1 #ifndef DQMServices_Core_DQMStore_h 2 #define DQMServices_Core_DQMStore_h 4 #if __GNUC__ && ! defined DQM_DEPRECATED 5 #define DQM_DEPRECATED __attribute__((deprecated)) 22 #include <classlib/utils/Regexp.h> 28 namespace lat {
class Regexp; }
85 SaveWithReferenceForQTest
99 template <
typename... Args>
101 return owner_->bookString(std::forward<Args>(
args)...);
105 template <
typename... Args>
107 return owner_->bookInt(std::forward<Args>(
args)...);
111 template <
typename... Args>
113 return owner_->bookFloat(std::forward<Args>(
args)...);
117 template <
typename... Args>
119 return owner_->book1D(std::forward<Args>(
args)...);
123 template <
typename... Args>
125 return owner_->book1S(std::forward<Args>(
args)...);
129 template <
typename... Args>
131 return owner_->book1DD(std::forward<Args>(
args)...);
135 template <
typename... Args>
137 return owner_->book2D(std::forward<Args>(
args)...);
141 template <
typename... Args>
143 return owner_->book2S(std::forward<Args>(
args)...);
147 template <
typename... Args>
149 return owner_->book2DD(std::forward<Args>(
args)...);
153 template <
typename... Args>
155 return owner_->book3D(std::forward<Args>(
args)...);
159 template <
typename... Args>
161 return owner_->bookProfile(std::forward<Args>(
args)...);
165 template <
typename... Args>
167 return owner_->bookProfile2D(std::forward<Args>(
args)...);
201 template <
typename... Args>
208 template <
typename... Args>
215 template <
typename... Args>
222 template <
typename... Args>
229 template <
typename... Args>
236 template <
typename... Args>
243 template <
typename... Args>
250 template <
typename... Args>
257 template <
typename... Args>
264 template <
typename... Args>
271 template <
typename... Args>
278 template <
typename... Args>
304 template <
typename... Args>
306 return owner_->getContents(std::forward<Args>(
args)...);
309 template <
typename... Args>
311 return owner_->removeElement(std::forward<Args>(
args)...);
323 std::vector<std::string>
getMEs();
354 template <
typename iFunc>
373 template <
typename iFunc>
394 template <
typename iFunc>
433 int nchX,
double lowX,
double highX);
436 int nchX,
double lowX,
double highX);
439 int nchX,
const float *xbinsize);
442 int nchX,
const float *xbinsize);
448 int nchX,
double lowX,
double highX);
451 int nchX,
double lowX,
double highX);
454 int nchX,
const float *xbinsize);
457 int nchX,
const float *xbinsize);
463 int nchX,
double lowX,
double highX);
466 int nchX,
double lowX,
double highX);
469 int nchX,
const float *xbinsize);
472 int nchX,
const float *xbinsize);
478 int nchX,
double lowX,
double highX,
479 int nchY,
double lowY,
double highY);
482 int nchX,
double lowX,
double highX,
483 int nchY,
double lowY,
double highY);
486 int nchX,
const float *xbinsize,
487 int nchY,
const float *ybinsize);
490 int nchX,
const float *xbinsize,
491 int nchY,
const float *ybinsize);
497 int nchX,
double lowX,
double highX,
498 int nchY,
double lowY,
double highY);
501 int nchX,
double lowX,
double highX,
502 int nchY,
double lowY,
double highY);
505 int nchX,
const float *xbinsize,
506 int nchY,
const float *ybinsize);
509 int nchX,
const float *xbinsize,
510 int nchY,
const float *ybinsize);
516 int nchX,
double lowX,
double highX,
517 int nchY,
double lowY,
double highY);
520 int nchX,
double lowX,
double highX,
521 int nchY,
double lowY,
double highY);
524 int nchX,
const float *xbinsize,
525 int nchY,
const float *ybinsize);
528 int nchX,
const float *xbinsize,
529 int nchY,
const float *ybinsize);
535 int nchX,
double lowX,
double highX,
536 int nchY,
double lowY,
double highY,
537 int nchZ,
double lowZ,
double highZ);
540 int nchX,
double lowX,
double highX,
541 int nchY,
double lowY,
double highY,
542 int nchZ,
double lowZ,
double highZ);
548 int nchX,
double lowX,
double highX,
549 int nchY,
double lowY,
double highY,
550 const char *
option =
"s");
553 int nchX,
double lowX,
double highX,
554 int nchY,
double lowY,
double highY,
555 const char *
option =
"s");
558 int nchX,
double lowX,
double highX,
559 double lowY,
double highY,
560 const char *
option =
"s");
563 int nchX,
double lowX,
double highX,
564 double lowY,
double highY,
565 const char *
option =
"s");
568 int nchX,
const double *xbinsize,
569 int nchY,
double lowY,
double highY,
570 const char *
option =
"s");
573 int nchX,
const double *xbinsize,
574 int nchY,
double lowY,
double highY,
575 const char *
option =
"s");
578 int nchX,
const double *xbinsize,
579 double lowY,
double highY,
580 const char *
option =
"s");
583 int nchX,
const double *xbinsize,
584 double lowY,
double highY,
585 const char *
option =
"s");
591 int nchX,
double lowX,
double highX,
592 int nchY,
double lowY,
double highY,
593 int nchZ,
double lowZ,
double highZ,
594 const char *
option =
"s");
597 int nchX,
double lowX,
double highX,
598 int nchY,
double lowY,
double highY,
599 int nchZ,
double lowZ,
double highZ,
600 const char *
option =
"s");
603 int nchX,
double lowX,
double highX,
604 int nchY,
double lowY,
double highY,
605 double lowZ,
double highZ,
606 const char *
option =
"s");
609 int nchX,
double lowX,
double highX,
610 int nchY,
double lowY,
double highY,
611 double lowZ,
double highZ,
612 const char *
option =
"s");
626 std::vector<std::string>
getMEs()
const;
630 std::vector<MonitorElement *>
get(
unsigned int tag)
const;
633 void getContents(std::vector<std::string> &into,
bool showContents =
true)
const;
652 const uint32_t
run = 0,
653 const uint32_t
lumi = 0,
659 const uint32_t
run = 0,
660 const uint32_t
lumi = 0);
662 bool overwrite =
false,
666 bool fileMustExist =
true);
669 bool fileMustExist =
true);
700 bool overwrite =
false,
704 bool fileMustExist =
true);
706 bool overwrite =
false,
710 bool fileMustExist =
true);
721 const uint32_t
run = 0,
722 const uint32_t
lumi = 0,
723 const uint32_t moduleId = 0)
const;
733 uint32_t
lumi = 0)
const;
756 const char *context);
757 template <
class HISTO,
class COLLATE>
761 int kind, HISTO *h, COLLATE collate);
801 using MEMap = std::set<MonitorElement>;
802 using QCMap = std::map<std::string, QCriterion *>;
803 using QAMap = std::map<std::string, QCriterion *(*)(const std::string &)>;
813 MEMap::const_iterator
begin,
814 MEMap::const_iterator
end,
826 MEMap::const_iterator
begin,
827 MEMap::const_iterator
end,
856 friend class edm::DQMHttpSource;
859 friend class DQMArchiver;
860 friend class DQMStoreExample;
867 #endif // DQMServices_Core_DQMStore_h ConcurrentMonitorElement book1DD(Args &&...args)
QCriterion * getQCriterion(const std::string &qtname) const
MonitorElement * book2DD_(const std::string &dir, const std::string &name, TH2D *h)
Book 2D histogram based on TH2D.
std::vector< MonitorElement * > getContents(Args &&...args)
static boost::mutex mutex
ConcurrentMonitorElement bookProfile(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.
bool containsAnyMonitorable(const std::string &path) const
bool isCollateME(MonitorElement *me) const
std::map< std::string, QCriterion * > QCMap
bool cdInto(const std::string &path) const
ConcurrentMonitorElement book2DD(Args &&...args)
int getStatus(const std::string &path="") const
ConcurrentMonitorElement book3D(Args &&...args)
MonitorElement * bookProfile2D_(const std::string &dir, const std::string &name, TProfile2D *h)
Book 2D profile histogram based on TProfile2D.
static void get_info(const dqmstorepb::ROOTFilePB::Histo &h, std::string &dirname, std::string &objname, TObject **obj)
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 void collateProfile(MonitorElement *me, TProfile *h, unsigned verbose)
TObject * extractNextObject(TBufferFile &buf)
ConcurrentMonitorElement bookProfile2D(Args &&...args)
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 postGlobalBeginLumi(const edm::GlobalContext &)
MonitorElement * book2DD(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D double histogram.
std::pair< fastmatch *, QCriterion * > QTestSpec
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_
ConcurrentBooker(DQMStore *store)
MonitorElement * book1DD(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
void initializeFrom(const edm::ParameterSet &)
std::set< MonitorElement > MEMap
MonitorElement * bookFloat(const char *name)
Book float.
static std::string const input
ConcurrentMonitorElement bookInt(Args &&...args)
std::list< QTestSpec > QTestSpecs
MonitorElement * book2D_(const std::string &dir, const std::string &name, TH2F *h)
Book 2D histogram based on TH2F.
void disableSoftReset(MonitorElement *me)
void saveMonitorElementRangeToROOT(std::string const &dir, std::string const &refpath, SaveReferenceTag ref, int minStatus, unsigned int run, MEMap::const_iterator begin, MEMap::const_iterator end, TFile &file, unsigned int &counter)
void saveMonitorElementToROOT(MonitorElement const &me, TFile &file)
std::vector< MonitorElement * > getAllContents(const std::string &path, uint32_t runNumber=0, uint32_t lumi=0) const
void deleteUnusedLumiHistograms(uint32_t run, uint32_t lumi)
MonitorElement * bookString(const char *name, const char *value)
Book string.
MonitorElement * bookProfile2D(Args &&...args)
ConcurrentMonitorElement book2D(Args &&...args)
MonitorElement * bookString_(const std::string &dir, const std::string &name, const std::string &value)
Book string.
void removeElement(const std::string &name)
MonitorElement * book3D_(const std::string &dir, const std::string &name, TH3F *h)
Book 3D histogram based on TH3F.
static void collateProfile2D(MonitorElement *me, TProfile2D *h, unsigned verbose)
MonitorElement * book1D(Args &&...args)
std::map< std::string, QCriterion *(*)(const std::string &)> QAMap
ConcurrentMonitorElement book1D(Args &&...args)
void saveMonitorElementRangeToPB(std::string const &dir, unsigned int run, MEMap::const_iterator begin, MEMap::const_iterator end, dqmstorepb::ROOTFilePB &file, unsigned int &counter)
MonitorElement * bookInt_(const std::string &dir, const std::string &name)
Book int.
MonitorElement * book2S(Args &&...args)
MonitorElement * bookProfile_(const std::string &dir, const std::string &name, TProfile *h)
Book profile histogram based on TProfile.
ConcurrentMonitorElement bookString(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_
std::vector< std::string > getSubdirs() const
void bookConcurrentTransaction(iFunc f, uint32_t run)
int extract(std::vector< int > *output, const std::string &dati)
MonitorElement * findObject(const std::string &dir, const std::string &name, const uint32_t run=0, const uint32_t lumi=0, const uint32_t moduleId=0) const
const DQMStore & operator=(const DQMStore &)
void saveMonitorElementToPB(MonitorElement const &me, dqmstorepb::ROOTFilePB &file)
static void collate1DD(MonitorElement *me, TH1D *h, unsigned verbose)
void tagAllContents(const std::string &path, unsigned int myTag)
ConcurrentMonitorElement bookFloat(Args &&...args)
void showDirStructure() const
MonitorElement * initialise(MonitorElement *me, const std::string &path)
void cd()
go to top directory (ie. root)
MonitorElement * book2D(Args &&...args)
MonitorElement * book_(const std::string &dir, const std::string &name, const char *context)
MonitorElement * book2S_(const std::string &dir, const std::string &name, TH2S *h)
Book 2D histogram based on TH2S.
void print_trace(const std::string &dir, const std::string &name)
MonitorElement * book1D_(const std::string &dir, const std::string &name, TH1F *h)
Book 1D histogram based on TH1F.
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)
std::vector< std::string > getMEs() const
get list of (non-dir) MEs of current directory
MonitorElement * book1DD_(const std::string &dir, const std::string &name, TH1D *h)
Book 1D histogram based on TH1D.
unsigned int readDirectory(TFile *file, bool overwrite, const std::string &path, const std::string &prepend, const std::string &curdir, OpenRunDirs stripdirs)
void removeContents()
erase all monitoring elements in current directory (not including subfolders);
bool forceResetOnBeginLumi_
void tagContents(const std::string &path, unsigned int myTag)
tag all children of folder (does NOT include subfolders)
void cloneRunHistograms(uint32_t run, uint32_t moduleId)
bool readFilePB(const std::string &filename, bool overwrite=false, const std::string &path="", const std::string &prepend="", OpenRunDirs stripdirs=StripRunDirs, bool fileMustExist=true)
void cloneLumiHistograms(uint32_t run, uint32_t lumi, uint32_t moduleId)
void useQTest(const std::string &dir, const std::string &qtname)
ConcurrentMonitorElement book2S(Args &&...args)
MonitorElement * book2DD(Args &&...args)
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 bookTransaction(iFunc f, uint32_t run, uint32_t moduleId)
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 goUp()
equivalent to "cd .."
void savePB(const std::string &filename, const std::string &path="", const uint32_t run=0, const uint32_t lumi=0)
MonitorElement * bookFloat_(const std::string &dir, const std::string &name)
Book float.
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)
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)
ConcurrentMonitorElement book1S(Args &&...args)
void setCurrentFolder(const std::string &fullpath)
static void collate2S(MonitorElement *me, TH2S *h, unsigned verbose)
MonitorElement * book1S_(const std::string &dir, const std::string &name, TH1S *h)
Book 1D histogram based on TH1S.
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")