 |
Belle II Software
release-05-02-19
|
9 #include <dqm/analysis/modules/DQMHistAnalysis.h>
34 DQMHistAnalysisModule::DQMHistAnalysisModule() :
Module()
41 DQMHistAnalysisModule::~DQMHistAnalysisModule()
48 if (dirname.size() > 0) {
49 g_hist.insert(HistList::value_type(dirname +
"/" + histname, h));
51 g_hist.insert(HistList::value_type(histname, h));
61 B2WARNING(
"MonitoringObject " << objName <<
" listed as being in memfile but points to nowhere. New Object will be made.");
67 g_monObj.insert(MonObjList::value_type(objName, obj));
90 B2ERROR(
"Histogram " << histname <<
" listed as being in memfile but points to nowhere.");
93 B2INFO(
"Histogram " << histname <<
" not in memfile.");
99 TDirectory* d = gROOT;
100 TString myl = histname;
103 while (myl.Tokenize(tok, from,
"/")) {
107 if (myl.Tokenize(dummy, f,
"/")) {
108 auto e = d->GetDirectory(tok);
110 B2INFO(
"Cd Dir " << tok);
124 g_hist[histname] = found_hist;
132 if (dirname.size() > 0) {
133 return findHist(dirname +
"/" + histname);
141 TObject* obj = histdir->FindObject(histname);
143 if (obj->IsA()->InheritsFrom(
"TH1")) {
144 B2INFO(
"Histogram " << histname <<
" found in mem");
148 B2INFO(
"Histogram " << histname <<
" NOT found in mem");
160 B2ERROR(
"MonitoringObject " << objName <<
" listed as being in memfile but points to nowhere.");
163 B2INFO(
"MonitoringObject " << objName <<
" not in memfile.");
173 g_vint.insert(IntValueList::value_type(parname, vint));
175 B2ERROR(parname +
" is already registered as non-int data type");
185 g_vfloat.insert(FloatValueList::value_type(parname, vfloat));
187 B2ERROR(parname +
" is already registered as non-float data type");
197 g_text.insert(TextList::value_type(parname, text));
199 B2ERROR(parname +
" is already registered as non-text data type");
static const MonObjList & getMonObjList()
Get the list of MonitoringObjects.
static const HistList & getHistList()
Get the list of the histograms.
void setDescription(const std::string &description)
Sets the description of the module.
static void setFloatValue(const std::string &parname, float vfloat)
Set the float value of the parameter.
static ParamTypeList g_parname
The list of module parameter types.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
static void setIntValue(const std::string &parname, int vint)
Set the integer value of the parameter.
static TH1 * findHist(const std::string &histname)
Find histogram.
@ c_ParamTEXT
The string type for module parameter.
std::map< std::string, std::string > TextList
The type of list of string module parameter.
static HistList g_hist
The list of histograms.
std::map< std::string, int > IntValueList
The type of list of integer module parameter.
static FloatValueList g_vfloat
The list of float module parameter.
Abstract base class for different kinds of events.
std::map< std::string, TH1 * > HistList
The type of list of histograms.
static MonObjList g_monObj
The list of MonitoringObjects.
std::map< std::string, float > FloatValueList
The type of list of float module parameter.
static void setText(const std::string &parname, const std::string &text)
Set the string value of the parameter.
static TextList g_text
The list of string module parameter.
@ c_ParamFLOAT
The float type for module parameter.
static IntValueList g_vint
The list of integer module parameter.
static MonitoringObject * findMonitoringObject(const std::string &objName)
Find MonitoringObject.
std::map< std::string, EParamType > ParamTypeList
The type of list of module parameter types.
std::map< std::string, MonitoringObject * > MonObjList
The type of list of MonitoringObjects.
static MonitoringObject * getMonitoringObject(const std::string &histname)
Get MonitoringObject with given name (new object is created if non-existing)
MonitoringObject is a basic object to hold data for the run-dependency monitoring Run summary TCanvas...
static void addHist(const std::string &dirname, const std::string &histname, TH1 *h)
Add histogram.
@ c_ParamINT
The integer type for module parameter.