CMS 3D CMS Logo

MonitorElement.h
Go to the documentation of this file.
1 #ifndef DQMSERVICES_CORE_MONITOR_ELEMENT_H
2 #define DQMSERVICES_CORE_MONITOR_ELEMENT_H
3 
4 #if __GNUC__ && !defined DQM_DEPRECATED
5 //#define DQM_DEPRECATED __attribute__((deprecated))
6 #define DQM_DEPRECATED
7 #endif
8 
10 
12 
14 
15 #include "TF1.h"
16 #include "TH1F.h"
17 #include "TH1S.h"
18 #include "TH1D.h"
19 #include "TH2F.h"
20 #include "TH2S.h"
21 #include "TH2D.h"
22 #include "TH3F.h"
23 #include "TProfile.h"
24 #include "TProfile2D.h"
25 #include "TObjString.h"
26 #include "TAxis.h"
27 
28 #include <mutex>
29 #include <string>
30 #include <atomic>
31 #include <sstream>
32 #include <iomanip>
33 #include <cassert>
34 #include <cstdint>
35 #include <sys/time.h>
36 #include <tbb/spin_mutex.h>
37 
38 // TODO: cleaup the usages and remove.
41 
42 // TODO: move to a better location (changing all usages)
43 namespace dqm {
46  namespace qstatus {
47  static const int OTHER = 30; //< Anything but 'ok','warning' or 'error'.
48  static const int DISABLED = 50; //< Test has been disabled.
49  static const int INVALID = 60; //< Problem preventing test from running.
50  static const int INSUF_STAT = 70; //< Insufficient statistics.
51  static const int DID_NOT_RUN = 90; //< Algorithm did not run.
52  static const int STATUS_OK = 100; //< Test was succesful.
53  static const int WARNING = 200; //< Test had some problems.
54  static const int ERROR = 300; //< Test has failed.
55  } // namespace qstatus
56 
57  namespace me_util {
59  }
60 } // namespace dqm
61 
62 // forward declarations for all our friends
63 namespace dqm::implementation {
64  class DQMStore;
65  class IBooker;
66 } // namespace dqm::implementation
67 struct DQMTTreeIO;
68 namespace dqm {
69  class DQMFileSaverPB;
70 }
71 class DQMService;
72 class QualityTester;
73 
74 namespace dqm::impl {
75 
76  using dqmmutex = tbb::spin_mutex;
77 
78  struct Access {
79  std::unique_lock<dqmmutex> guard_;
82  };
83  // TODO: can this be the same type, just const?
84  struct AccessMut {
85  std::unique_lock<dqmmutex> guard_;
88  };
89 
93  Access access() { return Access{std::unique_lock<dqmmutex>(lock_), data_.key_, data_.value_}; }
94  AccessMut accessMut() { return AccessMut{std::unique_lock<dqmmutex>(lock_), data_.key_, data_.value_}; }
95  };
96 
99  // these need to create and destroy MEs.
102  // these need to access some of the IO related methods.
103  friend ::DQMTTreeIO; // declared in DQMRootSource
104  friend ::dqm::DQMFileSaverPB;
105  friend ::DQMService;
106  // this one only needs syncCoreObject.
107  friend ::QualityTester;
108 
109  public:
112 
113  // Comparison helper used in DQMStore to insert into sets. This needs deep
114  // private access to the MEData, that is why it lives here.
115  struct MEComparison {
116  using is_transparent = int; // magic marker to allow C++14 heterogeneous set lookup.
117 
118  auto make_tuple(MonitorElement *me) const {
119  return std::make_tuple(std::reference_wrapper(me->getPathname()), std::reference_wrapper(me->getName()));
120  }
122  return std::make_tuple(path.getDirname(), path.getObjectname());
123  }
124  bool operator()(MonitorElement *left, MonitorElement *right) const {
125  return make_tuple(left) < make_tuple(right);
126  }
127  bool operator()(MonitorElement *left, MonitorElementData::Path const &right) const {
128  return make_tuple(left) < make_tuple(right);
129  }
130  bool operator()(MonitorElementData::Path const &left, MonitorElement *right) const {
131  return make_tuple(left) < make_tuple(right);
132  }
133  bool operator()(MonitorElementData::Path const &left, MonitorElementData::Path const &right) const {
134  return make_tuple(left) < make_tuple(right);
135  }
136  };
137 
138  private:
139  MutableMonitorElementData *mutable_; // only set if this is a mutable copy of this ME
140  // there are no immutable MEs at this time, but we might need them in the future.
141  bool is_owned_; // true if we are responsible for deleting the mutable object.
151  const Access access() const {
152  // First, check if there is a mutable object
153  if (mutable_) {
154  // if there is a mutable object, that is the truth, and we take a lock.
155  return mutable_->access();
156  } // else
157  throw cms::Exception("LogicError") << "MonitorElement " << getName() << " not backed by any data!";
158  }
159 
161  // For completeness, set the legacy `updated` marker.
162  this->update();
163 
164  // First, check if there is a mutable object
165  if (mutable_) {
166  // if there is a mutable object, that is the truth, and we take a lock.
167  return mutable_->accessMut();
168  } // else
169  throw cms::Exception("LogicError") << "MonitorElement " << getName() << " not backed by any data!";
170  }
171 
172  private:
173  // but internal -- only for DQMStore etc.
174 
175  // Create ME using this data. A ROOT object pointer may be moved into the
176  // new ME. The new ME will own this data.
178  // Create new ME and take ownership of this data.
180  // Create a new ME sharing data with this existing ME.
182 
183  // return a new clone of the data of this ME. Calls ->Clone(), new object
184  // is owned by the returned value.
186 
187  // Remove access and ownership to the data. The flag is used for a sanity check.
188  MutableMonitorElementData *release(bool expectOwned);
189 
190  // re-initialize this ME as a shared copy of the other.
192  // re-initialize taking ownership of this data.
194 
195  // Replace the ROOT object in this ME's data with the new object, taking
196  // ownership. The old object is deleted.
197  void switchObject(std::unique_ptr<TH1> &&newobject);
198 
199  // copy applicable fileds into the DQMNet core object for compatibility.
200  // In a few places these flags are also still used by the ME.
201  void syncCoreObject();
203 
204  // check if the ME is currently backed by MEData; if false (almost) any
205  // access will throw.
206  bool isValid() const { return mutable_ != nullptr; }
207 
208  // used to implement getQErrors et. al.
209  template <typename FILTER>
210  std::vector<MonitorElementData::QReport *> filterQReports(FILTER filter) const;
211 
212  // legacy interfaces, there are no alternatives but they should not be used
213 
215  bool operator<(const MonitorElement &x) const { return DQMNet::setOrder(data_, x.data_); }
217  static bool CheckBinLabels(const TAxis *a1, const TAxis *a2);
219  uint32_t flags() const { return data_.flags; }
222 
223  // mostly used for IO, should be private.
224  std::string valueString() const;
225  std::string tagString() const;
226  std::string tagLabelString() const;
227  std::string effLabelString() const;
229 
230  // kept for DQMService. data_ is also used for MEComparison, without it
231  // we'd need to keep a copy od the name somewhere else.
233  bool wasUpdated() const { return data_.flags & DQMNet::DQM_PROP_NEW; }
234  void packScalarData(std::string &into, const char *prefix) const;
235  void packQualityData(std::string &into) const;
236  DQMNet::CoreObject data_; //< Core object information.
237 
238  public:
239  MonitorElement &operator=(const MonitorElement &) = delete;
241  virtual ~MonitorElement();
242 
243  public:
244  // good to be used in subsystem code
245 
248 
250  const std::string &getName() const { return this->data_.objname; }
251 
253  const std::string &getPathname() const { return this->data_.dirname; }
254 
257 
259 
261 
263  bool getLumiFlag() const { return access().key.scope_ == MonitorElementData::Scope::LUMI; }
264 
268  auto access = this->accessMut();
269  if (access.value.object_)
270  access.value.object_->SetBit(TH1::kIsAverage);
271  }
273  auto access = this->access();
274  return access.value.object_ && access.value.object_->TestBit(TH1::kIsAverage);
275  }
276 
277  private:
278  // A static assert to check that T actually fits in
279  // int64_t.
280  template <typename T>
282  int checkArray[sizeof(int64_t) - sizeof(T) + 1];
283  };
284 
285  void doFill(int64_t x);
286 
287  public:
288  // filling API.
289 
290  void Fill(long long x) {
292  doFill(static_cast<int64_t>(x));
293  }
294  void Fill(unsigned long long x) {
296  doFill(static_cast<int64_t>(x));
297  }
298  void Fill(unsigned long x) {
300  doFill(static_cast<int64_t>(x));
301  }
302  void Fill(long x) {
304  doFill(static_cast<int64_t>(x));
305  }
306  void Fill(unsigned int x) {
308  doFill(static_cast<int64_t>(x));
309  }
310  void Fill(int x) {
312  doFill(static_cast<int64_t>(x));
313  }
314  void Fill(short x) {
316  doFill(static_cast<int64_t>(x));
317  }
318  void Fill(unsigned short x) {
320  doFill(static_cast<int64_t>(x));
321  }
322  void Fill(char x) {
324  doFill(static_cast<int64_t>(x));
325  }
326  void Fill(unsigned char x) {
328  doFill(static_cast<int64_t>(x));
329  }
330 
331  void Fill(float x) { Fill(static_cast<double>(x)); }
332  void Fill(double x);
333  void Fill(std::string &value);
334 
335  void Fill(double x, double yw);
336  void Fill(double x, double y, double zw);
337  void Fill(double x, double y, double z, double w);
339  void ShiftFillLast(double y, double ye = 0., int32_t xscale = 1);
340 
341  public:
342  // additional APIs, mainly for harvesting.
343 
345  virtual void Reset();
346 
349 
352 
355 
357  const MonitorElementData::QReport *getQReport(const std::string &qtname) const;
359  std::vector<MonitorElementData::QReport *> getQReports() const;
361  void getQReport(bool create, const std::string &qtname, MonitorElementData::QReport *&qr, DQMNet::QValue *&qv);
362 
364  std::vector<MonitorElementData::QReport *> getQWarnings() const;
366  std::vector<MonitorElementData::QReport *> getQErrors() const;
368  std::vector<MonitorElementData::QReport *> getQOthers() const;
369 
370  // const and data-independent -- safe
371  virtual int getNbinsX() const;
372  virtual int getNbinsY() const;
373  virtual int getNbinsZ() const;
374  virtual int getBin(int binx, int biny) const;
375  virtual std::string getAxisTitle(int axis = 1) const;
376  virtual std::string getTitle() const;
377 
378  // const but data-dependent -- semantically unsafe in RECO
379  virtual double getMean(int axis = 1) const;
380  virtual double getMeanError(int axis = 1) const;
381  virtual double getRMS(int axis = 1) const;
382  virtual double getRMSError(int axis = 1) const;
383  virtual double getBinContent(int binx) const;
384  virtual double getBinContent(int binx, int biny) const;
385  virtual double getBinContent(int binx, int biny, int binz) const;
386  virtual double getBinError(int binx) const;
387  virtual double getBinError(int binx, int biny) const;
388  virtual double getBinError(int binx, int biny, int binz) const;
389  virtual double getEntries() const;
390  virtual double getBinEntries(int bin) const;
391  virtual double getBinEntries(int binx, int biny) const;
392  virtual double integral() const;
393 
394  virtual int64_t getIntValue() const;
395  virtual double getFloatValue() const;
396  virtual const std::string &getStringValue() const;
397 
398  // non-const -- thread safety and semantical issues
399  virtual void setBinContent(int binx, double content);
400  virtual void setBinContent(int binx, int biny, double content);
401  virtual void setBinContent(int binx, int biny, int binz, double content);
402  virtual void setBinError(int binx, double error);
403  virtual void setBinError(int binx, int biny, double error);
404  virtual void setBinError(int binx, int biny, int binz, double error);
405  virtual void setBinEntries(int bin, double nentries);
406  virtual void setEntries(double nentries);
407  virtual void divide(const MonitorElement *, const MonitorElement *, double, double, const char *);
408  virtual void setBinLabel(int bin, const std::string &label, int axis = 1);
409  virtual void setAxisRange(double xmin, double xmax, int axis = 1);
410  virtual void setAxisTitle(const std::string &title, int axis = 1);
411  virtual void setAxisTimeDisplay(int value, int axis = 1);
412  virtual void setAxisTimeFormat(const char *format = "", int axis = 1);
413  virtual void setTitle(const std::string &title);
414 
415  // additional operations mainly for booking
416  virtual void setXTitle(std::string const &title);
417  virtual void setYTitle(std::string const &title);
418  virtual void enableSumw2();
419  virtual void disableAlphanumeric();
420  virtual void setOption(const char *option);
421  virtual double getAxisMin(int axis = 1) const;
422  virtual double getAxisMax(int axis = 1) const;
423  // We should avoid extending histograms in general, and if the behaviour
424  // is actually needed, provide a more specific interface rather than
425  // relying on the ROOT behaviour.
427  virtual void setCanExtend(unsigned int value);
428  // We should decide if we support this (or make it default)
430  virtual void setStatOverflows(bool value);
431  virtual bool getStatOverflows();
432 
433  // these should be non-const, since they are potentially not thread-safe
434  virtual TObject const *getRootObject() const;
435  virtual TH1 *getTH1();
436  virtual TH1F *getTH1F();
437  virtual TH1S *getTH1S();
438  virtual TH1D *getTH1D();
439  virtual TH2F *getTH2F();
440  virtual TH2S *getTH2S();
441  virtual TH2D *getTH2D();
442  virtual TH3F *getTH3F();
443  virtual TProfile *getTProfile();
444  virtual TProfile2D *getTProfile2D();
445 
446  private:
447  void incompatible(const char *func) const;
448  TH1 const *accessRootObject(Access const &access, const char *func, int reqdim) const;
449  TH1 *accessRootObject(AccessMut const &, const char *func, int reqdim) const;
450 
451  TAxis const *getAxis(Access const &access, const char *func, int axis) const;
452  TAxis *getAxis(AccessMut const &access, const char *func, int axis) const;
453  };
454 
455 } // namespace dqm::impl
456 
457 // These may become distinct classes in the future.
458 namespace dqm::reco {
460 }
461 namespace dqm::legacy {
463  public:
464  // import constructors
466 
467  // Add ROOT object accessors without cost here so that harvesting code can
468  // still freely use getTH1() and friends.
470  TObject *getRootObject() const override {
471  return const_cast<TObject *>(
472  const_cast<dqm::legacy::MonitorElement *>(this)->dqm::reco::MonitorElement::getRootObject());
473  };
475  virtual TH1 *getTH1() const {
476  return const_cast<dqm::legacy::MonitorElement *>(this)->dqm::reco::MonitorElement::getTH1();
477  };
479  virtual TH1F *getTH1F() const {
480  return const_cast<dqm::legacy::MonitorElement *>(this)->dqm::reco::MonitorElement::getTH1F();
481  };
483  virtual TH1S *getTH1S() const {
484  return const_cast<dqm::legacy::MonitorElement *>(this)->dqm::reco::MonitorElement::getTH1S();
485  };
487  virtual TH1D *getTH1D() const {
488  return const_cast<dqm::legacy::MonitorElement *>(this)->dqm::reco::MonitorElement::getTH1D();
489  };
491  virtual TH2F *getTH2F() const {
492  return const_cast<dqm::legacy::MonitorElement *>(this)->dqm::reco::MonitorElement::getTH2F();
493  };
495  virtual TH2S *getTH2S() const {
496  return const_cast<dqm::legacy::MonitorElement *>(this)->dqm::reco::MonitorElement::getTH2S();
497  };
499  virtual TH2D *getTH2D() const {
500  return const_cast<dqm::legacy::MonitorElement *>(this)->dqm::reco::MonitorElement::getTH2D();
501  };
503  virtual TH3F *getTH3F() const {
504  return const_cast<dqm::legacy::MonitorElement *>(this)->dqm::reco::MonitorElement::getTH3F();
505  };
507  virtual TProfile *getTProfile() const {
508  return const_cast<dqm::legacy::MonitorElement *>(this)->dqm::reco::MonitorElement::getTProfile();
509  };
511  virtual TProfile2D *getTProfile2D() const {
512  return const_cast<dqm::legacy::MonitorElement *>(this)->dqm::reco::MonitorElement::getTProfile2D();
513  };
514  };
515 } // namespace dqm::legacy
516 namespace dqm::harvesting {
518 }
519 
520 #endif // DQMSERVICES_CORE_MONITOR_ELEMENT_H
dqm::impl
Definition: MonitorElement.h:74
dqm::impl::MonitorElement::divide
virtual void divide(const MonitorElement *, const MonitorElement *, double, double, const char *)
Replace entries with results of dividing num by denom.
Definition: MonitorElement.cc:744
dqm::impl::MonitorElement
Definition: MonitorElement.h:98
dqm::impl::MonitorElement::getNbinsZ
virtual int getNbinsZ() const
get # of bins in Z-axis
Definition: MonitorElement.cc:586
dqm::impl::MonitorElement::mutable_
MutableMonitorElementData * mutable_
Definition: MonitorElement.h:139
dqm::impl::MonitorElement::setCanExtend
virtual DQM_DEPRECATED void setCanExtend(unsigned int value)
Definition: MonitorElement.cc:902
dqm::impl::MonitorElement::getBinEntries
virtual double getBinEntries(int bin) const
get # of bin entries (for profiles)
Definition: MonitorElement.cc:645
dqm::impl::MonitorElement::disableAlphanumeric
virtual void disableAlphanumeric()
Definition: MonitorElement.cc:880
DQMNet::setOrder
static bool setOrder(const CoreObject &a, const CoreObject &b)
Definition: DQMNet.h:165
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
MonitorElementData::Scalar
Definition: MonitorElementCollection.h:45
dqm::impl::Access::key
const MonitorElementData::Key & key
Definition: MonitorElement.h:80
MonitorElementData::Path::getFullname
std::string getFullname() const
Definition: MonitorElementCollection.h:173
dqm::impl::MonitorElement::data_
DQMNet::CoreObject data_
Definition: MonitorElement.h:236
dqm::impl::MonitorElement::setEntries
virtual void setEntries(double nentries)
set # of entries
Definition: MonitorElement.cc:738
dqm::impl::MonitorElement::setTitle
virtual void setTitle(const std::string &title)
set (ie. change) histogram/profile title
Definition: MonitorElement.cc:818
dqm::impl::MonitorElement::setAxisTimeDisplay
virtual void setAxisTimeDisplay(int value, int axis=1)
set x-, y-, or z-axis to display time values
Definition: MonitorElement.cc:806
dqm::impl::MonitorElement::operator=
MonitorElement & operator=(const MonitorElement &)=delete
dqm::impl::MonitorElement::getTH1S
virtual TH1S * getTH1S()
Definition: MonitorElement.cc:992
dqm::implementation
Definition: DQMStore.h:19
dqm::impl::MonitorElement::setOption
virtual void setOption(const char *option)
Definition: MonitorElement.cc:887
dqm::qstatus::DID_NOT_RUN
static const int DID_NOT_RUN
Definition: MonitorElement.h:51
dqm::impl::MonitorElement::tagLabelString
std::string tagLabelString() const
return label string for the monitor element tag (eg. <name>t=12345</name>)
Definition: MonitorElement.cc:423
dqm::qstatus::INSUF_STAT
static const int INSUF_STAT
Definition: MonitorElement.h:50
DQMService
Definition: DQMService.h:12
dqm::impl::MonitorElement::MEComparison::operator()
bool operator()(MonitorElement *left, MonitorElement *right) const
Definition: MonitorElement.h:124
dqm::impl::MonitorElement::CheckBinLabels
static bool CheckBinLabels(const TAxis *a1, const TAxis *a2)
Check the consistency of the axis labels.
Definition: MonitorElement.cc:160
dqm::impl::MonitorElement::getAxisTitle
virtual std::string getAxisTitle(int axis=1) const
get x-, y- or z-axis title (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:677
dqm::impl::MonitorElement::setEfficiencyFlag
void setEfficiencyFlag()
Definition: MonitorElement.h:267
dqm::qstatus::WARNING
static const int WARNING
Definition: MonitorElement.h:53
dqm::impl::MonitorElement::integral
virtual double integral() const
get integral of bins
Definition: MonitorElement.cc:671
dqm::impl::MonitorElement::effLabelString
std::string effLabelString() const
return label string for the monitor element tag (eg. <name>t=12345</name>)
Definition: MonitorElement.cc:441
dqm::legacy::MonitorElement::getTH1S
virtual TH1S * getTH1S() const
Definition: MonitorElement.h:483
dqm::impl::MonitorElement::getTH1D
virtual TH1D * getTH1D()
Definition: MonitorElement.cc:998
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
dqm::impl::MonitorElement::getTH3F
virtual TH3F * getTH3F()
Definition: MonitorElement.cc:1022
dqm::impl::MonitorElement::setAxisTimeFormat
virtual void setAxisTimeFormat(const char *format="", int axis=1)
set the format of the time values that are displayed on an axis
Definition: MonitorElement.cc:812
dqm::impl::MonitorElement::getQReports
std::vector< MonitorElementData::QReport * > getQReports() const
get map of QReports
Definition: MonitorElement.cc:502
dqm::impl::MonitorElement::getRMSError
virtual double getRMSError(int axis=1) const
get RMS uncertainty of histogram along x, y or z axis(axis=1,2,3 respectively)
Definition: MonitorElement.cc:568
dqm::impl::AccessMut
Definition: MonitorElement.h:84
dqm::impl::MonitorElement::MonitorElement
MonitorElement(MonitorElementData &&data)
Definition: MonitorElement.cc:37
dqm::impl::MonitorElement::getQOthers
std::vector< MonitorElementData::QReport * > getQOthers() const
from last set of quality tests
Definition: MonitorElement.cc:515
MonitorElementData::QReport::QValue
Definition: MonitorElementCollection.h:57
beamerCreator.create
def create(alignables, pedeDump, additionalData, outputFile, config)
Definition: beamerCreator.py:44
dqm::impl::MonitorElement::access
const Access access() const
Definition: MonitorElement.h:151
dqm::impl::MutableMonitorElementData::lock_
dqmmutex lock_
Definition: MonitorElement.h:92
dqm::impl::MonitorElement::accessRootObject
const TH1 * accessRootObject(Access const &access, const char *func, int reqdim) const
Definition: MonitorElement.cc:529
dqm::impl::MonitorElement::filterQReports
std::vector< MonitorElementData::QReport * > filterQReports(FILTER filter) const
Definition: MonitorElement.cc:489
dqm::impl::MonitorElement::switchData
void switchData(MonitorElement *other)
Definition: MonitorElement.cc:66
relativeConstraints.error
error
Definition: relativeConstraints.py:53
dqm::impl::MonitorElement::kind
Kind kind() const
Get the type of the monitor element.
Definition: MonitorElement.h:247
dqm::impl::MonitorElement::fits_in_int64_t::checkArray
int checkArray[sizeof(int64_t) - sizeof(T)+1]
Definition: MonitorElement.h:282
dqm::impl::MonitorElement::Fill
void Fill(long x)
Definition: MonitorElement.h:302
MonitorElementData::key_
Key key_
Definition: MonitorElementCollection.h:245
fileinputsource_cfi.option
option
Definition: fileinputsource_cfi.py:87
dqm::legacy::MonitorElement::getTH1F
virtual TH1F * getTH1F() const
Definition: MonitorElement.h:479
dqm::impl::MonitorElement::valueString
std::string valueString() const
Definition: MonitorElement.cc:390
MonitorElementData::Key::id_
edm::LuminosityBlockID id_
Definition: MonitorElementCollection.h:228
align::Scalar
double Scalar
Definition: Definitions.h:25
dqm::impl::MonitorElement::getLumiFlag
bool getLumiFlag() const
true if ME is meant to be stored for each luminosity section
Definition: MonitorElement.h:263
testProducerWithPsetDescEmpty_cfi.a2
a2
Definition: testProducerWithPsetDescEmpty_cfi.py:35
DQMNet::CoreObject::flags
uint32_t flags
Definition: DQMNet.h:89
dqm::impl::MonitorElement::getStatOverflows
virtual bool getStatOverflows()
Definition: MonitorElement.cc:915
dqm::impl::MonitorElement::getTH2F
virtual TH2F * getTH2F()
Definition: MonitorElement.cc:1004
dqm::impl::MonitorElement::getQErrors
std::vector< MonitorElementData::QReport * > getQErrors() const
get errors from last set of quality tests
Definition: MonitorElement.cc:511
dqm::impl::MonitorElement::getTProfile2D
virtual TProfile2D * getTProfile2D()
Definition: MonitorElement.cc:1034
dqm::legacy::DQMStore
Definition: DQMStore.h:727
dqm::legacy::MonitorElement::getTProfile2D
virtual TProfile2D * getTProfile2D() const
Definition: MonitorElement.h:511
MonitorElementData::Key
Definition: MonitorElementCollection.h:224
DQMTTreeIO
Definition: DQMRootSource.cc:56
dqm::impl::MonitorElement::operator<
bool operator<(const MonitorElement &x) const
Compare monitor elements, for ordering in sets.
Definition: MonitorElement.h:215
dqm::legacy::MonitorElement::getRootObject
TObject * getRootObject() const override
Definition: MonitorElement.h:470
dqm::impl::MonitorElement::Kind
MonitorElementData::Kind Kind
Definition: MonitorElement.h:111
dqm::impl::MonitorElement::Fill
void Fill(float x)
Definition: MonitorElement.h:331
dqm::impl::AccessMut::guard_
std::unique_lock< dqmmutex > guard_
Definition: MonitorElement.h:85
w
const double w
Definition: UKUtility.cc:23
MonitorElementCollection.h
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
DQMNet::DQM_PROP_REPORT_WARN
static const uint32_t DQM_PROP_REPORT_WARN
Definition: DQMNet.h:50
dqm::harvesting
Definition: DQMStore.h:738
dqm::impl::MonitorElement::Reset
virtual void Reset()
Remove all data from the ME, keept the empty histogram with all its settings.
Definition: MonitorElement.cc:354
dqm::impl::MonitorElement::ShiftFillLast
DQM_DEPRECATED void ShiftFillLast(double y, double ye=0., int32_t xscale=1)
Definition: MonitorElement.cc:256
MonitorElementData::Scope
Scope
Definition: MonitorElementCollection.h:152
dqm::impl::MonitorElement::getTH2S
virtual TH2S * getTH2S()
Definition: MonitorElement.cc:1010
QReport
MonitorElementData::QReport QReport
Definition: MonitorElement.h:39
DQMNet::DQM_PROP_NEW
static const uint32_t DQM_PROP_NEW
Definition: DQMNet.h:59
dqm::impl::MonitorElement::Fill
void Fill(short x)
Definition: MonitorElement.h:314
dqm::impl::MonitorElement::Fill
void Fill(unsigned int x)
Definition: MonitorElement.h:306
dqm::impl::Access
Definition: MonitorElement.h:78
DQMNet::DQM_PROP_TYPE_MASK
static const uint32_t DQM_PROP_TYPE_MASK
Definition: DQMNet.h:28
dqm::impl::MonitorElement::getRMS
virtual double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:562
dqm::impl::MonitorElement::doFill
void doFill(int64_t x)
"Fill" ME method for int64_t
Definition: MonitorElement.cc:214
dqm::impl::MonitorElement::getRunLumi
edm::LuminosityBlockID getRunLumi()
Definition: MonitorElement.h:258
trackingPlots.other
other
Definition: trackingPlots.py:1460
dqm::impl::MonitorElement::getTH1F
virtual TH1F * getTH1F()
Definition: MonitorElement.cc:986
dqm::legacy::MonitorElement::getTProfile
virtual TProfile * getTProfile() const
Definition: MonitorElement.h:507
dqm::impl::MonitorElement::setXTitle
virtual void setXTitle(std::string const &title)
Definition: MonitorElement.cc:861
QualityTester
Definition: QualityTester.cc:35
dqm::legacy
Definition: DQMStore.h:726
edm::LuminosityBlockID
Definition: LuminosityBlockID.h:31
DQMChannel
MonitorElementData::QReport::DQMChannel DQMChannel
Definition: MonitorElement.h:40
DQM_DEPRECATED
#define DQM_DEPRECATED
Definition: DQMStore.cc:2
dqm::impl::MonitorElement::packScalarData
void packScalarData(std::string &into, const char *prefix) const
convert scalar data into a string.
Definition: MonitorElement.cc:368
DQMNet::CoreObject::objname
std::string objname
Definition: DQMNet.h:97
ALCARECOTkAlBeamHalo_cff.filter
filter
Definition: ALCARECOTkAlBeamHalo_cff.py:27
dqm::legacy::MonitorElement::getTH1D
virtual TH1D * getTH1D() const
Definition: MonitorElement.h:487
dqm::impl::MonitorElement::hasOtherReport
bool hasOtherReport() const
true if at least of one of the tests returned some other (non-ok) status
Definition: MonitorElement.h:354
dqm::impl::MutableMonitorElementData::accessMut
AccessMut accessMut()
Definition: MonitorElement.h:94
dqm::legacy::MonitorElement::getTH1
virtual TH1 * getTH1() const
Definition: MonitorElement.h:475
MonitorElementData::value_
Value value_
Definition: MonitorElementCollection.h:246
dqm::impl::MonitorElement::getTH1
virtual TH1 * getTH1()
Definition: MonitorElement.cc:981
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
dqm::impl::MonitorElement::setAxisRange
virtual void setAxisRange(double xmin, double xmax, int axis=1)
set x-, y- or z-axis range (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:794
dqm::impl::MonitorElement::getEntries
virtual double getEntries() const
get # of entries
Definition: MonitorElement.cc:628
dqm::impl::MonitorElement::getQReport
const MonitorElementData::QReport * getQReport(const std::string &qtname) const
get QReport corresponding to <qtname> (null pointer if QReport does not exist)
Definition: MonitorElement.cc:481
dqm::impl::MonitorElement::getFloatValue
virtual double getFloatValue() const
Definition: MonitorElement.cc:929
dqm::qstatus::OTHER
static const int OTHER
Definition: MonitorElement.h:47
dqm::impl::MonitorElement::Fill
void Fill(unsigned long x)
Definition: MonitorElement.h:298
dqm::impl::MonitorElement::switchObject
void switchObject(std::unique_ptr< TH1 > &&newobject)
Definition: MonitorElement.cc:79
Skims_PA_cff.content
content
Definition: Skims_PA_cff.py:19
dqm::impl::MutableMonitorElementData::data_
MonitorElementData data_
Definition: MonitorElement.h:91
MonitorElementData::Key::path_
Path path_
Definition: MonitorElementCollection.h:225
dqm::qstatus::DISABLED
static const int DISABLED
Definition: MonitorElement.h:48
dqm::impl::MonitorElement::MEComparison::operator()
bool operator()(MonitorElementData::Path const &left, MonitorElementData::Path const &right) const
Definition: MonitorElement.h:133
dqm::impl::MonitorElement::getNbinsY
virtual int getNbinsY() const
get # of bins in Y-axis
Definition: MonitorElement.cc:580
dqm::impl::MonitorElement::isValid
bool isValid() const
Definition: MonitorElement.h:206
DQMNet::DQM_PROP_REPORT_ERROR
static const uint32_t DQM_PROP_REPORT_ERROR
Definition: DQMNet.h:49
dqm::impl::MonitorElement::cloneMEData
MonitorElementData cloneMEData()
Definition: MonitorElement.cc:46
dqm::legacy::MonitorElement::getTH2D
virtual TH2D * getTH2D() const
Definition: MonitorElement.h:499
DQMNet::DQM_PROP_REPORT_OTHER
static const uint32_t DQM_PROP_REPORT_OTHER
Definition: DQMNet.h:51
dqm::impl::dqmmutex
tbb::spin_mutex dqmmutex
Definition: MonitorElement.h:76
MonitorElementData::Kind
Kind
Definition: MonitorElementCollection.h:129
dqm::impl::MonitorElement::accessMut
AccessMut accessMut()
Definition: MonitorElement.h:160
dqm::impl::MonitorElement::~MonitorElement
virtual ~MonitorElement()
Definition: MonitorElement.cc:153
dqm::impl::AccessMut::key
const MonitorElementData::Key & key
Definition: MonitorElement.h:86
dqm::legacy::MonitorElement::getTH2S
virtual TH2S * getTH2S() const
Definition: MonitorElement.h:495
DQMNet::CoreObject
Definition: DQMNet.h:88
MonitorElementData::QReport
Definition: MonitorElementCollection.h:55
MonitorElementData::Value
Definition: MonitorElementCollection.h:156
dqm::impl::MonitorElement::Fill
void Fill(unsigned short x)
Definition: MonitorElement.h:318
createfilelist.int
int
Definition: createfilelist.py:10
dqm::impl::MonitorElement::getQWarnings
std::vector< MonitorElementData::QReport * > getQWarnings() const
get warnings from last set of quality tests
Definition: MonitorElement.cc:506
dqm::impl::MonitorElement::setBinEntries
virtual void setBinEntries(int bin, double nentries)
set # of bin entries (to be used for profiles)
Definition: MonitorElement.cc:727
dqm::impl::MonitorElement::setYTitle
virtual void setYTitle(std::string const &title)
Definition: MonitorElement.cc:866
dqm::impl::MonitorElement::MEComparison::operator()
bool operator()(MonitorElementData::Path const &left, MonitorElement *right) const
Definition: MonitorElement.h:130
value
Definition: value.py:1
dqm::impl::MonitorElement::setBinLabel
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:771
dqm::legacy::MonitorElement::getTH3F
virtual TH3F * getTH3F() const
Definition: MonitorElement.h:503
dqm::impl::MonitorElement::flags
uint32_t flags() const
Get the object flags.
Definition: MonitorElement.h:219
dqm::impl::MonitorElement::getTProfile
virtual TProfile * getTProfile()
Definition: MonitorElement.cc:1028
dqm::impl::MonitorElement::getScope
MonitorElementData::Scope getScope()
Definition: MonitorElement.h:260
dqm::impl::MonitorElement::is_owned_
bool is_owned_
Definition: MonitorElement.h:141
dqm::impl::MonitorElement::getTitle
virtual std::string getTitle() const
get MonitorElement title
Definition: MonitorElement.cc:683
dqm::impl::MonitorElement::Fill
void Fill(unsigned char x)
Definition: MonitorElement.h:326
TrackCollections2monitor_cff.func
func
Definition: TrackCollections2monitor_cff.py:359
dqm::impl::MonitorElement::getTH2D
virtual TH2D * getTH2D()
Definition: MonitorElement.cc:1016
dqm::impl::MonitorElement::setStatOverflows
virtual DQM_DEPRECATED void setStatOverflows(bool value)
Definition: MonitorElement.cc:907
dqm::impl::MutableMonitorElementData
Definition: MonitorElement.h:90
dqm::impl::MonitorElement::update
void update()
Mark the object updated.
Definition: MonitorElement.h:221
newFWLiteAna.bin
bin
Definition: newFWLiteAna.py:161
dqm::impl::MonitorElement::getFullname
std::string getFullname() const
get full name of ME including Pathname
Definition: MonitorElement.h:256
MonitorElementData::Key::scope_
Scope scope_
Definition: MonitorElementCollection.h:229
dqm::impl::MonitorElement::MEComparison::make_tuple
auto make_tuple(MonitorElement *me) const
Definition: MonitorElement.h:118
dqm::impl::MonitorElement::getRootObject
virtual const TObject * getRootObject() const
Definition: MonitorElement.cc:976
dqm::impl::MonitorElement::MEComparison::operator()
bool operator()(MonitorElement *left, MonitorElementData::Path const &right) const
Definition: MonitorElement.h:127
dqm::impl::MonitorElement::getPathname
const std::string & getPathname() const
get pathname of parent folder
Definition: MonitorElement.h:253
dqm::impl::MonitorElement::packQualityData
void packQualityData(std::string &into) const
serialise quality report information into a string.
Definition: MonitorElement.cc:386
dqm::impl::MonitorElement::setBinContent
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
Definition: MonitorElement.cc:691
MonitorElementData::Value::object_
edm::propagate_const< std::unique_ptr< TH1 > > object_
Definition: MonitorElementCollection.h:158
DQMNet.h
dqm::impl::AccessMut::value
MonitorElementData::Value & value
Definition: MonitorElement.h:87
MonitorElementData::Path
Definition: MonitorElementCollection.h:162
dqm::reco
Definition: DQMStore.h:735
dqm::impl::MonitorElement::qualityTagString
std::string qualityTagString(const DQMNet::QValue &qv) const
Definition: MonitorElement.cc:456
dqm::impl::MonitorElement::wasUpdated
bool wasUpdated() const
true if ME was updated in last monitoring cycle
Definition: MonitorElement.h:233
dqm::impl::MonitorElement::getAxisMax
virtual double getAxisMax(int axis=1) const
Definition: MonitorElement.cc:897
MonitorElementData::QReport::DQMChannel
Definition: MonitorElementCollection.h:64
T
long double T
Definition: Basic3DVectorLD.h:48
dqm::impl::MonitorElement::tagString
std::string tagString() const
Definition: MonitorElement.cc:407
dqm::impl::MonitorElement::getBin
virtual int getBin(int binx, int biny) const
get global bin number (for 2-D profiles)
Definition: MonitorElement.cc:634
TrackerOfflineValidation_Dqm_cff.xmax
xmax
Definition: TrackerOfflineValidation_Dqm_cff.py:11
Exception
Definition: hltDiff.cc:245
dqm::impl::MonitorElement::getNbinsX
virtual int getNbinsX() const
get # of bins in X-axis
Definition: MonitorElement.cc:574
phase2tkutil::DQMStore
dqm::reco::DQMStore DQMStore
Definition: TrackerPhase2DQMUtil.h:16
dqm::impl::MonitorElement::getAxisMin
virtual double getAxisMin(int axis=1) const
Definition: MonitorElement.cc:892
dqm::impl::MonitorElement::setBinError
virtual void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
Definition: MonitorElement.cc:709
dqm::impl::MonitorElement::getStringValue
virtual const std::string & getStringValue() const
Definition: MonitorElement.cc:934
format
dqm::impl::MonitorElement::getName
const std::string & getName() const
get name of ME
Definition: MonitorElement.h:250
dqm::qstatus::INVALID
static const int INVALID
Definition: MonitorElement.h:49
dqm::impl::MonitorElement::getEfficiencyFlag
bool getEfficiencyFlag()
Definition: MonitorElement.h:272
dqm::impl::MonitorElement::getMean
virtual double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:549
dqm::impl::MonitorElement::MEComparison::make_tuple
auto make_tuple(MonitorElementData::Path const &path) const
Definition: MonitorElement.h:121
dqm::qstatus::STATUS_OK
static const int STATUS_OK
Definition: MonitorElement.h:52
Exception.h
MonitorElementData
Definition: MonitorElementCollection.h:43
dqm::impl::MonitorElement::fits_in_int64_t
Definition: MonitorElement.h:281
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
dqm::implementation::IBooker
Definition: DQMStore.h:43
dqm::impl::MonitorElement::Fill
void Fill(unsigned long long x)
Definition: MonitorElement.h:294
dqm::impl::MonitorElement::Fill
void Fill(int x)
Definition: MonitorElement.h:310
zw
auto zw(V v) -> Vec2< typename std::remove_reference< decltype(v[0])>::type >
Definition: ExtVec.h:75
dqm::impl::MonitorElement::incompatible
void incompatible(const char *func) const
Definition: MonitorElement.cc:522
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
dqm
Definition: DQMStore.h:18
DQMNet::CoreObject::dirname
std::string dirname
Definition: DQMNet.h:96
dqm::impl::MonitorElement::enableSumw2
virtual void enableSumw2()
Definition: MonitorElement.cc:872
dqm::impl::MonitorElement::getMeanError
virtual double getMeanError(int axis=1) const
Definition: MonitorElement.cc:556
dqm::impl::MonitorElement::hasWarning
bool hasWarning() const
true if at least of one of the quality tests returned a warning
Definition: MonitorElement.h:351
dqm::impl::Access::guard_
std::unique_lock< dqmmutex > guard_
Definition: MonitorElement.h:79
TrackerOfflineValidation_Dqm_cff.xmin
xmin
Definition: TrackerOfflineValidation_Dqm_cff.py:10
dqm::impl::MonitorElement::syncCoreObject
void syncCoreObject()
Definition: MonitorElement.cc:86
dqm::impl::MonitorElement::getBinError
virtual double getBinError(int binx) const
get uncertainty on content of bin (1-D) - See TH1::GetBinError for details
Definition: MonitorElement.cc:610
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
dqm::qstatus::ERROR
static const int ERROR
Definition: MonitorElement.h:54
dqm::impl::MonitorElement::release
MutableMonitorElementData * release(bool expectOwned)
Definition: MonitorElement.cc:57
dqm::harvesting::MonitorElement
dqm::legacy::MonitorElement MonitorElement
Definition: MonitorElement.h:517
dqm::impl::MonitorElement::MEComparison
Definition: MonitorElement.h:115
dqm::impl::MutableMonitorElementData::access
Access access()
Definition: MonitorElement.h:93
dqm::impl::MonitorElement::setAxisTitle
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:800
dqm::impl::Access::value
const MonitorElementData::Value & value
Definition: MonitorElement.h:81
dqm::impl::MonitorElement::getBinContent
virtual double getBinContent(int binx) const
get content of bin (1-D)
Definition: MonitorElement.cc:592
dqm::impl::MonitorElement::hasError
bool hasError() const
true if at least of one of the quality tests returned an error
Definition: MonitorElement.h:348
dqm::impl::MonitorElement::getIntValue
virtual int64_t getIntValue() const
Definition: MonitorElement.cc:924
label
const char * label
Definition: PFTauDecayModeTools.cc:11
dqm::impl::MonitorElement::MEComparison::is_transparent
int is_transparent
Definition: MonitorElement.h:116
hcallasereventfilter2012_cfi.prefix
prefix
Definition: hcallasereventfilter2012_cfi.py:10
dqm::impl::MonitorElement::getAxis
const TAxis * getAxis(Access const &access, const char *func, int axis) const
Definition: MonitorElement.cc:842
dqm::impl::MonitorElement::Fill
void Fill(char x)
Definition: MonitorElement.h:322
dqm::legacy::MonitorElement::getTH2F
virtual TH2F * getTH2F() const
Definition: MonitorElement.h:491