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>
382 template <
typename iFunc>
405 template <
typename iFunc>
415 template <
typename iFunc>
454 int nchX,
double lowX,
double highX);
457 int nchX,
double lowX,
double highX);
460 int nchX,
const float *xbinsize);
463 int nchX,
const float *xbinsize);
469 int nchX,
double lowX,
double highX);
472 int nchX,
double lowX,
double highX);
475 int nchX,
const float *xbinsize);
478 int nchX,
const float *xbinsize);
484 int nchX,
double lowX,
double highX);
487 int nchX,
double lowX,
double highX);
490 int nchX,
const float *xbinsize);
493 int nchX,
const float *xbinsize);
499 int nchX,
double lowX,
double highX,
500 int nchY,
double lowY,
double highY);
503 int nchX,
double lowX,
double highX,
504 int nchY,
double lowY,
double highY);
507 int nchX,
const float *xbinsize,
508 int nchY,
const float *ybinsize);
511 int nchX,
const float *xbinsize,
512 int nchY,
const float *ybinsize);
518 int nchX,
double lowX,
double highX,
519 int nchY,
double lowY,
double highY);
522 int nchX,
double lowX,
double highX,
523 int nchY,
double lowY,
double highY);
526 int nchX,
const float *xbinsize,
527 int nchY,
const float *ybinsize);
530 int nchX,
const float *xbinsize,
531 int nchY,
const float *ybinsize);
537 int nchX,
double lowX,
double highX,
538 int nchY,
double lowY,
double highY);
541 int nchX,
double lowX,
double highX,
542 int nchY,
double lowY,
double highY);
545 int nchX,
const float *xbinsize,
546 int nchY,
const float *ybinsize);
549 int nchX,
const float *xbinsize,
550 int nchY,
const float *ybinsize);
556 int nchX,
double lowX,
double highX,
557 int nchY,
double lowY,
double highY,
558 int nchZ,
double lowZ,
double highZ);
561 int nchX,
double lowX,
double highX,
562 int nchY,
double lowY,
double highY,
563 int nchZ,
double lowZ,
double highZ);
569 int nchX,
double lowX,
double highX,
570 int nchY,
double lowY,
double highY,
571 const char *
option =
"s");
574 int nchX,
double lowX,
double highX,
575 int nchY,
double lowY,
double highY,
576 const char *
option =
"s");
579 int nchX,
double lowX,
double highX,
580 double lowY,
double highY,
581 const char *
option =
"s");
584 int nchX,
double lowX,
double highX,
585 double lowY,
double highY,
586 const char *
option =
"s");
589 int nchX,
const double *xbinsize,
590 int nchY,
double lowY,
double highY,
591 const char *
option =
"s");
594 int nchX,
const double *xbinsize,
595 int nchY,
double lowY,
double highY,
596 const char *
option =
"s");
599 int nchX,
const double *xbinsize,
600 double lowY,
double highY,
601 const char *
option =
"s");
604 int nchX,
const double *xbinsize,
605 double lowY,
double highY,
606 const char *
option =
"s");
612 int nchX,
double lowX,
double highX,
613 int nchY,
double lowY,
double highY,
614 int nchZ,
double lowZ,
double highZ,
615 const char *
option =
"s");
618 int nchX,
double lowX,
double highX,
619 int nchY,
double lowY,
double highY,
620 int nchZ,
double lowZ,
double highZ,
621 const char *
option =
"s");
624 int nchX,
double lowX,
double highX,
625 int nchY,
double lowY,
double highY,
626 double lowZ,
double highZ,
627 const char *
option =
"s");
630 int nchX,
double lowX,
double highX,
631 int nchY,
double lowY,
double highY,
632 double lowZ,
double highZ,
633 const char *
option =
"s");
647 std::vector<std::string>
getMEs()
const;
651 std::vector<MonitorElement *>
get(
unsigned int tag)
const;
654 void getContents(std::vector<std::string> &into,
bool showContents =
true)
const;
673 const uint32_t
run = 0,
674 const uint32_t
lumi = 0,
680 const uint32_t
run = 0,
681 const uint32_t
lumi = 0);
683 bool overwrite =
false,
687 bool fileMustExist =
true);
690 bool fileMustExist =
true);
721 bool overwrite =
false,
725 bool fileMustExist =
true);
727 bool overwrite =
false,
731 bool fileMustExist =
true);
742 const uint32_t
run = 0,
743 const uint32_t
lumi = 0,
744 const uint32_t streamId = 0,
745 const uint32_t moduleId = 0)
const;
753 void getAllTags(std::vector<std::string> &into)
const;
756 uint32_t
lumi = 0)
const;
784 const char *context);
785 template <
class HISTO,
class COLLATE>
789 int kind, HISTO *h, COLLATE collate);
829 using MEMap = std::set<MonitorElement>;
830 using QCMap = std::map<std::string, QCriterion *>;
831 using QAMap = std::map<std::string, QCriterion *(*)(const std::string &)>;
841 MEMap::const_iterator
begin,
842 MEMap::const_iterator
end,
854 MEMap::const_iterator
begin,
855 MEMap::const_iterator
end,
885 friend class edm::DQMHttpSource;
888 friend class DQMArchiver;
889 friend class DQMStoreExample;
896 #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)
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)
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)
void mergeAndResetMEsRunSummaryCache(uint32_t run, uint32_t streamId, uint32_t moduleId)
int extract(std::vector< int > *output, const std::string &dati)
void getAllTags(std::vector< std::string > &into) 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
void bookTransaction(iFunc f, uint32_t run, uint32_t streamId, uint32_t moduleId)
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)
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)
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)
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)
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)
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")