CMS 3D CMS Logo

DQMStore.h
Go to the documentation of this file.
1 #ifndef DQMServices_Core_DQMStore_h
2 #define DQMServices_Core_DQMStore_h
3 
6 
8 
9 #include <type_traits>
10 #include <functional>
11 #include <mutex>
12 
13 // TODO: Remove at some point:
14 #define TRACE(msg) \
15  std::cout << "TRACE: " << __FILE__ << ":" << __LINE__ << "(" << __FUNCTION__ << ") " << msg << std::endl;
16 #define TRACE_ TRACE("");
17 
18 namespace dqm {
19  namespace implementation {
21  class DQMStore;
22 
23  // The common implementation to change folders
24  class NavigatorBase {
25  public:
26  virtual void cd();
27  // cd is identical to setCurrentFolder!
29  virtual void cd(std::string const& dir);
30  // This is the only method that is allowed to change cwd_ value
31  virtual void setCurrentFolder(std::string const& fullpath);
32  virtual void goUp();
33  // returns the current directory without (!) trailing slash or empty string.
34  virtual std::string pwd();
35 
36  virtual ~NavigatorBase() {}
37 
38  protected:
41  };
42 
44  public:
45  // DQMStore configures the IBooker in bookTransaction.
46  friend class DQMStore;
47 
48  // functor to be passed as a default argument that does not do anything.
49  struct NOOP {
50  void operator()(TH1*) const {};
51  void operator()() const {};
52  };
53 
54  //
55  // Booking Methods, templated to allow passing in lambdas.
56  // The variations taking ROOT object pointers do NOT take ownership of
57  // the object; it will be clone'd.
58  //
59 
60  // The function argument as an optional template parameter adds a lot of
61  // ambiguity to the overload resolution, since it accepts *anything* by
62  // default (and it does not help that we rely on implicit conversions for
63  // almost all of the arguments in many cases, converting string literal
64  // to TString and ints to floats, and 0 also prefers to convert to float*
65  // and so on ...).
66  // So, we use SFINAE to restrict the template parameter type, but that is
67  // also not that easy: there is no way to check for sth. callable in
68  // type_traits (`is_function` is not the right thing!), so instead we
69  // check for not-numeric things, which works most of the time (though e.g.
70  // enum constants somehow still pass as not arithmetic and need an
71  // explicit cast to resolve the ambiguity).
73  MonitorElement* bookInt(TString const& name, FUNC onbooking = NOOP()) {
75  onbooking();
76  return nullptr;
77  });
78  }
80  MonitorElement* bookFloat(TString const& name, FUNC onbooking = NOOP()) {
82  onbooking();
83  return nullptr;
84  });
85  }
87  MonitorElement* bookString(TString const& name, TString const& value, FUNC onbooking = NOOP()) {
88  std::string initial_value(value);
90  onbooking();
91  return nullptr;
92  });
93  me->Fill(initial_value);
94  return me;
95  }
96 
98  MonitorElement* book1D(TString const& name,
99  TString const& title,
100  int const nchX,
101  double const lowX,
102  double const highX,
103  FUNC onbooking = NOOP()) {
105  auto th1 = new TH1F(name, title, nchX, lowX, highX);
106  onbooking(th1);
107  return th1;
108  });
109  }
112  TString const& name, TString const& title, int nchX, float const* xbinsize, FUNC onbooking = NOOP()) {
114  auto th1 = new TH1F(name, title, nchX, xbinsize);
115  onbooking(th1);
116  return th1;
117  });
118  }
120  MonitorElement* book1D(TString const& name, TH1F* object, FUNC onbooking = NOOP()) {
121  return bookME(
122  name,
124  [=]() {
125  auto th1 = static_cast<TH1F*>(object->Clone(name));
126  onbooking(th1);
127  return th1;
128  },
129  /* forceReplace */ true);
130  }
131 
134  TString const& name, TString const& title, int nchX, double lowX, double highX, FUNC onbooking = NOOP()) {
136  auto th1 = new TH1S(name, title, nchX, lowX, highX);
137  onbooking(th1);
138  return th1;
139  });
140  }
142  MonitorElement* book1S(TString const& name, TH1S* object, FUNC onbooking = NOOP()) {
143  return bookME(
144  name,
146  [=]() {
147  auto th1 = static_cast<TH1S*>(object->Clone(name));
148  onbooking(th1);
149  return th1;
150  },
151  /* forceReplace */ true);
152  }
153 
156  TString const& name, TString const& title, int nchX, double lowX, double highX, FUNC onbooking = NOOP()) {
158  auto th1 = new TH1D(name, title, nchX, lowX, highX);
159  onbooking(th1);
160  return th1;
161  });
162  }
164  MonitorElement* book1DD(TString const& name, TH1D* object, FUNC onbooking = NOOP()) {
165  return bookME(
166  name,
168  [=]() {
169  auto th1 = static_cast<TH1D*>(object->Clone(name));
170  onbooking(th1);
171  return th1;
172  },
173  /* forceReplace */ true);
174  }
175 
177  MonitorElement* book2D(TString const& name,
178  TString const& title,
179  int nchX,
180  double lowX,
181  double highX,
182  int nchY,
183  double lowY,
184  double highY,
185  FUNC onbooking = NOOP()) {
187  auto th2 = new TH2F(name, title, nchX, lowX, highX, nchY, lowY, highY);
188  onbooking(th2);
189  return th2;
190  });
191  }
193  MonitorElement* book2D(TString const& name,
194  TString const& title,
195  int nchX,
196  float const* xbinsize,
197  int nchY,
198  float const* ybinsize,
199  FUNC onbooking = NOOP()) {
201  auto th2 = new TH2F(name, title, nchX, xbinsize, nchY, ybinsize);
202  onbooking(th2);
203  return th2;
204  });
205  }
207  MonitorElement* book2D(TString const& name, TH2F* object, FUNC onbooking = NOOP()) {
208  return bookME(
209  name,
211  [=]() {
212  auto th2 = static_cast<TH2F*>(object->Clone(name));
213  onbooking(th2);
214  return th2;
215  },
216  /* forceReplace */ true);
217  }
219  MonitorElement* book2S(TString const& name,
220  TString const& title,
221  int nchX,
222  double lowX,
223  double highX,
224  int nchY,
225  double lowY,
226  double highY,
227  FUNC onbooking = NOOP()) {
229  auto th2 = new TH2S(name, title, nchX, lowX, highX, nchY, lowY, highY);
230  onbooking(th2);
231  return th2;
232  });
233  }
235  MonitorElement* book2S(TString const& name,
236  TString const& title,
237  int nchX,
238  float const* xbinsize,
239  int nchY,
240  float const* ybinsize,
241  FUNC onbooking = NOOP()) {
243  auto th2 = new TH2S(name, title, nchX, xbinsize, nchY, ybinsize);
244  onbooking(th2);
245  return th2;
246  });
247  }
249  MonitorElement* book2S(TString const& name, TH2S* object, FUNC onbooking = NOOP()) {
250  return bookME(
251  name,
253  [=]() {
254  auto th2 = static_cast<TH2S*>(object->Clone(name));
255  onbooking(th2);
256  return th2;
257  },
258  /* forceReplace */ true);
259  }
261  MonitorElement* book2DD(TString const& name,
262  TString const& title,
263  int nchX,
264  double lowX,
265  double highX,
266  int nchY,
267  double lowY,
268  double highY,
269  FUNC onbooking = NOOP()) {
271  auto th2 = new TH2D(name, title, nchX, lowX, highX, nchY, lowY, highY);
272  onbooking(th2);
273  return th2;
274  });
275  }
277  MonitorElement* book2DD(TString const& name, TH2D* object, FUNC onbooking = NOOP()) {
278  return bookME(
279  name,
281  [=]() {
282  auto th2 = static_cast<TH2D*>(object->Clone(name));
283  onbooking(th2);
284  return th2;
285  },
286  /* forceReplace */ true);
287  }
288 
290  MonitorElement* book3D(TString const& name,
291  TString const& title,
292  int nchX,
293  double lowX,
294  double highX,
295  int nchY,
296  double lowY,
297  double highY,
298  int nchZ,
299  double lowZ,
300  double highZ,
301  FUNC onbooking = NOOP()) {
303  auto th3 = new TH3F(name, title, nchX, lowX, highX, nchY, lowY, highY, nchZ, lowZ, highZ);
304  onbooking(th3);
305  return th3;
306  });
307  }
309  MonitorElement* book3D(TString const& name, TH3F* object, FUNC onbooking = NOOP()) {
310  return bookME(
311  name,
313  [=]() {
314  auto th3 = static_cast<TH3F*>(object->Clone(name));
315  onbooking(th3);
316  return th3;
317  },
318  /* forceReplace */ true);
319  }
320 
322  MonitorElement* bookProfile(TString const& name,
323  TString const& title,
324  int nchX,
325  double lowX,
326  double highX,
327  int /* nchY */,
328  double lowY,
329  double highY,
330  char const* option = "s",
331  FUNC onbooking = NOOP()) {
333  auto tprofile = new TProfile(name, title, nchX, lowX, highX, lowY, highY, option);
334  onbooking(tprofile);
335  return tprofile;
336  });
337  }
339  MonitorElement* bookProfile(TString const& name,
340  TString const& title,
341  int nchX,
342  double lowX,
343  double highX,
344  double lowY,
345  double highY,
346  char const* option = "s",
347  FUNC onbooking = NOOP()) {
349  auto tprofile = new TProfile(name, title, nchX, lowX, highX, lowY, highY, option);
350  onbooking(tprofile);
351  return tprofile;
352  });
353  }
355  MonitorElement* bookProfile(TString const& name,
356  TString const& title,
357  int nchX,
358  double const* xbinsize,
359  int /* nchY */,
360  double lowY,
361  double highY,
362  char const* option = "s",
363  FUNC onbooking = NOOP()) {
365  auto tprofile = new TProfile(name, title, nchX, xbinsize, lowY, highY, option);
366  onbooking(tprofile);
367  return tprofile;
368  });
369  }
371  MonitorElement* bookProfile(TString const& name,
372  TString const& title,
373  int nchX,
374  double const* xbinsize,
375  double lowY,
376  double highY,
377  char const* option = "s",
378  FUNC onbooking = NOOP()) {
380  auto tprofile = new TProfile(name, title, nchX, xbinsize, lowY, highY, option);
381  onbooking(tprofile);
382  return tprofile;
383  });
384  }
386  MonitorElement* bookProfile(TString const& name, TProfile* object, FUNC onbooking = NOOP()) {
387  return bookME(
388  name,
390  [=]() {
391  auto tprofile = static_cast<TProfile*>(object->Clone(name));
392  onbooking(tprofile);
393  return tprofile;
394  },
395  /* forceReplace */ true);
396  }
397 
400  TString const& title,
401  int nchX,
402  double lowX,
403  double highX,
404  int nchY,
405  double lowY,
406  double highY,
407  double lowZ,
408  double highZ,
409  char const* option = "s",
410  FUNC onbooking = NOOP()) {
412  auto tprofile = new TProfile2D(name, title, nchX, lowX, highX, nchY, lowY, highY, lowZ, highZ, option);
413  onbooking(tprofile);
414  return tprofile;
415  });
416  }
419  TString const& title,
420  int nchX,
421  double lowX,
422  double highX,
423  int nchY,
424  double lowY,
425  double highY,
426  int /* nchZ */,
427  double lowZ,
428  double highZ,
429  char const* option = "s",
430  FUNC onbooking = NOOP()) {
432  auto tprofile = new TProfile2D(name, title, nchX, lowX, highX, nchY, lowY, highY, lowZ, highZ, option);
433  onbooking(tprofile);
434  return tprofile;
435  });
436  }
438  MonitorElement* bookProfile2D(TString const& name, TProfile2D* object, FUNC onbooking = NOOP()) {
439  return bookME(
440  name,
442  [=]() {
443  auto tprofile = static_cast<TProfile2D*>(object->Clone(name));
444  onbooking(tprofile);
445  return tprofile;
446  },
447  /* forceReplace */ true);
448  }
449 
450  //
451  // all non-template interfaces are virtual.
452  //
453 
455  // RAII-Style guard to set and reset the Scope.
456  template <MonitorElementData::Scope SCOPE>
457  struct UseScope {
460  UseScope(IBooker& booker) : parent(booker) { oldscope = parent.setScope(SCOPE); }
462  };
466 
467  ~IBooker() override;
468 
469  private:
470  IBooker(DQMStore* store);
471  virtual uint64_t setModuleID(uint64_t moduleID);
473  virtual MonitorElement* bookME(TString const& name,
475  std::function<TH1*()> makeobject,
476  bool forceReplace = false);
477 
478  DQMStore* store_ = nullptr;
479  MonitorElementData::Scope scope_ = MonitorElementData::Scope::JOB;
482  };
483 
485  public:
486  // The IGetter interface is not really suitable for concurrent lumis/runs,
487  // so we don't even try much to get it right. Harvesting needs to run
488  // sequentially for now. Therefore, the methods just return the next-best
489  // global MEs that they find, ignoring Scope and run/lumi.
490  // Since these are global MEs, they may be deleted at some point; don't
491  // store the pointers!
492  // They are also shared with other modules. That is save when running
493  // multi-threaded as long as getTH1() etc. are not used, but of course
494  // all dependencies need to be properly declared to get correct results.
495 
496  // TODO: review and possibly rename the all methods below:
497  // get MEs that are direct children of full path `path`
498  virtual std::vector<dqm::harvesting::MonitorElement*> getContents(std::string const& path) const;
499 
500  // get all elements below full path `path`
501  // we have to discuss semantics here -- are run/lumi ever used?
502  virtual std::vector<dqm::harvesting::MonitorElement*> getAllContents(std::string const& path) const;
504  virtual std::vector<dqm::harvesting::MonitorElement*> getAllContents(std::string const& path,
505  uint32_t runNumber,
506  uint32_t lumi) const;
507  // TODO: rename to reflect the fact that it requires full path
508  // return ME identified by full path `path`, or nullptr
509  virtual MonitorElement* get(std::string const& fullpath) const;
510 
511  // This is the most specific way to get a ME, specifying also run and
512  // lumi in the key. Primarily for internal use.
513  virtual MonitorElement* get(MonitorElementData::Key const& key) const;
514 
515  // same as get, throws an exception if histogram not found
516  // Deprecated simply because it is barely used.
518  virtual MonitorElement* getElement(std::string const& path) const;
519 
520  // return sub-directories of current directory
521  // Deprecated because the current implementation is very slow and barely
522  // used, use getAllContents instead.
524  virtual std::vector<std::string> getSubdirs() const;
525  // return element names of direct children of current directory
526  virtual std::vector<std::string> getMEs() const;
527  // returns whether there are objects at full path `path`
528  virtual bool dirExists(std::string const& path) const;
529 
530  ~IGetter() override;
531 
532  protected:
533  IGetter(DQMStore* store);
534 
536  };
537 
538  class DQMStore : public IGetter, public IBooker {
539  public:
540  // IGetter uses the globalMEs_ directly.
541  friend IGetter;
543 
545  DQMStore(DQMStore const&) = delete;
546  DQMStore(DQMStore&&) = delete;
547  DQMStore& operator=(DQMStore const&) = delete;
548  ~DQMStore() override;
549 
550  // ------------------------------------------------------------------------
551  // ---------------------- public I/O --------------------------------------
553  void save(std::string const& filename, std::string const& path = "");
555  bool open(std::string const& filename,
556  bool overwrite = false,
557  std::string const& path = "",
558  std::string const& prepend = "",
559  OpenRunDirs stripdirs = KeepRunDirs,
560  bool fileMustExist = true);
561 
562  // ------------------------------------------------------------------------
563  // ------------ IBooker/IGetter overrides to prevent ambiguity ------------
564  void cd() override { this->IBooker::cd(); }
565  void cd(std::string const& dir) override { this->IBooker::cd(dir); }
566  void goUp() override { this->IBooker::goUp(); }
567  std::string pwd() override { return this->IBooker::pwd(); }
568 
569  void setCurrentFolder(std::string const& fullpath) override {
570  // only here we keep the two in sync -- all the others call this in the end!
571  this->IBooker::setCurrentFolder(fullpath);
572  this->IGetter::setCurrentFolder(fullpath);
573  }
574 
575  public:
576  // internal -- figure out better protection.
577  template <typename iFunc>
578  void bookTransaction(iFunc f, uint64_t moduleId, bool canSaveByLumi) {
579  // taking the lock here only to protect the single, global IBooker (as
580  // base class of DQMStore). We could avoid taking this lock by making a
581  // new IBooker instance for each transaction, and the DQMStore itself
582  // takes the lock before touching any data structures.
583  // There is a race in bookME when we don't take this lock, where two
584  // modules might prepare a global ME for the same name at the same time
585  // and only one of them succeeds in putME: this is is safe, but we need
586  // to remove the assertion over there and subsystem code has to be
587  // aware that the booking callback *can* run multiple times.
588  // Additionally, this lock is what keeps usage of getTH1() safe during
589  // booking... all code needs to be migrated to callbacks before this can
590  // be removed.
591  auto lock = std::scoped_lock(this->booking_mutex_);
592 
593  // This is to make sure everything gets reset in case of an exception.
594  // That is not really required (an exception here will crash the job
595  // anyways, and it is technically not required to reset everything), but
596  // it prevents misleading error messages in other threads.
597  struct ModuleIdScope {
598  IBooker& booker_;
599  uint64_t oldid_;
600  MonitorElementData::Scope oldscope_;
601  edm::LuminosityBlockID oldrunlumi_;
602  ModuleIdScope(IBooker& booker,
603  uint64_t newid,
604  MonitorElementData::Scope newscope,
605  edm::LuminosityBlockID newrunlumi)
606  : booker_(booker) {
607  oldid_ = booker_.setModuleID(newid);
608  oldscope_ = booker_.setScope(newscope);
609  oldrunlumi_ = booker_.setRunLumi(newrunlumi);
610  assert(newid != 0 || !"moduleID must be set for normal booking transaction");
611  assert(oldid_ == 0 || !"Nested booking transaction?");
612  }
613  ~ModuleIdScope() {
614  booker_.setModuleID(oldid_);
615  booker_.setScope(oldscope_);
616  booker_.setRunLumi(oldrunlumi_);
617  }
618  };
619 
620  ModuleIdScope booker(
621  *this,
622  moduleId,
623  // enable per-lumi-by-default here
624  canSaveByLumi && this->doSaveByLumi_ ? MonitorElementData::Scope::LUMI : MonitorElementData::Scope::RUN,
625  // always book prototypes
627 
628  f(booker.booker_);
629  };
630 
631  template <typename iFunc>
632  void meBookerGetter(iFunc f) {
633  auto lock = std::scoped_lock(this->booking_mutex_);
634  // here, we make much less assumptions compared to bookTransaction.
635  // This is essentially legacy semantics except we actually take the lock.
636  f(*this, *this);
637  // TODO: we should maybe make sure that Scope changes are reset here,
638  // but also it makes sense to inherit the Scope from the environement
639  // (e.g. when meBookerGetter is called *inside* a booking transaction).
640  };
641 
642  // For input modules: trigger recycling without local ME/enterLumi/moduleID.
644 
645  // this creates local all needed global MEs for the given run/lumi (and
646  // module), potentially cloning them if there are concurrent runs/lumis.
647  // Symmetrical to cleanupLumi, this is called from a framwork hook, to
648  // make sure it also runs when the module does not call anything.
651 
652  // modules are expected to call these callbacks when they change run/lumi.
653  // The DQMStore then updates the module's MEs local MEs to point to the
654  // new run/lumi.
657 
658  // this is triggered by a framework hook to remove/recycle MEs after a
659  // run/lumi is saved. We do this via the edm::Service interface to make
660  // sure it runs after *all* output modules, even if there are multiple.
662 
663  // Add ME to DQMStore datastructures. The object will be deleted if a
664  // similar object is already present.
665  // For global ME
667  // For local ME
669  // Find a global ME of matching name, in any state.
670  // MELIKE can be a MonitorElementData::Path or MonitorElement*.
671  template <typename MELIKE>
672  MonitorElement* findME(MELIKE const& path);
673  // Log a backtrace on booking.
674  void printTrace(std::string const& message);
675  // print a log message if ME matches trackME_.
676  void debugTrackME(const char* message, MonitorElement* me_local, MonitorElement* me_global) const;
677 
678  private:
679  // MEComparison is a name-only comparison on MEs and Paths, allowing
680  // heterogeneous lookup.
681  // The ME objects here are lightweight, all the important stuff is in the
682  // MEData. However we never handle MEData directly, but always keep it
683  // wrapped in MEs (created as needed). MEs can share MEData.
684  // ME objects must never appear more than once in these sets. ME objects
685  // in localMEs_ cannot be deleted, since the module might hold pointers.
686  // MEs in globalMEs_ can be deleted/recycled at the end of their scope,
687  // if there are no local MEs left that share the data.
688  // MEs can be _protoype MEs_ if their scope is not yet known (after
689  // booking, after leaveLumi). A prototype is kept if and only if there is
690  // no other global instance of the same ME. Prototype MEs have
691  // run = lumi = 0 and scope != JOB. If scope == JOB, a prototype is never
692  // required. Prototype MEs are reset *before* inserting, so fill calls
693  // can go into prototype MEs and not be lost.
694  // Key is (run, lumi), potentially one or both 0 for SCOPE::RUN or SCOPE::JOB
695  // NEVER modify the key_ of a ME in these datastructures. Since we use
696  // pointers, this may be possible (not everything is const), but it could
697  // still corrupt the datastructure.
698  std::map<edm::LuminosityBlockID, std::set<MonitorElement*, MonitorElement::MEComparison>> globalMEs_;
699  // Key is (moduleID [, run | , stream]), run is only needed for
700  // edm::global, stream only for edm::stream.
701  // Legacy MEs have moduleID 0.
702  std::map<uint64_t, std::set<MonitorElement*, MonitorElement::MEComparison>> localMEs_;
703  // Whenever modifying these sets, take this mutex. It's recursive, so we
704  // can be liberal -- lock on any access, but also lock on the full booking
705  // transaction.
706  std::recursive_mutex booking_mutex_;
707 
708  // Universal verbose flag.
709  // Only very few usages remain, the main debugging tool is trackME_.
710  int verbose_;
711 
712  // If set to true, error out whenever things happen that are not safe for
713  // legacy modules.
715 
716  // Book MEs by lumi by default whenever possible.
718  std::vector<std::string> MEsToSave_; //just if perLS is ON
719 
720  // if non-empty, debugTrackME calls will log some information whenever a
721  // ME path contains this string.
723  };
724  } // namespace implementation
725 
726  // Since we still use a single, edm::Serivce instance of a DQMStore, these are all the same.
727  namespace legacy {
729  public:
732  // import constructors.
734  };
735  } // namespace legacy
736  namespace reco {
738  } // namespace reco
739  namespace harvesting {
741  } // namespace harvesting
742 } // namespace dqm
743 
744 #endif
dqm::implementation::IBooker::book2S
MonitorElement * book2S(TString const &name, TH2S *object, FUNC onbooking=NOOP())
Definition: DQMStore.h:249
edm::RunNumber_t
unsigned int RunNumber_t
Definition: RunLumiEventNumber.h:14
dqm::implementation::DQMStore::StripRunDirs
Definition: DQMStore.h:542
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
dqm::implementation::IBooker::runlumi_
edm::LuminosityBlockID runlumi_
Definition: DQMStore.h:481
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TH1F *object, FUNC onbooking=NOOP())
Definition: DQMStore.h:120
resolutioncreator_cfi.object
object
Definition: resolutioncreator_cfi.py:4
dqm::implementation::NavigatorBase::~NavigatorBase
virtual ~NavigatorBase()
Definition: DQMStore.h:36
dqm::implementation::DQMStore::findOrRecycle
MonitorElement * findOrRecycle(MonitorElementData::Key const &)
Definition: DQMStore.cc:317
dqm::implementation::IGetter::getContents
virtual std::vector< dqm::harvesting::MonitorElement * > getContents(std::string const &path) const
Definition: DQMStore.cc:593
dqm::implementation::IBooker::bookFloat
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:80
MonitorElementData::Kind::INT
dqm::implementation::DQMStore::leaveLumi
void leaveLumi(edm::RunNumber_t run, edm::LuminosityBlockNumber_t lumi, uint64_t moduleID)
Definition: DQMStore.cc:492
dqm::implementation::IBooker::book2S
MonitorElement * book2S(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:219
dqm::implementation::IBooker::book2S
MonitorElement * book2S(TString const &name, TString const &title, int nchX, float const *xbinsize, int nchY, float const *ybinsize, FUNC onbooking=NOOP())
Definition: DQMStore.h:235
dqm::implementation::IBooker::setScope
virtual MonitorElementData::Scope setScope(MonitorElementData::Scope newscope)
Definition: DQMStore.cc:46
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TH2F *object, FUNC onbooking=NOOP())
Definition: DQMStore.h:207
reco_skim_cfg_mod.fullpath
fullpath
Definition: reco_skim_cfg_mod.py:202
dqm::implementation::DQMStore::goUp
void goUp() override
Definition: DQMStore.h:566
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
dqm::implementation::DQMStore::initLumi
void initLumi(edm::RunNumber_t run, edm::LuminosityBlockNumber_t lumi)
Definition: DQMStore.cc:360
dqm::implementation::DQMStore::DQMStore
DQMStore(edm::ParameterSet const &pset, edm::ActivityRegistry &)
Definition: DQMStore.cc:739
MonitorElementData::Kind::TH1S
MonitorElementData::Kind::TH1F
dqm::implementation::IBooker::moduleID_
uint64_t moduleID_
Definition: DQMStore.h:480
dqm::implementation::IGetter::IGetter
IGetter(DQMStore *store)
Definition: DQMStore.cc:735
dqm::implementation::IGetter::getMEs
virtual std::vector< std::string > getMEs() const
Definition: DQMStore.cc:720
dqm::implementation::IBooker::bookProfile2D
MonitorElement * bookProfile2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, double lowZ, double highZ, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:399
dqm::implementation::NavigatorBase::cwd_
std::string cwd_
Definition: DQMStore.h:40
dqm::implementation::IBooker::bookME
virtual MonitorElement * bookME(TString const &name, MonitorElementData::Kind kind, std::function< TH1 *()> makeobject, bool forceReplace=false)
Definition: DQMStore.cc:63
MonitorElementData::Kind::STRING
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int nchX, float const *xbinsize, FUNC onbooking=NOOP())
Definition: DQMStore.h:111
dqm::implementation::DQMStore::operator=
DQMStore & operator=(DQMStore const &)=delete
cms::cuda::assert
assert(be >=bs)
dqm::implementation::DQMStore::KeepRunDirs
Definition: DQMStore.h:542
dqm::implementation::DQMStore::meBookerGetter
void meBookerGetter(iFunc f)
Definition: DQMStore.h:632
dqm::implementation::IGetter::getSubdirs
virtual DQM_DEPRECATED std::vector< std::string > getSubdirs() const
Definition: DQMStore.cc:700
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
gpuClustering::moduleId
uint16_t *__restrict__ uint16_t const *__restrict__ uint32_t const *__restrict__ uint32_t *__restrict__ uint32_t const *__restrict__ moduleId
Definition: gpuClusterChargeCut.h:20
IBooker
dqm::reco::DQMStore::IBooker IBooker
Definition: RPCRollMapHisto.cc:6
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:46
dqm::implementation::IBooker::book2DD
MonitorElement * book2DD(TString const &name, TH2D *object, FUNC onbooking=NOOP())
Definition: DQMStore.h:277
dqm::implementation::IBooker::bookProfile
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:339
dqm::implementation::IGetter::getAllContents
virtual std::vector< dqm::harvesting::MonitorElement * > getAllContents(std::string const &path) const
Definition: DQMStore.cc:609
dqm::implementation::IBooker::setRunLumi
virtual edm::LuminosityBlockID setRunLumi(edm::LuminosityBlockID runlumi)
Definition: DQMStore.cc:57
edm::LuminosityBlockNumber_t
unsigned int LuminosityBlockNumber_t
Definition: RunLumiEventNumber.h:13
dqm::harvesting::DQMStore
dqm::legacy::DQMStore DQMStore
Definition: DQMStore.h:740
fileinputsource_cfi.option
option
Definition: fileinputsource_cfi.py:94
MonitorElementData::Kind::TH2D
dqm::implementation::IBooker::UseScope::parent
IBooker & parent
Definition: DQMStore.h:458
dqm::implementation::IBooker::IBooker
IBooker(DQMStore *store)
Definition: DQMStore.cc:39
convertSQLiteXML.runNumber
runNumber
Definition: convertSQLiteXML.py:91
MonitorElementData::Kind::TH2F
ActivityRegistry.h
dqm::legacy::DQMStore
Definition: DQMStore.h:728
MonitorElementData::Key
Definition: MonitorElementCollection.h:224
dqm::implementation::DQMStore::OpenRunDirs
OpenRunDirs
Definition: DQMStore.h:542
dqm::implementation::IBooker::NOOP::operator()
void operator()() const
Definition: DQMStore.h:51
dqm::implementation::IBooker::NOOP
Definition: DQMStore.h:49
dqm::implementation::DQMStore::cleanupLumi
void cleanupLumi(edm::RunNumber_t run, edm::LuminosityBlockNumber_t lumi)
Definition: DQMStore.cc:526
dqm::implementation::IBooker::~IBooker
~IBooker() override
Definition: DQMStore.cc:44
edm::ActivityRegistry
Definition: ActivityRegistry.h:134
MonitorElementData::Scope
Scope
Definition: MonitorElementCollection.h:152
dqm::implementation::IBooker::bookProfile
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double const *xbinsize, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:371
dqm::implementation::NavigatorBase::cd
virtual void cd()
Definition: DQMStore.cc:29
dqm::implementation::IBooker::bookProfile
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:322
corrVsCorr.filename
filename
Definition: corrVsCorr.py:123
dqm::implementation::IBooker::book1S
MonitorElement * book1S(TString const &name, TH1S *object, FUNC onbooking=NOOP())
Definition: DQMStore.h:142
dqm::implementation::DQMStore::setCurrentFolder
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:569
dqm::implementation::IBooker::book1S
MonitorElement * book1S(TString const &name, TString const &title, int nchX, double lowX, double highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:133
edm::LuminosityBlockID
Definition: LuminosityBlockID.h:31
DQM_DEPRECATED
#define DQM_DEPRECATED
Definition: DQMStore.cc:2
dqm::implementation::DQMStore::save
DQM_DEPRECATED void save(std::string const &filename, std::string const &path="")
Definition: DQMStore.cc:784
dqm::implementation::NavigatorBase::pwd
virtual std::string pwd()
Definition: DQMStore.cc:16
dqm::implementation::NavigatorBase::NavigatorBase
NavigatorBase()
Definition: DQMStore.h:39
dqm::implementation::IBooker::scope_
MonitorElementData::Scope scope_
Definition: DQMStore.h:479
dqm::implementation::DQMStore::trackME_
std::string trackME_
Definition: DQMStore.h:722
dqm::implementation::DQMStore::MEsToSave_
std::vector< std::string > MEsToSave_
Definition: DQMStore.h:718
dqm::implementation::IBooker::book1DD
MonitorElement * book1DD(TString const &name, TString const &title, int nchX, double lowX, double highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:155
dqm::implementation::DQMStore::putME
MonitorElement * putME(MonitorElement *me)
Definition: DQMStore.cc:148
dqm::implementation::DQMStore::pwd
std::string pwd() override
Definition: DQMStore.h:567
dqm::implementation::DQMStore::IGetter
friend IGetter
Definition: DQMStore.h:541
dqm::implementation::DQMStore::printTrace
void printTrace(std::string const &message)
Definition: DQMStore.cc:210
MonitorElement.h
dqm::implementation::IBooker::book2DD
MonitorElement * book2DD(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:261
edm::ParameterSet
Definition: ParameterSet.h:47
dqm::implementation::IBooker::bookString
MonitorElement * bookString(TString const &name, TString const &value, FUNC onbooking=NOOP())
Definition: DQMStore.h:87
dqm::implementation::IBooker::UseScope
Definition: DQMStore.h:457
CommonMethods.lock
def lock()
Definition: CommonMethods.py:81
dqm::implementation::DQMStore::booking_mutex_
std::recursive_mutex booking_mutex_
Definition: DQMStore.h:706
dqm::implementation::IGetter::store_
DQMStore * store_
Definition: DQMStore.h:535
MonitorElementData::Kind
Kind
Definition: MonitorElementCollection.h:129
dqm::implementation::IBooker::bookInt
MonitorElement * bookInt(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:73
value
Definition: value.py:1
dqm::implementation::IBooker::book1DD
MonitorElement * book1DD(TString const &name, TH1D *object, FUNC onbooking=NOOP())
Definition: DQMStore.h:164
dqm::implementation::DQMStore::assertLegacySafe_
bool assertLegacySafe_
Definition: DQMStore.h:714
dqm::implementation::IBooker::setModuleID
virtual uint64_t setModuleID(uint64_t moduleID)
Definition: DQMStore.cc:51
MonitorElementData::Kind::TH1D
dqm::implementation::DQMStore::localMEs_
std::map< uint64_t, std::set< MonitorElement *, MonitorElement::MEComparison > > localMEs_
Definition: DQMStore.h:702
CalibrationSummaryClient_cfi.kind
kind
Definition: CalibrationSummaryClient_cfi.py:37
dqm::implementation::MonitorElement
dqm::legacy::MonitorElement MonitorElement
Definition: DQMStore.h:20
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
dqm::implementation::IBooker::UseScope::oldscope
MonitorElementData::Scope oldscope
Definition: DQMStore.h:459
dqm::implementation::NavigatorBase::goUp
virtual void goUp()
Definition: DQMStore.cc:31
dqm::implementation::DQMStore::doSaveByLumi_
bool doSaveByLumi_
Definition: DQMStore.h:717
dqm::implementation::IBooker::bookProfile2D
MonitorElement * bookProfile2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int, double lowZ, double highZ, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:418
MonitorElementData::Kind::TH2S
writedatasetfile.run
run
Definition: writedatasetfile.py:27
dqm::implementation::DQMStore::~DQMStore
~DQMStore() override
Definition: DQMStore.cc:782
MonitorElementData::Kind::TPROFILE2D
MonitorElementData::Kind::TH3F
dqm::implementation::IBooker::book3D
MonitorElement * book3D(TString const &name, TH3F *object, FUNC onbooking=NOOP())
Definition: DQMStore.h:309
dqm::implementation::DQMStore::bookTransaction
void bookTransaction(iFunc f, uint64_t moduleId, bool canSaveByLumi)
Definition: DQMStore.h:578
dqm::implementation::IBooker::UseScope::UseScope
UseScope(IBooker &booker)
Definition: DQMStore.h:460
dqm::implementation::IGetter
Definition: DQMStore.h:484
dqm::implementation::DQMStore::cd
void cd(std::string const &dir) override
Definition: DQMStore.h:565
relativeConstraints.value
value
Definition: relativeConstraints.py:53
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
dqm::implementation::DQMStore::debugTrackME
void debugTrackME(const char *message, MonitorElement *me_local, MonitorElement *me_global) const
Definition: DQMStore.cc:279
dqm::implementation::IBooker::book3D
MonitorElement * book3D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, FUNC onbooking=NOOP())
Definition: DQMStore.h:290
dqm::implementation::IBooker::NOOP::operator()
void operator()(TH1 *) const
Definition: DQMStore.h:50
HiBiasedCentrality_cfi.function
function
Definition: HiBiasedCentrality_cfi.py:4
dqm::implementation::DQMStore::verbose_
int verbose_
Definition: DQMStore.h:710
dqm::implementation::IGetter::get
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:673
dqm::implementation::IBooker::bookProfile
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double const *xbinsize, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:355
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
dqm::implementation::DQMStore::findME
MonitorElement * findME(MELIKE const &path)
Definition: DQMStore.cc:196
dqm::implementation::DQMStore::open
DQM_DEPRECATED bool open(std::string const &filename, bool overwrite=false, std::string const &path="", std::string const &prepend="", OpenRunDirs stripdirs=KeepRunDirs, bool fileMustExist=true)
Definition: DQMStore.cc:790
dqm::implementation::IGetter::~IGetter
~IGetter() override
Definition: DQMStore.cc:737
dqm::implementation::IBooker
Definition: DQMStore.h:43
cond::uint64_t
unsigned long long uint64_t
Definition: Time.h:13
dqm::implementation::IGetter::getElement
virtual DQM_DEPRECATED MonitorElement * getElement(std::string const &path) const
Definition: DQMStore.cc:692
dqm::implementation::DQMStore::globalMEs_
std::map< edm::LuminosityBlockID, std::set< MonitorElement *, MonitorElement::MEComparison > > globalMEs_
Definition: DQMStore.h:698
dqm::implementation::DQMStore::enterLumi
void enterLumi(edm::RunNumber_t run, edm::LuminosityBlockNumber_t lumi, uint64_t moduleID)
Definition: DQMStore.cc:448
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
dqm
Definition: DQMStore.h:18
dqm::implementation::IBooker::bookProfile2D
MonitorElement * bookProfile2D(TString const &name, TProfile2D *object, FUNC onbooking=NOOP())
Definition: DQMStore.h:438
ParameterSet.h
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
dqm::implementation::IBooker::store_
DQMStore * store_
Definition: DQMStore.h:478
dqm::implementation::DQMStore
Definition: DQMStore.h:538
dqm::implementation::IBooker::bookProfile
MonitorElement * bookProfile(TString const &name, TProfile *object, FUNC onbooking=NOOP())
Definition: DQMStore.h:386
crabWrapper.key
key
Definition: crabWrapper.py:19
lumi
Definition: LumiSectionData.h:20
MonitorElementData::Kind::TPROFILE
dqm::implementation::NavigatorBase
Definition: DQMStore.h:24
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, float const *xbinsize, int nchY, float const *ybinsize, FUNC onbooking=NOOP())
Definition: DQMStore.h:193
MonitorElementData::Kind::REAL
dqm::implementation::IGetter::dirExists
virtual bool dirExists(std::string const &path) const
Definition: DQMStore.cc:730
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
dqm::implementation::DQMStore::cd
void cd() override
Definition: DQMStore.h:564
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23
dqm::implementation::IBooker::UseScope::~UseScope
~UseScope()
Definition: DQMStore.h:461