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; }
70 std::unique_ptr<lat::Regexp> regexp_{
nullptr};
81 SaveWithReferenceForQTest
92 #define IBOOKER_FUNCTION_WITH_SUFFIX(suffix) \ 93 template <typename... Args> \ 94 MonitorElement* book##suffix(Args&&... args) \ 96 return owner_->book##suffix(std::forward<Args>(args)...); \ 116 #undef IBOOKER_FUNCTION_WITH_SUFFIX 145 #define CONCURRENTBOOKER_FUNCTION_WITH_SUFFIX(suffix) \ 146 template <typename... Args> \ 147 ConcurrentMonitorElement book##suffix(Args&&... args) \ 149 MonitorElement* me = IBooker::book##suffix(std::forward<Args>(args)...); \ 150 return ConcurrentMonitorElement(me); \ 170 #undef CONCURRENTBOOKER_FUNCTION_WITH_SUFFIX 191 template <
typename... Args>
194 return owner_->getContents(std::forward<Args>(
args)...);
198 template <
typename... Args>
201 return owner_->removeElement(std::forward<Args>(
args)...);
213 std::vector<std::string>
getMEs();
242 template <
typename iFunc>
263 template <
typename iFunc>
285 template <
typename iFunc>
321 operator char const*()
const {
return data_.c_str(); }
334 int const nchX,
double const lowX,
double const highX);
337 int nchX,
float const* xbinsize);
341 int nchX,
double lowX,
double highX);
344 int nchX,
float const* xbinsize);
348 int nchX,
double lowX,
double highX);
351 int nchX,
float const* xbinsize);
355 int nchX,
double lowX,
double highX,
356 int nchY,
double lowY,
double highY);
359 int nchX,
float const* xbinsize,
360 int nchY,
float const* ybinsize);
364 int nchX,
double lowX,
double highX,
365 int nchY,
double lowY,
double highY);
368 int nchX,
float const* xbinsize,
369 int nchY,
float const* ybinsize);
373 int nchX,
double lowX,
double highX,
374 int nchY,
double lowY,
double highY);
377 int nchX,
float const* xbinsize,
378 int nchY,
float const* ybinsize);
382 int nchX,
double lowX,
double highX,
383 int nchY,
double lowY,
double highY,
384 int nchZ,
double lowZ,
double highZ);
388 int nchX,
double lowX,
double highX,
389 int nchY,
double lowY,
double highY,
390 char const*
option =
"s");
393 int nchX,
double lowX,
double highX,
394 double lowY,
double highY,
395 char const*
option =
"s");
398 int nchX,
double const* xbinsize,
399 int nchY,
double lowY,
double highY,
400 char const*
option =
"s");
403 int nchX,
double const* xbinsize,
404 double lowY,
double highY,
405 char const*
option =
"s");
409 int nchX,
double lowX,
double highX,
410 int nchY,
double lowY,
double highY,
411 double lowZ,
double highZ,
412 char const*
option =
"s");
415 int nchX,
double lowX,
double highX,
416 int nchY,
double lowY,
double highY,
417 int nchZ,
double lowZ,
double highZ,
418 char const*
option =
"s");
425 void tagContents(
std::string const& path,
unsigned int myTag);
426 void tagAllContents(
std::string const& path,
unsigned int myTag);
430 std::vector<std::string> getSubdirs()
const;
431 std::vector<std::string> getMEs()
const;
432 bool containsAnyMonitorable(
std::string const& path)
const;
435 std::vector<MonitorElement*>
get(
unsigned int tag)
const;
436 std::vector<MonitorElement*> getContents(
std::string const& path)
const;
437 std::vector<MonitorElement*> getContents(
std::string const& path,
unsigned int tag)
const;
438 void getContents(std::vector<std::string> &into,
bool showContents =
true)
const;
446 void removeContents();
467 bool overwrite =
false,
471 bool fileMustExist =
true);
474 bool fileMustExist =
true);
481 void showDirStructure()
const;
484 bool isCollate()
const;
494 void scaleElements();
505 bool overwrite =
false,
509 bool fileMustExist =
true);
511 bool overwrite =
false,
515 bool fileMustExist =
true);
517 unsigned int readDirectory(TFile*
file,
536 std::vector<MonitorElement*> getAllContents(
std::string const& path,
538 uint32_t lumi = 0)
const;
539 std::vector<MonitorElement*> getMatchingContents(
std::string const& pattern, lat::Regexp::Syntax syntaxType = lat::Regexp::Wildcard)
const;
542 void cloneLumiHistograms(uint32_t run, uint32_t lumi, uint32_t moduleId);
543 void cloneRunHistograms(uint32_t run, uint32_t moduleId);
545 void deleteUnusedLumiHistograms(uint32_t run, uint32_t lumi);
564 char const* context);
565 template <
class HISTO,
class COLLATE>
569 int kind, HISTO*
h, COLLATE collate);
586 static void collate1D(
MonitorElement* me, TH1F* h,
unsigned verbose);
587 static void collate1S(
MonitorElement* me, TH1S* h,
unsigned verbose);
588 static void collate1DD(
MonitorElement* me, TH1D* h,
unsigned verbose);
589 static void collate2D(
MonitorElement* me, TH2F* h,
unsigned verbose);
590 static void collate2S(
MonitorElement* me, TH2S* h,
unsigned verbose);
591 static void collate2DD(
MonitorElement* me, TH2D* h,
unsigned verbose);
592 static void collate3D(
MonitorElement* me, TH3F* h,
unsigned verbose);
593 static void collateProfile(
MonitorElement* me, TProfile* h,
unsigned verbose);
594 static void collateProfile2D(
MonitorElement* me, TProfile2D* h,
unsigned verbose);
605 using MEMap = std::set<MonitorElement>;
606 using QCMap = std::map<std::string, QCriterion*>;
607 using QAMap = std::map<std::string, QCriterion* (*)(std::string const&)>;
612 void saveMonitorElementRangeToPB(
std::string const& dir,
614 MEMap::const_iterator
begin,
615 MEMap::const_iterator
end,
620 void saveMonitorElementRangeToROOT(
std::string const& dir,
625 MEMap::const_iterator
begin,
626 MEMap::const_iterator
end,
630 unsigned verbose_{1};
631 unsigned verboseQT_{1};
634 bool collateHistograms_{
false};
635 bool enableMultiThread_{
false};
637 bool forceResetOnBeginLumi_{
false};
640 uint32_t moduleId_{};
641 std::unique_ptr<std::ostream> stream_{
nullptr};
653 friend class edm::DQMHttpSource;
656 friend class DQMArchiver;
657 friend class DQMStoreExample;
664 #endif // DQMServices_Core_DQMStore_h
static boost::mutex mutex
std::map< std::string, QCriterion *(*)(std::string const &)> QAMap
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.
TObject * extractNextObject(TBufferFile &buf)
void tagContents(std::string const &path, unsigned int myTag)
tag all children of folder (does NOT include subfolders)
#define CONCURRENTBOOKER_FUNCTION_WITH_SUFFIX(suffix)
MatchingHeuristicEnum matching_
IGetter(DQMStore *store) noexcept
std::set< MonitorElement > MEMap
static std::string const input
std::list< QTestSpec > QTestSpecs
char_string(std::string const &str)
std::pair< fastmatch *, QCriterion * > QTestSpec
IBooker(DQMStore *store) noexcept
#define IBOOKER_FUNCTION_WITH_SUFFIX(suffix)
void setVerbose(unsigned level)
std::vector< std::string > getSubdirs() const
void bookConcurrentTransaction(iFunc f, uint32_t run)
std::vector< MonitorElement * > getContents(Args &&...args)
std::map< std::string, QCriterion * > QCMap
char_string(TString const &str)
int extract(std::vector< int > *output, const std::string &dati)
void setCurrentFolder(std::string const &fullpath)
DecomposeProduct< arg, typename Div::arg > D
void cd()
go to top directory (ie. root)
DQMStore & operator=(DQMStore const &)=delete
std::vector< std::string > getMEs() const
get list of (non-dir) MEs of current directory
ConcurrentBooker(DQMStore *store) noexcept
static const int STATUS_OK
void bookTransaction(iFunc f, uint32_t run, uint32_t moduleId)
void meBookerGetter(iFunc f)
void goUp()
equivalent to "cd .."
char_string(char const *str)
std::set< std::string > dirs_
void reset(double vett[256])
void removeElement(Args &&...args)
def getElement(obj, name)
std::vector< MonitorElement * > getAllContents(std::string const &path, uint32_t runNumber=0, uint32_t lumi=0) const
bool containsAnyMonitorable(std::string const &path) const
std::string match(BranchDescription const &a, BranchDescription const &b, std::string const &fileName)