Skip to content

Commit 09c8d2f

Browse files
committed
using O2 LOG instead of cout
1 parent 033b88c commit 09c8d2f

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

PWGDQ/TableProducer/tableMakerMC_withAssoc.cxx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
#include <Framework/Array2D.h>
5454
#include <Framework/Configurable.h>
5555
#include <Framework/InitContext.h>
56+
#include <Framework/Logger.h>
5657
#include <Framework/runDataProcessing.h>
5758
#include <ReconstructionDataFormats/GlobalFwdTrack.h>
5859
#include <ReconstructionDataFormats/TrackFwd.h>
@@ -67,17 +68,13 @@
6768
#include <array>
6869
#include <cstdint>
6970
#include <cstdlib>
70-
#include <iostream>
7171
#include <map>
7272
#include <memory>
7373
#include <string>
7474
#include <unordered_map>
7575
#include <utility>
7676
#include <vector>
7777

78-
using std::cout;
79-
using std::endl;
80-
8178
using namespace o2;
8279
using namespace o2::framework;
8380
using namespace o2::framework::expressions;
@@ -142,13 +139,15 @@ inline TString* varNames() { return static_cast<TString*>(VarManager::fgVariable
142139
inline TString* varUnits() { return static_cast<TString*>(VarManager::fgVariableUnits); }
143140
} // namespace dqtablemakermc_helpers
144141

142+
/*
145143
template <typename TMap>
146144
void PrintBitMap(TMap map, int nbits)
147145
{
148146
for (int i = 0; i < nbits; i++) {
149147
cout << ((map & (TMap(1) << i)) > 0 ? "1" : "0");
150148
}
151149
}
150+
*/
152151

153152
struct TableMakerMC {
154153

@@ -1459,8 +1458,8 @@ struct TableMakerMC {
14591458
mothers.push_back(fLabelsMap.find(m)->second);
14601459
}
14611460
} else {
1462-
cout << "Mother label (" << m << ") exceeds the McParticles size (" << mcParticles.size() << ")" << endl;
1463-
cout << " Check the MC generator" << endl;
1461+
LOG(warn) << "Mother label (" << m << ") exceeds the McParticles size (" << mcParticles.size() << ")";
1462+
LOG(warn) << "Check the MC generator";
14641463
}
14651464
}
14661465
}
@@ -1476,8 +1475,8 @@ struct TableMakerMC {
14761475
daughters.push_back(fLabelsMap.find(d)->second);
14771476
}
14781477
} else {
1479-
cout << "Daughter label (" << d << ") exceeds the McParticles size (" << mcParticles.size() << ")" << endl;
1480-
cout << " Check the MC generator" << endl;
1478+
LOG(warn) << "Daughter label (" << d << ") exceeds the McParticles size (" << mcParticles.size() << ")";
1479+
LOG(warn) << "Check the MC generator";
14811480
}
14821481
}
14831482
}
@@ -1507,7 +1506,7 @@ struct TableMakerMC {
15071506
void DefineHistograms(const TString& histClasses)
15081507
{
15091508
std::unique_ptr<TObjArray> objArray(histClasses.Tokenize(";"));
1510-
for (Int_t iclass = 0; iclass < objArray->GetEntries(); ++iclass) {
1509+
for (int iclass = 0; iclass < objArray->GetEntries(); ++iclass) {
15111510
TString classStr = objArray->At(iclass)->GetName();
15121511
if (fConfigHistOutput.fConfigQA) {
15131512
fHistMan->AddHistClass(classStr.Data());

0 commit comments

Comments
 (0)