14#include <framework/core/ModuleParam.templateDetails.h>
15#include <dqm/analysis/modules/DQMHistSnapshots.h>
37 B2DEBUG(1,
"DQMHistSnapshots: Constructor done.");
46 B2DEBUG(20,
"DQMHistSnapshots: initialized.");
53 B2DEBUG(20,
"DQMHistSnapshots: beginRun called.");
59 if (it->histo->GetName() == a)
69 time_t cur_time = time(NULL);
82 n->histo = (TH1*) it.second.getHist()->Clone();
85 auto dirname = s.at(0);
87 std::string canvas_name = dirname +
"/c_" + hname;
93 auto h = it.second.getHist();
95 if (h->GetEntries() > n->histo->GetEntries()) {
97 n->histo = (TH1*)h->Clone();
103 if (n->stale == 1 && n->canvas != NULL) {
104 h->SetTitle((h->GetTitle() +
string(
" [STALLED]")).c_str());
113 B2DEBUG(20,
"DQMHistSnapshots: endRun called");
119 B2DEBUG(20,
"DQMHistSnapshots: terminate called");
The base class for the histogram analysis module.
TCanvas * findCanvas(TString cname)
Find canvas by name.
std::vector< std::string > StringSplit(const std::string &s, const char delim)
Helper function for string token split.
static HistList & getHistList()
Get the list of the histograms.
~DQMHistSnapshotsModule()
Destructor.
void initialize() override final
Initializer.
int m_check_interval
Interval between checks in second.
std::vector< SSNODE * > m_ssnode
List of snapshots.
DQMHistSnapshotsModule()
Constructor.
void terminate() override final
This method is called at the end of the event processing.
void event() override final
This method is called for each event.
void endRun() override final
This method is called if the current run ends.
time_t m_last_check
The time for the last check.
void beginRun() override final
Called when entering a new run.
SSNODE * find_snapshot(TString a)
Find a snapshot by the histogram's name.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.
The struct for the snapshots.