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>
25 namespace lat {
class Regexp; }
96 template <
typename...
Args>
102 template <
typename...
Args>
108 template <
typename...
Args>
114 template <
typename...
Args>
120 template <
typename...
Args>
126 template <
typename...
Args>
132 template <
typename...
Args>
138 template <
typename...
Args>
144 template <
typename...
Args>
150 template <
typename...
Args>
156 template <
typename...
Args>
162 template <
typename...
Args>
196 template <
typename...
Args>
201 template <
typename...
Args>
211 std::vector<std::string>
getMEs(
void);
240 template <
typename iFunc>
270 template <
typename iFunc>
279 template <
typename iFunc>
318 int nchX,
double lowX,
double highX);
321 int nchX,
double lowX,
double highX);
324 int nchX,
const float *xbinsize);
327 int nchX,
const float *xbinsize);
333 int nchX,
double lowX,
double highX);
336 int nchX,
double lowX,
double highX);
339 int nchX,
const float *xbinsize);
342 int nchX,
const float *xbinsize);
348 int nchX,
double lowX,
double highX);
351 int nchX,
double lowX,
double highX);
354 int nchX,
const float *xbinsize);
357 int nchX,
const float *xbinsize);
363 int nchX,
double lowX,
double highX,
364 int nchY,
double lowY,
double highY);
367 int nchX,
double lowX,
double highX,
368 int nchY,
double lowY,
double highY);
371 int nchX,
const float *xbinsize,
372 int nchY,
const float *ybinsize);
375 int nchX,
const float *xbinsize,
376 int nchY,
const float *ybinsize);
382 int nchX,
double lowX,
double highX,
383 int nchY,
double lowY,
double highY);
386 int nchX,
double lowX,
double highX,
387 int nchY,
double lowY,
double highY);
390 int nchX,
const float *xbinsize,
391 int nchY,
const float *ybinsize);
394 int nchX,
const float *xbinsize,
395 int nchY,
const float *ybinsize);
401 int nchX,
double lowX,
double highX,
402 int nchY,
double lowY,
double highY);
405 int nchX,
double lowX,
double highX,
406 int nchY,
double lowY,
double highY);
409 int nchX,
const float *xbinsize,
410 int nchY,
const float *ybinsize);
413 int nchX,
const float *xbinsize,
414 int nchY,
const float *ybinsize);
420 int nchX,
double lowX,
double highX,
421 int nchY,
double lowY,
double highY,
422 int nchZ,
double lowZ,
double highZ);
425 int nchX,
double lowX,
double highX,
426 int nchY,
double lowY,
double highY,
427 int nchZ,
double lowZ,
double highZ);
433 int nchX,
double lowX,
double highX,
434 int nchY,
double lowY,
double highY,
435 const char *option =
"s");
438 int nchX,
double lowX,
double highX,
439 int nchY,
double lowY,
double highY,
440 const char *option =
"s");
443 int nchX,
double lowX,
double highX,
444 double lowY,
double highY,
445 const char *option =
"s");
448 int nchX,
double lowX,
double highX,
449 double lowY,
double highY,
450 const char *option =
"s");
453 int nchX,
const double *xbinsize,
454 int nchY,
double lowY,
double highY,
455 const char *option =
"s");
458 int nchX,
const double *xbinsize,
459 int nchY,
double lowY,
double highY,
460 const char *option =
"s");
463 int nchX,
const double *xbinsize,
464 double lowY,
double highY,
465 const char *option =
"s");
468 int nchX,
const double *xbinsize,
469 double lowY,
double highY,
470 const char *option =
"s");
476 int nchX,
double lowX,
double highX,
477 int nchY,
double lowY,
double highY,
478 int nchZ,
double lowZ,
double highZ,
479 const char *option =
"s");
482 int nchX,
double lowX,
double highX,
483 int nchY,
double lowY,
double highY,
484 int nchZ,
double lowZ,
double highZ,
485 const char *option =
"s");
488 int nchX,
double lowX,
double highX,
489 int nchY,
double lowY,
double highY,
490 double lowZ,
double highZ,
491 const char *option =
"s");
494 int nchX,
double lowX,
double highX,
495 int nchY,
double lowY,
double highY,
496 double lowZ,
double highZ,
497 const char *option =
"s");
510 std::vector<std::string>
getSubdirs(
void)
const;
511 std::vector<std::string>
getMEs(
void)
const;
515 std::vector<MonitorElement *>
get(
unsigned int tag)
const;
518 void getContents(std::vector<std::string> &into,
bool showContents =
true)
const;
535 const uint32_t
run = 0,
536 const uint32_t
lumi = 0,
537 const bool resetMEsAfterWriting =
false);
542 const uint32_t
run = 0,
543 const uint32_t
lumi = 0,
547 const bool resetMEsAfterWriting =
false);
549 bool overwrite =
false,
553 bool fileMustExist =
true);
556 bool fileMustExist =
true);
585 bool overwrite =
false,
589 bool fileMustExist =
true);
591 bool overwrite =
false,
595 bool fileMustExist =
true);
606 const uint32_t
run = 0,
607 const uint32_t
lumi = 0,
608 const uint32_t streamId = 0,
609 const uint32_t moduleId = 0)
const;
617 void getAllTags(std::vector<std::string> &into)
const;
620 uint32_t
lumi = 0)
const;
647 const char *context);
648 template <
class HISTO,
class COLLATE>
650 const char *context,
int kind,
651 HISTO *
h, COLLATE collate);
691 typedef std::set<MonitorElement>
MEMap;
692 typedef std::map<std::string, QCriterion *>
QCMap;
693 typedef std::map<std::string, QCriterion *(*)(const std::string &)>
QAMap;
732 #endif // DQMSERVICES_CORE_DQM_STORE_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
std::vector< MonitorElement * > getContents(Args &&...args)
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)
static void collate3D(MonitorElement *me, TH3F *h, unsigned verbose)
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 collateProfile(MonitorElement *me, TProfile *h, unsigned verbose)
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.
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.
void markForDeletion(uint32_t run, uint32_t lumi)
const std::string & pwd(void)
static void collate2DD(MonitorElement *me, TH2D *h, unsigned verbose)
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)
std::vector< MonitorElement * > getAllContents(const std::string &path, uint32_t runNumber=0, uint32_t lumi=0) const
fastmatch(std::string const &_fastString)
void removeContents(void)
erase all monitoring elements in current directory (not including subfolders);
tuple path
else: Piece not in the list, fine.
void get_info(const dqmstorepb::ROOTFilePB_Histo &, std::string &dirname, std::string &objname, TObject **obj)
MonitorElement * bookString(const char *name, const char *value)
Book string.
MonitorElement * bookProfile2D(Args &&...args)
std::set< MonitorElement > MEMap
bool isCollate(void) const
void removeElement(const std::string &name)
static void collateProfile2D(MonitorElement *me, TProfile2D *h, unsigned verbose)
MonitorElement * book1D(Args &&...args)
void tag(MonitorElement *, unsigned int)
MonitorElement * book2S(Args &&...args)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
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)
TObject * extractNextObject(TBufferFile &) const
std::vector< MonitorElement * > getContents(const std::string &path) const
std::string readSelectedDirectory_
std::vector< std::string > getMEs(void)
void mergeAndResetMEsRunSummaryCache(uint32_t run, uint32_t streamId, uint32_t moduleId)
bool dirExists(const std::string &path) const
true if directory exists
void savePB(const std::string &filename, const std::string &path="", const uint32_t run=0, const uint32_t lumi=0, const bool resetMEsAfterWriting=false)
void getAllTags(std::vector< std::string > &into) const
const DQMStore & operator=(const DQMStore &)
bool dirExists(const std::string &path)
bool load(const std::string &filename, OpenRunDirs stripdirs=StripRunDirs, bool fileMustExist=true)
static void collate1DD(MonitorElement *me, TH1D *h, unsigned verbose)
void tagAllContents(const std::string &path, unsigned int myTag)
void setCurrentFolder(const std::string &fullpath)
MonitorElement * initialise(MonitorElement *me, const std::string &path)
bool containsAnyMonitorable(const std::string &path)
void tagContents(const std::string &, unsigned int)
MonitorElement * book2D(Args &&...args)
std::list< QTestSpec > QTestSpecs
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>.
std::vector< MonitorElement * > getAllContents(const std::string &path, uint32_t runNumber=0, uint32_t lumi=0)
static void collate1D(MonitorElement *me, TH1F *h, unsigned verbose)
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
std::vector< std::string > getSubdirs(void)
void setCurrentFolder(const std::string &fullpath)
unsigned int readDirectory(TFile *file, bool overwrite, const std::string &path, const std::string &prepend, const std::string &curdir, OpenRunDirs stripdirs)
bool forceResetOnBeginLumi_
bool extract(TObject *obj, const std::string &dir, bool overwrite, bool collateHistograms)
void tagContents(const std::string &path, unsigned int myTag)
tag all children of folder (does NOT include subfolders)
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, const uint32_t lumi=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE", const bool resetMEsAfterWriting=false)
std::map< std::string, QCriterion *(*)(const std::string &)> QAMap
bool readFilePB(const std::string &filename, bool overwrite=false, const std::string &path="", const std::string &prepend="", OpenRunDirs stripdirs=StripRunDirs, bool fileMustExist=true)
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)
static void collate1S(MonitorElement *me, TH1S *h, unsigned verbose)
void meBookerGetter(iFunc f)
QCriterion * createQTest(const std::string &algoname, const std::string &qtname)
MonitorElement * bookFloat(Args &&...args)
static bool checkBinningMatches(MonitorElement *me, TH1 *h, unsigned verbose)
void showDirStructure(void) const
static void collate2D(MonitorElement *me, TH2F *h, unsigned verbose)
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_
void removeElement(Args &&...args)
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)
bool compare_strings(std::string const &pattern, std::string const &input) const
void setCurrentFolder(const std::string &fullpath)
static void collate2S(MonitorElement *me, TH2S *h, unsigned verbose)
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")