1 #ifndef DQMServices_Core_DQMStore_h 2 #define DQMServices_Core_DQMStore_h 4 #if __GNUC__ && ! defined DQM_DEPRECATED 5 #define DQM_DEPRECATED __attribute__((deprecated)) 23 #include <classlib/utils/Regexp.h> 29 namespace lat {
class Regexp; }
73 std::unique_ptr<lat::Regexp> regexp_{
nullptr};
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>
374 template <
typename iFunc>
395 template <
typename iFunc>
436 int nchX,
double lowX,
double highX);
439 int nchX,
double lowX,
double highX);
442 int nchX,
const float *xbinsize);
445 int nchX,
const float *xbinsize);
451 int nchX,
double lowX,
double highX);
454 int nchX,
double lowX,
double highX);
457 int nchX,
const float *xbinsize);
460 int nchX,
const float *xbinsize);
466 int nchX,
double lowX,
double highX);
469 int nchX,
double lowX,
double highX);
472 int nchX,
const float *xbinsize);
475 int nchX,
const float *xbinsize);
481 int nchX,
double lowX,
double highX,
482 int nchY,
double lowY,
double highY);
485 int nchX,
double lowX,
double highX,
486 int nchY,
double lowY,
double highY);
489 int nchX,
const float *xbinsize,
490 int nchY,
const float *ybinsize);
493 int nchX,
const float *xbinsize,
494 int nchY,
const float *ybinsize);
500 int nchX,
double lowX,
double highX,
501 int nchY,
double lowY,
double highY);
504 int nchX,
double lowX,
double highX,
505 int nchY,
double lowY,
double highY);
508 int nchX,
const float *xbinsize,
509 int nchY,
const float *ybinsize);
512 int nchX,
const float *xbinsize,
513 int nchY,
const float *ybinsize);
519 int nchX,
double lowX,
double highX,
520 int nchY,
double lowY,
double highY);
523 int nchX,
double lowX,
double highX,
524 int nchY,
double lowY,
double highY);
527 int nchX,
const float *xbinsize,
528 int nchY,
const float *ybinsize);
531 int nchX,
const float *xbinsize,
532 int nchY,
const float *ybinsize);
538 int nchX,
double lowX,
double highX,
539 int nchY,
double lowY,
double highY,
540 int nchZ,
double lowZ,
double highZ);
543 int nchX,
double lowX,
double highX,
544 int nchY,
double lowY,
double highY,
545 int nchZ,
double lowZ,
double highZ);
551 int nchX,
double lowX,
double highX,
552 int nchY,
double lowY,
double highY,
553 const char *
option =
"s");
556 int nchX,
double lowX,
double highX,
557 int nchY,
double lowY,
double highY,
558 const char *
option =
"s");
561 int nchX,
double lowX,
double highX,
562 double lowY,
double highY,
563 const char *
option =
"s");
566 int nchX,
double lowX,
double highX,
567 double lowY,
double highY,
568 const char *
option =
"s");
571 int nchX,
const double *xbinsize,
572 int nchY,
double lowY,
double highY,
573 const char *
option =
"s");
576 int nchX,
const double *xbinsize,
577 int nchY,
double lowY,
double highY,
578 const char *
option =
"s");
581 int nchX,
const double *xbinsize,
582 double lowY,
double highY,
583 const char *
option =
"s");
586 int nchX,
const double *xbinsize,
587 double lowY,
double highY,
588 const char *
option =
"s");
594 int nchX,
double lowX,
double highX,
595 int nchY,
double lowY,
double highY,
596 int nchZ,
double lowZ,
double highZ,
597 const char *
option =
"s");
600 int nchX,
double lowX,
double highX,
601 int nchY,
double lowY,
double highY,
602 int nchZ,
double lowZ,
double highZ,
603 const char *
option =
"s");
606 int nchX,
double lowX,
double highX,
607 int nchY,
double lowY,
double highY,
608 double lowZ,
double highZ,
609 const char *
option =
"s");
612 int nchX,
double lowX,
double highX,
613 int nchY,
double lowY,
double highY,
614 double lowZ,
double highZ,
615 const char *
option =
"s");
629 std::vector<std::string>
getMEs()
const;
633 std::vector<MonitorElement *>
get(
unsigned int tag)
const;
636 void getContents(std::vector<std::string> &into,
bool showContents =
true)
const;
655 const uint32_t
run = 0,
656 const uint32_t
lumi = 0,
662 const uint32_t
run = 0,
663 const uint32_t
lumi = 0);
665 bool overwrite =
false,
669 bool fileMustExist =
true);
672 bool fileMustExist =
true);
703 bool overwrite =
false,
707 bool fileMustExist =
true);
709 bool overwrite =
false,
713 bool fileMustExist =
true);
724 const uint32_t
run = 0,
725 const uint32_t
lumi = 0,
726 const uint32_t moduleId = 0)
const;
736 uint32_t
lumi = 0)
const;
759 const char *context);
760 template <
class HISTO,
class COLLATE>
764 int kind, HISTO *h, COLLATE collate);
804 using MEMap = std::set<MonitorElement>;
805 using QCMap = std::map<std::string, QCriterion *>;
806 using QAMap = std::map<std::string, QCriterion *(*)(const std::string &)>;
816 MEMap::const_iterator
begin,
817 MEMap::const_iterator
end,
829 MEMap::const_iterator
begin,
830 MEMap::const_iterator
end,
845 std::unique_ptr<std::ostream>
stream_{
nullptr};
857 friend class edm::DQMHttpSource;
860 friend class DQMArchiver;
861 friend class DQMStoreExample;
868 #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)
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 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
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.
DQMStore & operator=(DQMStore const &)=delete
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)
std::unique_ptr< std::ostream > stream_
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")