|
|
Go to the documentation of this file. 1 #ifndef DQMSERVICES_CORE_MONITOR_ELEMENT_H
2 #define DQMSERVICES_CORE_MONITOR_ELEMENT_H
4 #if __GNUC__ && !defined DQM_DEPRECATED
24 #include "TProfile2D.h"
25 #include "TObjString.h"
36 #include <tbb/spin_mutex.h>
104 friend ::dqm::DQMFileSaverPB;
107 friend ::QualityTester;
119 return std::make_tuple(std::reference_wrapper(
me->getPathname()), std::reference_wrapper(
me->getName()));
122 return std::make_tuple(
path.getDirname(),
path.getObjectname());
209 template <
typename FILTER>
280 template <
typename T>
292 doFill(static_cast<int64_t>(x));
294 void Fill(
unsigned long long x) {
296 doFill(static_cast<int64_t>(x));
300 doFill(static_cast<int64_t>(x));
304 doFill(static_cast<int64_t>(x));
308 doFill(static_cast<int64_t>(x));
312 doFill(static_cast<int64_t>(x));
316 doFill(static_cast<int64_t>(x));
320 doFill(static_cast<int64_t>(x));
324 doFill(static_cast<int64_t>(x));
328 doFill(static_cast<int64_t>(x));
331 void Fill(
float x) {
Fill(static_cast<double>(x)); }
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);
345 virtual void Reset();
359 std::vector<MonitorElementData::QReport *>
getQReports()
const;
364 std::vector<MonitorElementData::QReport *>
getQWarnings()
const;
366 std::vector<MonitorElementData::QReport *>
getQErrors()
const;
368 std::vector<MonitorElementData::QReport *>
getQOthers()
const;
374 virtual int getBin(
int binx,
int biny)
const;
379 virtual double getMean(
int axis = 1)
const;
381 virtual double getRMS(
int axis = 1)
const;
385 virtual double getBinContent(
int binx,
int biny,
int binz)
const;
387 virtual double getBinError(
int binx,
int biny)
const;
388 virtual double getBinError(
int binx,
int biny,
int binz)
const;
421 virtual double getAxisMin(
int axis = 1)
const;
422 virtual double getAxisMax(
int axis = 1)
const;
470 return const_cast<TObject *>(
475 return const_cast<dqm::legacy::MonitorElement *>(
this)->dqm::reco::MonitorElement::getTH1();
479 return const_cast<dqm::legacy::MonitorElement *>(
this)->dqm::reco::MonitorElement::getTH1F();
483 return const_cast<dqm::legacy::MonitorElement *>(
this)->dqm::reco::MonitorElement::getTH1S();
487 return const_cast<dqm::legacy::MonitorElement *>(
this)->dqm::reco::MonitorElement::getTH1D();
491 return const_cast<dqm::legacy::MonitorElement *>(
this)->dqm::reco::MonitorElement::getTH2F();
495 return const_cast<dqm::legacy::MonitorElement *>(
this)->dqm::reco::MonitorElement::getTH2S();
499 return const_cast<dqm::legacy::MonitorElement *>(
this)->dqm::reco::MonitorElement::getTH2D();
503 return const_cast<dqm::legacy::MonitorElement *>(
this)->dqm::reco::MonitorElement::getTH3F();
507 return const_cast<dqm::legacy::MonitorElement *>(
this)->dqm::reco::MonitorElement::getTProfile();
511 return const_cast<dqm::legacy::MonitorElement *>(
this)->dqm::reco::MonitorElement::getTProfile2D();
519 #endif // DQMSERVICES_CORE_MONITOR_ELEMENT_H
virtual void divide(const MonitorElement *, const MonitorElement *, double, double, const char *)
Replace entries with results of dividing num by denom.
virtual int getNbinsZ() const
get # of bins in Z-axis
MutableMonitorElementData * mutable_
virtual DQM_DEPRECATED void setCanExtend(unsigned int value)
virtual double getBinEntries(int bin) const
get # of bin entries (for profiles)
virtual void disableAlphanumeric()
static bool setOrder(const CoreObject &a, const CoreObject &b)
const MonitorElementData::Key & key
std::string getFullname() const
virtual void setEntries(double nentries)
set # of entries
virtual void setTitle(const std::string &title)
set (ie. change) histogram/profile title
virtual void setAxisTimeDisplay(int value, int axis=1)
set x-, y-, or z-axis to display time values
MonitorElement & operator=(const MonitorElement &)=delete
virtual void setOption(const char *option)
static const int DID_NOT_RUN
std::string tagLabelString() const
return label string for the monitor element tag (eg. <name>t=12345</name>)
static const int INSUF_STAT
bool operator()(MonitorElement *left, MonitorElement *right) const
static bool CheckBinLabels(const TAxis *a1, const TAxis *a2)
Check the consistency of the axis labels.
virtual std::string getAxisTitle(int axis=1) const
get x-, y- or z-axis title (axis=1, 2, 3 respectively)
virtual double integral() const
get integral of bins
std::string effLabelString() const
return label string for the monitor element tag (eg. <name>t=12345</name>)
virtual TH1S * getTH1S() const
virtual void setAxisTimeFormat(const char *format="", int axis=1)
set the format of the time values that are displayed on an axis
std::vector< MonitorElementData::QReport * > getQReports() const
get map of QReports
virtual double getRMSError(int axis=1) const
get RMS uncertainty of histogram along x, y or z axis(axis=1,2,3 respectively)
MonitorElement(MonitorElementData &&data)
std::vector< MonitorElementData::QReport * > getQOthers() const
from last set of quality tests
def create(alignables, pedeDump, additionalData, outputFile, config)
const Access access() const
const TH1 * accessRootObject(Access const &access, const char *func, int reqdim) const
std::vector< MonitorElementData::QReport * > filterQReports(FILTER filter) const
void switchData(MonitorElement *other)
Kind kind() const
Get the type of the monitor element.
int checkArray[sizeof(int64_t) - sizeof(T)+1]
virtual TH1F * getTH1F() const
std::string valueString() const
edm::LuminosityBlockID id_
bool getLumiFlag() const
true if ME is meant to be stored for each luminosity section
std::vector< MonitorElementData::QReport * > getQErrors() const
get errors from last set of quality tests
virtual TProfile2D * getTProfile2D()
virtual TProfile2D * getTProfile2D() const
bool operator<(const MonitorElement &x) const
Compare monitor elements, for ordering in sets.
TObject * getRootObject() const override
MonitorElementData::Kind Kind
std::unique_lock< dqmmutex > guard_
static const uint32_t DQM_PROP_REPORT_WARN
virtual void Reset()
Remove all data from the ME, keept the empty histogram with all its settings.
DQM_DEPRECATED void ShiftFillLast(double y, double ye=0., int32_t xscale=1)
MonitorElementData::QReport QReport
static const uint32_t DQM_PROP_NEW
void Fill(unsigned int x)
static const uint32_t DQM_PROP_TYPE_MASK
virtual double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)
void doFill(int64_t x)
"Fill" ME method for int64_t
edm::LuminosityBlockID getRunLumi()
virtual TProfile * getTProfile() const
virtual void setXTitle(std::string const &title)
MonitorElementData::QReport::DQMChannel DQMChannel
void packScalarData(std::string &into, const char *prefix) const
convert scalar data into a string.
virtual TH1D * getTH1D() const
bool hasOtherReport() const
true if at least of one of the tests returned some other (non-ok) status
virtual TH1 * getTH1() const
virtual void setAxisRange(double xmin, double xmax, int axis=1)
set x-, y- or z-axis range (axis=1, 2, 3 respectively)
virtual double getEntries() const
get # of entries
const MonitorElementData::QReport * getQReport(const std::string &qtname) const
get QReport corresponding to <qtname> (null pointer if QReport does not exist)
virtual double getFloatValue() const
void Fill(unsigned long x)
void switchObject(std::unique_ptr< TH1 > &&newobject)
static const int DISABLED
bool operator()(MonitorElementData::Path const &left, MonitorElementData::Path const &right) const
virtual int getNbinsY() const
get # of bins in Y-axis
static const uint32_t DQM_PROP_REPORT_ERROR
MonitorElementData cloneMEData()
virtual TH2D * getTH2D() const
static const uint32_t DQM_PROP_REPORT_OTHER
virtual ~MonitorElement()
const MonitorElementData::Key & key
virtual TH2S * getTH2S() const
void Fill(unsigned short x)
std::vector< MonitorElementData::QReport * > getQWarnings() const
get warnings from last set of quality tests
virtual void setBinEntries(int bin, double nentries)
set # of bin entries (to be used for profiles)
virtual void setYTitle(std::string const &title)
bool operator()(MonitorElementData::Path const &left, MonitorElement *right) const
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)
virtual TH3F * getTH3F() const
uint32_t flags() const
Get the object flags.
virtual TProfile * getTProfile()
virtual DQM_DEPRECATED void setStatOverflows(unsigned int value)
MonitorElementData::Scope getScope()
virtual std::string getTitle() const
get MonitorElement title
void Fill(unsigned char x)
void update()
Mark the object updated.
std::string getFullname() const
get full name of ME including Pathname
auto make_tuple(MonitorElement *me) const
virtual const TObject * getRootObject() const
bool operator()(MonitorElement *left, MonitorElementData::Path const &right) const
const std::string & getPathname() const
get pathname of parent folder
void packQualityData(std::string &into) const
serialise quality report information into a string.
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
edm::propagate_const< std::unique_ptr< TH1 > > object_
MonitorElementData::Value & value
std::string qualityTagString(const DQMNet::QValue &qv) const
bool wasUpdated() const
true if ME was updated in last monitoring cycle
virtual double getAxisMax(int axis=1) const
std::string tagString() const
virtual int getBin(int binx, int biny) const
get global bin number (for 2-D profiles)
virtual int getNbinsX() const
get # of bins in X-axis
dqm::reco::DQMStore DQMStore
virtual double getAxisMin(int axis=1) const
virtual void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
virtual const std::string & getStringValue() const
const std::string & getName() const
get name of ME
virtual double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
auto make_tuple(MonitorElementData::Path const &path) const
static const int STATUS_OK
char data[epos_bytes_allocation]
void Fill(unsigned long long x)
auto zw(V v) -> Vec2< typename std::remove_reference< decltype(v[0])>::type >
void incompatible(const char *func) const
virtual void enableSumw2()
virtual double getMeanError(int axis=1) const
bool hasWarning() const
true if at least of one of the quality tests returned a warning
std::unique_lock< dqmmutex > guard_
virtual double getBinError(int binx) const
get uncertainty on content of bin (1-D) - See TH1::GetBinError for details
MutableMonitorElementData * release(bool expectOwned)
dqm::legacy::MonitorElement MonitorElement
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
const MonitorElementData::Value & value
virtual double getBinContent(int binx) const
get content of bin (1-D)
bool hasError() const
true if at least of one of the quality tests returned an error
virtual int64_t getIntValue() const
const TAxis * getAxis(Access const &access, const char *func, int axis) const
virtual TH2F * getTH2F() const