CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DQMStore.h
Go to the documentation of this file.
1 #ifndef DQMSERVICES_CORE_DQM_STORE_H
2 # define DQMSERVICES_CORE_DQM_STORE_H
3 
4 # if __GNUC__ && ! defined DQM_DEPRECATED
5 # define DQM_DEPRECATED __attribute__((deprecated))
6 # endif
7 
9 # include "classlib/utils/Regexp.h"
10 # include <vector>
11 # include <string>
12 # include <list>
13 # include <map>
14 # include <set>
15 # include <cassert>
16 # include <mutex>
17 # include <thread>
18 # include <execinfo.h>
19 # include <stdio.h>
20 # include <stdlib.h>
21 # include <cxxabi.h>
22 
23 namespace edm { class DQMHttpSource; class ParameterSet; class ActivityRegistry;}
24 namespace lat { class Regexp; }
25 
26 class MonitorElement;
27 class QCriterion;
28 class TFile;
29 class TObject;
30 class TH1;
31 class TObjString;
32 class TH1F;
33 class TH1S;
34 class TH1D;
35 class TH2F;
36 class TH2S;
37 class TH2D;
38 class TH3F;
39 class TProfile;
40 class TProfile2D;
41 
46 class fastmatch
47 {
48  private:
50 
51  public:
52  fastmatch (std::string const& _fastString);
53  ~fastmatch();
54 
55  bool match (std::string const& s) const;
56 
57  private:
58  // checks if two strings are equal, starting at the back of the strings
60  std::string const& input) const;
61  // checks if two strings are equal, starting at the front of the strings
62  bool compare_strings (std::string const& pattern,
63  std::string const& input) const;
64 
65  lat::Regexp * regexp_;
68 };
69 
70 class DQMStore
71 {
72  public:
74  {
78  };
80  {
83  };
84 
85  class IBooker
86  {
87  public:
88  friend class DQMStore;
89 
90  // for the supported syntaxes, see the declarations of DQMStore::bookString
91  template <typename... Args>
93  return owner_->bookString(std::forward<Args>(args)...);
94  }
95 
96  // for the supported syntaxes, see the declarations of DQMStore::bookInt
97  template <typename... Args>
99  return owner_->bookInt(std::forward<Args>(args)...);
100  }
101 
102  // for the supported syntaxes, see the declarations of DQMStore::bookFloat
103  template <typename... Args>
105  return owner_->bookFloat(std::forward<Args>(args)...);
106  }
107 
108  // for the supported syntaxes, see the declarations of DQMStore::book1D
109  template <typename... Args>
111  return owner_->book1D(std::forward<Args>(args)...);
112  }
113 
114  // for the supported syntaxes, see the declarations of DQMStore::book1S
115  template <typename... Args>
117  return owner_->book1S(std::forward<Args>(args)...);
118  }
119 
120  // for the supported syntaxes, see the declarations of DQMStore::book1DD
121  template <typename... Args>
123  return owner_->book1DD(std::forward<Args>(args)...);
124  }
125 
126  // for the supported syntaxes, see the declarations of DQMStore::book2D
127  template <typename... Args>
129  return owner_->book2D(std::forward<Args>(args)...);
130  }
131 
132  // for the supported syntaxes, see the declarations of DQMStore::book2S
133  template <typename... Args>
135  return owner_->book2S(std::forward<Args>(args)...);
136  }
137 
138  // for the supported syntaxes, see the declarations of DQMStore::book2DD
139  template <typename... Args>
141  return owner_->book2DD(std::forward<Args>(args)...);
142  }
143 
144  // for the supported syntaxes, see the declarations of DQMStore::book3D
145  template <typename... Args>
147  return owner_->book3D(std::forward<Args>(args)...);
148  }
149 
150  // for the supported syntaxes, see the declarations of DQMStore::bookProfile
151  template <typename... Args>
153  return owner_->bookProfile(std::forward<Args>(args)...);
154  }
155 
156  // for the supported syntaxes, see the declarations of DQMStore::bookProfile2D
157  template <typename... Args>
159  return owner_->bookProfile2D(std::forward<Args>(args)...);
160  }
161 
162  void cd(void);
163  void cd(const std::string &dir);
164  void setCurrentFolder(const std::string &fullpath);
165  void tag(MonitorElement *, unsigned int);
166 
167  private:
168  explicit IBooker(DQMStore * store):owner_(0) {
169  assert(store);
170  owner_ = store;
171  }
172 
173  IBooker();
174  IBooker(const IBooker&);
175 
176  // Embedded classes do not natively own a pointer to the embedding
177  // class. We therefore need to store a pointer to the main
178  // DQMStore instance (owner_).
180  }; // IBooker
181 
182  // Template function to be used inside each DQM Modules' lambda
183  // functions to book MonitorElements into the DQMStore. The function
184  // calls whatever user-supplied code via the function f. The latter
185  // is passed the instance of the IBooker class (owned by the *only*
186  // DQMStore instance), that is capable of booking MonitorElements
187  // into the DQMStore via a public API. The central mutex is acquired
188  // *before* invoking fand automatically released upon returns.
189  template <typename iFunc>
190  void bookTransaction(iFunc f,
191  uint32_t run,
192  uint32_t streamId,
193  uint32_t moduleId) {
194  std::lock_guard<std::mutex> guard(book_mutex_);
195  /* If enableMultiThread is not enabled we do not set run_,
196  streamId_ and moduleId_ to 0, since we rely on their default
197  initialization in DQMSTore constructor. */
198  if (enableMultiThread_) {
199  run_ = run;
200  streamId_ = streamId;
201  moduleId_ = moduleId;
202  }
203  f(*ibooker_);
204  }
205  //-------------------------------------------------------------------------
206  // ---------------------- Constructors ------------------------------------
208  DQMStore(const edm::ParameterSet &pset);
209  ~DQMStore(void);
210 
211  //-------------------------------------------------------------------------
212  void setVerbose(unsigned level);
213 
214  // ---------------------- public navigation -------------------------------
215  const std::string & pwd(void) const;
216  void cd(void);
217  void cd(const std::string &subdir);
218  void setCurrentFolder(const std::string &fullpath);
219  void goUp(void);
220 
221  bool dirExists(const std::string &path) const;
222 
223  //-------------------------------------------------------------------------
224  // ---------------------- public ME booking -------------------------------
225 
226  MonitorElement * bookInt (const char *name);
228 
229  MonitorElement * bookFloat (const char *name);
231 
232  MonitorElement * bookString (const char *name,
233  const char *value);
235  const std::string &value);
236 
237  MonitorElement * book1D (const char *name,
238  const char *title,
239  int nchX, double lowX, double highX);
241  const std::string &title,
242  int nchX, double lowX, double highX);
243  MonitorElement * book1D (const char *name,
244  const char *title,
245  int nchX, float *xbinsize);
247  const std::string &title,
248  int nchX, float *xbinsize);
249  MonitorElement * book1D (const char *name, TH1F *h);
250  MonitorElement * book1D (const std::string &name, TH1F *h);
251 
252  MonitorElement * book1S (const char *name,
253  const char *title,
254  int nchX, double lowX, double highX);
256  const std::string &title,
257  int nchX, double lowX, double highX);
258  MonitorElement * book1S (const char *name,
259  const char *title,
260  int nchX, float *xbinsize);
262  const std::string &title,
263  int nchX, float *xbinsize);
264  MonitorElement * book1S (const char *name, TH1S *h);
265  MonitorElement * book1S (const std::string &name, TH1S *h);
266 
267  MonitorElement * book1DD (const char *name,
268  const char *title,
269  int nchX, double lowX, double highX);
271  const std::string &title,
272  int nchX, double lowX, double highX);
273  MonitorElement * book1DD (const char *name,
274  const char *title,
275  int nchX, float *xbinsize);
277  const std::string &title,
278  int nchX, float *xbinsize);
279  MonitorElement * book1DD (const char *name, TH1D *h);
280  MonitorElement * book1DD (const std::string &name, TH1D *h);
281 
282  MonitorElement * book2D (const char *name,
283  const char *title,
284  int nchX, double lowX, double highX,
285  int nchY, double lowY, double highY);
287  const std::string &title,
288  int nchX, double lowX, double highX,
289  int nchY, double lowY, double highY);
290  MonitorElement * book2D (const char *name,
291  const char *title,
292  int nchX, float *xbinsize,
293  int nchY, float *ybinsize);
295  const std::string &title,
296  int nchX, float *xbinsize,
297  int nchY, float *ybinsize);
298  MonitorElement * book2D (const char *name, TH2F *h);
299  MonitorElement * book2D (const std::string &name, TH2F *h);
300 
301  MonitorElement * book2S (const char *name,
302  const char *title,
303  int nchX, double lowX, double highX,
304  int nchY, double lowY, double highY);
306  const std::string &title,
307  int nchX, double lowX, double highX,
308  int nchY, double lowY, double highY);
309  MonitorElement * book2S (const char *name,
310  const char *title,
311  int nchX, float *xbinsize,
312  int nchY, float *ybinsize);
314  const std::string &title,
315  int nchX, float *xbinsize,
316  int nchY, float *ybinsize);
317  MonitorElement * book2S (const char *name, TH2S *h);
318  MonitorElement * book2S (const std::string &name, TH2S *h);
319 
320  MonitorElement * book2DD (const char *name,
321  const char *title,
322  int nchX, double lowX, double highX,
323  int nchY, double lowY, double highY);
325  const std::string &title,
326  int nchX, double lowX, double highX,
327  int nchY, double lowY, double highY);
328  MonitorElement * book2DD (const char *name,
329  const char *title,
330  int nchX, float *xbinsize,
331  int nchY, float *ybinsize);
333  const std::string &title,
334  int nchX, float *xbinsize,
335  int nchY, float *ybinsize);
336  MonitorElement * book2DD (const char *name, TH2D *h);
337  MonitorElement * book2DD (const std::string &name, TH2D *h);
338 
339  MonitorElement * book3D (const char *name,
340  const char *title,
341  int nchX, double lowX, double highX,
342  int nchY, double lowY, double highY,
343  int nchZ, double lowZ, double highZ);
345  const std::string &title,
346  int nchX, double lowX, double highX,
347  int nchY, double lowY, double highY,
348  int nchZ, double lowZ, double highZ);
349  MonitorElement * book3D (const char *name, TH3F *h);
350  MonitorElement * book3D (const std::string &name, TH3F *h);
351 
352  MonitorElement * bookProfile (const char *name,
353  const char *title,
354  int nchX, double lowX, double highX,
355  int nchY, double lowY, double highY,
356  const char *option = "s");
358  const std::string &title,
359  int nchX, double lowX, double highX,
360  int nchY, double lowY, double highY,
361  const char *option = "s");
362  MonitorElement * bookProfile (const char *name,
363  const char *title,
364  int nchX, double lowX, double highX,
365  double lowY, double highY,
366  const char *option = "s");
368  const std::string &title,
369  int nchX, double lowX, double highX,
370  double lowY, double highY,
371  const char *option = "s");
372  MonitorElement * bookProfile (const char *name,
373  const char *title,
374  int nchX, double *xbinsize,
375  int nchY, double lowY, double highY,
376  const char *option = "s");
378  const std::string &title,
379  int nchX, double *xbinsize,
380  int nchY, double lowY, double highY,
381  const char *option = "s");
382  MonitorElement * bookProfile (const char *name,
383  const char *title,
384  int nchX, double *xbinsize,
385  double lowY, double highY,
386  const char *option = "s");
388  const std::string &title,
389  int nchX, double *xbinsize,
390  double lowY, double highY,
391  const char *option = "s");
392  MonitorElement * bookProfile (const char *name, TProfile *h);
393  MonitorElement * bookProfile (const std::string &name, TProfile *h);
394 
395  MonitorElement * bookProfile2D(const char *name,
396  const char *title,
397  int nchX, double lowX, double highX,
398  int nchY, double lowY, double highY,
399  int nchZ, double lowZ, double highZ,
400  const char *option = "s");
402  const std::string &title,
403  int nchX, double lowX, double highX,
404  int nchY, double lowY, double highY,
405  int nchZ, double lowZ, double highZ,
406  const char *option = "s");
407  MonitorElement * bookProfile2D(const char *name,
408  const char *title,
409  int nchX, double lowX, double highX,
410  int nchY, double lowY, double highY,
411  double lowZ, double highZ,
412  const char *option = "s");
414  const std::string &title,
415  int nchX, double lowX, double highX,
416  int nchY, double lowY, double highY,
417  double lowZ, double highZ,
418  const char *option = "s");
419  MonitorElement * bookProfile2D(const char *name, TProfile2D *h);
420  MonitorElement * bookProfile2D(const std::string &name, TProfile2D *h);
421 
422  //-------------------------------------------------------------------------
423  // ---------------------- public tagging ----------------------------------
424  void tag(MonitorElement *me, unsigned int myTag);
425  void tag(const std::string &path, unsigned int myTag);
426  void tagContents(const std::string &path, unsigned int myTag);
427  void tagAllContents(const std::string &path, unsigned int myTag);
428 
429  //-------------------------------------------------------------------------
430  // ---------------------- public ME getters -------------------------------
431  std::vector<std::string> getSubdirs(void) const;
432  std::vector<std::string> getMEs(void) const;
433  bool containsAnyMonitorable(const std::string &path) const;
434 
435  MonitorElement * get(const std::string &path) const;
436  std::vector<MonitorElement *> get(unsigned int tag) const;
437  std::vector<MonitorElement *> getContents(const std::string &path) const;
438  std::vector<MonitorElement *> getContents(const std::string &path, unsigned int tag) const;
439  void getContents(std::vector<std::string> &into, bool showContents = true) const;
440 
441  // ---------------------- softReset methods -------------------------------
442  void softReset(MonitorElement *me);
444 
445  // ---------------------- Public deleting ---------------------------------
446  void rmdir(const std::string &fullpath);
447  void removeContents(void);
448  void removeContents(const std::string &dir);
449  void removeElement(const std::string &name);
450  void removeElement(const std::string &dir, const std::string &name, bool warning = true);
451 
452  //-------------------------------------------------------------------------
453  // ---------------------- public I/O --------------------------------------
454  void save(const std::string &filename,
455  const std::string &path = "",
456  const std::string &pattern = "",
457  const std::string &rewrite = "",
458  const uint32_t run = 0,
461  const std::string &fileupdate = "RECREATE");
462  bool open(const std::string &filename,
463  bool overwrite = false,
464  const std::string &path ="",
465  const std::string &prepend = "",
466  OpenRunDirs stripdirs = KeepRunDirs,
467  bool fileMustExist = true);
468  bool load(const std::string &filename,
469  OpenRunDirs stripdirs = StripRunDirs,
470  bool fileMustExist = true);
471 
472  //-------------------------------------------------------------------------
473  // ---------------------- Public print methods -----------------------------
474  void showDirStructure(void) const;
475 
476  // ---------------------- Public check options -----------------------------
477  bool isCollate(void) const;
478 
479  //-------------------------------------------------------------------------
480  // ---------------------- Quality Test methods -----------------------------
481  QCriterion * getQCriterion(const std::string &qtname) const;
482  QCriterion * createQTest(const std::string &algoname, const std::string &qtname);
483  void useQTest(const std::string &dir, const std::string &qtname);
484  int useQTestByMatch(const std::string &pattern, const std::string &qtname);
485  void runQTests(void);
486  int getStatus(const std::string &path = "") const;
487  void scaleElements(void);
488 
489  private:
490  // ---------------- Navigation -----------------------
491  bool cdInto(const std::string &path) const;
492 
493  // ------------------- Reference ME -------------------------------
494  bool isCollateME(MonitorElement *me) const;
495 
496  // ------------------- Private "getters" ------------------------------
497  bool readFile(const std::string &filename,
498  bool overwrite = false,
499  const std::string &path ="",
500  const std::string &prepend = "",
501  OpenRunDirs stripdirs = StripRunDirs,
502  bool fileMustExist = true);
503  void makeDirectory(const std::string &path);
504  unsigned int readDirectory(TFile *file,
505  bool overwrite,
506  const std::string &path,
507  const std::string &prepend,
508  const std::string &curdir,
509  OpenRunDirs stripdirs);
510 
512  const std::string &name,
513  const uint32_t run = 0,
514  const uint32_t lumi = 0,
515  const uint32_t streamId = 0,
516  const uint32_t moduleId = 0) const;
517 
518  public:
519  void getAllTags(std::vector<std::string> &into) const;
520  std::vector<MonitorElement*> getAllContents(const std::string &path,
521  uint32_t runNumber = 0,
522  uint32_t lumi = 0) const;
523  std::vector<MonitorElement*> getMatchingContents(const std::string &pattern, lat::Regexp::Syntax syntaxType = lat::Regexp::Wildcard) const;
524 
525  // Multithread SummaryCache manipulations
526  void mergeAndResetMEsRunSummaryCache(uint32_t run,
527  uint32_t streamId,
528  uint32_t moduleId);
530  uint32_t lumi,
531  uint32_t streamId,
532  uint32_t moduleId);
533  private:
534 
535  // ---------------- Miscellaneous -----------------------------
536  void initializeFrom(const edm::ParameterSet&);
537  void reset(void);
538  void forceReset(void);
539 
540  bool extract(TObject *obj, const std::string &dir, bool overwrite);
541 
542  // ---------------------- Booking ------------------------------------
545  const std::string &name,
546  const char *context);
547  template <class HISTO, class COLLATE>
549  const char *context, int kind,
550  HISTO *h, COLLATE collate);
551 
555  MonitorElement * book1D(const std::string &dir, const std::string &name, TH1F *h);
556  MonitorElement * book1S(const std::string &dir, const std::string &name, TH1S *h);
557  MonitorElement * book1DD(const std::string &dir, const std::string &name, TH1D *h);
558  MonitorElement * book2D(const std::string &dir, const std::string &name, TH2F *h);
559  MonitorElement * book2S(const std::string &dir, const std::string &name, TH2S *h);
560  MonitorElement * book2DD(const std::string &dir, const std::string &name, TH2D *h);
561  MonitorElement * book3D(const std::string &dir, const std::string &name, TH3F *h);
562  MonitorElement * bookProfile(const std::string &dir, const std::string &name, TProfile *h);
563  MonitorElement * bookProfile2D(const std::string &folder, const std::string &name, TProfile2D *h);
564 
565  static bool checkBinningMatches(MonitorElement *me, TH1 *h);
566 
567  static void collate1D(MonitorElement *me, TH1F *h);
568  static void collate1S(MonitorElement *me, TH1S *h);
569  static void collate1DD(MonitorElement *me, TH1D *h);
570  static void collate2D(MonitorElement *me, TH2F *h);
571  static void collate2S(MonitorElement *me, TH2S *h);
572  static void collate2DD(MonitorElement *me, TH2D *h);
573  static void collate3D(MonitorElement *me, TH3F *h);
574  static void collateProfile(MonitorElement *me, TProfile *h);
575  static void collateProfile2D(MonitorElement *me, TProfile2D *h);
576 
577  // --- Operations on MEs that are normally reset at end of monitoring cycle ---
578  void setAccumulate(MonitorElement *me, bool flag);
579 
580  void print_trace(const std::string &dir, const std::string &name);
581 
582  // ----------------------- Unavailable ---------------------------------------
583  DQMStore(const DQMStore&);
584  const DQMStore& operator=(const DQMStore&);
585 
586  //-------------------------------------------------------------------------------
587  //-------------------------------------------------------------------------------
588  typedef std::pair<fastmatch *, QCriterion *> QTestSpec;
589  typedef std::list<QTestSpec> QTestSpecs;
590  typedef std::set<MonitorElement> MEMap;
591  typedef std::map<std::string, QCriterion *> QCMap;
592  typedef std::map<std::string, QCriterion *(*)(const std::string &)> QAMap;
593 
594  unsigned verbose_;
595  unsigned verboseQT_;
596  bool reset_;
597  double scaleFlag_;
601  uint32_t run_;
602  uint32_t streamId_;
603  uint32_t moduleId_;
604 
607  std::set<std::string> dirs_;
608 
612 
615 
616  friend class edm::DQMHttpSource;
617  friend class DQMService;
618  friend class DQMNet;
619  friend class DQMArchiver;
620  friend class DQMStoreExample; // for get{All,Matching}Contents -- sole user of this method!
621 };
622 
623 #endif // DQMSERVICES_CORE_DQM_STORE_H
624 
625 /* Local Variables: */
626 /* show-trailing-whitespace: t */
627 /* truncate-lines: t */
628 /* End: */
static void collateProfile2D(MonitorElement *me, TProfile2D *h)
Definition: DQMStore.cc:1495
QCriterion * getQCriterion(const std::string &qtname) const
Definition: DQMStore.cc:2797
bool compare_strings_reverse(std::string const &pattern, std::string const &input) const
Definition: DQMStore.cc:198
std::pair< fastmatch *, QCriterion * > QTestSpec
Definition: DQMStore.h:588
MonitorElement * book1S(Args &&...args)
Definition: DQMStore.h:116
DQMStore(const edm::ParameterSet &pset, edm::ActivityRegistry &)
Definition: DQMStore.cc:391
MonitorElement * book2S(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2S histogram.
Definition: DQMStore.cc:1022
std::map< std::string, QCriterion * > QCMap
Definition: DQMStore.h:591
bool containsAnyMonitorable(const std::string &path) const
Definition: DQMStore.cc:1613
bool isCollateME(MonitorElement *me) const
Definition: DQMStore.cc:2990
bool cdInto(const std::string &path) const
Definition: DQMStore.cc:2249
int getStatus(const std::string &path="") const
Definition: DQMStore.cc:2903
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1574
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:872
void rmdir(const std::string &fullpath)
Definition: DQMStore.cc:2730
bool match(std::string const &s) const
Definition: DQMStore.cc:240
bool readFile(const std::string &filename, bool overwrite=false, const std::string &path="", const std::string &prepend="", OpenRunDirs stripdirs=StripRunDirs, bool fileMustExist=true)
Definition: DQMStore.cc:2672
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:152
static boost::mutex mutex
Definition: LHEProxy.cc:11
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
Definition: DQMStore.cc:1753
static void collate3D(MonitorElement *me, TH3F *h)
Definition: DQMStore.cc:1478
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.
Definition: DQMStore.cc:1134
static void collate1D(MonitorElement *me, TH1F *h)
Definition: DQMStore.cc:1436
MatchingHeuristicEnum
Definition: DQMStore.h:49
Definition: DQMNet.h:22
void cd(void)
Definition: DQMStore.cc:258
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:561
MonitorElement * book2DD(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D double histogram.
Definition: DQMStore.cc:1044
uint32_t streamId_
Definition: DQMStore.h:602
tuple lumi
Definition: fjr2json.py:35
static void collate1DD(MonitorElement *me, TH1D *h)
Definition: DQMStore.cc:1450
MonitorElement * bookInt(Args &&...args)
Definition: DQMStore.h:98
std::vector< MonitorElement * > getMatchingContents(const std::string &pattern, lat::Regexp::Syntax syntaxType=lat::Regexp::Wildcard) const
Definition: DQMStore.cc:1874
MonitorElement * bookString(Args &&...args)
Definition: DQMStore.h:92
MatchingHeuristicEnum matching_
Definition: DQMStore.h:67
bool reset_
Definition: DQMStore.h:596
MonitorElement * book1DD(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
Definition: DQMStore.cc:904
friend class DQMArchiver
Definition: DQMStore.h:619
void initializeFrom(const edm::ParameterSet &)
Definition: DQMStore.cc:441
OpenRunDirs
Definition: DQMStore.h:79
uint32_t moduleId_
Definition: DQMStore.h:603
QCMap qtests_
Definition: DQMStore.h:609
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:727
std::mutex book_mutex_
Definition: DQMStore.h:613
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:809
static std::string const input
Definition: EdmProvDump.cc:44
SaveReferenceTag
Definition: DQMStore.h:73
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1509
~DQMStore(void)
Definition: DQMStore.cc:430
void disableSoftReset(MonitorElement *me)
Definition: DQMStore.cc:2942
static void collateProfile(MonitorElement *me, TProfile *h)
Definition: DQMStore.cc:1485
void forceReset(void)
Definition: DQMStore.cc:1934
std::vector< MonitorElement * > getAllContents(const std::string &path, uint32_t runNumber=0, uint32_t lumi=0) const
Definition: DQMStore.cc:1836
fastmatch(std::string const &_fastString)
Definition: DQMStore.cc:122
unsigned verboseQT_
Definition: DQMStore.h:595
bool extract(TObject *obj, const std::string &dir, bool overwrite)
Definition: DQMStore.cc:1954
QTestSpecs qtestspecs_
Definition: DQMStore.h:611
void removeContents(void)
erase all monitoring elements in current directory (not including subfolders);
Definition: DQMStore.cc:2764
double scaleFlag_
Definition: DQMStore.h:597
MonitorElement * bookString(const char *name, const char *value)
Book string.
Definition: DQMStore.cc:838
MonitorElement * bookProfile2D(Args &&...args)
Definition: DQMStore.h:158
std::set< MonitorElement > MEMap
Definition: DQMStore.h:590
static void collate1S(MonitorElement *me, TH1S *h)
Definition: DQMStore.cc:1443
bool isCollate(void) const
Definition: DQMStore.cc:2981
void removeElement(const std::string &name)
Definition: DQMStore.cc:2772
static bool checkBinningMatches(MonitorElement *me, TH1 *h)
Definition: DQMStore.cc:1412
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:110
void tag(MonitorElement *, unsigned int)
Definition: DQMStore.cc:270
MonitorElement * book2S(Args &&...args)
Definition: DQMStore.h:134
double f[11][100]
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
Definition: DQMStore.cc:2296
uint32_t run_
Definition: DQMStore.h:601
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1186
void setVerbose(unsigned level)
Definition: DQMStore.cc:548
void softReset(MonitorElement *me)
Definition: DQMStore.cc:2934
std::string pwd_
Definition: DQMStore.h:605
tuple warning
Definition: accesses.py:3
void runQTests(void)
Definition: DQMStore.cc:2882
lat::Regexp * regexp_
Definition: DQMStore.h:65
IBooker * ibooker_
Definition: DQMStore.h:614
QAMap qalgos_
Definition: DQMStore.h:610
std::vector< MonitorElement * > getContents(const std::string &path) const
Definition: DQMStore.cc:1652
std::string readSelectedDirectory_
Definition: DQMStore.h:600
void mergeAndResetMEsRunSummaryCache(uint32_t run, uint32_t streamId, uint32_t moduleId)
Definition: DQMStore.cc:285
std::string fastString_
Definition: DQMStore.h:66
bool dirExists(const std::string &path) const
true if directory exists
Definition: DQMStore.cc:648
void getAllTags(std::vector< std::string > &into) const
Definition: DQMStore.cc:1783
const DQMStore & operator=(const DQMStore &)
bool load(const std::string &filename, OpenRunDirs stripdirs=StripRunDirs, bool fileMustExist=true)
Definition: DQMStore.cc:2647
void scaleElements(void)
Definition: DQMStore.cc:2998
~fastmatch()
Definition: DQMStore.cc:192
void tagAllContents(const std::string &path, unsigned int myTag)
Definition: DQMStore.cc:1552
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:266
MonitorElement * initialise(MonitorElement *me, const std::string &path)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:128
unsigned verbose_
Definition: DQMStore.h:594
std::list< QTestSpec > QTestSpecs
Definition: DQMStore.h:589
static void collate2S(MonitorElement *me, TH2S *h)
Definition: DQMStore.cc:1464
MEMap data_
Definition: DQMStore.h:606
static void collate2D(MonitorElement *me, TH2F *h)
Definition: DQMStore.cc:1457
void print_trace(const std::string &dir, const std::string &name)
Definition: DQMStore.cc:497
int useQTestByMatch(const std::string &pattern, const std::string &qtname)
attach quality test &lt;qc&gt; to monitor elements matching &lt;pattern&gt;.
Definition: DQMStore.cc:2847
void bookTransaction(iFunc f, uint32_t run, uint32_t streamId, uint32_t moduleId)
Definition: DQMStore.h:190
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1597
friend class DQMStoreExample
Definition: DQMStore.h:620
DQMStore * owner_
Definition: DQMStore.h:179
unsigned int readDirectory(TFile *file, bool overwrite, const std::string &path, const std::string &prepend, const std::string &curdir, OpenRunDirs stripdirs)
Definition: DQMStore.cc:2477
dictionary args
IBooker(DQMStore *store)
Definition: DQMStore.h:168
static void collate2DD(MonitorElement *me, TH2D *h)
Definition: DQMStore.cc:1471
void tagContents(const std::string &path, unsigned int myTag)
tag all children of folder (does NOT include subfolders)
Definition: DQMStore.cc:1540
std::map< std::string, QCriterion *(*)(const std::string &)> QAMap
Definition: DQMStore.h:592
void useQTest(const std::string &dir, const std::string &qtname)
Definition: DQMStore.cc:2829
tuple filename
Definition: lut2db_cfg.py:20
MonitorElement * book2DD(Args &&...args)
Definition: DQMStore.h:140
void goUp(void)
equivalent to &quot;cd ..&quot;
Definition: DQMStore.cc:595
bool open(const std::string &filename, bool overwrite=false, const std::string &path="", const std::string &prepend="", OpenRunDirs stripdirs=KeepRunDirs, bool fileMustExist=true)
Definition: DQMStore.cc:2632
static const int STATUS_OK
void setAccumulate(MonitorElement *me, bool flag)
Definition: DQMStore.cc:2951
tuple level
Definition: testEve_cfg.py:34
QCriterion * createQTest(const std::string &algoname, const std::string &qtname)
Definition: DQMStore.cc:2808
MonitorElement * bookFloat(Args &&...args)
Definition: DQMStore.h:104
dbl *** dir
Definition: mlp_gen.cc:35
void showDirStructure(void) const
Definition: DQMStore.cc:2961
void reset(void)
Definition: DQMStore.cc:1910
MonitorElement * bookInt(const char *name)
Book int.
Definition: DQMStore.cc:779
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1000
MonitorElement * book3D(Args &&...args)
Definition: DQMStore.h:146
void mergeAndResetMEsLuminositySummaryCache(uint32_t run, uint32_t lumi, uint32_t streamId, uint32_t moduleId)
Definition: DQMStore.cc:336
friend class edm::DQMHttpSource
Definition: DQMStore.h:616
std::set< std::string > dirs_
Definition: DQMStore.h:607
bool collateHistograms_
Definition: DQMStore.h:598
MonitorElement * book1DD(Args &&...args)
Definition: DQMStore.h:122
MonitorElement * book1S(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
Definition: DQMStore.cc:888
void makeDirectory(const std::string &path)
get folder corresponding to inpath wrt to root (create subdirs if necessary)
Definition: DQMStore.cc:607
bool compare_strings(std::string const &pattern, std::string const &input) const
Definition: DQMStore.cc:219
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
const std::string & pwd(void) const
Definition: DQMStore.cc:556
bool enableMultiThread_
Definition: DQMStore.h:599
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")
Definition: DQMStore.cc:1330