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>
195 template <
typename...
Args>
200 template <
typename...
Args>
210 std::vector<std::string>
getMEs(
void);
239 template <
typename iFunc>
269 template <
typename iFunc>
278 template <
typename iFunc>
317 int nchX,
double lowX,
double highX);
320 int nchX,
double lowX,
double highX);
323 int nchX,
const float *xbinsize);
326 int nchX,
const float *xbinsize);
332 int nchX,
double lowX,
double highX);
335 int nchX,
double lowX,
double highX);
338 int nchX,
const float *xbinsize);
341 int nchX,
const float *xbinsize);
347 int nchX,
double lowX,
double highX);
350 int nchX,
double lowX,
double highX);
353 int nchX,
const float *xbinsize);
356 int nchX,
const float *xbinsize);
362 int nchX,
double lowX,
double highX,
363 int nchY,
double lowY,
double highY);
366 int nchX,
double lowX,
double highX,
367 int nchY,
double lowY,
double highY);
370 int nchX,
const float *xbinsize,
371 int nchY,
const float *ybinsize);
374 int nchX,
const float *xbinsize,
375 int nchY,
const float *ybinsize);
381 int nchX,
double lowX,
double highX,
382 int nchY,
double lowY,
double highY);
385 int nchX,
double lowX,
double highX,
386 int nchY,
double lowY,
double highY);
389 int nchX,
const float *xbinsize,
390 int nchY,
const float *ybinsize);
393 int nchX,
const float *xbinsize,
394 int nchY,
const float *ybinsize);
400 int nchX,
double lowX,
double highX,
401 int nchY,
double lowY,
double highY);
404 int nchX,
double lowX,
double highX,
405 int nchY,
double lowY,
double highY);
408 int nchX,
const float *xbinsize,
409 int nchY,
const float *ybinsize);
412 int nchX,
const float *xbinsize,
413 int nchY,
const float *ybinsize);
419 int nchX,
double lowX,
double highX,
420 int nchY,
double lowY,
double highY,
421 int nchZ,
double lowZ,
double highZ);
424 int nchX,
double lowX,
double highX,
425 int nchY,
double lowY,
double highY,
426 int nchZ,
double lowZ,
double highZ);
432 int nchX,
double lowX,
double highX,
433 int nchY,
double lowY,
double highY,
434 const char *option =
"s");
437 int nchX,
double lowX,
double highX,
438 int nchY,
double lowY,
double highY,
439 const char *option =
"s");
442 int nchX,
double lowX,
double highX,
443 double lowY,
double highY,
444 const char *option =
"s");
447 int nchX,
double lowX,
double highX,
448 double lowY,
double highY,
449 const char *option =
"s");
452 int nchX,
const double *xbinsize,
453 int nchY,
double lowY,
double highY,
454 const char *option =
"s");
457 int nchX,
const double *xbinsize,
458 int nchY,
double lowY,
double highY,
459 const char *option =
"s");
462 int nchX,
const double *xbinsize,
463 double lowY,
double highY,
464 const char *option =
"s");
467 int nchX,
const double *xbinsize,
468 double lowY,
double highY,
469 const char *option =
"s");
475 int nchX,
double lowX,
double highX,
476 int nchY,
double lowY,
double highY,
477 int nchZ,
double lowZ,
double highZ,
478 const char *option =
"s");
481 int nchX,
double lowX,
double highX,
482 int nchY,
double lowY,
double highY,
483 int nchZ,
double lowZ,
double highZ,
484 const char *option =
"s");
487 int nchX,
double lowX,
double highX,
488 int nchY,
double lowY,
double highY,
489 double lowZ,
double highZ,
490 const char *option =
"s");
493 int nchX,
double lowX,
double highX,
494 int nchY,
double lowY,
double highY,
495 double lowZ,
double highZ,
496 const char *option =
"s");
509 std::vector<std::string>
getSubdirs(
void)
const;
510 std::vector<std::string>
getMEs(
void)
const;
514 std::vector<MonitorElement *>
get(
unsigned int tag)
const;
517 void getContents(std::vector<std::string> &into,
bool showContents =
true)
const;
534 const uint32_t
run = 0,
535 const uint32_t
lumi = 0,
536 const bool resetMEsAfterWriting =
false);
541 const uint32_t
run = 0,
542 const uint32_t
lumi = 0,
546 const bool resetMEsAfterWriting =
false);
548 bool overwrite =
false,
552 bool fileMustExist =
true);
555 bool fileMustExist =
true);
583 bool overwrite =
false,
587 bool fileMustExist =
true);
589 bool overwrite =
false,
593 bool fileMustExist =
true);
604 const uint32_t
run = 0,
605 const uint32_t
lumi = 0,
606 const uint32_t streamId = 0,
607 const uint32_t moduleId = 0)
const;
615 void getAllTags(std::vector<std::string> &into)
const;
618 uint32_t
lumi = 0)
const;
645 const char *context);
646 template <
class HISTO,
class COLLATE>
648 const char *context,
int kind,
649 HISTO *
h, COLLATE collate);
689 typedef std::set<MonitorElement>
MEMap;
690 typedef std::map<std::string, QCriterion *>
QCMap;
691 typedef std::map<std::string, QCriterion *(*)(const std::string &)>
QAMap;
730 #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)
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")