CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
GEMDQMHarvester Class Reference
Inheritance diagram for GEMDQMHarvester:

Classes

class  NumStatus
 
struct  PreStatusInfo
 

Public Types

typedef std::tuple< int, int > IdChamber
 
typedef std::tuple< int, int, int > IdVFAT
 
typedef struct GEMDQMHarvester::PreStatusInfo StatusInfo
 

Public Member Functions

 GEMDQMHarvester (const edm::ParameterSet &)
 
 ~GEMDQMHarvester () override
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Protected Types

typedef std::vector< std::vector< Int_t > > TableStatusNum
 
typedef std::vector< std::vector< Float_t > > TableStatusOcc
 

Protected Member Functions

Int_t assessOneBin (std::string strName, Int_t nIdxX, Int_t nIdxY, Float_t fAll, Float_t fNumOcc, Float_t fNumErr, Float_t fNumWarn)
 
void copyLabels (MonitorElement *h2Src, MonitorElement *h2Dst)
 
void createInactiveChannelFracHist (edm::Service< DQMStore > &store, std::string strSuffix, Int_t nNumChamber)
 
void createLumiFuncHist (edm::Service< DQMStore > &store, std::string strSuffix, Int_t nIdxLayer, Int_t nLumiCurr)
 
void createSummaryHist (edm::Service< DQMStore > &store, MonitorElement *h2Src, MonitorElement *&h2Sum)
 
void createSummaryVFAT (edm::Service< DQMStore > &store, MonitorElement *h2Src, std::string strSuffix, MonitorElement *&h2Sum)
 
void createTableWatchingSummary ()
 
void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &iLumi, edm::EventSetup const &) override
 
void drawSummaryHistogram (edm::Service< DQMStore > &store, Int_t nLumiCurr)
 
void getGeometryInfo (edm::Service< DQMStore > &store, MonitorElement *h2Src)
 
Float_t refineSummaryHistogram (std::string strName, MonitorElement *h2Sum, std::vector< MonitorElement *> &listOccPlots, MonitorElement *h2SrcStatusA, MonitorElement *h2SrcStatusE, MonitorElement *h2SrcStatusW, MonitorElement *h2SrcStatusEVFAT, MonitorElement *h2SrcStatusWVFAT, MonitorElement *h2SrcStatusEOH, MonitorElement *h2SrcStatusWOH, MonitorElement *h2SrcStatusEAMC, MonitorElement *h2SrcStatusWAMC, MonitorElement *h2SrcStatusEAMC13, Int_t nLumiCurr)
 
Int_t refineSummaryVFAT (std::string strName, MonitorElement *h2Sum, MonitorElement *h2SrcOcc, MonitorElement *h2SrcStatusE, MonitorElement *h2SrcStatusW, Int_t nLumiCurr, Int_t nIdxLayer)
 
Int_t UpdateStatusChamber (Int_t nIdxLayer, Int_t nIdxCh, Int_t nLumiCurr, NumStatus numStatus)
 
Int_t UpdateStatusChamber (Int_t nIdxLayer, Int_t nIdxCh, Int_t nIdxVFAT, Int_t nLumiCurr, NumStatus numStatus)
 
Int_t UpdateStatusChamber (std::vector< StatusInfo > &listStatus, NumStatus &numStatus, Int_t nLumiCurr, NumStatus numStatusNew)
 

Protected Attributes

Bool_t bIsStatusChambersInit_
 
Float_t fCutErr_
 
Float_t fCutLowErr_
 
Float_t fCutWarn_
 
std::vector< std::string > listLayer_
 
std::map< int, MonitorElement * > mapHistLumiFunc_
 
std::map< std::string, int > mapIdxLayer_
 
std::map< int, int > mapNumChPerChamber_
 
std::map< IdChamber, NumStatusmapNumStatusChambersSummary_
 
std::map< IdVFAT, NumStatusmapNumStatusVFATsSummary_
 
std::map< IdChamber, std::vector< StatusInfo > > mapStatusChambersSummary_
 
std::map< IdVFAT, std::vector< StatusInfo > > mapStatusVFATsSummary_
 
const Int_t nBitErrAMC13_ = 1
 
const Int_t nBitErrAMC_ = 2
 
const Int_t nBitErrOH_ = 4
 
const Int_t nBitErrVFAT_ = 6
 
const Int_t nBitOcc_ = 0
 
const Int_t nBitWarnAMC_ = 3
 
const Int_t nBitWarnOH_ = 5
 
const Int_t nBitWarnVFAT_ = 7
 
const Int_t nCodeError_ = 2
 
const Int_t nCodeFine_ = 1
 
const Int_t nCodeLowError_ = 4
 
const Int_t nCodeWarning_ = 3
 
const Int_t nMaxLumi_ = 6000
 
const Int_t nNumVFATs_ = 24
 
Int_t nResolutionLumi_
 
const std::string strDirRecHit_ = "GEM/RecHits"
 
const std::string strDirStatus_ = "GEM/DAQStatus"
 
const std::string strDirSummary_ = "GEM/EventInfo"
 

Detailed Description

Definition at line 22 of file GEMDQMHarvester.cc.

Member Typedef Documentation

◆ IdChamber

typedef std::tuple<int, int> GEMDQMHarvester::IdChamber

Definition at line 28 of file GEMDQMHarvester.cc.

◆ IdVFAT

typedef std::tuple<int, int, int> GEMDQMHarvester::IdVFAT

Definition at line 29 of file GEMDQMHarvester.cc.

◆ StatusInfo

◆ TableStatusNum

typedef std::vector<std::vector<Int_t> > GEMDQMHarvester::TableStatusNum
protected

Definition at line 143 of file GEMDQMHarvester.cc.

◆ TableStatusOcc

typedef std::vector<std::vector<Float_t> > GEMDQMHarvester::TableStatusOcc
protected

Definition at line 142 of file GEMDQMHarvester.cc.

Constructor & Destructor Documentation

◆ GEMDQMHarvester()

GEMDQMHarvester::GEMDQMHarvester ( const edm::ParameterSet cfg)

Definition at line 157 of file GEMDQMHarvester.cc.

References looper::cfg.

157  {
158  fCutErr_ = cfg.getParameter<double>("cutErr");
159  fCutLowErr_ = cfg.getParameter<double>("cutLowErr");
160  fCutWarn_ = cfg.getParameter<double>("cutWarn");
161  nResolutionLumi_ = cfg.getParameter<int>("resolutionLumi");
162  bIsStatusChambersInit_ = false;
163 }
Bool_t bIsStatusChambersInit_

◆ ~GEMDQMHarvester()

GEMDQMHarvester::~GEMDQMHarvester ( )
inlineoverride

Definition at line 25 of file GEMDQMHarvester.cc.

25 {};

Member Function Documentation

◆ assessOneBin()

Int_t GEMDQMHarvester::assessOneBin ( std::string  strName,
Int_t  nIdxX,
Int_t  nIdxY,
Float_t  fAll,
Float_t  fNumOcc,
Float_t  fNumErr,
Float_t  fNumWarn 
)
protected

Definition at line 388 of file GEMDQMHarvester.cc.

389  {
390  if (fNumErr > fCutErr_ * fAll) // The error status criterion
391  return nCodeError_;
392  else if (fNumErr > fCutLowErr_ * fAll) // The low-error status criterion
393  return nCodeLowError_;
394  else if (fNumWarn > fCutWarn_ * fAll) // The warning status criterion
395  return nCodeWarning_;
396  else if (fNumOcc > 0)
397  return nCodeFine_;
398 
399  return 0;
400 }
const Int_t nCodeWarning_
const Int_t nCodeError_
const Int_t nCodeLowError_
const Int_t nCodeFine_

◆ copyLabels()

void GEMDQMHarvester::copyLabels ( MonitorElement h2Src,
MonitorElement h2Dst 
)
protected

Definition at line 300 of file GEMDQMHarvester.cc.

References dqm::impl::MonitorElement::getAxisTitle(), dqm::impl::MonitorElement::getNbinsX(), dqm::impl::MonitorElement::getNbinsY(), dqm::legacy::MonitorElement::getTH2F(), dqm::impl::MonitorElement::getTitle(), mps_fire::i, anotherprimaryvertexanalyzer_cfi::nBinX, anotherprimaryvertexanalyzer_cfi::nBinY, dqm::impl::MonitorElement::setBinLabel(), dqm::impl::MonitorElement::setTitle(), dqm::impl::MonitorElement::setXTitle(), and dqm::impl::MonitorElement::setYTitle().

300  {
301  Int_t nBinX = h2Src->getNbinsX(), nBinY = h2Src->getNbinsY();
302 
303  for (Int_t i = 1; i <= nBinX; i++) {
304  h2Dst->setBinLabel(i, h2Src->getTH2F()->GetXaxis()->GetBinLabel(i), 1);
305  }
306  for (Int_t i = 1; i <= nBinY; i++) {
307  h2Dst->setBinLabel(i, h2Src->getTH2F()->GetYaxis()->GetBinLabel(i), 2);
308  }
309  h2Dst->setTitle(h2Src->getTitle());
310  h2Dst->setXTitle(h2Src->getAxisTitle(1));
311  h2Dst->setYTitle(h2Src->getAxisTitle(2));
312 }
virtual void setTitle(const std::string &title)
set (ie. change) histogram/profile title
virtual std::string getAxisTitle(int axis=1) const
get x-, y- or z-axis title (axis=1, 2, 3 respectively)
virtual TH2F * getTH2F() const
virtual void setXTitle(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)
virtual int getNbinsY() const
get # of bins in Y-axis
virtual std::string getTitle() const
get MonitorElement title
virtual void setYTitle(std::string const &title)
virtual int getNbinsX() const
get # of bins in X-axis

◆ createInactiveChannelFracHist()

void GEMDQMHarvester::createInactiveChannelFracHist ( edm::Service< DQMStore > &  store,
std::string  strSuffix,
Int_t  nNumChamber 
)
protected

Definition at line 699 of file GEMDQMHarvester.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::IGetter::get(), getNameChamberOccGE11(), getNameChamberOccGE21(), getNameChamberOccNull(), dqm::impl::MonitorElement::getNbinsX(), dqm::impl::MonitorElement::getNbinsY(), dqm::legacy::MonitorElement::getTH2F(), mps_fire::i, dqmiolumiharvest::j, dqm::impl::MonitorElement::setBinContent(), dqm::impl::MonitorElement::setBinLabel(), dqm::impl::MonitorElement::setXTitle(), dqm::impl::MonitorElement::setYTitle(), and AlCaHLTBitMon_QueryRunRegistry::string.

701  {
702  std::string strTitle = "The fraction of inactive channels in " + strSuffix.substr(1);
703  MonitorElement *h2InactiveChannel =
704  store->book1D("inactive_frac_chamber" + strSuffix, strTitle, nNumChamber, 0.5, nNumChamber + 0.5);
705  h2InactiveChannel->setXTitle("Chamber");
706  h2InactiveChannel->setYTitle("Fraction of inactive channels");
707  for (Int_t i = 1; i <= nNumChamber; i++) {
708  h2InactiveChannel->setBinLabel(i, Form("%i", i), 1);
709  }
710 
711  std::string (*funcNameCh)(std::string, Int_t) = getNameChamberOccNull;
712 
713  if (strSuffix.find("_GE11") != std::string::npos) {
714  funcNameCh = getNameChamberOccGE11;
715  } else if (strSuffix.find("_GE21") != std::string::npos) {
716  funcNameCh = getNameChamberOccGE21;
717  }
718 
719  for (Int_t nIdxCh = 1; nIdxCh <= nNumChamber; nIdxCh++) {
720  std::string strNameCh = funcNameCh(strSuffix, nIdxCh);
721  MonitorElement *h2SrcChamberOcc = store->get(strNameCh);
722  if (h2SrcChamberOcc == nullptr) {
723  // FIXME: It's about sending a message
724  continue;
725  }
726 
727  Int_t nNumBinX = h2SrcChamberOcc->getNbinsX();
728  Int_t nNumBinY = h2SrcChamberOcc->getNbinsY();
729  Int_t nNumAllChannel = nNumBinX * nNumBinY;
730  auto *histData = h2SrcChamberOcc->getTH2F();
731  auto *pdData = histData->GetArray();
732  Int_t nNumChannelInactive = 0;
733  for (Int_t j = 1; j <= nNumBinY; j++)
734  for (Int_t i = 1; i <= nNumBinX; i++) {
735  if (pdData[j * (nNumBinX + 2) + i] <= 0) {
736  nNumChannelInactive++;
737  }
738  }
739  h2InactiveChannel->setBinContent(nIdxCh, ((Double_t)nNumChannelInactive) / nNumAllChannel);
740  }
741 }
std::string getNameChamberOccGE21(std::string strSuffix, Int_t nIdxCh)
std::string getNameChamberOccNull(std::string strSuffix, Int_t nIdxChamber)
virtual TH2F * getTH2F() const
virtual void setXTitle(std::string const &title)
std::string getNameChamberOccGE11(std::string strSuffix, Int_t nIdxCh)
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 int getNbinsY() const
get # of bins in Y-axis
virtual void setYTitle(std::string const &title)
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:680
virtual int getNbinsX() const
get # of bins in X-axis
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98

◆ createLumiFuncHist()

void GEMDQMHarvester::createLumiFuncHist ( edm::Service< DQMStore > &  store,
std::string  strSuffix,
Int_t  nIdxLayer,
Int_t  nLumiCurr 
)
protected

Definition at line 566 of file GEMDQMHarvester.cc.

References dqm::implementation::IBooker::book2S(), mps_fire::i, dqm::impl::MonitorElement::setBinContent(), dqm::impl::MonitorElement::setBinLabel(), dqm::implementation::DQMStore::setCurrentFolder(), dqm::impl::MonitorElement::setXTitle(), and dqm::impl::MonitorElement::setYTitle().

569  {
570  auto &nNumCh = mapNumChPerChamber_[nIdxLayer];
571 
572  MonitorElement *h2Summary;
573 
574  //Int_t nLumiCurrLowRes = ( ( nLumiCurr - 1 ) / nResolutionLumi_ ) * nResolutionLumi_;
575  Int_t nNumBinLumi = ((nLumiCurr - 1) / nResolutionLumi_) + 1;
576  Int_t nMaxBin = 0;
577 
578  // Creating or Summoning the corresponding histogram
579  if (mapHistLumiFunc_.find(nIdxLayer) == mapHistLumiFunc_.end()) {
581  h2Summary = store->book2S("chamberStatus_inLumi" + strSuffix,
582  "Chamber status on lumi-block " + strSuffix.substr(1),
584  1.0,
585  (Float_t)(nMaxLumi_ + 1),
586  //nNumBinLumi, 1.0, (Float_t)( nLumiCurr + 1 ),
587  nNumCh,
588  0.5,
589  nNumCh + 0.5);
590  mapHistLumiFunc_[nIdxLayer] = h2Summary;
591 
592  h2Summary->setXTitle("Luminosity block");
593  h2Summary->setYTitle("Chamber");
594  for (Int_t i = 1; i <= nNumCh; i++) {
595  h2Summary->setBinLabel(i, Form("%i", i), 2);
596  }
597  } else {
598  h2Summary = mapHistLumiFunc_[nIdxLayer];
599  }
600 
601  for (Int_t nIdxCh = 1; nIdxCh <= nNumCh; nIdxCh++) {
602  auto &listStatus = mapStatusChambersSummary_[{nIdxLayer, nIdxCh}];
603 
604  Int_t nIdxStatus = 0;
605  for (Int_t nIdxLumi = 0; nIdxLumi < nNumBinLumi; nIdxLumi++) {
606  // Lumis covered by these values (nLumiStart <=, <= nLumiEnd) are counted for the current bin
607  Int_t nLumiStart = 1 + nIdxLumi * nResolutionLumi_;
608  Int_t nLumiEnd = (1 + nIdxLumi) * nResolutionLumi_;
609  if (nLumiEnd > nLumiCurr)
610  nLumiEnd = nLumiCurr;
611 
612  Int_t nStatusSum = 0;
613  while (true) { // No worries, nIdxStatus must increase and reach at listStatus.size()
614  // True: It was too past so that
615  // the lumi range of listStatus[ nIdxStatus ] is out of the coverage of the current bin
616  if (listStatus[nIdxStatus].nLumiEnd < nLumiStart) {
617  nIdxStatus++;
618  if (nIdxStatus >= (int)listStatus.size()) {
619  break; // For safety
620  }
621  continue;
622  }
623 
624  nStatusSum = listStatus[nIdxStatus].nStatus;
625 
626  // True: This is the last item of listStatus which is covered by the current bin
627  if (nIdxStatus + 1 >= (int)listStatus.size() || listStatus[nIdxStatus].nLumiEnd >= nLumiEnd) {
628  break;
629  }
630 
631  nIdxStatus++;
632  if (nIdxStatus >= (int)listStatus.size()) {
633  break; // For safety
634  }
635  }
636 
637  h2Summary->setBinContent(nIdxLumi + 1, nIdxCh, nStatusSum);
638  if (nMaxBin < nIdxLumi + 1)
639  nMaxBin = nIdxLumi + 1;
640  }
641  }
642 
643  for (Int_t nX = 1; nX <= nMaxBin; nX++) {
644  h2Summary->setBinContent(nX, 0, 1);
645  }
646 }
MonitorElement * book2S(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:254
const std::string strDirSummary_
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:646
std::map< IdChamber, std::vector< StatusInfo > > mapStatusChambersSummary_
virtual void setXTitle(std::string const &title)
std::map< int, MonitorElement * > mapHistLumiFunc_
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)
const Int_t nMaxLumi_
virtual void setYTitle(std::string const &title)
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
std::map< int, int > mapNumChPerChamber_

◆ createSummaryHist()

void GEMDQMHarvester::createSummaryHist ( edm::Service< DQMStore > &  store,
MonitorElement h2Src,
MonitorElement *&  h2Sum 
)
protected

Definition at line 361 of file GEMDQMHarvester.cc.

References dqm::implementation::IBooker::book2D(), dqm::impl::MonitorElement::getNbinsX(), dqm::impl::MonitorElement::getNbinsY(), dqm::legacy::MonitorElement::getTH2F(), mps_fire::i, anotherprimaryvertexanalyzer_cfi::nBinX, anotherprimaryvertexanalyzer_cfi::nBinY, dqm::impl::MonitorElement::setBinLabel(), dqm::impl::MonitorElement::setTitle(), dqm::impl::MonitorElement::setXTitle(), and dqm::impl::MonitorElement::setYTitle().

361  {
362  //store->setCurrentFolder(strDirSummary_);
363 
364  Int_t nBinX = h2Src->getNbinsX(), nBinY = h2Src->getNbinsY();
365  h2Sum = store->book2D("reportSummaryMap", "", nBinX, 0.5, nBinX + 0.5, nBinY, 0.5, nBinY + 0.5);
366  h2Sum->setTitle("Summary plot");
367  h2Sum->setXTitle("Chamber");
368  h2Sum->setYTitle("Layer");
369 
370  for (Int_t i = 1; i <= nBinX; i++)
371  h2Sum->setBinLabel(i, h2Src->getTH2F()->GetXaxis()->GetBinLabel(i), 1);
372  for (Int_t i = 1; i <= nBinY; i++)
373  h2Sum->setBinLabel(i, listLayer_[i].substr(1), 2);
374 }
virtual void setTitle(const std::string &title)
set (ie. change) histogram/profile title
std::vector< std::string > listLayer_
virtual TH2F * getTH2F() const
virtual void setXTitle(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)
virtual int getNbinsY() const
get # of bins in Y-axis
virtual void setYTitle(std::string const &title)
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212
virtual int getNbinsX() const
get # of bins in X-axis

◆ createSummaryVFAT()

void GEMDQMHarvester::createSummaryVFAT ( edm::Service< DQMStore > &  store,
MonitorElement h2Src,
std::string  strSuffix,
MonitorElement *&  h2Sum 
)
protected

Definition at line 376 of file GEMDQMHarvester.cc.

References dqm::implementation::IBooker::book2D(), dqm::impl::MonitorElement::getNbinsX(), dqm::impl::MonitorElement::getNbinsY(), anotherprimaryvertexanalyzer_cfi::nBinX, and anotherprimaryvertexanalyzer_cfi::nBinY.

379  {
380  //store->setCurrentFolder(strDirStatus_);
381  //store->setCurrentFolder(strDirSummary_);
382 
383  Int_t nBinX = h2Src->getNbinsX(), nBinY = h2Src->getNbinsY();
384  h2Sum = store->book2D("vfat_statusSummary" + strSuffix, "", nBinX, 0.5, nBinX + 0.5, nBinY, -0.5, nBinY - 0.5);
385  copyLabels(h2Src, h2Sum);
386 }
void copyLabels(MonitorElement *h2Src, MonitorElement *h2Dst)
virtual int getNbinsY() const
get # of bins in Y-axis
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212
virtual int getNbinsX() const
get # of bins in X-axis

◆ createTableWatchingSummary()

void GEMDQMHarvester::createTableWatchingSummary ( )
protected

Definition at line 282 of file GEMDQMHarvester.cc.

References mps_fire::i, and dqmiolumiharvest::j.

282  {
284  return;
285 
286  for (const auto &[nIdxLayer, nNumCh] : mapNumChPerChamber_) {
287  for (Int_t i = 1; i <= nNumCh; i++) {
288  mapStatusChambersSummary_[{nIdxLayer, i}] = std::vector<StatusInfo>();
289  mapNumStatusChambersSummary_[{nIdxLayer, i}] = NumStatus();
290  for (Int_t j = 1; j <= nNumVFATs_; j++) {
291  mapStatusVFATsSummary_[{nIdxLayer, i, j}] = std::vector<StatusInfo>();
292  mapNumStatusVFATsSummary_[{nIdxLayer, i, j}] = NumStatus();
293  }
294  }
295  }
296 
297  bIsStatusChambersInit_ = true;
298 }
std::map< IdChamber, std::vector< StatusInfo > > mapStatusChambersSummary_
std::map< IdVFAT, NumStatus > mapNumStatusVFATsSummary_
std::map< IdVFAT, std::vector< StatusInfo > > mapStatusVFATsSummary_
Bool_t bIsStatusChambersInit_
const Int_t nNumVFATs_
std::map< IdChamber, NumStatus > mapNumStatusChambersSummary_
std::map< int, int > mapNumChPerChamber_

◆ dqmEndJob()

void GEMDQMHarvester::dqmEndJob ( DQMStore::IBooker ,
DQMStore::IGetter  
)
inlineoverrideprotected

Definition at line 72 of file GEMDQMHarvester.cc.

72 {}; // Cannot use; it is called after dqmSaver

◆ dqmEndLuminosityBlock()

void GEMDQMHarvester::dqmEndLuminosityBlock ( DQMStore::IBooker ,
DQMStore::IGetter ,
edm::LuminosityBlock const &  iLumi,
edm::EventSetup const &   
)
overrideprotected

Definition at line 174 of file GEMDQMHarvester.cc.

References edm::LuminosityBlockBase::id(), and edm::LuminosityBlockID::luminosityBlock().

177  {
179  Int_t nLumiCurr = iLumi.id().luminosityBlock();
180  drawSummaryHistogram(store, nLumiCurr);
181 }
void drawSummaryHistogram(edm::Service< DQMStore > &store, Int_t nLumiCurr)

◆ drawSummaryHistogram()

void GEMDQMHarvester::drawSummaryHistogram ( edm::Service< DQMStore > &  store,
Int_t  nLumiCurr 
)
protected

Definition at line 183 of file GEMDQMHarvester.cc.

References dqm::implementation::IBooker::bookFloat(), dqm::impl::MonitorElement::Fill(), dqm::implementation::IGetter::get(), dqm::impl::MonitorElement::getAxisTitle(), dqm::impl::MonitorElement::getTitle(), dqm::implementation::DQMStore::setCurrentFolder(), dqm::impl::MonitorElement::setTitle(), dqm::impl::MonitorElement::setXTitle(), dqm::impl::MonitorElement::setYTitle(), and AlCaHLTBitMon_QueryRunRegistry::string.

183  {
184  Float_t fReportSummary = -1.0;
185 
186  std::string strSrcStatusA = "GEM/DAQStatus/chamberAllStatus";
187  std::string strSrcStatusE = "GEM/DAQStatus/chamberErrors";
188  std::string strSrcStatusW = "GEM/DAQStatus/chamberWarnings";
189  std::string strSrcStatusEVFAT = "GEM/DAQStatus/chamberVFATErrors";
190  std::string strSrcStatusWVFAT = "GEM/DAQStatus/chamberVFATWarnings";
191  std::string strSrcStatusEOH = "GEM/DAQStatus/chamberOHErrors";
192  std::string strSrcStatusWOH = "GEM/DAQStatus/chamberOHWarnings";
193  std::string strSrcStatusEAMC = "GEM/DAQStatus/chamberAMCErrors";
194  std::string strSrcStatusWAMC = "GEM/DAQStatus/chamberAMCWarnings";
195  std::string strSrcStatusEAMC13 = "GEM/DAQStatus/chamberAMC13Errors";
196 
197  std::string strSrcVFATOcc = "GEM/Digis/occ";
198  std::string strSrcVFATStatusW = "GEM/DAQStatus/vfat_statusWarnSum";
199  std::string strSrcVFATStatusE = "GEM/DAQStatus/vfat_statusErrSum";
200 
202 
203  MonitorElement *h2SrcStatusA = store->get(strSrcStatusA);
204  MonitorElement *h2SrcStatusE = store->get(strSrcStatusE);
205  MonitorElement *h2SrcStatusW = store->get(strSrcStatusW);
206  MonitorElement *h2SrcStatusEVFAT = store->get(strSrcStatusEVFAT);
207  MonitorElement *h2SrcStatusWVFAT = store->get(strSrcStatusWVFAT);
208  MonitorElement *h2SrcStatusEOH = store->get(strSrcStatusEOH);
209  MonitorElement *h2SrcStatusWOH = store->get(strSrcStatusWOH);
210  MonitorElement *h2SrcStatusEAMC = store->get(strSrcStatusEAMC);
211  MonitorElement *h2SrcStatusWAMC = store->get(strSrcStatusWAMC);
212  MonitorElement *h2SrcStatusEAMC13 = store->get(strSrcStatusEAMC13);
213 
214  std::string strTitleSummary = "summary";
215 
216  getGeometryInfo(store, h2SrcStatusE);
217 
218  if (h2SrcStatusA != nullptr && h2SrcStatusE != nullptr && h2SrcStatusW != nullptr) {
219  MonitorElement *h2Sum = nullptr;
220  createSummaryHist(store, h2SrcStatusE, h2Sum);
222 
223  std::vector<MonitorElement *> listOccPlots(listLayer_.size() + 1); // The index starts at 1
224  for (const auto &strSuffix : listLayer_) {
225  if (mapIdxLayer_.find(strSuffix) == mapIdxLayer_.end())
226  continue;
227  auto nIdxLayer = mapIdxLayer_[strSuffix];
228  MonitorElement *h2SrcVFATOcc = store->get(strSrcVFATOcc + strSuffix);
229  if (h2SrcVFATOcc == nullptr)
230  continue;
231  listOccPlots[nIdxLayer] = h2SrcVFATOcc;
232  }
233 
234  fReportSummary = refineSummaryHistogram(strTitleSummary,
235  h2Sum,
236  listOccPlots,
237  h2SrcStatusA,
238  h2SrcStatusE,
239  h2SrcStatusW,
240  h2SrcStatusEVFAT,
241  h2SrcStatusWVFAT,
242  h2SrcStatusEOH,
243  h2SrcStatusWOH,
244  h2SrcStatusEAMC,
245  h2SrcStatusWAMC,
246  h2SrcStatusEAMC13,
247  nLumiCurr);
248 
249  for (const auto &strSuffix : listLayer_) {
250  if (mapIdxLayer_.find(strSuffix) == mapIdxLayer_.end())
251  continue;
252  auto nIdxLayer = mapIdxLayer_[strSuffix];
253  MonitorElement *h2SrcVFATOcc = store->get(strSrcVFATOcc + strSuffix);
254  MonitorElement *h2SrcVFATStatusW = store->get(strSrcVFATStatusW + strSuffix);
255  MonitorElement *h2SrcVFATStatusE = store->get(strSrcVFATStatusE + strSuffix);
256  if (h2SrcVFATOcc == nullptr || h2SrcVFATStatusW == nullptr || h2SrcVFATStatusE == nullptr)
257  continue;
258 
259  MonitorElement *h2SumVFAT = nullptr;
260  createSummaryVFAT(store, h2SrcVFATStatusE, strSuffix, h2SumVFAT);
261  refineSummaryVFAT(strSuffix, h2SumVFAT, h2SrcVFATOcc, h2SrcVFATStatusE, h2SrcVFATStatusW, nLumiCurr, nIdxLayer);
262  TString strNewTitle = h2SrcVFATStatusE->getTitle();
263  h2SumVFAT->setTitle((const char *)strNewTitle.ReplaceAll("errors", "errors/warnings"));
264  h2SumVFAT->setXTitle(h2SrcVFATStatusE->getAxisTitle(1));
265  h2SumVFAT->setYTitle(h2SrcVFATStatusE->getAxisTitle(2));
266 
267  createLumiFuncHist(store, strSuffix, nIdxLayer, nLumiCurr);
268  }
269  }
270 
271  for (const auto &strSuffix : listLayer_) {
272  if (mapIdxLayer_.find(strSuffix) == mapIdxLayer_.end())
273  continue;
274  //auto nNumChamber = mapNumChPerChamber_[mapIdxLayer_[strSuffix]];
275  Int_t nNumChamber = 36;
276  createInactiveChannelFracHist(store, strSuffix, nNumChamber);
277  }
278 
279  store->bookFloat("reportSummary")->Fill(fReportSummary);
280 }
virtual void setTitle(const std::string &title)
set (ie. change) histogram/profile title
std::map< std::string, int > mapIdxLayer_
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:80
void createSummaryVFAT(edm::Service< DQMStore > &store, MonitorElement *h2Src, std::string strSuffix, MonitorElement *&h2Sum)
void createInactiveChannelFracHist(edm::Service< DQMStore > &store, std::string strSuffix, Int_t nNumChamber)
const std::string strDirSummary_
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:646
virtual std::string getAxisTitle(int axis=1) const
get x-, y- or z-axis title (axis=1, 2, 3 respectively)
Float_t refineSummaryHistogram(std::string strName, MonitorElement *h2Sum, std::vector< MonitorElement *> &listOccPlots, MonitorElement *h2SrcStatusA, MonitorElement *h2SrcStatusE, MonitorElement *h2SrcStatusW, MonitorElement *h2SrcStatusEVFAT, MonitorElement *h2SrcStatusWVFAT, MonitorElement *h2SrcStatusEOH, MonitorElement *h2SrcStatusWOH, MonitorElement *h2SrcStatusEAMC, MonitorElement *h2SrcStatusWAMC, MonitorElement *h2SrcStatusEAMC13, Int_t nLumiCurr)
void createTableWatchingSummary()
std::vector< std::string > listLayer_
void Fill(long long x)
virtual void setXTitle(std::string const &title)
void getGeometryInfo(edm::Service< DQMStore > &store, MonitorElement *h2Src)
virtual std::string getTitle() const
get MonitorElement title
virtual void setYTitle(std::string const &title)
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:680
void createSummaryHist(edm::Service< DQMStore > &store, MonitorElement *h2Src, MonitorElement *&h2Sum)
Int_t refineSummaryVFAT(std::string strName, MonitorElement *h2Sum, MonitorElement *h2SrcOcc, MonitorElement *h2SrcStatusE, MonitorElement *h2SrcStatusW, Int_t nLumiCurr, Int_t nIdxLayer)
void createLumiFuncHist(edm::Service< DQMStore > &store, std::string strSuffix, Int_t nIdxLayer, Int_t nLumiCurr)

◆ fillDescriptions()

void GEMDQMHarvester::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 165 of file GEMDQMHarvester.cc.

References edm::ConfigurationDescriptions::add(), and submitPVResolutionJobs::desc.

165  {
167  desc.add<double>("cutErr", 0.05);
168  desc.add<double>("cutLowErr", 0.00);
169  desc.add<double>("cutWarn", 0.05);
170  desc.add<int>("resolutionLumi", 1);
171  descriptions.add("GEMDQMHarvester", desc);
172 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ getGeometryInfo()

void GEMDQMHarvester::getGeometryInfo ( edm::Service< DQMStore > &  store,
MonitorElement h2Src 
)
protected

Definition at line 314 of file GEMDQMHarvester.cc.

References dqm::implementation::IGetter::get(), dqm::impl::MonitorElement::getBinContent(), dqm::impl::MonitorElement::getNbinsY(), dqm::legacy::MonitorElement::getTH2F(), mps_fire::i, anotherprimaryvertexanalyzer_cfi::nBinY, and AlCaHLTBitMon_QueryRunRegistry::string.

314  {
315  listLayer_.clear();
316  mapIdxLayer_.clear();
317  mapNumChPerChamber_.clear();
318 
319  if (h2Src != nullptr) { // For online and offline
320  Int_t nBinY = h2Src->getNbinsY();
321  listLayer_.push_back("");
322 
323  for (Int_t i = 1; i <= nBinY; i++) {
324  std::string strLabelFull = h2Src->getTH2F()->GetYaxis()->GetBinLabel(i);
325  auto nPos = strLabelFull.find(';');
326  auto strLayer = strLabelFull.substr(nPos + 1);
327  Int_t nBinXActual = (Int_t)(h2Src->getBinContent(0, i) + 0.5);
328  if (nBinXActual > 108) { // When the number seems wrong
329  if (strLayer.find("GE11") != std::string::npos) {
330  nBinXActual = 36;
331  } else if (strLayer.find("GE21") != std::string::npos) {
332  nBinXActual = 18;
333  } else if (strLayer.find("GE01") != std::string::npos) {
334  nBinXActual = 36;
335  }
336  }
337  listLayer_.push_back(strLayer);
338  mapIdxLayer_[strLayer] = i;
339  mapNumChPerChamber_[i] = nBinXActual;
340  }
341  } else { // For others (validation and...?)
342  listLayer_.push_back("");
343  if (store->get("GEM/Digis/occupancy_GE11-M-L1/occ_GE11-M-01L1-S") != nullptr) {
344  listLayer_.push_back("_GE11-P-L2");
345  listLayer_.push_back("_GE11-P-L1");
346  listLayer_.push_back("_GE11-M-L1");
347  listLayer_.push_back("_GE11-M-L2");
348  mapIdxLayer_["_GE11-P-L2"] = 1;
349  mapIdxLayer_["_GE11-P-L1"] = 2;
350  mapIdxLayer_["_GE11-M-L1"] = 3;
351  mapIdxLayer_["_GE11-M-L2"] = 4;
352  mapNumChPerChamber_[1] = 36;
353  mapNumChPerChamber_[2] = 36;
354  mapNumChPerChamber_[3] = 36;
355  mapNumChPerChamber_[4] = 36;
356  }
357  // FIXME: How about GE21 and ME0?
358  }
359 }
std::map< std::string, int > mapIdxLayer_
std::vector< std::string > listLayer_
virtual TH2F * getTH2F() const
virtual int getNbinsY() const
get # of bins in Y-axis
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:680
std::map< int, int > mapNumChPerChamber_
virtual double getBinContent(int binx) const
get content of bin (1-D)

◆ refineSummaryHistogram()

Float_t GEMDQMHarvester::refineSummaryHistogram ( std::string  strName,
MonitorElement h2Sum,
std::vector< MonitorElement *> &  listOccPlots,
MonitorElement h2SrcStatusA,
MonitorElement h2SrcStatusE,
MonitorElement h2SrcStatusW,
MonitorElement h2SrcStatusEVFAT,
MonitorElement h2SrcStatusWVFAT,
MonitorElement h2SrcStatusEOH,
MonitorElement h2SrcStatusWOH,
MonitorElement h2SrcStatusEAMC,
MonitorElement h2SrcStatusWAMC,
MonitorElement h2SrcStatusEAMC13,
Int_t  nLumiCurr 
)
protected

Definition at line 403 of file GEMDQMHarvester.cc.

References dqm::impl::MonitorElement::getBinContent(), dqm::impl::MonitorElement::getNbinsY(), mps_fire::i, dqmiolumiharvest::j, anotherprimaryvertexanalyzer_cfi::nBinX, anotherprimaryvertexanalyzer_cfi::nBinY, alignCSCRings::r, and dqm::impl::MonitorElement::setBinContent().

416  {
417  Int_t nBinY = h2Sum->getNbinsY();
418  Int_t nAllBin = 0, nFineBin = 0;
419  for (Int_t j = 1; j <= nBinY; j++) {
420  Int_t nBinX = (Int_t)(h2SrcStatusE->getBinContent(0, j) + 0.5);
421  auto h2SrcOcc = listOccPlots[j];
422  Int_t nBinYOcc = 0;
423  if (h2SrcOcc != nullptr) {
424  nBinYOcc = h2SrcOcc->getNbinsY();
425  }
426 
427  h2Sum->setBinContent(0, j, nBinX);
428  for (Int_t i = 1; i <= nBinX; i++) {
429  Float_t fOcc = 0;
430  for (Int_t r = 1; r <= nBinYOcc; r++) {
431  fOcc += h2SrcOcc->getBinContent(i, r);
432  }
433 
434  Float_t fStatusAll = h2SrcStatusA->getBinContent(i, j);
435  Float_t fStatusErr = h2SrcStatusE->getBinContent(i, j);
436  Float_t fStatusWarn = h2SrcStatusW->getBinContent(i, j);
437  Float_t fStatusErrVFAT = h2SrcStatusEVFAT != nullptr ? h2SrcStatusEVFAT->getBinContent(i, j) : 0;
438  Float_t fStatusWarnVFAT = h2SrcStatusWVFAT != nullptr ? h2SrcStatusWVFAT->getBinContent(i, j) : 0;
439  Float_t fStatusErrOH = h2SrcStatusEOH != nullptr ? h2SrcStatusEOH->getBinContent(i, j) : 0;
440  Float_t fStatusWarnOH = h2SrcStatusWOH != nullptr ? h2SrcStatusWOH->getBinContent(i, j) : 0;
441  Float_t fStatusErrAMC = h2SrcStatusEAMC != nullptr ? h2SrcStatusEAMC->getBinContent(i, j) : 0;
442  Float_t fStatusWarnAMC = h2SrcStatusWAMC != nullptr ? h2SrcStatusWAMC->getBinContent(i, j) : 0;
443  Float_t fStatusErrAMC13 = h2SrcStatusEAMC13 != nullptr ? h2SrcStatusEAMC13->getBinContent(i, j) : 0;
444  NumStatus numStatus(fStatusAll,
445  fOcc,
446  fStatusErrVFAT,
447  fStatusWarnVFAT,
448  fStatusErrOH,
449  fStatusWarnOH,
450  fStatusErrAMC,
451  fStatusWarnAMC,
452  fStatusErrAMC13);
453  UpdateStatusChamber(j, i, nLumiCurr, numStatus);
454 
455  Int_t nRes = assessOneBin(strName, i, j, fStatusAll, fOcc, fStatusErr, fStatusWarn);
456  if (nRes == 1)
457  nFineBin++;
458 
459  h2Sum->setBinContent(i, j, (Float_t)nRes);
460  nAllBin++;
461  }
462  }
463 
464  return ((Float_t)nFineBin) / nAllBin;
465 }
Int_t assessOneBin(std::string strName, Int_t nIdxX, Int_t nIdxY, Float_t fAll, Float_t fNumOcc, Float_t fNumErr, Float_t fNumWarn)
virtual int getNbinsY() const
get # of bins in Y-axis
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
Int_t UpdateStatusChamber(Int_t nIdxLayer, Int_t nIdxCh, Int_t nLumiCurr, NumStatus numStatus)
virtual double getBinContent(int binx) const
get content of bin (1-D)

◆ refineSummaryVFAT()

Int_t GEMDQMHarvester::refineSummaryVFAT ( std::string  strName,
MonitorElement h2Sum,
MonitorElement h2SrcOcc,
MonitorElement h2SrcStatusE,
MonitorElement h2SrcStatusW,
Int_t  nLumiCurr,
Int_t  nIdxLayer 
)
protected

Definition at line 467 of file GEMDQMHarvester.cc.

References dqm::impl::MonitorElement::getBinContent(), dqm::impl::MonitorElement::getNbinsX(), dqm::impl::MonitorElement::getNbinsY(), mps_fire::i, dqmiolumiharvest::j, anotherprimaryvertexanalyzer_cfi::nBinX, anotherprimaryvertexanalyzer_cfi::nBinY, and dqm::impl::MonitorElement::setBinContent().

473  {
474  Int_t nBinY = h2Sum->getNbinsY();
475  for (Int_t j = 1; j <= nBinY; j++) {
476  Int_t nBinX = h2Sum->getNbinsX();
477  for (Int_t i = 1; i <= nBinX; i++) {
478  Float_t fOcc = h2SrcOcc->getBinContent(i, j);
479  Float_t fStatusErr = h2SrcStatusE->getBinContent(i, j);
480  Float_t fStatusWarn = h2SrcStatusW->getBinContent(i, j);
481  Float_t fStatusAll = fOcc + fStatusErr + fStatusWarn;
482  NumStatus numStatus(fStatusAll, fOcc, fStatusErr, fStatusWarn, 0, 0, 0, 0, 0);
483  UpdateStatusChamber(nIdxLayer, i, j, nLumiCurr, numStatus);
484 
485  Int_t nRes = assessOneBin(strName, i, j, fStatusAll, fOcc, fStatusErr, fStatusWarn);
486  h2Sum->setBinContent(i, j, (Float_t)nRes);
487  }
488  }
489 
490  return 0;
491 }
Int_t assessOneBin(std::string strName, Int_t nIdxX, Int_t nIdxY, Float_t fAll, Float_t fNumOcc, Float_t fNumErr, Float_t fNumWarn)
virtual int getNbinsY() const
get # of bins in Y-axis
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
Int_t UpdateStatusChamber(Int_t nIdxLayer, Int_t nIdxCh, Int_t nLumiCurr, NumStatus numStatus)
virtual int getNbinsX() const
get # of bins in X-axis
virtual double getBinContent(int binx) const
get content of bin (1-D)

◆ UpdateStatusChamber() [1/3]

Int_t GEMDQMHarvester::UpdateStatusChamber ( Int_t  nIdxLayer,
Int_t  nIdxCh,
Int_t  nLumiCurr,
NumStatus  numStatus 
)
protected

Definition at line 493 of file GEMDQMHarvester.cc.

493  {
495  return 0;
496  if (0 >= nIdxCh || nIdxCh > mapNumChPerChamber_[nIdxLayer])
497  return 0;
498  auto &listStatus = mapStatusChambersSummary_[{nIdxLayer, nIdxCh}];
499  auto &numStatusPrev = mapNumStatusChambersSummary_[{nIdxLayer, nIdxCh}];
500  return UpdateStatusChamber(listStatus, numStatusPrev, nLumiCurr, numStatus);
501 }
std::map< IdChamber, std::vector< StatusInfo > > mapStatusChambersSummary_
Bool_t bIsStatusChambersInit_
Int_t UpdateStatusChamber(Int_t nIdxLayer, Int_t nIdxCh, Int_t nLumiCurr, NumStatus numStatus)
std::map< IdChamber, NumStatus > mapNumStatusChambersSummary_
std::map< int, int > mapNumChPerChamber_

◆ UpdateStatusChamber() [2/3]

Int_t GEMDQMHarvester::UpdateStatusChamber ( Int_t  nIdxLayer,
Int_t  nIdxCh,
Int_t  nIdxVFAT,
Int_t  nLumiCurr,
NumStatus  numStatus 
)
protected

Definition at line 503 of file GEMDQMHarvester.cc.

504  {
506  return 0;
507  if (0 >= nIdxCh || nIdxCh > mapNumChPerChamber_[nIdxLayer])
508  return 0;
509  if (0 >= nIdxVFAT || nIdxVFAT > nNumVFATs_)
510  return 0;
511  auto &listStatus = mapStatusVFATsSummary_[{nIdxLayer, nIdxCh, nIdxVFAT}];
512  auto &numStatusPrev = mapNumStatusVFATsSummary_[{nIdxLayer, nIdxCh, nIdxVFAT}];
513  return UpdateStatusChamber(listStatus, numStatusPrev, nLumiCurr, numStatus);
514 }
std::map< IdVFAT, NumStatus > mapNumStatusVFATsSummary_
std::map< IdVFAT, std::vector< StatusInfo > > mapStatusVFATsSummary_
Bool_t bIsStatusChambersInit_
const Int_t nNumVFATs_
Int_t UpdateStatusChamber(Int_t nIdxLayer, Int_t nIdxCh, Int_t nLumiCurr, NumStatus numStatus)
std::map< int, int > mapNumChPerChamber_

◆ UpdateStatusChamber() [3/3]

Int_t GEMDQMHarvester::UpdateStatusChamber ( std::vector< StatusInfo > &  listStatus,
NumStatus numStatus,
Int_t  nLumiCurr,
NumStatus  numStatusNew 
)
protected

Definition at line 516 of file GEMDQMHarvester.cc.

References GEMDQMHarvester::NumStatus::fNumErrAMC13_, GEMDQMHarvester::NumStatus::fNumErrAMC_, GEMDQMHarvester::NumStatus::fNumErrOH_, GEMDQMHarvester::NumStatus::fNumErrVFAT_, GEMDQMHarvester::NumStatus::fNumOcc_, GEMDQMHarvester::NumStatus::fNumTotal_, GEMDQMHarvester::NumStatus::fNumWarnAMC_, GEMDQMHarvester::NumStatus::fNumWarnOH_, GEMDQMHarvester::NumStatus::fNumWarnVFAT_, GEMDQMHarvester::PreStatusInfo::nLumiEnd, GEMDQMHarvester::PreStatusInfo::nLumiStart, and GEMDQMHarvester::PreStatusInfo::nStatus.

519  {
520  // First of all, the current lumi section will be assessed, of which the result will be stored in nStatus
521  Int_t nStatus = 0;
522 
523  Float_t fNumAddErrVFAT = numStatusNew.fNumErrVFAT_ - numStatus.fNumErrVFAT_;
524  Float_t fNumAddWarnVFAT = numStatusNew.fNumWarnVFAT_ - numStatus.fNumWarnVFAT_;
525  Float_t fNumAddErrOH = numStatusNew.fNumErrOH_ - numStatus.fNumErrOH_;
526  Float_t fNumAddWarnOH = numStatusNew.fNumWarnOH_ - numStatus.fNumWarnOH_;
527  Float_t fNumAddErrAMC = numStatusNew.fNumErrAMC_ - numStatus.fNumErrAMC_;
528  Float_t fNumAddWarnAMC = numStatusNew.fNumWarnAMC_ - numStatus.fNumWarnAMC_;
529  Float_t fNumAddErrAMC13 = numStatusNew.fNumErrAMC13_ - numStatus.fNumErrAMC13_;
530 
531  numStatus.fNumTotal_ = numStatusNew.fNumTotal_;
532  numStatus.fNumOcc_ = numStatusNew.fNumOcc_;
533  numStatus.fNumErrVFAT_ = numStatusNew.fNumErrVFAT_;
534  numStatus.fNumWarnVFAT_ = numStatusNew.fNumWarnVFAT_;
535  numStatus.fNumErrOH_ = numStatusNew.fNumErrOH_;
536  numStatus.fNumWarnOH_ = numStatusNew.fNumWarnOH_;
537  numStatus.fNumErrAMC_ = numStatusNew.fNumErrAMC_;
538  numStatus.fNumWarnAMC_ = numStatusNew.fNumWarnAMC_;
539  numStatus.fNumErrAMC13_ = numStatusNew.fNumErrAMC13_;
540 
541  nStatus = (numStatusNew.fNumOcc_ > 0 ? 1 << nBitOcc_ : 0) | (fNumAddErrAMC13 > 0 ? 1 << nBitErrAMC13_ : 0) |
542  (fNumAddErrAMC > 0 ? 1 << nBitErrAMC_ : 0) | (fNumAddWarnAMC > 0 ? 1 << nBitWarnAMC_ : 0) |
543  (fNumAddErrOH > 0 ? 1 << nBitErrOH_ : 0) | (fNumAddWarnOH > 0 ? 1 << nBitWarnOH_ : 0) |
544  (fNumAddErrVFAT > 0 ? 1 << nBitErrVFAT_ : 0) | (fNumAddWarnVFAT > 0 ? 1 << nBitWarnVFAT_ : 0);
545 
546  // Only used in the next if statement; See statusLast
547  StatusInfo statusNew;
548  statusNew.nLumiStart = nLumiCurr;
549  statusNew.nLumiEnd = nLumiCurr;
550  statusNew.nStatus = nStatus;
551 
552  if (listStatus.empty()) {
553  listStatus.push_back(statusNew);
554  } else {
555  auto &statusLastPre = listStatus.back();
556  if (statusLastPre.nStatus == nStatus) {
557  statusLastPre.nLumiEnd = nLumiCurr;
558  } else {
559  listStatus.push_back(statusNew);
560  }
561  }
562 
563  return 0;
564 }
const Int_t nBitErrVFAT_
const Int_t nBitErrOH_
struct GEMDQMHarvester::PreStatusInfo StatusInfo
const Int_t nBitOcc_
const Int_t nBitErrAMC13_
const Int_t nBitErrAMC_
const Int_t nBitWarnVFAT_
const Int_t nBitWarnAMC_
const Int_t nBitWarnOH_

Member Data Documentation

◆ bIsStatusChambersInit_

Bool_t GEMDQMHarvester::bIsStatusChambersInit_
protected

Definition at line 154 of file GEMDQMHarvester.cc.

◆ fCutErr_

Float_t GEMDQMHarvester::fCutErr_
protected

Definition at line 116 of file GEMDQMHarvester.cc.

◆ fCutLowErr_

Float_t GEMDQMHarvester::fCutLowErr_
protected

Definition at line 116 of file GEMDQMHarvester.cc.

◆ fCutWarn_

Float_t GEMDQMHarvester::fCutWarn_
protected

Definition at line 116 of file GEMDQMHarvester.cc.

◆ listLayer_

std::vector<std::string> GEMDQMHarvester::listLayer_
protected

Definition at line 150 of file GEMDQMHarvester.cc.

◆ mapHistLumiFunc_

std::map<int, MonitorElement *> GEMDQMHarvester::mapHistLumiFunc_
protected

Definition at line 153 of file GEMDQMHarvester.cc.

◆ mapIdxLayer_

std::map<std::string, int> GEMDQMHarvester::mapIdxLayer_
protected

Definition at line 151 of file GEMDQMHarvester.cc.

◆ mapNumChPerChamber_

std::map<int, int> GEMDQMHarvester::mapNumChPerChamber_
protected

Definition at line 152 of file GEMDQMHarvester.cc.

◆ mapNumStatusChambersSummary_

std::map<IdChamber, NumStatus> GEMDQMHarvester::mapNumStatusChambersSummary_
protected

Definition at line 147 of file GEMDQMHarvester.cc.

◆ mapNumStatusVFATsSummary_

std::map<IdVFAT, NumStatus> GEMDQMHarvester::mapNumStatusVFATsSummary_
protected

Definition at line 148 of file GEMDQMHarvester.cc.

◆ mapStatusChambersSummary_

std::map<IdChamber, std::vector<StatusInfo> > GEMDQMHarvester::mapStatusChambersSummary_
protected

Definition at line 145 of file GEMDQMHarvester.cc.

◆ mapStatusVFATsSummary_

std::map<IdVFAT, std::vector<StatusInfo> > GEMDQMHarvester::mapStatusVFATsSummary_
protected

Definition at line 146 of file GEMDQMHarvester.cc.

◆ nBitErrAMC13_

const Int_t GEMDQMHarvester::nBitErrAMC13_ = 1
protected

Definition at line 133 of file GEMDQMHarvester.cc.

◆ nBitErrAMC_

const Int_t GEMDQMHarvester::nBitErrAMC_ = 2
protected

Definition at line 132 of file GEMDQMHarvester.cc.

◆ nBitErrOH_

const Int_t GEMDQMHarvester::nBitErrOH_ = 4
protected

Definition at line 130 of file GEMDQMHarvester.cc.

◆ nBitErrVFAT_

const Int_t GEMDQMHarvester::nBitErrVFAT_ = 6
protected

Definition at line 128 of file GEMDQMHarvester.cc.

◆ nBitOcc_

const Int_t GEMDQMHarvester::nBitOcc_ = 0
protected

Definition at line 134 of file GEMDQMHarvester.cc.

◆ nBitWarnAMC_

const Int_t GEMDQMHarvester::nBitWarnAMC_ = 3
protected

Definition at line 131 of file GEMDQMHarvester.cc.

◆ nBitWarnOH_

const Int_t GEMDQMHarvester::nBitWarnOH_ = 5
protected

Definition at line 129 of file GEMDQMHarvester.cc.

◆ nBitWarnVFAT_

const Int_t GEMDQMHarvester::nBitWarnVFAT_ = 7
protected

Definition at line 127 of file GEMDQMHarvester.cc.

◆ nCodeError_

const Int_t GEMDQMHarvester::nCodeError_ = 2
protected

Definition at line 123 of file GEMDQMHarvester.cc.

◆ nCodeFine_

const Int_t GEMDQMHarvester::nCodeFine_ = 1
protected

Definition at line 122 of file GEMDQMHarvester.cc.

◆ nCodeLowError_

const Int_t GEMDQMHarvester::nCodeLowError_ = 4
protected

Definition at line 125 of file GEMDQMHarvester.cc.

◆ nCodeWarning_

const Int_t GEMDQMHarvester::nCodeWarning_ = 3
protected

Definition at line 124 of file GEMDQMHarvester.cc.

◆ nMaxLumi_

const Int_t GEMDQMHarvester::nMaxLumi_ = 6000
protected

Definition at line 138 of file GEMDQMHarvester.cc.

◆ nNumVFATs_

const Int_t GEMDQMHarvester::nNumVFATs_ = 24
protected

Definition at line 136 of file GEMDQMHarvester.cc.

◆ nResolutionLumi_

Int_t GEMDQMHarvester::nResolutionLumi_
protected

Definition at line 140 of file GEMDQMHarvester.cc.

◆ strDirRecHit_

const std::string GEMDQMHarvester::strDirRecHit_ = "GEM/RecHits"
protected

Definition at line 119 of file GEMDQMHarvester.cc.

◆ strDirStatus_

const std::string GEMDQMHarvester::strDirStatus_ = "GEM/DAQStatus"
protected

Definition at line 120 of file GEMDQMHarvester.cc.

◆ strDirSummary_

const std::string GEMDQMHarvester::strDirSummary_ = "GEM/EventInfo"
protected

Definition at line 118 of file GEMDQMHarvester.cc.