1 #define __STDC_FORMAT_MACROS 1 19 <<
"' cannot be invoked on monitor" 21 <<
name <<
"' because it is not a ROOT object.";
23 auto *
h =
static_cast<TH1 *
>(tobj);
24 int ndim =
h->GetDimension();
25 if (reqdim < 0 || reqdim > ndim)
27 <<
"' cannot be invoked on monitor" 29 <<
name <<
"' because it requires " << reqdim
30 <<
" dimensions; this" 32 <<
typeid(*h).name() <<
"' has " << ndim <<
" dimensions";
38 this->
mutable_ = std::make_shared<MutableMonitorElementData>();
153 THashList *l1 = (
const_cast<TAxis *
>(a1))->GetLabels();
154 THashList *l2 = (
const_cast<TAxis *
>(
a2))->GetLabels();
162 if (l1->GetSize() != l2->GetSize()) {
165 for (
int i = 1;
i <= a1->GetNbins(); ++
i) {
166 TString
label1 = a1->GetBinLabel(
i);
263 int index = entries + 1;
267 if (entries >=
nbins) {
269 xlow = entries -
nbins + 3;
276 double N = entries -
nbins + 1.;
277 if (ye == 0. || y1err == 0. || y2err == 0.) {
279 double sum =
N *
y1 +
y2;
282 double s = (
N + 1.) * (
N *
y1 *
y1 +
y2 *
y2) - sum * sum;
284 y1err =
sqrt(
s) / (
N + 1.);
289 double denom = (1. / y1err + 1. / y2err);
310 sprintf(
buffer,
"%d", xlow * xscale);
313 sprintf(
buffer,
"%d", xup * xscale);
427 size_t len = sprintf(
buf,
"t=%" PRIu32,
data_.
tag);
461 size_t buflen = sprintf(
buf,
"qr=st:%d:%.*g:", qv.
code, DBL_DIG + 2, qv.
qtresult);
489 template <
typename FILTER>
492 std::vector<MonitorElementData::QReport *>
result;
497 result.push_back(const_cast<MonitorElementData::QReport *>(&qr));
525 <<
"' cannot be invoked on monitor" 533 <<
"' cannot be invoked on monitor" 535 <<
data_.
objname <<
"' because it is not a root object";
541 <<
"' cannot be invoked on monitor" 543 <<
data_.
objname <<
"' because it is not a root object";
638 return static_cast<TProfile2D
const *
>(
accessRootObject(
access, __PRETTY_FUNCTION__, 1))->GetBin(binx, biny);
664 return static_cast<TProfile2D
const *
>(
accessRootObject(
access, __PRETTY_FUNCTION__, 1))->GetBinEntries(globBin);
680 return getAxis(
access, __PRETTY_FUNCTION__, axis)->GetTitle();
748 num->incompatible(__PRETTY_FUNCTION__);
750 denom->incompatible(__PRETTY_FUNCTION__);
752 TH1
const *numH =
static_cast<TH1
const *
>(
num->getRootObject());
753 TH1
const *denomH =
static_cast<TH1
const *
>(
denom->getRootObject());
758 std::array<const MonitorElement *, 3>
order{{
this,
num,
denom}};
760 return lhs->mutable_->data_.value_.object_.get() < rhs->mutable_->data_.value_.object_.get();
764 auto a1 =
order[1]->access();
768 thisH->Divide(numH, denomH,
c1, c2,
options);
789 <<
"setBinLabel: attempting to set label of non-existent bin number for ME: " 835 throw cms::Exception(
"MonitorElementError") <<
"No such axis " << axis
836 <<
" in monitor element" 838 <<
data_.
objname <<
"' of type '" <<
typeid(*h).name() <<
"'";
845 TAxis
const *
a =
nullptr;
854 throw cms::Exception(
"MonitorElementError") <<
"No such axis " << axis
855 <<
" in monitor element" 857 <<
data_.
objname <<
"' of type '" <<
typeid(*h).name() <<
"'";
895 return getAxis(
access, __PRETTY_FUNCTION__, axis)->GetXmin();
900 return getAxis(
access, __PRETTY_FUNCTION__, axis)->GetXmax();
919 if (
value == TH1::kConsider)
960 else if (
pos == end) {
965 q.message =
"NO_MESSAGE_ASSIGNED";
966 q.algorithm =
"UNKNOWN_ALGORITHM";
972 qv = &(qr->getValue());
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_
std::string tagLabelString() const
return label string for the monitor element tag (eg. <name>t=12345</name>)
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)
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.
static const uint32_t DQM_PROP_EFFICIENCY_PLOT
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
constexpr element_type const * get() 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)
virtual void setXTitle(std::string const &title)
virtual TProfile2D * getTProfile2D()
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
void switchObject(std::unique_ptr< TH1 > &&newobject)
void doFill(int64_t x)
"Fill" ME method for int64_t
MonitorElementData cloneMEData()
std::string const & getDirname() const
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
virtual double getEntries() const
get # of entries
static const uint32_t DQM_PROP_REPORT_OTHER
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
virtual std::string getTitle() const
get MonitorElement title
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)
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
static constexpr float a0
std::string qualityTagString(const DQMNet::QValue &qv) const
virtual DQM_DEPRECATED void setStatOverflows(bool value)
static void packQualityData(std::string &into, const QReports &qr)
std::string tagString() const
virtual double getAxisMin(int axis=1) const
virtual const std::string & getStringValue() const
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.
std::vector< QReport > qreports_
char data[epos_bytes_allocation]
virtual double getAxisMax(int axis=1) const
int getStatus() const
get test status
static const int STATUS_OK
virtual int getBin(int binx, int biny) const
get global bin number (for 2-D profiles)
virtual void enableSumw2()
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 >
QValue & getValue()
access underlying value
virtual void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
static TH1 * checkRootObject(const std::string &name, TObject *tobj, const char *func, int reqdim)
static const uint32_t DQM_PROP_NEW
Log< level::Warning, false > LogWarning
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
std::string const & getObjectname() const
static const uint32_t DQM_PROP_LUMI
void incompatible(const char *func) const
virtual double getMeanError(int axis=1) const
virtual void divide(const MonitorElement *, const MonitorElement *, double, double, const char *)
Replace entries with results of dividing num by denom.
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