1 #ifndef DQMSERVICES_CORE_DQM_STORE_H
2 # define DQMSERVICES_CORE_DQM_STORE_H
4 # if __GNUC__ && ! defined DQM_DEPRECATED
5 # define DQM_DEPRECATED __attribute__((deprecated))
9 # include "classlib/utils/Regexp.h"
17 namespace lat {
class Regexp; }
60 const std::string &
pwd(
void)
const;
62 void cd(
const std::string &subdir);
80 const std::string &
value);
84 int nchX,
double lowX,
double highX);
86 const std::string &
title,
87 int nchX,
double lowX,
double highX);
90 int nchX,
float *xbinsize);
92 const std::string &
title,
93 int nchX,
float *xbinsize);
99 int nchX,
double lowX,
double highX);
101 const std::string &
title,
102 int nchX,
double lowX,
double highX);
105 int nchX,
float *xbinsize);
107 const std::string &
title,
108 int nchX,
float *xbinsize);
114 int nchX,
double lowX,
double highX);
116 const std::string &
title,
117 int nchX,
double lowX,
double highX);
120 int nchX,
float *xbinsize);
122 const std::string &
title,
123 int nchX,
float *xbinsize);
129 int nchX,
double lowX,
double highX,
130 int nchY,
double lowY,
double highY);
132 const std::string &
title,
133 int nchX,
double lowX,
double highX,
134 int nchY,
double lowY,
double highY);
137 int nchX,
float *xbinsize,
138 int nchY,
float *ybinsize);
140 const std::string &
title,
141 int nchX,
float *xbinsize,
142 int nchY,
float *ybinsize);
148 int nchX,
double lowX,
double highX,
149 int nchY,
double lowY,
double highY);
151 const std::string &
title,
152 int nchX,
double lowX,
double highX,
153 int nchY,
double lowY,
double highY);
156 int nchX,
float *xbinsize,
157 int nchY,
float *ybinsize);
159 const std::string &
title,
160 int nchX,
float *xbinsize,
161 int nchY,
float *ybinsize);
167 int nchX,
double lowX,
double highX,
168 int nchY,
double lowY,
double highY);
170 const std::string &
title,
171 int nchX,
double lowX,
double highX,
172 int nchY,
double lowY,
double highY);
175 int nchX,
float *xbinsize,
176 int nchY,
float *ybinsize);
178 const std::string &
title,
179 int nchX,
float *xbinsize,
180 int nchY,
float *ybinsize);
186 int nchX,
double lowX,
double highX,
187 int nchY,
double lowY,
double highY,
188 int nchZ,
double lowZ,
double highZ);
190 const std::string &
title,
191 int nchX,
double lowX,
double highX,
192 int nchY,
double lowY,
double highY,
193 int nchZ,
double lowZ,
double highZ);
199 int nchX,
double lowX,
double highX,
200 int nchY,
double lowY,
double highY,
201 const char *option =
"s");
203 const std::string &
title,
204 int nchX,
double lowX,
double highX,
205 int nchY,
double lowY,
double highY,
206 const char *option =
"s");
209 int nchX,
double lowX,
double highX,
210 double lowY,
double highY,
211 const char *option =
"s");
213 const std::string &
title,
214 int nchX,
double lowX,
double highX,
215 double lowY,
double highY,
216 const char *option =
"s");
219 int nchX,
double *xbinsize,
220 int nchY,
double lowY,
double highY,
221 const char *option =
"s");
223 const std::string &
title,
224 int nchX,
double *xbinsize,
225 int nchY,
double lowY,
double highY,
226 const char *option =
"s");
229 int nchX,
double *xbinsize,
230 double lowY,
double highY,
231 const char *option =
"s");
233 const std::string &
title,
234 int nchX,
double *xbinsize,
235 double lowY,
double highY,
236 const char *option =
"s");
242 int nchX,
double lowX,
double highX,
243 int nchY,
double lowY,
double highY,
244 int nchZ,
double lowZ,
double highZ,
245 const char *option =
"s");
247 const std::string &
title,
248 int nchX,
double lowX,
double highX,
249 int nchY,
double lowY,
double highY,
250 int nchZ,
double lowZ,
double highZ,
251 const char *option =
"s");
254 int nchX,
double lowX,
double highX,
255 int nchY,
double lowY,
double highY,
256 double lowZ,
double highZ,
257 const char *option =
"s");
259 const std::string &
title,
260 int nchX,
double lowX,
double highX,
261 int nchY,
double lowY,
double highY,
262 double lowZ,
double highZ,
263 const char *option =
"s");
270 void tag(
const std::string &
path,
unsigned int myTag);
276 std::vector<std::string>
getSubdirs(
void)
const;
277 std::vector<std::string>
getMEs(
void)
const;
281 std::vector<MonitorElement *>
get(
unsigned int tag)
const;
282 std::vector<MonitorElement *>
getContents(
const std::string &
path)
const;
283 std::vector<MonitorElement *>
getContents(
const std::string &
path,
unsigned int tag)
const;
284 void getContents(std::vector<std::string> &into,
bool showContents =
true)
const;
291 void rmdir(
const std::string &fullpath);
300 const std::string &
path =
"",
301 const std::string &
pattern =
"",
302 const std::string &rewrite =
"",
305 const std::string &fileupdate =
"RECREATE");
307 bool overwrite =
false,
308 const std::string &
path =
"",
309 const std::string &prepend =
"",
311 bool fileMustExist =
true);
314 bool fileMustExist =
true);
324 void useQTest(
const std::string &
dir,
const std::string &qtname);
338 bool overwrite =
false,
339 const std::string &
path =
"",
340 const std::string &prepend =
"",
342 bool fileMustExist =
true);
346 const std::string &
path,
347 const std::string &prepend,
348 const std::string &curdir,
354 void getAllTags(std::vector<std::string> &into)
const;
356 std::vector<MonitorElement*>
getMatchingContents(
const std::string &
pattern, lat::Regexp::Syntax syntaxType = lat::Regexp::Wildcard)
const;
364 bool extract(TObject *
obj,
const std::string &
dir,
bool overwrite);
369 const std::string &
name,
370 const char *context);
371 template <
class HISTO,
class COLLATE>
373 const char *context,
int kind,
374 HISTO *
h, COLLATE collate);
410 typedef std::pair<lat::Regexp *, QCriterion *>
QTestSpec;
412 typedef std::set<MonitorElement>
MEMap;
413 typedef std::map<std::string, QCriterion *>
QCMap;
414 typedef std::map<std::string, QCriterion *(*)(const std::string &)>
QAMap;
437 #endif // DQMSERVICES_CORE_DQM_STORE_H
static void collateProfile2D(MonitorElement *me, TProfile2D *h)
QCriterion * getQCriterion(const std::string &qtname) const
DQMStore(const edm::ParameterSet &pset, edm::ActivityRegistry &)
MonitorElement * book2S(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2S histogram.
std::map< std::string, QCriterion * > QCMap
bool containsAnyMonitorable(const std::string &path) const
bool isCollateME(MonitorElement *me) const
bool cdInto(const std::string &path) const
int getStatus(const std::string &path="") const
std::vector< std::string > getSubdirs(void) const
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
void rmdir(const std::string &fullpath)
bool readFile(const std::string &filename, bool overwrite=false, const std::string &path="", const std::string &prepend="", OpenRunDirs stripdirs=StripRunDirs, bool fileMustExist=true)
static void collate3D(MonitorElement *me, TH3F *h)
MonitorElement * book3D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ)
Book 3D histogram.
static void collate1D(MonitorElement *me, TH1F *h)
void cd(void)
go to top directory (ie. root)
MonitorElement * book2DD(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D double histogram.
static void collate1DD(MonitorElement *me, TH1D *h)
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
std::vector< MonitorElement * > getMatchingContents(const std::string &pattern, lat::Regexp::Syntax syntaxType=lat::Regexp::Wildcard) const
MonitorElement * book1DD(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
void initializeFrom(const edm::ParameterSet &)
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
MonitorElement * bookFloat(const char *name)
Book float.
std::vector< MonitorElement * > getAllContents(const std::string &path) const
void tag(MonitorElement *me, unsigned int myTag)
void disableSoftReset(MonitorElement *me)
static void collateProfile(MonitorElement *me, TProfile *h)
bool extract(TObject *obj, const std::string &dir, bool overwrite)
tuple obj
Example code starts here #.
void removeContents(void)
erase all monitoring elements in current directory (not including subfolders);
MonitorElement * bookString(const char *name, const char *value)
Book string.
std::set< MonitorElement > MEMap
static void collate1S(MonitorElement *me, TH1S *h)
void removeElement(const std::string &name)
static bool checkBinningMatches(MonitorElement *me, TH1 *h)
MonitorElement * findObject(const std::string &dir, const std::string &name) const
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
void setVerbose(unsigned level)
void softReset(MonitorElement *me)
std::vector< MonitorElement * > getContents(const std::string &path) const
std::string readSelectedDirectory_
bool dirExists(const std::string &path) const
true if directory exists
void getAllTags(std::vector< std::string > &into) const
const DQMStore & operator=(const DQMStore &)
bool load(const std::string &filename, OpenRunDirs stripdirs=StripRunDirs, bool fileMustExist=true)
void tagAllContents(const std::string &path, unsigned int myTag)
MonitorElement * initialise(MonitorElement *me, const std::string &path)
std::list< QTestSpec > QTestSpecs
static void collate2S(MonitorElement *me, TH2S *h)
static void collate2D(MonitorElement *me, TH2F *h)
int useQTestByMatch(const std::string &pattern, const std::string &qtname)
attach quality test <qc> to monitor elements matching <pattern>.
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
friend class DQMStoreExample
unsigned int readDirectory(TFile *file, bool overwrite, const std::string &path, const std::string &prepend, const std::string &curdir, OpenRunDirs stripdirs)
static void collate2DD(MonitorElement *me, TH2D *h)
void tagContents(const std::string &path, unsigned int myTag)
tag all children of folder (does NOT include subfolders)
std::map< std::string, QCriterion *(*)(const std::string &)> QAMap
void useQTest(const std::string &dir, const std::string &qtname)
void goUp(void)
equivalent to "cd .."
bool open(const std::string &filename, bool overwrite=false, const std::string &path="", const std::string &prepend="", OpenRunDirs stripdirs=KeepRunDirs, bool fileMustExist=true)
static const int STATUS_OK
void setAccumulate(MonitorElement *me, bool flag)
std::pair< lat::Regexp *, QCriterion * > QTestSpec
QCriterion * createQTest(const std::string &algoname, const std::string &qtname)
void showDirStructure(void) const
MonitorElement * bookInt(const char *name)
Book int.
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
std::set< std::string > dirs_
MonitorElement * book1S(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
void makeDirectory(const std::string &path)
get folder corresponding to inpath wrt to root (create subdirs if necessary)
void setCurrentFolder(const std::string &fullpath)
const std::string & pwd(void) const
MonitorElement * bookProfile2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, const char *option="s")