Skip to content

Commit e673a51

Browse files
mfasDadavidrohr
authored andcommitted
[EMCAL-610] Move debug printouts to LOG(DEBUG) and decrease verbosity
1 parent bce63b4 commit e673a51

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

Detectors/EMCAL/simulation/src/RawCreator.cxx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <string>
1313
#include <vector>
1414
#include "Framework/Logger.h"
15+
#include "FairLogger.h"
1516

1617
#include <boost/program_options.hpp>
1718

@@ -68,6 +69,11 @@ int main(int argc, const char** argv)
6869
exit(2);
6970
}
7071

72+
auto debuglevel = vm["debug"].as<uint32_t>();
73+
if (debuglevel > 0) {
74+
FairLogger::GetLogger()->SetLogScreenLevel("DEBUG");
75+
}
76+
7177
o2::conf::ConfigurableParam::updateFromString(vm["configKeyValues"].as<std::string>());
7278

7379
auto digitfilename = vm["input-file"].as<std::string>(),

Detectors/EMCAL/simulation/src/RawWriter.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ bool RawWriter::processTrigger(const o2::emcal::TriggerRecord& trg)
117117
}
118118

119119
// Create and fill DMA pages for each channel
120-
std::cout << "encode data" << std::endl;
120+
LOG(DEBUG) << "encode data";
121121
for (auto srucont : mSRUdata) {
122122

123123
std::vector<char> payload; // this must be initialized per SRU, becuase pages are per SRU, therefore the payload was not reset.
@@ -181,7 +181,7 @@ bool RawWriter::processTrigger(const o2::emcal::TriggerRecord& trg)
181181
LOG(DEBUG1) << "Adding payload with size " << payload.size() << " (" << payload.size() / 4 << " ALTRO words)";
182182
mRawWriter->addData(ddlid, crorc, link, 0, trg.getBCData(), payload, false, trg.getTriggerBits());
183183
}
184-
std::cout << "Done" << std::endl;
184+
LOG(DEBUG) << "Done";
185185
return true;
186186
}
187187

0 commit comments

Comments
 (0)