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> 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));
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;
423 virtual double getAxisMin(
int axis = 1)
const;
424 virtual double getAxisMax(
int axis = 1)
const;
475 return const_cast<TObject *
>(
532 #endif // DQMSERVICES_CORE_MONITOR_ELEMENT_H
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
std::string tagLabelString() const
return label string for the monitor element tag (eg. <name>t=12345</name>)
virtual TH3F * getTH3F() const
virtual TProfile * getTProfile() const
virtual int getNbinsZ() const
get # of bins in Z-axis
virtual DQM_DEPRECATED void setCanExtend(unsigned int value)
virtual double getBinEntries(int bin) const
get # of bin entries (for profiles)
virtual void disableAlphanumeric()
std::shared_ptr< MutableMonitorElementData > release()
def create(alignables, pedeDump, additionalData, outputFile, config)
virtual double integral() const
get integral of bins
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 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)
virtual TH2I * getTH2I() const
edm::propagate_const< std::unique_ptr< TH1 > > object_
std::vector< MonitorElementData::QReport * > getQOthers() const
from last set of quality tests
static bool CheckBinLabels(const TAxis *a1, const TAxis *a2)
Check the consistency of the axis labels.
std::vector< MonitorElementData::QReport * > filterQReports(FILTER filter) 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.
std::string effLabelString() const
return label string for the monitor element tag (eg. <name>t=12345</name>)
virtual bool getStatOverflows()
MonitorElement(MonitorElementData &&data)
const Access access() const
std::vector< MonitorElementData::QReport * > getQErrors() const
get errors from last set of quality tests
void switchData(MonitorElement *other)
std::string valueString() const
dqm::reco::DQMStore DQMStore
bool getLumiFlag() const
true if ME is meant to be stored for each luminosity section
virtual TH2F * getTH2F() const
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
virtual double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)
edm::LuminosityBlockID getRunLumi()
virtual void setXTitle(std::string const &title)
virtual TProfile2D * getTProfile2D()
bool hasOtherReport() const
true if at least of one of the tests returned some other (non-ok) status
bool operator<(const MonitorElement &x) const
Compare monitor elements, for ordering in sets.
MonitorElementData::Kind Kind
virtual void setAxisRange(double xmin, double xmax, int axis=1)
set x-, y- or z-axis range (axis=1, 2, 3 respectively)
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
std::unique_lock< dqmmutex > guard_
static const int INSUF_STAT
void switchObject(std::unique_ptr< TH1 > &&newobject)
edm::LuminosityBlockID id_
void Fill(unsigned int x)
void doFill(int64_t x)
"Fill" ME method for int64_t
MonitorElementData cloneMEData()
TH1 const * accessRootObject(Access const &access, const char *func, int reqdim) const
void packScalarData(std::string &into, const char *prefix) const
convert scalar data into a string.
static const int DID_NOT_RUN
virtual ~MonitorElement()
static const uint32_t DQM_PROP_REPORT_ERROR
TAxis const * getAxis(Access const &access, const char *func, int axis) const
static const int DISABLED
virtual TH1D * getTH1D() const
std::unique_lock< dqmmutex > guard_
virtual double getEntries() const
get # of entries
static const uint32_t DQM_PROP_REPORT_OTHER
void Fill(unsigned short x)
void Fill(unsigned long x)
bool operator()(MonitorElement *left, MonitorElementData::Path const &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 TProfile * getTProfile()
virtual int getNbinsY() const
get # of bins in Y-axis
MonitorElementData::Value & value
MonitorElementData::Scope getScope()
std::string getFullname() const
virtual std::string getTitle() const
get MonitorElement title
void Fill(unsigned char x)
dqm::legacy::MonitorElement MonitorElement
MonitorElementData::Value const & value
virtual TObject const * getRootObject() const
void update()
Mark the object updated.
std::string getFullname() const
get full name of ME including Pathname
std::vector< MonitorElementData::QReport * > getQWarnings() const
get warnings from last set of quality tests
virtual void setYTitle(std::string const &title)
virtual void setBinEntries(int bin, double nentries)
set # of bin entries (to be used for profiles)
const std::string & getPathname() const
get pathname of parent folder
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
uint32_t flags() const
Get the object flags.
bool operator()(MonitorElementData::Path const &left, MonitorElement *right) const
bool operator()(MonitorElementData::Path const &left, MonitorElementData::Path const &right) const
MonitorElementData::Key const & key
virtual TH1F * getTH1F() const
std::string qualityTagString(const DQMNet::QValue &qv) const
bool wasUpdated() const
true if ME was updated in last monitoring cycle
virtual DQM_DEPRECATED void setStatOverflows(bool value)
std::string tagString() const
virtual TH1I * getTH1I() const
virtual double getAxisMin(int axis=1) const
virtual TH1S * getTH1S() const
virtual TH1 * getTH1() const
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)
void packQualityData(std::string &into) const
serialise quality report information into a string.
MonitorElementData::QReport::DQMChannel DQMChannel
auto make_tuple(MonitorElement *me) const
char data[epos_bytes_allocation]
void Fill(unsigned long long x)
static bool setOrder(const CoreObject &a, const CoreObject &b)
virtual double getAxisMax(int axis=1) const
virtual TProfile2D * getTProfile2D() const
static const int STATUS_OK
virtual int getBin(int binx, int biny) const
get global bin number (for 2-D profiles)
virtual void enableSumw2()
dqm::reco::DQMStore::IBooker IBooker
virtual int getNbinsX() const
get # of bins in X-axis
virtual double getBinError(int binx) const
get uncertainty on content of bin (1-D) - See TH1::GetBinError for details
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
bool hasError() const
true if at least of one of the quality tests returned an error
auto make_tuple(MonitorElementData::Path const &path) const
int checkArray[sizeof(int64_t) - sizeof(T)+1]
void incompatible(const char *func) const
virtual double getMeanError(int axis=1) const
bool hasWarning() const
true if at least of one of the quality tests returned a warning
virtual TH2S * getTH2S() const
virtual void divide(const MonitorElement *, const MonitorElement *, double, double, const char *)
Replace entries with results of dividing num by denom.
bool operator()(MonitorElement *left, MonitorElement *right) const
virtual double getBinContent(int binx) const
get content of bin (1-D)
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
virtual int64_t getIntValue() const
virtual TH2D * getTH2D() const