57 B2DEBUG(20,
"DQMHistAnalysisOutputImages: event called.");
59 B2ERROR(
"No valid EventMetaData.");
63 TSeqCollection* seq = gROOT->GetListOfCanvases();
72 int saved_canvases = 0;
74 while ((obj = (TObject*)nextkey())) {
75 if (obj->IsA()->InheritsFrom(
"TCanvas")) {
76 TCanvas* c = (TCanvas*) obj;
79 auto it = clist.find(c->GetName());
80 if (it != clist.end()) {
81 process_canvas = it->second;
83 if (!process_canvas)
continue;
86 std::string cname = c->GetName();
87 create_directories((outpath / cname).parent_path());
88 if (
m_asPNG) c->Print((outpath / (cname +
".png")).c_str());
89 if (
m_asJPEG) c->Print((outpath / (cname +
".jpg")).c_str());
90 if (
m_asPDF) c->Print((outpath / (cname +
".pdf")).c_str());
91 if (
m_asROOT) c->Print((outpath / (cname +
".root")).c_str());
92 if (
m_asJSON) c->Print((outpath / (cname +
".json")).c_str());
95 B2INFO(
"Saved " << saved_canvases <<
" of " << seq->GetEntries() <<
" objects.");
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.