1 #ifndef DQMSERVICES_CORE_MONITOR_ELEMENT_H
2 #define DQMSERVICES_CORE_MONITOR_ELEMENT_H
4 #if __GNUC__ && !defined DQM_DEPRECATED
26 #include "TProfile2D.h"
27 #include "TObjString.h"
39 #include <oneapi/tbb/spin_mutex.h>
66 namespace dqm::implementation {
107 friend ::dqm::DQMFileSaverPB;
110 friend ::QualityTester;
122 return std::make_tuple(std::reference_wrapper(me->
getPathname()), std::reference_wrapper(me->
getName()));
125 return std::make_tuple(std::reference_wrapper(path.
getDirname()), std::reference_wrapper(path.
getObjectname()));
142 std::shared_ptr<MutableMonitorElementData>
mutable_;
190 std::shared_ptr<MutableMonitorElementData>
release();
211 template <
typename FILTER>
282 template <
typename T>
294 doFill(static_cast<int64_t>(x));
296 void Fill(
unsigned long long x) {
298 doFill(static_cast<int64_t>(x));
302 doFill(static_cast<int64_t>(x));
306 doFill(static_cast<int64_t>(x));
310 doFill(static_cast<int64_t>(x));
314 doFill(static_cast<int64_t>(x));
318 doFill(static_cast<int64_t>(x));
322 doFill(static_cast<int64_t>(x));
326 doFill(static_cast<int64_t>(x));
330 doFill(static_cast<int64_t>(x));
333 void Fill(
float x) {
Fill(static_cast<double>(x)); }
337 void Fill(
double x,
double yw);
338 void Fill(
double x,
double y,
double zw);
339 void Fill(
double x,
double y,
double z,
double w);
341 void ShiftFillLast(
double y,
double ye = 0., int32_t xscale = 1);
347 virtual void Reset();
361 std::vector<MonitorElementData::QReport *>
getQReports()
const;
366 std::vector<MonitorElementData::QReport *>
getQWarnings()
const;
368 std::vector<MonitorElementData::QReport *>
getQErrors()
const;
370 std::vector<MonitorElementData::QReport *>
getQOthers()
const;
376 virtual int getBin(
int binx,
int biny)
const;
381 virtual double getMean(
int axis = 1)
const;
383 virtual double getRMS(
int axis = 1)
const;
387 virtual double getBinContent(
int binx,
int biny,
int binz)
const;
389 virtual double getBinError(
int binx,
int biny)
const;
390 virtual double getBinError(
int binx,
int biny,
int binz)
const;
422 virtual void setOption(
const char *option);
423 virtual double getAxisMin(
int axis = 1)
const;
424 virtual double getAxisMax(
int axis = 1)
const;
465 namespace dqm::legacy {
475 return const_cast<TObject *
>(
528 namespace dqm::harvesting {
532 #endif // DQMSERVICES_CORE_MONITOR_ELEMENT_H
virtual std::string getTitle() const
get MonitorElement title
virtual TH2D * getTH2D() const
static const uint32_t DQM_PROP_REPORT_WARN
virtual void setTitle(const std::string &title)
set (ie. change) histogram/profile title
std::shared_ptr< MutableMonitorElementData > mutable_
MonitorElement & operator=(const MonitorElement &)=delete
bool operator()(MonitorElementData::Path const &left, MonitorElement *right) const
virtual TH2F * getTH2F() const
virtual DQM_DEPRECATED void setCanExtend(unsigned int value)
virtual double integral() const
get integral of bins
virtual void disableAlphanumeric()
virtual TH1I * getTH1I() const
std::shared_ptr< MutableMonitorElementData > release()
TAxis const * getAxis(Access const &access, const char *func, int axis) const
virtual int getNbinsY() const
get # of bins in Y-axis
virtual double getAxisMin(int axis=1) const
virtual void setEntries(double nentries)
set # of entries
virtual void setAxisTimeDisplay(int value, int axis=1)
set x-, y-, or z-axis to display time values
MonitorElementData::Key const & key
virtual void setOption(const char *option)
virtual TH1F * getTH1F() const
const std::string & getPathname() const
get pathname of parent folder
virtual void setAxisTimeFormat(const char *format="", int axis=1)
set the format of the time values that are displayed on an axis
edm::propagate_const< std::unique_ptr< TH1 > > object_
static bool CheckBinLabels(const TAxis *a1, const TAxis *a2)
Check the consistency of the axis labels.
virtual double getBinError(int binx) const
get uncertainty on content of bin (1-D) - See TH1::GetBinError for details
virtual int64_t getIntValue() const
virtual int getNbinsZ() const
get # of bins in Z-axis
bool operator()(MonitorElement *left, MonitorElement *right) const
virtual std::string getAxisTitle(int axis=1) const
get x-, y- or z-axis title (axis=1, 2, 3 respectively)
Kind kind() const
Get the type of the monitor element.
const std::string & getName() const
get name of ME
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t Func __host__ __device__ V int Func func
bool operator()(MonitorElementData::Path const &left, MonitorElementData::Path const &right) const
virtual bool getStatOverflows()
bool hasOtherReport() const
true if at least of one of the tests returned some other (non-ok) status
const MonitorElementData::QReport * getQReport(const std::string &qtname) const
get QReport corresponding to <qtname> (null pointer if QReport does not exist)
MonitorElement(MonitorElementData &&data)
void packQualityData(std::string &into) const
serialise quality report information into a string.
std::vector< MonitorElementData::QReport * > getQOthers() const
from last set of quality tests
void incompatible(const char *func) const
void switchData(MonitorElement *other)
virtual TH1S * getTH1S() const
dqm::reco::DQMStore DQMStore
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)
std::vector< MonitorElementData::QReport * > getQErrors() const
get errors from last set of quality tests
MonitorElementData::QReport QReport
edm::LuminosityBlockID getRunLumi()
bool hasWarning() const
true if at least of one of the quality tests returned a warning
std::vector< MonitorElementData::QReport * > getQReports() const
get map of QReports
std::string const & getDirname() const
virtual void setXTitle(std::string const &title)
virtual TProfile2D * getTProfile2D()
bool operator<(const MonitorElement &x) const
Compare monitor elements, for ordering in sets.
MonitorElementData::Kind Kind
virtual int getNbinsX() const
get # of bins in X-axis
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
std::string tagString() const
std::unique_lock< dqmmutex > guard_
static const int INSUF_STAT
void switchObject(std::unique_ptr< TH1 > &&newobject)
edm::LuminosityBlockID id_
bool operator()(MonitorElement *left, MonitorElementData::Path const &right) const
void Fill(unsigned int x)
void doFill(int64_t x)
"Fill" ME method for int64_t
MonitorElementData cloneMEData()
virtual TH2I * getTH2I() const
static const int DID_NOT_RUN
virtual ~MonitorElement()
static const uint32_t DQM_PROP_REPORT_ERROR
static const int DISABLED
std::string getFullname() const
std::unique_lock< dqmmutex > guard_
static const uint32_t DQM_PROP_REPORT_OTHER
void Fill(unsigned short x)
void Fill(unsigned long x)
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 double getBinContent(int binx) const
get content of bin (1-D)
virtual TProfile2D * getTProfile2D() const
virtual TProfile * getTProfile()
MonitorElementData::Value & value
MonitorElementData::Scope getScope()
virtual TH2S * getTH2S() const
void Fill(unsigned char x)
void packScalarData(std::string &into, const char *prefix) const
convert scalar data into a string.
std::vector< MonitorElementData::QReport * > filterQReports(FILTER filter) const
MonitorElementData::Value const & value
void update()
Mark the object updated.
virtual double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
virtual void setYTitle(std::string const &title)
virtual void setBinEntries(int bin, double nentries)
set # of bin entries (to be used for profiles)
virtual int getBin(int binx, int biny) const
get global bin number (for 2-D profiles)
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
dqm::legacy::MonitorElement MonitorElement
bool hasError() const
true if at least of one of the quality tests returned an error
virtual TProfile * getTProfile() const
virtual TH1D * getTH1D() const
virtual double getMeanError(int axis=1) const
MonitorElementData::Key const & key
virtual double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)
virtual DQM_DEPRECATED void setStatOverflows(bool value)
uint32_t flags() const
Get the object flags.
auto make_tuple(MonitorElement *me) const
bool getLumiFlag() const
true if ME is meant to be stored for each luminosity section
std::string valueString() const
virtual double getBinEntries(int bin) const
get # of bin entries (for profiles)
std::string const & getObjectname() const
bool wasUpdated() const
true if ME was updated in last monitoring cycle
std::vector< MonitorElementData::QReport * > getQWarnings() const
get warnings from last set of quality tests
MonitorElementData::QReport::DQMChannel DQMChannel
char data[epos_bytes_allocation]
virtual double getFloatValue() const
void Fill(unsigned long long x)
static bool setOrder(const CoreObject &a, const CoreObject &b)
const Access access() const
virtual const std::string & getStringValue() const
std::string tagLabelString() const
return label string for the monitor element tag (eg. <name>t=12345</name>)
int checkArray[sizeof(int64_t)-sizeof(T)+1]
virtual double getRMSError(int axis=1) const
get RMS uncertainty of histogram along x, y or z axis(axis=1,2,3 respectively)
std::string getFullname() const
get full name of ME including Pathname
static const int STATUS_OK
virtual void enableSumw2()
dqm::reco::DQMStore::IBooker IBooker
auto zw(V v) -> Vec2< typename std::remove_reference< decltype(v[0])>::type >
TObject * getRootObject() const override
virtual void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
static const uint32_t DQM_PROP_NEW
static const uint32_t DQM_PROP_TYPE_MASK
TH1 const * accessRootObject(Access const &access, const char *func, int reqdim) const
virtual TObject const * getRootObject() const
std::string effLabelString() const
return label string for the monitor element tag (eg. <name>t=12345</name>)
virtual double getAxisMax(int axis=1) const
virtual TH1 * getTH1() const
virtual TH3F * getTH3F() const
virtual void divide(const MonitorElement *, const MonitorElement *, double, double, const char *)
Replace entries with results of dividing num by denom.
std::string qualityTagString(const DQMNet::QValue &qv) const
auto make_tuple(MonitorElementData::Path const &path) const
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)