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>
265 template <
typename iFunc>
287 template <
typename iFunc>
323 operator char const*()
const {
return data_.c_str(); }
336 int const nchX,
double const lowX,
double const highX);
339 int nchX,
float const* xbinsize);
343 int nchX,
double lowX,
double highX);
346 int nchX,
float const* xbinsize);
350 int nchX,
double lowX,
double highX);
353 int nchX,
float const* xbinsize);
357 int nchX,
double lowX,
double highX,
358 int nchY,
double lowY,
double highY);
361 int nchX,
float const* xbinsize,
362 int nchY,
float const* ybinsize);
366 int nchX,
double lowX,
double highX,
367 int nchY,
double lowY,
double highY);
370 int nchX,
float const* xbinsize,
371 int nchY,
float const* ybinsize);
375 int nchX,
double lowX,
double highX,
376 int nchY,
double lowY,
double highY);
379 int nchX,
float const* xbinsize,
380 int nchY,
float const* ybinsize);
384 int nchX,
double lowX,
double highX,
385 int nchY,
double lowY,
double highY,
386 int nchZ,
double lowZ,
double highZ);
390 int nchX,
double lowX,
double highX,
391 int nchY,
double lowY,
double highY,
392 char const*
option =
"s");
395 int nchX,
double lowX,
double highX,
396 double lowY,
double highY,
397 char const*
option =
"s");
400 int nchX,
double const* xbinsize,
401 int nchY,
double lowY,
double highY,
402 char const*
option =
"s");
405 int nchX,
double const* xbinsize,
406 double lowY,
double highY,
407 char const*
option =
"s");
411 int nchX,
double lowX,
double highX,
412 int nchY,
double lowY,
double highY,
413 double lowZ,
double highZ,
414 char const*
option =
"s");
417 int nchX,
double lowX,
double highX,
418 int nchY,
double lowY,
double highY,
419 int nchZ,
double lowZ,
double highZ,
420 char const*
option =
"s");
427 void tagContents(
std::string const& path,
unsigned int myTag);
428 void tagAllContents(
std::string const& path,
unsigned int myTag);
432 std::vector<std::string> getSubdirs()
const;
433 std::vector<std::string> getMEs()
const;
434 bool containsAnyMonitorable(
std::string const& path)
const;
437 std::vector<MonitorElement*>
get(
unsigned int tag)
const;
438 std::vector<MonitorElement*> getContents(
std::string const& path)
const;
439 std::vector<MonitorElement*> getContents(
std::string const& path,
unsigned int tag)
const;
440 void getContents(std::vector<std::string> &into,
bool showContents =
true)
const;
448 void removeContents();
469 bool overwrite =
false,
473 bool fileMustExist =
true);
476 bool fileMustExist =
true);
483 void showDirStructure()
const;
486 bool isCollate()
const;
496 void scaleElements();
507 bool overwrite =
false,
511 bool fileMustExist =
true);
513 bool overwrite =
false,
517 bool fileMustExist =
true);
519 unsigned int readDirectory(TFile*
file,
538 std::vector<MonitorElement*> getAllContents(
std::string const& path,
540 uint32_t lumi = 0)
const;
541 std::vector<MonitorElement*> getMatchingContents(
std::string const& pattern, lat::Regexp::Syntax syntaxType = lat::Regexp::Wildcard)
const;
544 void cloneLumiHistograms(uint32_t run, uint32_t lumi, uint32_t moduleId);
545 void cloneRunHistograms(uint32_t run, uint32_t moduleId);
547 void deleteUnusedLumiHistograms(uint32_t run, uint32_t lumi);
566 char const* context);
567 template <
class HISTO,
class COLLATE>
571 int kind, HISTO*
h, COLLATE collate);
588 static void collate1D(
MonitorElement* me, TH1F* h,
unsigned verbose);
589 static void collate1S(
MonitorElement* me, TH1S* h,
unsigned verbose);
590 static void collate1DD(
MonitorElement* me, TH1D* h,
unsigned verbose);
591 static void collate2D(
MonitorElement* me, TH2F* h,
unsigned verbose);
592 static void collate2S(
MonitorElement* me, TH2S* h,
unsigned verbose);
593 static void collate2DD(
MonitorElement* me, TH2D* h,
unsigned verbose);
594 static void collate3D(
MonitorElement* me, TH3F* h,
unsigned verbose);
595 static void collateProfile(
MonitorElement* me, TProfile* h,
unsigned verbose);
596 static void collateProfile2D(
MonitorElement* me, TProfile2D* h,
unsigned verbose);
607 using MEMap = std::set<MonitorElement>;
608 using QCMap = std::map<std::string, QCriterion*>;
609 using QAMap = std::map<std::string, QCriterion* (*)(std::string const&)>;
614 void saveMonitorElementRangeToPB(
std::string const& dir,
616 MEMap::const_iterator
begin,
617 MEMap::const_iterator
end,
622 void saveMonitorElementRangeToROOT(
std::string const& dir,
627 MEMap::const_iterator
begin,
628 MEMap::const_iterator
end,
632 unsigned verbose_{1};
633 unsigned verboseQT_{1};
636 bool collateHistograms_{
false};
637 bool enableMultiThread_{
false};
639 bool forceResetOnBeginLumi_{
false};
642 uint32_t moduleId_{};
644 bool canSaveByLumi_{
false};
646 bool doSaveByLumi_{
false};
647 std::unique_ptr<std::ostream> stream_{
nullptr};
659 friend class edm::DQMHttpSource;
662 friend class DQMArchiver;
663 friend class DQMStoreExample;
670 #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
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 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)
void bookTransaction(iFunc f, uint32_t run, uint32_t moduleId, bool canSaveByLumi)
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)