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; }
82 SaveWithReferenceForQTest
96 template <
typename...
Args>
98 return owner_->bookString(std::forward<Args>(
args)...);
102 template <
typename...
Args>
104 return owner_->bookInt(std::forward<Args>(
args)...);
108 template <
typename...
Args>
110 return owner_->bookFloat(std::forward<Args>(
args)...);
114 template <
typename...
Args>
116 return owner_->book1D(std::forward<Args>(
args)...);
120 template <
typename...
Args>
122 return owner_->book1S(std::forward<Args>(
args)...);
126 template <
typename...
Args>
128 return owner_->book1DD(std::forward<Args>(
args)...);
132 template <
typename...
Args>
134 return owner_->book2D(std::forward<Args>(
args)...);
138 template <
typename...
Args>
140 return owner_->book2S(std::forward<Args>(
args)...);
144 template <
typename...
Args>
146 return owner_->book2DD(std::forward<Args>(
args)...);
150 template <
typename...
Args>
152 return owner_->book3D(std::forward<Args>(
args)...);
156 template <
typename...
Args>
158 return owner_->bookProfile(std::forward<Args>(
args)...);
162 template <
typename...
Args>
164 return owner_->bookProfile2D(std::forward<Args>(
args)...);
196 template <
typename...
Args>
198 return owner_->getContents(std::forward<Args>(
args)...);
201 template <
typename...
Args>
203 return owner_->removeElement(std::forward<Args>(
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;
725 friend class edm::DQMHttpSource;
728 friend class DQMArchiver;
729 friend class DQMStoreExample;
736 #endif // DQMSERVICES_CORE_DQM_STORE_H
QCriterion * getQCriterion(const std::string &qtname) const
std::pair< fastmatch *, QCriterion * > QTestSpec
std::vector< MonitorElement * > getContents(Args &&...args)
MonitorElement * book1S(Args &&...args)
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
static void get_info(const dqmstorepb::ROOTFilePB::Histo &h, std::string &dirname, std::string &objname, TObject **obj)
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 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)
TObject * extractNextObject(TBufferFile &buf)
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.
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 disableSoftReset(MonitorElement *me)
std::vector< MonitorElement * > getAllContents(const std::string &path, uint32_t runNumber=0, uint32_t lumi=0) const
void removeContents(void)
erase all monitoring elements in current directory (not including subfolders);
void deleteUnusedLumiHistograms(uint32_t run, uint32_t lumi)
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)
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)
std::vector< MonitorElement * > getContents(const std::string &path) const
std::string readSelectedDirectory_
void mergeAndResetMEsRunSummaryCache(uint32_t run, uint32_t streamId, uint32_t moduleId)
int extract(std::vector< int > *output, const std::string &dati)
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 &)
static void collate1DD(MonitorElement *me, TH1D *h, unsigned verbose)
void tagAllContents(const std::string &path, unsigned int myTag)
MonitorElement * initialise(MonitorElement *me, 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>.
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
unsigned int readDirectory(TFile *file, bool overwrite, const std::string &path, const std::string &prepend, const std::string &curdir, OpenRunDirs stripdirs)
bool forceResetOnBeginLumi_
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
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)
std::set< std::string > dirs_
void reset(double vett[256])
void removeElement(Args &&...args)
MonitorElement * book1DD(Args &&...args)
def getElement(obj, name)
MonitorElement * book1S(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
void makeDirectory(const std::string &path)
void setCurrentFolder(const std::string &fullpath)
static void collate2S(MonitorElement *me, TH2S *h, unsigned verbose)
std::string match(BranchDescription const &a, BranchDescription const &b, std::string const &fileName)
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")