|
|
Go to the documentation of this file.
19 #include <TDirectoryFile.h>
42 std::vector<std::string> &listLayers);
51 Bool_t bVarXBin =
false);
64 fReportSummary_ = -1.0;
66 strDirSummary_ =
"GEM/EventInfo";
67 strDirRecHit_ =
"GEM/RecHits";
68 strDirStatus_ =
"GEM/DAQStatus";
74 descriptions.
add(
"GEMDQMHarvester",
desc);
82 drawSummaryHistogram(store);
86 std::string strSrcDigiOcc =
"GEM/Digis/summaryOccDigi";
87 std::string strSrcStatusW =
"GEM/DAQStatus/chamberWarnings";
88 std::string strSrcStatusE =
"GEM/DAQStatus/chamberErrors";
91 std::string strSrcVFATStatusW =
"GEM/DAQStatus/vfat_statusWarnSum";
92 std::string strSrcVFATStatusE =
"GEM/DAQStatus/vfat_statusErrSum";
100 if (h2SrcDigiOcc !=
nullptr && h2SrcStatusW !=
nullptr && h2SrcStatusE !=
nullptr) {
102 createSummaryHist(store, h2SrcStatusE, h2Sum, listLayer_);
103 fReportSummary_ = refineSummaryHistogram(h2Sum, h2SrcDigiOcc, h2SrcStatusE, h2SrcStatusW,
true);
105 for (
const auto &strSuffix : listLayer_) {
109 if (h2SrcVFATOcc ==
nullptr || h2SrcVFATStatusW ==
nullptr || h2SrcVFATStatusE ==
nullptr)
112 createSummaryVFAT(store, h2SrcVFATStatusE, strSuffix, h2SumVFAT);
113 refineSummaryHistogram(h2SumVFAT, h2SrcVFATOcc, h2SrcVFATStatusE, h2SrcVFATStatusW);
114 TString strNewTitle = h2SrcVFATStatusE->
getTitle();
115 h2SumVFAT->
setTitle((
const char *)strNewTitle.ReplaceAll(
"errors",
"errors/warnings"));
127 for (Int_t
i = 1;
i <=
nBinX;
i++) {
130 for (Int_t
i = 1;
i <=
nBinY;
i++) {
141 std::vector<std::string> &listLayers) {
153 for (Int_t
i = 1;
i <=
nBinY;
i++) {
155 auto nPos = strLabelFull.find(
';');
156 auto strLabel = strLabelFull.substr(0, nPos);
157 listLayers.push_back(strLabelFull.substr(nPos + 1));
171 copyLabels(h2Src, h2Sum);
181 Int_t nAllBin = 0, nFineBin = 0;
182 for (Int_t
j = 1;
j <=
nBinY;
j++) {
188 for (Int_t
i = 1;
i <=
nBinX;
i++) {
190 Float_t fStatusWarn = (h2SrcStatusW !=
nullptr ? h2SrcStatusW->
getBinContent(
i,
j) : 0.0);
196 else if (fStatusWarn > 0)
208 return ((Float_t)nFineBin) / nAllBin;
void drawSummaryHistogram(edm::Service< DQMStore > &store)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
virtual void setTitle(const std::string &title)
set (ie. change) histogram/profile title
void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
virtual std::string getAxisTitle(int axis=1) const
get x-, y- or z-axis title (axis=1, 2, 3 respectively)
std::string strDirRecHit_
std::string strDirSummary_
#define DEFINE_FWK_MODULE(type)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Float_t refineSummaryHistogram(MonitorElement *h2Sum, MonitorElement *h2SrcOcc, MonitorElement *h2SrcStatusE, MonitorElement *h2SrcStatusW=nullptr, Bool_t bVarXBin=false)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
~GEMDQMHarvester() override
std::string strDirStatus_
void setCurrentFolder(std::string const &fullpath) override
virtual void setXTitle(std::string const &title)
void createSummaryVFAT(edm::Service< DQMStore > &store, MonitorElement *h2Src, std::string strSuffix, MonitorElement *&h2Sum)
GEMDQMHarvester(const edm::ParameterSet &)
virtual int getNbinsY() const
get # of bins in Y-axis
virtual void setYTitle(std::string const &title)
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)
void createSummaryHist(edm::Service< DQMStore > &store, MonitorElement *h2Src, MonitorElement *&h2Sum, std::vector< std::string > &listLayers)
virtual std::string getTitle() const
get MonitorElement title
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
virtual int getNbinsX() const
get # of bins in X-axis
virtual MonitorElement * get(std::string const &fullpath) const
std::vector< std::string > listLayer_
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
virtual double getBinContent(int binx) const
get content of bin (1-D)
void copyLabels(MonitorElement *h2Src, MonitorElement *h2Dst)
virtual TH2F * getTH2F() const