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; }
94 template <
typename...
Args>
100 template <
typename...
Args>
106 template <
typename...
Args>
112 template <
typename...
Args>
118 template <
typename...
Args>
124 template <
typename...
Args>
130 template <
typename...
Args>
136 template <
typename...
Args>
142 template <
typename...
Args>
148 template <
typename...
Args>
154 template <
typename...
Args>
160 template <
typename...
Args>
193 template <
typename...
Args>
200 std::vector<std::string>
getMEs(
void);
229 template <
typename iFunc>
259 template <
typename iFunc>
268 template <
typename iFunc>
307 int nchX,
double lowX,
double highX);
310 int nchX,
double lowX,
double highX);
313 int nchX,
float *xbinsize);
316 int nchX,
float *xbinsize);
322 int nchX,
double lowX,
double highX);
325 int nchX,
double lowX,
double highX);
328 int nchX,
float *xbinsize);
331 int nchX,
float *xbinsize);
337 int nchX,
double lowX,
double highX);
340 int nchX,
double lowX,
double highX);
343 int nchX,
float *xbinsize);
346 int nchX,
float *xbinsize);
352 int nchX,
double lowX,
double highX,
353 int nchY,
double lowY,
double highY);
356 int nchX,
double lowX,
double highX,
357 int nchY,
double lowY,
double highY);
360 int nchX,
float *xbinsize,
361 int nchY,
float *ybinsize);
364 int nchX,
float *xbinsize,
365 int nchY,
float *ybinsize);
371 int nchX,
double lowX,
double highX,
372 int nchY,
double lowY,
double highY);
375 int nchX,
double lowX,
double highX,
376 int nchY,
double lowY,
double highY);
379 int nchX,
float *xbinsize,
380 int nchY,
float *ybinsize);
383 int nchX,
float *xbinsize,
384 int nchY,
float *ybinsize);
390 int nchX,
double lowX,
double highX,
391 int nchY,
double lowY,
double highY);
394 int nchX,
double lowX,
double highX,
395 int nchY,
double lowY,
double highY);
398 int nchX,
float *xbinsize,
399 int nchY,
float *ybinsize);
402 int nchX,
float *xbinsize,
403 int nchY,
float *ybinsize);
409 int nchX,
double lowX,
double highX,
410 int nchY,
double lowY,
double highY,
411 int nchZ,
double lowZ,
double highZ);
414 int nchX,
double lowX,
double highX,
415 int nchY,
double lowY,
double highY,
416 int nchZ,
double lowZ,
double highZ);
422 int nchX,
double lowX,
double highX,
423 int nchY,
double lowY,
double highY,
424 const char *option =
"s");
427 int nchX,
double lowX,
double highX,
428 int nchY,
double lowY,
double highY,
429 const char *option =
"s");
432 int nchX,
double lowX,
double highX,
433 double lowY,
double highY,
434 const char *option =
"s");
437 int nchX,
double lowX,
double highX,
438 double lowY,
double highY,
439 const char *option =
"s");
442 int nchX,
double *xbinsize,
443 int nchY,
double lowY,
double highY,
444 const char *option =
"s");
447 int nchX,
double *xbinsize,
448 int nchY,
double lowY,
double highY,
449 const char *option =
"s");
452 int nchX,
double *xbinsize,
453 double lowY,
double highY,
454 const char *option =
"s");
457 int nchX,
double *xbinsize,
458 double lowY,
double highY,
459 const char *option =
"s");
465 int nchX,
double lowX,
double highX,
466 int nchY,
double lowY,
double highY,
467 int nchZ,
double lowZ,
double highZ,
468 const char *option =
"s");
471 int nchX,
double lowX,
double highX,
472 int nchY,
double lowY,
double highY,
473 int nchZ,
double lowZ,
double highZ,
474 const char *option =
"s");
477 int nchX,
double lowX,
double highX,
478 int nchY,
double lowY,
double highY,
479 double lowZ,
double highZ,
480 const char *option =
"s");
483 int nchX,
double lowX,
double highX,
484 int nchY,
double lowY,
double highY,
485 double lowZ,
double highZ,
486 const char *option =
"s");
499 std::vector<std::string>
getSubdirs(
void)
const;
500 std::vector<std::string>
getMEs(
void)
const;
504 std::vector<MonitorElement *>
get(
unsigned int tag)
const;
507 void getContents(std::vector<std::string> &into,
bool showContents =
true)
const;
524 const uint32_t
run = 0,
525 const uint32_t
lumi = 0,
526 const bool resetMEsAfterWriting =
false);
531 const uint32_t
run = 0,
532 const uint32_t
lumi = 0,
536 const bool resetMEsAfterWriting =
false);
538 bool overwrite =
false,
542 bool fileMustExist =
true);
545 bool fileMustExist =
true);
573 bool overwrite =
false,
577 bool fileMustExist =
true);
579 bool overwrite =
false,
583 bool fileMustExist =
true);
594 const uint32_t
run = 0,
595 const uint32_t
lumi = 0,
596 const uint32_t streamId = 0,
597 const uint32_t moduleId = 0)
const;
605 void getAllTags(std::vector<std::string> &into)
const;
608 uint32_t
lumi = 0)
const;
633 const char *context);
634 template <
class HISTO,
class COLLATE>
636 const char *context,
int kind,
637 HISTO *
h, COLLATE collate);
677 typedef std::set<MonitorElement>
MEMap;
678 typedef std::map<std::string, QCriterion *>
QCMap;
679 typedef std::map<std::string, QCriterion *(*)(const std::string &)>
QAMap;
716 #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
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)
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)
const std::string & pwd(void)
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)
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
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)
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)
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
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
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)
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)
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)
void meBookerGetter(iFunc f)
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)
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")