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 namespace dqmstorepb {class ROOTFilePB; class ROOTFilePB_Histo;}
26 
27 class MonitorElement;
28 class QCriterion;
29 class TFile;
30 class TBufferFile;
31 class TObject;
32 class TH1;
33 class TObjString;
34 class TH1F;
35 class TH1S;
36 class TH1D;
37 class TH2F;
38 class TH2S;
39 class TH2D;
40 class TH3F;
41 class TProfile;
42 class TProfile2D;
43 class TNamed;
44 
49 class fastmatch
50 {
51  private:
53 
54  public:
55  fastmatch (std::string const& _fastString);
56  ~fastmatch();
57 
58  bool match (std::string const& s) const;
59 
60  private:
61  // checks if two strings are equal, starting at the back of the strings
63  std::string const& input) const;
64  // checks if two strings are equal, starting at the front of the strings
65  bool compare_strings (std::string const& pattern,
66  std::string const& input) const;
67 
68  lat::Regexp * regexp_;
71 };
72 
73 class DQMStore
74 {
75  public:
77  {
81  };
83  {
86  };
87 
88  class IBooker
89  {
90  public:
91  friend class DQMStore;
92 
93  // for the supported syntaxes, see the declarations of DQMStore::bookString
94  template <typename... Args>
96  return owner_->bookString(std::forward<Args>(args)...);
97  }
98 
99  // for the supported syntaxes, see the declarations of DQMStore::bookInt
100  template <typename... Args>
102  return owner_->bookInt(std::forward<Args>(args)...);
103  }
104 
105  // for the supported syntaxes, see the declarations of DQMStore::bookFloat
106  template <typename... Args>
108  return owner_->bookFloat(std::forward<Args>(args)...);
109  }
110 
111  // for the supported syntaxes, see the declarations of DQMStore::book1D
112  template <typename... Args>
114  return owner_->book1D(std::forward<Args>(args)...);
115  }
116 
117  // for the supported syntaxes, see the declarations of DQMStore::book1S
118  template <typename... Args>
120  return owner_->book1S(std::forward<Args>(args)...);
121  }
122 
123  // for the supported syntaxes, see the declarations of DQMStore::book1DD
124  template <typename... Args>
126  return owner_->book1DD(std::forward<Args>(args)...);
127  }
128 
129  // for the supported syntaxes, see the declarations of DQMStore::book2D
130  template <typename... Args>
132  return owner_->book2D(std::forward<Args>(args)...);
133  }
134 
135  // for the supported syntaxes, see the declarations of DQMStore::book2S
136  template <typename... Args>
138  return owner_->book2S(std::forward<Args>(args)...);
139  }
140 
141  // for the supported syntaxes, see the declarations of DQMStore::book2DD
142  template <typename... Args>
144  return owner_->book2DD(std::forward<Args>(args)...);
145  }
146 
147  // for the supported syntaxes, see the declarations of DQMStore::book3D
148  template <typename... Args>
150  return owner_->book3D(std::forward<Args>(args)...);
151  }
152 
153  // for the supported syntaxes, see the declarations of DQMStore::bookProfile
154  template <typename... Args>
156  return owner_->bookProfile(std::forward<Args>(args)...);
157  }
158 
159  // for the supported syntaxes, see the declarations of DQMStore::bookProfile2D
160  template <typename... Args>
162  return owner_->bookProfile2D(std::forward<Args>(args)...);
163  }
164 
165  void cd(void);
166  void cd(const std::string &dir);
167  void setCurrentFolder(const std::string &fullpath);
168  void goUp(void);
169  const std::string & pwd(void);
170  void tag(MonitorElement *, unsigned int);
171 
172  private:
173  explicit IBooker(DQMStore * store):owner_(0) {
174  assert(store);
175  owner_ = store;
176  }
177 
178  IBooker();
179  IBooker(const IBooker&);
180 
181  // Embedded classes do not natively own a pointer to the embedding
182  // class. We therefore need to store a pointer to the main
183  // DQMStore instance (owner_).
185  }; // IBooker
186 
187  class IGetter
188  {
189  public:
190  friend class DQMStore;
191 
192  // for the supported syntaxes, see the declarations of DQMStore::getContents
193  template <typename... Args>
194  std::vector<MonitorElement *> getContents(Args && ... args) {
195  return owner_->getContents(std::forward<Args>(args)...);
196  }
197 
198  MonitorElement * get(const std::string &path);
199  std::vector<std::string> getSubdirs(void);
200  std::vector<std::string> getMEs(void);
202  bool dirExists(const std::string &path);
203  void cd(void);
204  void cd(const std::string &dir);
205  void setCurrentFolder(const std::string &fullpath);
206 
207  private:
208  explicit IGetter(DQMStore * store):owner_(0) {
209  assert(store);
210  owner_ = store;
211  }
212 
213  IGetter();
214  IGetter(const IGetter&);
215 
216  // Embedded classes do not natively own a pointer to the embedding
217  // class. We therefore need to store a pointer to the main
218  // DQMStore instance (owner_).
220  }; //IGetter
221 
222  // Template function to be used inside each DQM Modules' lambda
223  // functions to book MonitorElements into the DQMStore. The function
224  // calls whatever user-supplied code via the function f. The latter
225  // is passed the instance of the IBooker class (owned by the *only*
226  // DQMStore instance), that is capable of booking MonitorElements
227  // into the DQMStore via a public API. The central mutex is acquired
228  // *before* invoking fand automatically released upon returns.
229  template <typename iFunc>
230  void bookTransaction(iFunc f,
231  uint32_t run,
232  uint32_t streamId,
233  uint32_t moduleId) {
234  std::lock_guard<std::mutex> guard(book_mutex_);
235  /* If enableMultiThread is not enabled we do not set run_,
236  streamId_ and moduleId_ to 0, since we rely on their default
237  initialization in DQMStore constructor. */
238  if (enableMultiThread_) {
239  run_ = run;
240  streamId_ = streamId;
241  moduleId_ = moduleId;
242  }
243  f(*ibooker_);
244 
245  /* Initialize to 0 the run_, streamId_ and moduleId_ variables
246  in case we run in mixed conditions with DQMEDAnalyzers and
247  legacy modules */
248  if (enableMultiThread_) {
249  run_ = 0;
250  streamId_ = 0;
251  moduleId_ = 0;
252  }
253  }
254  // Signature needed in the harvesting where the booking is done
255  // in the endJob. No handles to the run there. Two arguments ensure
256  // the capability of booking and getting. The method relies on the
257  // initialization of run, stream and module ID to 0. The mutex
258  // is not needed.
259  template <typename iFunc>
260  void meBookerGetter(iFunc f) {
261  f(*ibooker_, *igetter_);
262  }
263  // Signature needed in the harvesting where it might be needed to get
264  // the LS based histograms. Handle to the Lumi and to the iSetup are available.
265  // No need to book anything there. The method relies on the
266  // initialization of run, stream and module ID to 0. The mutex
267  // is not needed.
268  template <typename iFunc>
269  void meGetter(iFunc f) {
270  f(*igetter_);
271  }
272 
273  //-------------------------------------------------------------------------
274  // ---------------------- Constructors ------------------------------------
276  DQMStore(const edm::ParameterSet &pset);
277  ~DQMStore(void);
278 
279  //-------------------------------------------------------------------------
280  void setVerbose(unsigned level);
281 
282  // ---------------------- public navigation -------------------------------
283  const std::string & pwd(void) const;
284  void cd(void);
285  void cd(const std::string &subdir);
286  void setCurrentFolder(const std::string &fullpath);
287  void goUp(void);
288 
289  bool dirExists(const std::string &path) const;
290 
291  //-------------------------------------------------------------------------
292  // ---------------------- public ME booking -------------------------------
293 
294  MonitorElement * bookInt (const char *name);
296 
297  MonitorElement * bookFloat (const char *name);
299 
300  MonitorElement * bookString (const char *name,
301  const char *value);
303  const std::string &value);
304 
305  MonitorElement * book1D (const char *name,
306  const char *title,
307  int nchX, double lowX, double highX);
309  const std::string &title,
310  int nchX, double lowX, double highX);
311  MonitorElement * book1D (const char *name,
312  const char *title,
313  int nchX, float *xbinsize);
315  const std::string &title,
316  int nchX, float *xbinsize);
317  MonitorElement * book1D (const char *name, TH1F *h);
318  MonitorElement * book1D (const std::string &name, TH1F *h);
319 
320  MonitorElement * book1S (const char *name,
321  const char *title,
322  int nchX, double lowX, double highX);
324  const std::string &title,
325  int nchX, double lowX, double highX);
326  MonitorElement * book1S (const char *name,
327  const char *title,
328  int nchX, float *xbinsize);
330  const std::string &title,
331  int nchX, float *xbinsize);
332  MonitorElement * book1S (const char *name, TH1S *h);
333  MonitorElement * book1S (const std::string &name, TH1S *h);
334 
335  MonitorElement * book1DD (const char *name,
336  const char *title,
337  int nchX, double lowX, double highX);
339  const std::string &title,
340  int nchX, double lowX, double highX);
341  MonitorElement * book1DD (const char *name,
342  const char *title,
343  int nchX, float *xbinsize);
345  const std::string &title,
346  int nchX, float *xbinsize);
347  MonitorElement * book1DD (const char *name, TH1D *h);
348  MonitorElement * book1DD (const std::string &name, TH1D *h);
349 
350  MonitorElement * book2D (const char *name,
351  const char *title,
352  int nchX, double lowX, double highX,
353  int nchY, double lowY, double highY);
355  const std::string &title,
356  int nchX, double lowX, double highX,
357  int nchY, double lowY, double highY);
358  MonitorElement * book2D (const char *name,
359  const char *title,
360  int nchX, float *xbinsize,
361  int nchY, float *ybinsize);
363  const std::string &title,
364  int nchX, float *xbinsize,
365  int nchY, float *ybinsize);
366  MonitorElement * book2D (const char *name, TH2F *h);
367  MonitorElement * book2D (const std::string &name, TH2F *h);
368 
369  MonitorElement * book2S (const char *name,
370  const char *title,
371  int nchX, double lowX, double highX,
372  int nchY, double lowY, double highY);
374  const std::string &title,
375  int nchX, double lowX, double highX,
376  int nchY, double lowY, double highY);
377  MonitorElement * book2S (const char *name,
378  const char *title,
379  int nchX, float *xbinsize,
380  int nchY, float *ybinsize);
382  const std::string &title,
383  int nchX, float *xbinsize,
384  int nchY, float *ybinsize);
385  MonitorElement * book2S (const char *name, TH2S *h);
386  MonitorElement * book2S (const std::string &name, TH2S *h);
387 
388  MonitorElement * book2DD (const char *name,
389  const char *title,
390  int nchX, double lowX, double highX,
391  int nchY, double lowY, double highY);
393  const std::string &title,
394  int nchX, double lowX, double highX,
395  int nchY, double lowY, double highY);
396  MonitorElement * book2DD (const char *name,
397  const char *title,
398  int nchX, float *xbinsize,
399  int nchY, float *ybinsize);
401  const std::string &title,
402  int nchX, float *xbinsize,
403  int nchY, float *ybinsize);
404  MonitorElement * book2DD (const char *name, TH2D *h);
405  MonitorElement * book2DD (const std::string &name, TH2D *h);
406 
407  MonitorElement * book3D (const char *name,
408  const char *title,
409  int nchX, double lowX, double highX,
410  int nchY, double lowY, double highY,
411  int nchZ, double lowZ, double highZ);
413  const std::string &title,
414  int nchX, double lowX, double highX,
415  int nchY, double lowY, double highY,
416  int nchZ, double lowZ, double highZ);
417  MonitorElement * book3D (const char *name, TH3F *h);
418  MonitorElement * book3D (const std::string &name, TH3F *h);
419 
420  MonitorElement * bookProfile (const char *name,
421  const char *title,
422  int nchX, double lowX, double highX,
423  int nchY, double lowY, double highY,
424  const char *option = "s");
426  const std::string &title,
427  int nchX, double lowX, double highX,
428  int nchY, double lowY, double highY,
429  const char *option = "s");
430  MonitorElement * bookProfile (const char *name,
431  const char *title,
432  int nchX, double lowX, double highX,
433  double lowY, double highY,
434  const char *option = "s");
436  const std::string &title,
437  int nchX, double lowX, double highX,
438  double lowY, double highY,
439  const char *option = "s");
440  MonitorElement * bookProfile (const char *name,
441  const char *title,
442  int nchX, double *xbinsize,
443  int nchY, double lowY, double highY,
444  const char *option = "s");
446  const std::string &title,
447  int nchX, double *xbinsize,
448  int nchY, double lowY, double highY,
449  const char *option = "s");
450  MonitorElement * bookProfile (const char *name,
451  const char *title,
452  int nchX, double *xbinsize,
453  double lowY, double highY,
454  const char *option = "s");
456  const std::string &title,
457  int nchX, double *xbinsize,
458  double lowY, double highY,
459  const char *option = "s");
460  MonitorElement * bookProfile (const char *name, TProfile *h);
461  MonitorElement * bookProfile (const std::string &name, TProfile *h);
462 
463  MonitorElement * bookProfile2D(const char *name,
464  const char *title,
465  int nchX, double lowX, double highX,
466  int nchY, double lowY, double highY,
467  int nchZ, double lowZ, double highZ,
468  const char *option = "s");
470  const std::string &title,
471  int nchX, double lowX, double highX,
472  int nchY, double lowY, double highY,
473  int nchZ, double lowZ, double highZ,
474  const char *option = "s");
475  MonitorElement * bookProfile2D(const char *name,
476  const char *title,
477  int nchX, double lowX, double highX,
478  int nchY, double lowY, double highY,
479  double lowZ, double highZ,
480  const char *option = "s");
482  const std::string &title,
483  int nchX, double lowX, double highX,
484  int nchY, double lowY, double highY,
485  double lowZ, double highZ,
486  const char *option = "s");
487  MonitorElement * bookProfile2D(const char *name, TProfile2D *h);
488  MonitorElement * bookProfile2D(const std::string &name, TProfile2D *h);
489 
490  //-------------------------------------------------------------------------
491  // ---------------------- public tagging ----------------------------------
492  void tag(MonitorElement *me, unsigned int myTag);
493  void tag(const std::string &path, unsigned int myTag);
494  void tagContents(const std::string &path, unsigned int myTag);
495  void tagAllContents(const std::string &path, unsigned int myTag);
496 
497  //-------------------------------------------------------------------------
498  // ---------------------- public ME getters -------------------------------
499  std::vector<std::string> getSubdirs(void) const;
500  std::vector<std::string> getMEs(void) const;
501  bool containsAnyMonitorable(const std::string &path) const;
502 
503  MonitorElement * get(const std::string &path) const;
504  std::vector<MonitorElement *> get(unsigned int tag) const;
505  std::vector<MonitorElement *> getContents(const std::string &path) const;
506  std::vector<MonitorElement *> getContents(const std::string &path, unsigned int tag) const;
507  void getContents(std::vector<std::string> &into, bool showContents = true) const;
508 
509  // ---------------------- softReset methods -------------------------------
510  void softReset(MonitorElement *me);
512 
513  // ---------------------- Public deleting ---------------------------------
514  void rmdir(const std::string &fullpath);
515  void removeContents(void);
516  void removeContents(const std::string &dir);
517  void removeElement(const std::string &name);
518  void removeElement(const std::string &dir, const std::string &name, bool warning = true);
519 
520  //-------------------------------------------------------------------------
521  // ---------------------- public I/O --------------------------------------
522  void savePB(const std::string &filename,
523  const std::string &path = "",
524  const uint32_t run = 0,
525  const uint32_t lumi = 0,
526  const bool resetMEsAfterWriting = false);
527  void save(const std::string &filename,
528  const std::string &path = "",
529  const std::string &pattern = "",
530  const std::string &rewrite = "",
531  const uint32_t run = 0,
532  const uint32_t lumi = 0,
535  const std::string &fileupdate = "RECREATE",
536  const bool resetMEsAfterWriting = false);
537  bool open(const std::string &filename,
538  bool overwrite = false,
539  const std::string &path ="",
540  const std::string &prepend = "",
541  OpenRunDirs stripdirs = KeepRunDirs,
542  bool fileMustExist = true);
543  bool load(const std::string &filename,
544  OpenRunDirs stripdirs = StripRunDirs,
545  bool fileMustExist = true);
546 
547  //-------------------------------------------------------------------------
548  // ---------------------- Public print methods -----------------------------
549  void showDirStructure(void) const;
550 
551  // ---------------------- Public check options -----------------------------
552  bool isCollate(void) const;
553 
554  //-------------------------------------------------------------------------
555  // ---------------------- Quality Test methods -----------------------------
556  QCriterion * getQCriterion(const std::string &qtname) const;
557  QCriterion * createQTest(const std::string &algoname, const std::string &qtname);
558  void useQTest(const std::string &dir, const std::string &qtname);
559  int useQTestByMatch(const std::string &pattern, const std::string &qtname);
560  void runQTests(void);
561  int getStatus(const std::string &path = "") const;
562  void scaleElements(void);
563 
564  private:
565  // ---------------- Navigation -----------------------
566  bool cdInto(const std::string &path) const;
567 
568  // ------------------- Reference ME -------------------------------
569  bool isCollateME(MonitorElement *me) const;
570 
571  // ------------------- Private "getters" ------------------------------
572  bool readFilePB(const std::string &filename,
573  bool overwrite = false,
574  const std::string &path ="",
575  const std::string &prepend = "",
576  OpenRunDirs stripdirs = StripRunDirs,
577  bool fileMustExist = true);
578  bool readFile(const std::string &filename,
579  bool overwrite = false,
580  const std::string &path ="",
581  const std::string &prepend = "",
582  OpenRunDirs stripdirs = StripRunDirs,
583  bool fileMustExist = true);
584  void makeDirectory(const std::string &path);
585  unsigned int readDirectory(TFile *file,
586  bool overwrite,
587  const std::string &path,
588  const std::string &prepend,
589  const std::string &curdir,
590  OpenRunDirs stripdirs);
591 
593  const std::string &name,
594  const uint32_t run = 0,
595  const uint32_t lumi = 0,
596  const uint32_t streamId = 0,
597  const uint32_t moduleId = 0) const;
598 
600  std::string & dirname,
601  std::string & objname,
602  TObject ** obj);
603 
604  public:
605  void getAllTags(std::vector<std::string> &into) const;
606  std::vector<MonitorElement*> getAllContents(const std::string &path,
607  uint32_t runNumber = 0,
608  uint32_t lumi = 0) const;
609  std::vector<MonitorElement*> getMatchingContents(const std::string &pattern, lat::Regexp::Syntax syntaxType = lat::Regexp::Wildcard) const;
610 
611  // Multithread SummaryCache manipulations
612  void mergeAndResetMEsRunSummaryCache(uint32_t run,
613  uint32_t streamId,
614  uint32_t moduleId);
616  uint32_t lumi,
617  uint32_t streamId,
618  uint32_t moduleId);
619  private:
620 
621  // ---------------- Miscellaneous -----------------------------
622  void initializeFrom(const edm::ParameterSet&);
623  void reset(void);
624  void forceReset(void);
625 
626  bool extract(TObject *obj, const std::string &dir, bool overwrite, bool collateHistograms);
627  TObject * extractNextObject(TBufferFile&) const;
628 
629  // ---------------------- Booking ------------------------------------
632  const std::string &name,
633  const char *context);
634  template <class HISTO, class COLLATE>
636  const char *context, int kind,
637  HISTO *h, COLLATE collate);
638 
642  MonitorElement * book1D(const std::string &dir, const std::string &name, TH1F *h);
643  MonitorElement * book1S(const std::string &dir, const std::string &name, TH1S *h);
644  MonitorElement * book1DD(const std::string &dir, const std::string &name, TH1D *h);
645  MonitorElement * book2D(const std::string &dir, const std::string &name, TH2F *h);
646  MonitorElement * book2S(const std::string &dir, const std::string &name, TH2S *h);
647  MonitorElement * book2DD(const std::string &dir, const std::string &name, TH2D *h);
648  MonitorElement * book3D(const std::string &dir, const std::string &name, TH3F *h);
649  MonitorElement * bookProfile(const std::string &dir, const std::string &name, TProfile *h);
650  MonitorElement * bookProfile2D(const std::string &folder, const std::string &name, TProfile2D *h);
651 
652  static bool checkBinningMatches(MonitorElement *me, TH1 *h);
653 
654  static void collate1D(MonitorElement *me, TH1F *h);
655  static void collate1S(MonitorElement *me, TH1S *h);
656  static void collate1DD(MonitorElement *me, TH1D *h);
657  static void collate2D(MonitorElement *me, TH2F *h);
658  static void collate2S(MonitorElement *me, TH2S *h);
659  static void collate2DD(MonitorElement *me, TH2D *h);
660  static void collate3D(MonitorElement *me, TH3F *h);
661  static void collateProfile(MonitorElement *me, TProfile *h);
662  static void collateProfile2D(MonitorElement *me, TProfile2D *h);
663 
664  // --- Operations on MEs that are normally reset at end of monitoring cycle ---
665  void setAccumulate(MonitorElement *me, bool flag);
666 
667  void print_trace(const std::string &dir, const std::string &name);
668 
669  // ----------------------- Unavailable ---------------------------------------
670  DQMStore(const DQMStore&);
671  const DQMStore& operator=(const DQMStore&);
672 
673  //-------------------------------------------------------------------------------
674  //-------------------------------------------------------------------------------
675  typedef std::pair<fastmatch *, QCriterion *> QTestSpec;
676  typedef std::list<QTestSpec> QTestSpecs;
677  typedef std::set<MonitorElement> MEMap;
678  typedef std::map<std::string, QCriterion *> QCMap;
679  typedef std::map<std::string, QCriterion *(*)(const std::string &)> QAMap;
680 
681  unsigned verbose_;
682  unsigned verboseQT_;
683  bool reset_;
684  double scaleFlag_;
690  uint32_t run_;
691  uint32_t streamId_;
692  uint32_t moduleId_;
693 
696  std::set<std::string> dirs_;
697 
701 
705 
706  friend class edm::DQMHttpSource;
707  friend class DQMService;
708  friend class DQMNet;
709  friend class DQMArchiver;
710  friend class DQMStoreExample; // for get{All,Matching}Contents -- sole user of this method!
711  friend class DQMRootOutputModule;
712  friend class DQMFileSaver;
713  friend class MEtoEDMConverter;
714 };
715 
716 #endif // DQMSERVICES_CORE_DQM_STORE_H
static void collateProfile2D(MonitorElement *me, TProfile2D *h)
Definition: DQMStore.cc:1568
QCriterion * getQCriterion(const std::string &qtname) const
Definition: DQMStore.cc:3118
IGetter * igetter_
Definition: DQMStore.h:704
bool compare_strings_reverse(std::string const &pattern, std::string const &input) const
Definition: DQMStore.cc:205
std::pair< fastmatch *, QCriterion * > QTestSpec
Definition: DQMStore.h:675
std::vector< MonitorElement * > getContents(Args &&...args)
Definition: DQMStore.h:194
MonitorElement * book1S(Args &&...args)
Definition: DQMStore.h:119
DQMStore(const edm::ParameterSet &pset, edm::ActivityRegistry &)
Definition: DQMStore.cc:441
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:1092
std::map< std::string, QCriterion * > QCMap
Definition: DQMStore.h:678
bool containsAnyMonitorable(const std::string &path) const
Definition: DQMStore.cc:1686
bool isCollateME(MonitorElement *me) const
Definition: DQMStore.cc:3311
bool cdInto(const std::string &path) const
Definition: DQMStore.cc:2325
void cd(void)
Definition: DQMStore.cc:311
int getStatus(const std::string &path="") const
Definition: DQMStore.cc:3224
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1647
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:942
void rmdir(const std::string &fullpath)
Definition: DQMStore.cc:3051
bool match(std::string const &s) const
Definition: DQMStore.cc:247
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:2887
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:155
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:1826
static void collate3D(MonitorElement *me, TH3F *h)
Definition: DQMStore.cc:1551
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:1204
static void collate1D(MonitorElement *me, TH1F *h)
Definition: DQMStore.cc:1509
MatchingHeuristicEnum
Definition: DQMStore.h:52
Definition: DQMNet.h:22
void cd(void)
Definition: DQMStore.cc:266
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:632
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:1114
uint32_t streamId_
Definition: DQMStore.h:691
tuple lumi
Definition: fjr2json.py:35
static void collate1DD(MonitorElement *me, TH1D *h)
Definition: DQMStore.cc:1523
const std::string & pwd(void)
Definition: DQMStore.cc:282
MonitorElement * bookInt(Args &&...args)
Definition: DQMStore.h:101
std::vector< MonitorElement * > getMatchingContents(const std::string &pattern, lat::Regexp::Syntax syntaxType=lat::Regexp::Wildcard) const
Definition: DQMStore.cc:1947
MonitorElement * bookString(Args &&...args)
Definition: DQMStore.h:95
MatchingHeuristicEnum matching_
Definition: DQMStore.h:70
bool reset_
Definition: DQMStore.h:683
MonitorElement * book1DD(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
Definition: DQMStore.cc:974
friend class DQMArchiver
Definition: DQMStore.h:709
void initializeFrom(const edm::ParameterSet &)
Definition: DQMStore.cc:508
OpenRunDirs
Definition: DQMStore.h:82
uint32_t moduleId_
Definition: DQMStore.h:692
QCMap qtests_
Definition: DQMStore.h:698
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:797
std::mutex book_mutex_
Definition: DQMStore.h:702
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:879
static std::string const input
Definition: EdmProvDump.cc:44
SaveReferenceTag
Definition: DQMStore.h:76
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1582
~DQMStore(void)
Definition: DQMStore.cc:497
void disableSoftReset(MonitorElement *me)
Definition: DQMStore.cc:3263
static void collateProfile(MonitorElement *me, TProfile *h)
Definition: DQMStore.cc:1558
void forceReset(void)
Definition: DQMStore.cc:2007
std::vector< MonitorElement * > getAllContents(const std::string &path, uint32_t runNumber=0, uint32_t lumi=0) const
Definition: DQMStore.cc:1909
fastmatch(std::string const &_fastString)
Definition: DQMStore.cc:129
unsigned verboseQT_
Definition: DQMStore.h:682
QTestSpecs qtestspecs_
Definition: DQMStore.h:700
void removeContents(void)
erase all monitoring elements in current directory (not including subfolders);
Definition: DQMStore.cc:3085
tuple path
else: Piece not in the list, fine.
double scaleFlag_
Definition: DQMStore.h:684
void get_info(const dqmstorepb::ROOTFilePB_Histo &, std::string &dirname, std::string &objname, TObject **obj)
Definition: DQMStore.cc:2950
MonitorElement * bookString(const char *name, const char *value)
Book string.
Definition: DQMStore.cc:908
MonitorElement * bookProfile2D(Args &&...args)
Definition: DQMStore.h:161
std::set< MonitorElement > MEMap
Definition: DQMStore.h:677
static void collate1S(MonitorElement *me, TH1S *h)
Definition: DQMStore.cc:1516
bool isCollate(void) const
Definition: DQMStore.cc:3302
void removeElement(const std::string &name)
Definition: DQMStore.cc:3093
static bool checkBinningMatches(MonitorElement *me, TH1 *h)
Definition: DQMStore.cc:1482
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:113
void tag(MonitorElement *, unsigned int)
Definition: DQMStore.cc:286
MonitorElement * book2S(Args &&...args)
Definition: DQMStore.h:137
double f[11][100]
uint32_t run_
Definition: DQMStore.h:690
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
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:1256
void setVerbose(unsigned level)
Definition: DQMStore.cc:619
void softReset(MonitorElement *me)
Definition: DQMStore.cc:3255
std::string pwd_
Definition: DQMStore.h:694
void runQTests(void)
Definition: DQMStore.cc:3203
TObject * extractNextObject(TBufferFile &) const
Definition: DQMStore.cc:2942
lat::Regexp * regexp_
Definition: DQMStore.h:68
IBooker * ibooker_
Definition: DQMStore.h:703
QAMap qalgos_
Definition: DQMStore.h:699
std::vector< MonitorElement * > getContents(const std::string &path) const
Definition: DQMStore.cc:1725
std::string readSelectedDirectory_
Definition: DQMStore.h:689
std::vector< std::string > getMEs(void)
Definition: DQMStore.cc:299
void mergeAndResetMEsRunSummaryCache(uint32_t run, uint32_t streamId, uint32_t moduleId)
Definition: DQMStore.cc:332
std::string fastString_
Definition: DQMStore.h:69
void meGetter(iFunc f)
Definition: DQMStore.h:269
bool dirExists(const std::string &path) const
true if directory exists
Definition: DQMStore.cc:720
void savePB(const std::string &filename, const std::string &path="", const uint32_t run=0, const uint32_t lumi=0, const bool resetMEsAfterWriting=false)
Definition: DQMStore.cc:2367
void getAllTags(std::vector< std::string > &into) const
Definition: DQMStore.cc:1856
const DQMStore & operator=(const DQMStore &)
bool dirExists(const std::string &path)
Definition: DQMStore.cc:307
bool load(const std::string &filename, OpenRunDirs stripdirs=StripRunDirs, bool fileMustExist=true)
Definition: DQMStore.cc:2860
void scaleElements(void)
Definition: DQMStore.cc:3319
~fastmatch()
Definition: DQMStore.cc:199
void tagAllContents(const std::string &path, unsigned int myTag)
Definition: DQMStore.cc:1625
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
MonitorElement * initialise(MonitorElement *me, const std::string &path)
void goUp(void)
Definition: DQMStore.cc:278
bool containsAnyMonitorable(const std::string &path)
Definition: DQMStore.cc:303
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:131
unsigned verbose_
Definition: DQMStore.h:681
std::list< QTestSpec > QTestSpecs
Definition: DQMStore.h:676
static void collate2S(MonitorElement *me, TH2S *h)
Definition: DQMStore.cc:1537
MEMap data_
Definition: DQMStore.h:695
static void collate2D(MonitorElement *me, TH2F *h)
Definition: DQMStore.cc:1530
void print_trace(const std::string &dir, const std::string &name)
Definition: DQMStore.cc:568
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:3168
void bookTransaction(iFunc f, uint32_t run, uint32_t streamId, uint32_t moduleId)
Definition: DQMStore.h:230
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1670
friend class DQMStoreExample
Definition: DQMStore.h:710
std::vector< std::string > getSubdirs(void)
Definition: DQMStore.cc:295
DQMStore * owner_
Definition: DQMStore.h:184
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:319
unsigned int readDirectory(TFile *file, bool overwrite, const std::string &path, const std::string &prepend, const std::string &curdir, OpenRunDirs stripdirs)
Definition: DQMStore.cc:2690
IBooker(DQMStore *store)
Definition: DQMStore.h:173
bool forceResetOnBeginLumi_
Definition: DQMStore.h:688
bool extract(TObject *obj, const std::string &dir, bool overwrite, bool collateHistograms)
Definition: DQMStore.cc:2029
static void collate2DD(MonitorElement *me, TH2D *h)
Definition: DQMStore.cc:1544
void tagContents(const std::string &path, unsigned int myTag)
tag all children of folder (does NOT include subfolders)
Definition: DQMStore.cc:1613
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, const uint32_t lumi=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE", const bool resetMEsAfterWriting=false)
Definition: DQMStore.cc:2490
std::map< std::string, QCriterion *(*)(const std::string &)> QAMap
Definition: DQMStore.h:679
bool readFilePB(const std::string &filename, bool overwrite=false, const std::string &path="", const std::string &prepend="", OpenRunDirs stripdirs=StripRunDirs, bool fileMustExist=true)
Definition: DQMStore.cc:2971
void useQTest(const std::string &dir, const std::string &qtname)
Definition: DQMStore.cc:3150
tuple filename
Definition: lut2db_cfg.py:20
MonitorElement * book2DD(Args &&...args)
Definition: DQMStore.h:143
void goUp(void)
equivalent to &quot;cd ..&quot;
Definition: DQMStore.cc:666
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:2845
static const int STATUS_OK
void setAccumulate(MonitorElement *me, bool flag)
Definition: DQMStore.cc:3272
tuple level
Definition: testEve_cfg.py:34
void meBookerGetter(iFunc f)
Definition: DQMStore.h:260
QCriterion * createQTest(const std::string &algoname, const std::string &qtname)
Definition: DQMStore.cc:3129
MonitorElement * bookFloat(Args &&...args)
Definition: DQMStore.h:107
dbl *** dir
Definition: mlp_gen.cc:35
void showDirStructure(void) const
Definition: DQMStore.cc:3282
void reset(void)
Definition: DQMStore.cc:1983
MonitorElement * bookInt(const char *name)
Book int.
Definition: DQMStore.cc:849
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:1070
tuple collateHistograms
MonitorElement * book3D(Args &&...args)
Definition: DQMStore.h:149
void mergeAndResetMEsLuminositySummaryCache(uint32_t run, uint32_t lumi, uint32_t streamId, uint32_t moduleId)
Definition: DQMStore.cc:387
DQMStore * owner_
Definition: DQMStore.h:219
friend class edm::DQMHttpSource
Definition: DQMStore.h:706
std::set< std::string > dirs_
Definition: DQMStore.h:696
bool collateHistograms_
Definition: DQMStore.h:685
MonitorElement * book1DD(Args &&...args)
Definition: DQMStore.h:125
bool LSbasedMode_
Definition: DQMStore.h:687
MonitorElement * book1S(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
Definition: DQMStore.cc:958
void makeDirectory(const std::string &path)
Definition: DQMStore.cc:679
bool compare_strings(std::string const &pattern, std::string const &input) const
Definition: DQMStore.cc:226
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:655
const std::string & pwd(void) const
Definition: DQMStore.cc:627
bool enableMultiThread_
Definition: DQMStore.h:686
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:1400
IGetter(DQMStore *store)
Definition: DQMStore.h:208