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);
167 TString label2 =
a2->GetBinLabel(
i);
255 int index = entries + 1;
259 if (entries >=
nbins) {
261 xlow = entries -
nbins + 3;
268 double N = entries -
nbins + 1.;
269 if (ye == 0. || y1err == 0. || y2err == 0.) {
271 double sum =
N *
y1 +
y2;
274 double s = (
N + 1.) * (
N *
y1 *
y1 +
y2 *
y2) - sum * sum;
276 y1err =
sqrt(
s) / (
N + 1.);
281 double denom = (1. / y1err + 1. / y2err);
302 sprintf(
buffer,
"%d", xlow * xscale);
305 sprintf(
buffer,
"%d", xup * xscale);
417 size_t len = sprintf(
buf,
"t=%" PRIu32,
data_.
tag);
451 size_t buflen = sprintf(
buf,
"qr=st:%d:%.*g:", qv.
code, DBL_DIG + 2, qv.
qtresult);
475 const_cast<MonitorElement *>(
this)->getQReport(
false, qtname, qr, qv);
479 template <
typename FILTER>
482 std::vector<MonitorElementData::QReport *>
result;
487 result.push_back(const_cast<MonitorElementData::QReport *>(&qr));
515 <<
"' cannot be invoked on monitor"
523 <<
"' cannot be invoked on monitor"
525 <<
data_.
objname <<
"' because it is not a root object";
531 <<
"' cannot be invoked on monitor"
533 <<
data_.
objname <<
"' because it is not a root object";
628 return static_cast<TProfile2D const *>(
accessRootObject(
access, __PRETTY_FUNCTION__, 1))->GetBin(binx, biny);
654 return static_cast<TProfile2D const *>(
accessRootObject(
access, __PRETTY_FUNCTION__, 1))->GetBinEntries(globBin);
670 return getAxis(
access, __PRETTY_FUNCTION__, axis)->GetTitle();
738 num->incompatible(__PRETTY_FUNCTION__);
740 denom->incompatible(__PRETTY_FUNCTION__);
742 TH1
const *numH = static_cast<TH1 const *>(
num->getRootObject());
743 TH1
const *denomH = static_cast<TH1 const *>(
denom->getRootObject());
748 std::array<const MonitorElement *, 3>
order{{
this,
num,
denom}};
750 return lhs->mutable_->data_.value_.object_.get() < rhs->mutable_->data_.value_.object_.get();
754 auto a1 =
order[1]->access();
758 thisH->Divide(numH, denomH,
c1, c2,
options);
779 <<
"setBinLabel: attempting to set label of non-existent bin number for ME: "
825 throw cms::Exception(
"MonitorElementError") <<
"No such axis " << axis
826 <<
" in monitor element"
828 <<
data_.
objname <<
"' of type '" <<
typeid(*h).name() <<
"'";
835 TAxis
const *
a =
nullptr;
844 throw cms::Exception(
"MonitorElementError") <<
"No such axis " << axis
845 <<
" in monitor element"
847 <<
data_.
objname <<
"' of type '" <<
typeid(*h).name() <<
"'";
885 return getAxis(
access, __PRETTY_FUNCTION__, axis)->GetXmin();
890 return getAxis(
access, __PRETTY_FUNCTION__, axis)->GetXmax();
909 if (
value == TH1::kConsider)
955 q.message =
"NO_MESSAGE_ASSIGNED";
956 q.algorithm =
"UNKNOWN_ALGORITHM";
962 qv = &(qr->getValue());