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"
18 # include <execinfo.h>
24 namespace lat {
class Regexp; }
91 template <
typename...
Args>
97 template <
typename...
Args>
103 template <
typename...
Args>
109 template <
typename...
Args>
115 template <
typename...
Args>
121 template <
typename...
Args>
127 template <
typename...
Args>
133 template <
typename...
Args>
139 template <
typename...
Args>
145 template <
typename...
Args>
151 template <
typename...
Args>
157 template <
typename...
Args>
189 template <
typename iFunc>
239 int nchX,
double lowX,
double highX);
242 int nchX,
double lowX,
double highX);
245 int nchX,
float *xbinsize);
248 int nchX,
float *xbinsize);
254 int nchX,
double lowX,
double highX);
257 int nchX,
double lowX,
double highX);
260 int nchX,
float *xbinsize);
263 int nchX,
float *xbinsize);
269 int nchX,
double lowX,
double highX);
272 int nchX,
double lowX,
double highX);
275 int nchX,
float *xbinsize);
278 int nchX,
float *xbinsize);
284 int nchX,
double lowX,
double highX,
285 int nchY,
double lowY,
double highY);
288 int nchX,
double lowX,
double highX,
289 int nchY,
double lowY,
double highY);
292 int nchX,
float *xbinsize,
293 int nchY,
float *ybinsize);
296 int nchX,
float *xbinsize,
297 int nchY,
float *ybinsize);
303 int nchX,
double lowX,
double highX,
304 int nchY,
double lowY,
double highY);
307 int nchX,
double lowX,
double highX,
308 int nchY,
double lowY,
double highY);
311 int nchX,
float *xbinsize,
312 int nchY,
float *ybinsize);
315 int nchX,
float *xbinsize,
316 int nchY,
float *ybinsize);
322 int nchX,
double lowX,
double highX,
323 int nchY,
double lowY,
double highY);
326 int nchX,
double lowX,
double highX,
327 int nchY,
double lowY,
double highY);
330 int nchX,
float *xbinsize,
331 int nchY,
float *ybinsize);
334 int nchX,
float *xbinsize,
335 int nchY,
float *ybinsize);
341 int nchX,
double lowX,
double highX,
342 int nchY,
double lowY,
double highY,
343 int nchZ,
double lowZ,
double highZ);
346 int nchX,
double lowX,
double highX,
347 int nchY,
double lowY,
double highY,
348 int nchZ,
double lowZ,
double highZ);
354 int nchX,
double lowX,
double highX,
355 int nchY,
double lowY,
double highY,
356 const char *option =
"s");
359 int nchX,
double lowX,
double highX,
360 int nchY,
double lowY,
double highY,
361 const char *option =
"s");
364 int nchX,
double lowX,
double highX,
365 double lowY,
double highY,
366 const char *option =
"s");
369 int nchX,
double lowX,
double highX,
370 double lowY,
double highY,
371 const char *option =
"s");
374 int nchX,
double *xbinsize,
375 int nchY,
double lowY,
double highY,
376 const char *option =
"s");
379 int nchX,
double *xbinsize,
380 int nchY,
double lowY,
double highY,
381 const char *option =
"s");
384 int nchX,
double *xbinsize,
385 double lowY,
double highY,
386 const char *option =
"s");
389 int nchX,
double *xbinsize,
390 double lowY,
double highY,
391 const char *option =
"s");
397 int nchX,
double lowX,
double highX,
398 int nchY,
double lowY,
double highY,
399 int nchZ,
double lowZ,
double highZ,
400 const char *option =
"s");
403 int nchX,
double lowX,
double highX,
404 int nchY,
double lowY,
double highY,
405 int nchZ,
double lowZ,
double highZ,
406 const char *option =
"s");
409 int nchX,
double lowX,
double highX,
410 int nchY,
double lowY,
double highY,
411 double lowZ,
double highZ,
412 const char *option =
"s");
415 int nchX,
double lowX,
double highX,
416 int nchY,
double lowY,
double highY,
417 double lowZ,
double highZ,
418 const char *option =
"s");
431 std::vector<std::string>
getSubdirs(
void)
const;
432 std::vector<std::string>
getMEs(
void)
const;
436 std::vector<MonitorElement *>
get(
unsigned int tag)
const;
439 void getContents(std::vector<std::string> &into,
bool showContents =
true)
const;
458 const uint32_t
run = 0,
463 bool overwrite =
false,
467 bool fileMustExist =
true);
470 bool fileMustExist =
true);
498 bool overwrite =
false,
502 bool fileMustExist =
true);
513 const uint32_t
run = 0,
514 const uint32_t
lumi = 0,
515 const uint32_t streamId = 0,
516 const uint32_t moduleId = 0)
const;
519 void getAllTags(std::vector<std::string> &into)
const;
522 uint32_t
lumi = 0)
const;
546 const char *context);
547 template <
class HISTO,
class COLLATE>
549 const char *context,
int kind,
550 HISTO *
h, COLLATE collate);
590 typedef std::set<MonitorElement>
MEMap;
591 typedef std::map<std::string, QCriterion *>
QCMap;
592 typedef std::map<std::string, QCriterion *(*)(const std::string &)>
QAMap;
623 #endif // DQMSERVICES_CORE_DQM_STORE_H
static void collateProfile2D(MonitorElement *me, TProfile2D *h)
QCriterion * getQCriterion(const std::string &qtname) const
bool compare_strings_reverse(std::string const &pattern, std::string const &input) const
std::pair< fastmatch *, QCriterion * > QTestSpec
MonitorElement * book1S(Args &&...args)
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 match(std::string const &s) const
bool readFile(const std::string &filename, bool overwrite=false, const std::string &path="", const std::string &prepend="", OpenRunDirs stripdirs=StripRunDirs, bool fileMustExist=true)
MonitorElement * bookProfile(Args &&...args)
static boost::mutex mutex
MonitorElement * findObject(const std::string &dir, const std::string &name, const uint32_t run=0, const uint32_t lumi=0, const uint32_t streamId=0, const uint32_t moduleId=0) const
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)
MonitorElement * bookInt(Args &&...args)
std::vector< MonitorElement * > getMatchingContents(const std::string &pattern, lat::Regexp::Syntax syntaxType=lat::Regexp::Wildcard) const
MonitorElement * bookString(Args &&...args)
MatchingHeuristicEnum matching_
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.
static std::string const input
void tag(MonitorElement *me, unsigned int myTag)
void disableSoftReset(MonitorElement *me)
static void collateProfile(MonitorElement *me, TProfile *h)
std::vector< MonitorElement * > getAllContents(const std::string &path, uint32_t runNumber=0, uint32_t lumi=0) const
fastmatch(std::string const &_fastString)
bool extract(TObject *obj, const std::string &dir, bool overwrite)
void removeContents(void)
erase all monitoring elements in current directory (not including subfolders);
MonitorElement * bookString(const char *name, const char *value)
Book string.
MonitorElement * bookProfile2D(Args &&...args)
std::set< MonitorElement > MEMap
static void collate1S(MonitorElement *me, TH1S *h)
bool isCollate(void) const
void removeElement(const std::string &name)
static bool checkBinningMatches(MonitorElement *me, TH1 *h)
MonitorElement * book1D(Args &&...args)
void tag(MonitorElement *, unsigned int)
MonitorElement * book2S(Args &&...args)
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
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_
void mergeAndResetMEsRunSummaryCache(uint32_t run, uint32_t streamId, uint32_t moduleId)
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)
void setCurrentFolder(const std::string &fullpath)
MonitorElement * initialise(MonitorElement *me, const std::string &path)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
MonitorElement * book2D(Args &&...args)
std::list< QTestSpec > QTestSpecs
static void collate2S(MonitorElement *me, TH2S *h)
static void collate2D(MonitorElement *me, TH2F *h)
void print_trace(const std::string &dir, const std::string &name)
int useQTestByMatch(const std::string &pattern, const std::string &qtname)
attach quality test <qc> to monitor elements matching <pattern>.
void bookTransaction(iFunc f, uint32_t run, uint32_t streamId, uint32_t moduleId)
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)
MonitorElement * book2DD(Args &&...args)
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)
QCriterion * createQTest(const std::string &algoname, const std::string &qtname)
MonitorElement * bookFloat(Args &&...args)
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.
MonitorElement * book3D(Args &&...args)
void mergeAndResetMEsLuminositySummaryCache(uint32_t run, uint32_t lumi, uint32_t streamId, uint32_t moduleId)
friend class edm::DQMHttpSource
std::set< std::string > dirs_
MonitorElement * book1DD(Args &&...args)
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)
bool compare_strings(std::string const &pattern, std::string const &input) const
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")