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>
215 std::vector<std::string>
getMEs(
void);
244 template <
typename iFunc>
274 template <
typename iFunc>
283 template <
typename iFunc>
322 int nchX,
double lowX,
double highX);
325 int nchX,
double lowX,
double highX);
328 int nchX,
const float *xbinsize);
331 int nchX,
const float *xbinsize);
337 int nchX,
double lowX,
double highX);
340 int nchX,
double lowX,
double highX);
343 int nchX,
const float *xbinsize);
346 int nchX,
const float *xbinsize);
352 int nchX,
double lowX,
double highX);
355 int nchX,
double lowX,
double highX);
358 int nchX,
const float *xbinsize);
361 int nchX,
const float *xbinsize);
367 int nchX,
double lowX,
double highX,
368 int nchY,
double lowY,
double highY);
371 int nchX,
double lowX,
double highX,
372 int nchY,
double lowY,
double highY);
375 int nchX,
const float *xbinsize,
376 int nchY,
const float *ybinsize);
379 int nchX,
const float *xbinsize,
380 int nchY,
const float *ybinsize);
386 int nchX,
double lowX,
double highX,
387 int nchY,
double lowY,
double highY);
390 int nchX,
double lowX,
double highX,
391 int nchY,
double lowY,
double highY);
394 int nchX,
const float *xbinsize,
395 int nchY,
const float *ybinsize);
398 int nchX,
const float *xbinsize,
399 int nchY,
const float *ybinsize);
405 int nchX,
double lowX,
double highX,
406 int nchY,
double lowY,
double highY);
409 int nchX,
double lowX,
double highX,
410 int nchY,
double lowY,
double highY);
413 int nchX,
const float *xbinsize,
414 int nchY,
const float *ybinsize);
417 int nchX,
const float *xbinsize,
418 int nchY,
const float *ybinsize);
424 int nchX,
double lowX,
double highX,
425 int nchY,
double lowY,
double highY,
426 int nchZ,
double lowZ,
double highZ);
429 int nchX,
double lowX,
double highX,
430 int nchY,
double lowY,
double highY,
431 int nchZ,
double lowZ,
double highZ);
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 int nchY,
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,
double lowX,
double highX,
453 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 int nchY,
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");
472 int nchX,
const double *xbinsize,
473 double lowY,
double highY,
474 const char *option =
"s");
480 int nchX,
double lowX,
double highX,
481 int nchY,
double lowY,
double highY,
482 int nchZ,
double lowZ,
double highZ,
483 const char *option =
"s");
486 int nchX,
double lowX,
double highX,
487 int nchY,
double lowY,
double highY,
488 int nchZ,
double lowZ,
double highZ,
489 const char *option =
"s");
492 int nchX,
double lowX,
double highX,
493 int nchY,
double lowY,
double highY,
494 double lowZ,
double highZ,
495 const char *option =
"s");
498 int nchX,
double lowX,
double highX,
499 int nchY,
double lowY,
double highY,
500 double lowZ,
double highZ,
501 const char *option =
"s");
514 std::vector<std::string>
getSubdirs(
void)
const;
515 std::vector<std::string>
getMEs(
void)
const;
519 std::vector<MonitorElement *>
get(
unsigned int tag)
const;
522 void getContents(std::vector<std::string> &into,
bool showContents =
true)
const;
539 const uint32_t
run = 0,
540 const uint32_t
lumi = 0,
541 const bool resetMEsAfterWriting =
false);
546 const uint32_t
run = 0,
547 const uint32_t
lumi = 0,
551 const bool resetMEsAfterWriting =
false);
553 bool overwrite =
false,
557 bool fileMustExist =
true);
560 bool fileMustExist =
true);
589 bool overwrite =
false,
593 bool fileMustExist =
true);
595 bool overwrite =
false,
599 bool fileMustExist =
true);
610 const uint32_t
run = 0,
611 const uint32_t
lumi = 0,
612 const uint32_t streamId = 0,
613 const uint32_t moduleId = 0)
const;
621 void getAllTags(std::vector<std::string> &into)
const;
624 uint32_t
lumi = 0)
const;
651 const char *context);
652 template <
class HISTO,
class COLLATE>
654 const char *context,
int kind,
655 HISTO *
h, COLLATE collate);
695 typedef std::set<MonitorElement>
MEMap;
696 typedef std::map<std::string, QCriterion *>
QCMap;
697 typedef std::map<std::string, QCriterion *(*)(const std::string &)>
QAMap;
736 #endif // DQMSERVICES_CORE_DQM_STORE_H
QCriterion * getQCriterion(const std::string &qtname) const
MonitorElement * getElement(const std::string &path)
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
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
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.
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);
void deleteUnusedLumiHistograms(uint32_t run, uint32_t lumi)
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)
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)
tuple folder
Histograms Source for live online DQM in P5
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")