1717
1818// o2 includes
1919#include " TPCQC/GPUErrorQA.h"
20- #include " GPUDefMacros .h"
20+ #include " GPUErrors .h"
2121
2222ClassImp (o2::tpc::qc::GPUErrorQA);
2323
@@ -28,21 +28,13 @@ void GPUErrorQA::initializeHistograms()
2828{
2929 TH1::AddDirectory (false );
3030
31- // get gpu error names
32- // copied from GPUErrors.h
33- static std::unordered_map<uint32_t , const char *> errorNames = {
34- #define GPUCA_ERROR_CODE (num, name, ...) {num, GPUCA_M_STR (name)},
35- #include " GPUErrorCodes.h"
36- #undef GPUCA_ERROR_CODE
37- };
38-
3931 // 1D histogram counting all reported errors
40- mMapHist [" ErrorCounter" ] = std::make_unique<TH1I>(" ErrorCounter" , " ErrorCounter" , errorNames.size (), -0.5 , errorNames.size () - 0.5 );
32+ mMapHist [" ErrorCounter" ] = std::make_unique<TH1I>(" ErrorCounter" , " ErrorCounter" , o2::gpu:: errorNames.size (), -0.5 , o2::gpu:: errorNames.size () - 0.5 );
4133 mMapHist [" ErrorCounter" ]->GetXaxis ()->SetTitle (" Error Codes" );
4234 mMapHist [" ErrorCounter" ]->GetYaxis ()->SetTitle (" Entries" );
4335 // for convienence, label each bin with the error name
4436 for (size_t bin = 1 ; bin < mMapHist [" ErrorCounter" ]->GetNbinsX (); bin++) {
45- auto const & it = errorNames.find (bin);
37+ auto const & it = o2::gpu:: errorNames.find (bin);
4638 mMapHist [" ErrorCounter" ]->GetXaxis ()->SetBinLabel (bin, it->second );
4739 }
4840}
@@ -68,7 +60,7 @@ void GPUErrorQA::dumpToFile(const std::string filename)
6860 auto f = std::unique_ptr<TFile>(TFile::Open (filename.data (), " recreate" ));
6961 TObjArray arr;
7062 arr.SetName (" GPUErrorQA_Hists" );
71- for (const auto & [name, hist] : mMapHist ) {
63+ for ([[maybe_unused]] const auto & [name, hist] : mMapHist ) {
7264 arr.Add (hist.get ());
7365 }
7466 arr.Write (arr.GetName (), TObject::kSingleKey );
0 commit comments