1 #ifndef DQMSERVICES_CORE_MONITOR_ELEMENT_H
2 # define DQMSERVICES_CORE_MONITOR_ELEMENT_H
14 # include "TProfile.h"
15 # include "TProfile2D.h"
16 # include "TObjString.h"
18 # include <sys/time.h>
27 # ifndef DQM_ROOT_METHODS
28 # define DQM_ROOT_METHODS 1
164 template <
typename T>
185 void Fill(
double x,
double yw);
186 void Fill(
double x,
double y,
double zw);
187 void Fill(
double x,
double y,
double z,
double w);
226 std::vector<QReport *>
getQErrors(
void)
const;
230 std::vector<QReport *>
getQOthers(
void)
const;
242 double getMean(
int axis = 1)
const;
244 double getRMS(
int axis = 1)
const;
254 double getBinError(
int binx,
int biny,
int binz)
const;
280 void setAxisTimeOffset(
double toffset,
const char *option=
"local",
int axis = 1);
284 #endif // DQM_ROOT_METHODS
318 TAxis *
getAxis(
const char *func,
int axis)
const;
325 void addProfiles(TProfile *h1, TProfile *h2, TProfile *sum,
float c1,
float c2);
326 void addProfiles(TProfile2D *h1, TProfile2D *h2, TProfile2D *sum,
float c1,
float c2);
397 #endif // DQMSERVICES_CORE_MONITOR_ELEMENT_H
TH1F * getRefTH1F(void) const
TH2S * getTH2S(void) const
TH1S * getTH1S(void) const
static const uint32_t DQM_PROP_REPORT_WARN
const std::string & getName(void) const
get name of ME
void incompatible(const char *func) const
const QReport * getQReport(const std::string &qtname) const
get QReport corresponding to <qtname> (null pointer if QReport does not exist)
void resetUpdate(void)
reset "was updated" flag
void setBinContent(int binx, double content)
set content of bin (1-D)
static const uint32_t DQM_PROP_TYPE_TH1S
TH1 * accessRootObject(const char *func, int reqdim) const
bool markedToDelete(void) const
true if ME is marked for deletion
MonitorElement * initialise(Kind kind)
static const uint32_t DQM_PROP_TYPE_TPROF
TProfile2D * getTProfile2D(void) const
TH1 * getRefTH1(void) const
void setAxisRange(double xmin, double xmax, int axis=1)
set x-, y- or z-axis range (axis=1, 2, 3 respectively)
static const uint32_t DQM_PROP_TYPE_TH2D
void setAxisTimeFormat(const char *format="", int axis=1)
set the format of the time values that are displayed on an axis
void updateQReportStats(void)
Refresh QReport stats, usually after MEs were read in from a file.
std::vector< QReport > qreports_
void Fill(unsigned short x)
std::string tagLabelString(void) const
return label string for the monitor element tag (eg. <name>t=12345</name>)
void setLumi(uint32_t ls)
std::string qualityTagString(const DQMNet::QValue &qv) const
std::string getAxisTitle(int axis=1) const
get x-, y- or z-axis title (axis=1, 2, 3 respectively)
TProfile2D * getRefTProfile2D(void) const
auto zw(V v) -> Vec2< typenamestd::remove_reference< decltype(v[0])>::type >
void disableSoftReset(void)
reverts action of softReset
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)
bool hasError(void) const
true if at least of one of the quality tests returned an error
TH3F * getTH3F(void) const
static const uint32_t DQM_PROP_TAGGED
TH1D * getTH1D(void) const
void runQTests(void)
run all quality tests
static const uint32_t DQM_PROP_EFFICIENCY_PLOT
static const uint32_t DQM_PROP_TYPE_TH3F
static const uint32_t DQM_PROP_RESET
TH2D * getTH2D(void) const
const std::string * dirname
static const uint32_t DQM_PROP_TYPE_TH1F
void update(void)
Mark the object updated.
static const uint32_t DQM_PROP_MARKTODELETE
double getEntries(void) const
get # of entries
double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
bool operator<(const MonitorElement &x) const
Compare monitor elements, for ordering in sets.
void Fill(unsigned long long x)
double getMeanError(int axis=1) const
void packScalarData(std::string &into, const char *prefix) const
convert scalar data into a string.
const uint32_t getTag(void) const
int getNbinsY(void) const
get # of bins in Y-axis
std::vector< QReport * > getQErrors(void) const
get errors from last set of quality tests
bool wasUpdated(void) const
true if ME was updated in last monitoring cycle
static const uint32_t DQM_PROP_ACCUMULATE
TH3F * getRefTH3F(void) const
bool getLumiFlag(void) const
true if ME is meant to be stored for each luminosity section
const uint32_t lumi(void) const
void ShiftFillLast(double y, double ye=0., int32_t xscale=1)
void packQualityData(std::string &into) const
serialise quality report information into a string.
const std::string & getPathname(void) const
get pathname of parent folder
tuple path
else: Piece not in the list, fine.
TH2F * getRefTH2F(void) const
bool hasWarning(void) const
true if at least of one of the quality tests returned a warning
void setAxisTimeDisplay(int value, int axis=1)
set x-, y-, or z-axis to display time values
static const uint32_t DQM_PROP_TYPE_INT
void doFill(int64_t x)
"Fill" ME method for int64_t
DQMNet::TagList getTags(void) const
int getNbinsZ(void) const
get # of bins in Z-axis
void addProfiles(TProfile *h1, TProfile *h2, TProfile *sum, float c1, float c2)
std::string getTitle(void) const
get MonitorElement title
double getFloatValue(void) const
int checkArray[sizeof(int64_t)-sizeof(T)+1]
static const uint32_t DQM_PROP_REPORT_ERROR
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
std::vector< QReport >::const_iterator QReportIterator
static const uint32_t DQM_PROP_REPORT_OTHER
Kind kind(void) const
Get the type of the monitor element.
static const uint32_t DQM_PROP_TYPE_TH1D
void setEntries(double nentries)
set # of entries
uint32_t flags(void) const
Get the object flags.
const std::string getFullname(void) const
get full name of ME including Pathname
const std::string & getStringValue(void) const
std::string effLabelString(void) const
return label string for the monitor element tag (eg. <name>t=12345</name>)
bool isAccumulateEnabled(void) const
whether ME contents should be accumulated over multiple monitoring periods; default: false ...
const uint32_t streamId(void) const
void Fill(unsigned int x)
std::string valueString(void) const
TH2D * getRefTH2D(void) const
TAxis * getAxis(const char *func, int axis) const
void setTitle(const std::string &title)
set (ie. change) histogram/profile title
double getRMSError(int axis=1) const
get RMS uncertainty of histogram along x, y or z axis(axis=1,2,3 respectively)
std::vector< uint32_t > TagList
TObject * getRootObject(void) const
std::vector< QReport * > getQReports(void) const
get map of QReports
void setAxisTimeOffset(double toffset, const char *option="local", int axis=1)
set the time offset, if option = "gmt" then the offset is treated as a GMT time
void Fill(unsigned long x)
bool isEfficiency(void) const
std::vector< QReport * > getQOthers(void) const
double getBinError(int binx) const
get uncertainty on content of bin (1-D) - See TH1::GetBinError for details
int64_t getIntValue(void) const
TH1F * getTH1F(void) const
std::string tagString(void) const
MonitorElement & operator=(const MonitorElement &)=delete
bool hasOtherReport(void) const
true if at least of one of the tests returned some other (non-ok) status
TProfile * getRefTProfile(void) const
void copyFunctions(TH1 *from, TH1 *to)
bool resetMe(void) const
true if ME should be reset at end of monitoring cycle
const uint32_t moduleId(void) const
double getBinContent(int binx) const
get content of bin (1-D)
double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)
double getYmax(void) const
get max Y value (for profiles)
static bool setOrder(const CoreObject &a, const CoreObject &b)
TProfile * getTProfile(void) const
TH2S * getRefTH2S(void) const
bool isSoftResetEnabled(void) const
whether soft-reset is enabled; default is false
double getBinEntries(int bin) const
get # of bin entries (for profiles)
std::vector< QReport * > getQWarnings(void) const
get warnings from last set of quality tests
static const uint32_t DQM_PROP_TYPE_TH2S
int getNbinsX(void) const
get # of bins in X-axis
void Fill(unsigned char x)
const uint32_t run(void) const
void setEfficiencyFlag(void)
static const uint32_t DQM_PROP_TYPE_STRING
static const uint32_t DQM_PROP_NEW
void setLumiFlag(void)
this ME is meant to be stored for each luminosity section
static const uint32_t DQM_PROP_TYPE_MASK
TH2F * getTH2F(void) const
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void Reset(void)
reset ME (ie. contents, errors, etc)
TObject * getRefRootObject(void) const
static const uint32_t DQM_PROP_LUMI
void setBinEntries(int bin, double nentries)
set # of bin entries (to be used for profiles)
TH1S * getRefTH1S(void) const
static const uint32_t DQM_PROP_TYPE_REAL
void addQReport(const DQMNet::QValue &desc, QCriterion *qc)
Add quality report, from DQMStore.
static const uint32_t DQM_PROP_TYPE_INVALID
static const uint32_t DQM_PROP_TYPE_TPROF2D
double getYmin(void) const
get min Y value (for profiles)
static const uint32_t DQM_PROP_TYPE_TH2F
TH1D * getRefTH1D(void) const
static bool CheckBinLabels(const TAxis *a1, const TAxis *a2)
Check the consistency of the axis labels.