CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
SiStripCertificationInfo Class Reference

#include <SiStripCertificationInfo.h>

Inheritance diagram for SiStripCertificationInfo:
edm::EDAnalyzer edm::EDConsumerBase

Classes

struct  SubDetMEs
 

Public Member Functions

 SiStripCertificationInfo (const edm::ParameterSet &ps)
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void analyze (edm::Event const &, edm::EventSetup const &) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &eSetup) override
 
void bookSiStripCertificationMEs (DQMStore &dqm_store)
 
void endLuminosityBlock (edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &iSetup) override
 
void endRun (edm::Run const &run, edm::EventSetup const &eSetup) override
 
void fillDummySiStripCertification (DQMStore &dqm_store)
 
void fillSiStripCertificationMEs (DQMStore &dqm_store, edm::EventSetup const &eSetup)
 
void fillSiStripCertificationMEsAtLumi (DQMStore &dqm_store)
 
void resetSiStripCertificationMEs (DQMStore &dqm_store)
 

Private Attributes

edm::ESHandle< SiStripDetCablingdetCabling_ {}
 
unsigned long long m_cacheID_ {}
 
int nFEDConnected_ {}
 
MonitorElementSiStripCertification { 0 }
 
bool sistripCertificationBooked_ {false}
 
MonitorElementSiStripCertificationMap { 0 }
 
MonitorElementSiStripCertificationSummaryMap { 0 }
 
std::map< std::string, SubDetMEsSubDetMEsMap {}
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

DQM/SiStripMonitorCluster/interface/SiStripCertificationInfo.h

Description: Checks the # of SiStrip FEDs from DAQ Usage: <usage>

Definition at line 41 of file SiStripCertificationInfo.h.

Constructor & Destructor Documentation

SiStripCertificationInfo::SiStripCertificationInfo ( const edm::ParameterSet ps)

Definition at line 31 of file SiStripCertificationInfo.cc.

31 {}

Member Function Documentation

void SiStripCertificationInfo::analyze ( edm::Event const &  event,
edm::EventSetup const &  eSetup 
)
overrideprivatevirtual

Implements edm::EDAnalyzer.

Definition at line 154 of file SiStripCertificationInfo.cc.

154  {
155 }
void SiStripCertificationInfo::beginRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 34 of file SiStripCertificationInfo.cc.

References bookSiStripCertificationMEs(), constexpr, detCabling_, fillDummySiStripCertification(), edm::EventSetup::get(), edm::ESHandleBase::isValid(), LogDebug, m_cacheID_, RunInfo::m_fed_in, FEDNumbering::MAXSiStripFEDID, FEDNumbering::MINSiStripFEDID, nFEDConnected_, and edm::EventSetup::tryToGet().

36 {
37  edm::LogInfo ("SiStripCertificationInfo") <<"SiStripCertificationInfo:: Begining of Run";
38  unsigned long long cacheID = eSetup.get<SiStripDetCablingRcd>().cacheIdentifier();
39  if (m_cacheID_ != cacheID) {
40  m_cacheID_ = cacheID;
41  }
42  eSetup.get<SiStripDetCablingRcd>().get(detCabling_);
43 
44  constexpr int siStripFedIdMin{FEDNumbering::MINSiStripFEDID};
45  constexpr int siStripFedIdMax{FEDNumbering::MAXSiStripFEDID};
46 
47  if(auto runInfoRec = eSetup.tryToGet<RunInfoRcd>()) {
48 
50  runInfoRec->get(sumFED);
51 
52  if (sumFED.isValid()) {
53  for (auto const fedID : sumFED->m_fed_in) {
54  if (fedID >= siStripFedIdMin && fedID <= siStripFedIdMax)
56  }
57  LogDebug("SiStripDcsInfo")
58  << " SiStripDcsInfo :: Connected FEDs " << nFEDConnected_;
59  }
60  }
61 
62  auto& dqm_store = *edm::Service<DQMStore>{};
63  bookSiStripCertificationMEs(dqm_store);
65 }
#define LogDebug(id)
edm::ESHandle< SiStripDetCabling > detCabling_
std::vector< int > m_fed_in
Definition: RunInfo.h:26
void fillDummySiStripCertification(DQMStore &dqm_store)
void bookSiStripCertificationMEs(DQMStore &dqm_store)
bool isValid() const
Definition: ESHandle.h:44
#define constexpr
void SiStripCertificationInfo::bookSiStripCertificationMEs ( DQMStore dqm_store)
private

Definition at line 70 of file SiStripCertificationInfo.cc.

References DQMStore::book2D(), DQMStore::bookFloat(), DQMStore::cd(), SiStripCertificationInfo::SubDetMEs::det_fractionME, SiStripCertificationInfo::SubDetMEs::folder_name, SiStripUtility::getTopFolderPath(), SiStripCertificationInfo::SubDetMEs::n_layer, MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::setCurrentFolder(), SiStripCertification, sistripCertificationBooked_, SiStripCertificationSummaryMap, AlCaHLTBitMon_QueryRunRegistry::string, SiStripCertificationInfo::SubDetMEs::subdet_tag, SubDetMEsMap, and GlobalPosition_Frontier_DevDB_cff::tag.

Referenced by beginRun(), and resetSiStripCertificationMEs().

71 {
72  if (sistripCertificationBooked_) return;
73 
74  dqm_store.cd();
75  std::string strip_dir = "";
76  SiStripUtility::getTopFolderPath(dqm_store, "SiStrip", strip_dir);
77  if (!strip_dir.empty())
78  dqm_store.setCurrentFolder(strip_dir + "/EventInfo");
79  else
80  dqm_store.setCurrentFolder("SiStrip/EventInfo");
81 
82  SiStripCertification = dqm_store.bookFloat("CertificationSummary");
83 
84  std::string hname = "CertificationReportMap";
85  std::string htitle = "SiStrip Certification for Good Detector Fraction";
87  dqm_store.book2D(hname, htitle, 6, 0.5, 6.5, 9, 0.5, 9.5);
88  SiStripCertificationSummaryMap->setAxisTitle("Sub Detector Type", 1);
89  SiStripCertificationSummaryMap->setAxisTitle("Layer/Disc Number", 2);
90  int ibin = 0;
91  for (auto const& pr : SubDetMEsMap) {
92  ++ibin;
93  auto const& det = pr.first;
95  }
96 
97  SubDetMEs local_mes;
99  dqm_store.cd();
100  if (!strip_dir.empty())
101  dqm_store.setCurrentFolder(strip_dir + "/EventInfo/CertificationContents");
102  else
103  dqm_store.setCurrentFolder("SiStrip/EventInfo/CertificationContents");
104  tag = "TIB";
105 
106  local_mes.folder_name = "TIB";
107  local_mes.subdet_tag = "TIB";
108  local_mes.n_layer = 4;
109  local_mes.det_fractionME = dqm_store.bookFloat("SiStrip_" + tag);
110  SubDetMEsMap.emplace(tag, local_mes);
111 
112  tag = "TOB";
113  local_mes.folder_name = "TOB";
114  local_mes.subdet_tag = "TOB";
115  local_mes.n_layer = 6;
116  local_mes.det_fractionME = dqm_store.bookFloat("SiStrip_" + tag);
117  SubDetMEsMap.emplace(tag, local_mes);
118 
119  tag = "TECF";
120  local_mes.folder_name = "TEC/PLUS";
121  local_mes.subdet_tag = "TEC+";
122  local_mes.n_layer = 9;
123  local_mes.det_fractionME = dqm_store.bookFloat("SiStrip_" + tag);
124  SubDetMEsMap.emplace(tag, local_mes);
125 
126  tag = "TECB";
127  local_mes.folder_name = "TEC/MINUS";
128  local_mes.subdet_tag = "TEC-";
129  local_mes.n_layer = 9;
130  local_mes.det_fractionME = dqm_store.bookFloat("SiStrip_" + tag);
131  SubDetMEsMap.emplace(tag, local_mes);
132 
133  tag = "TIDF";
134  local_mes.folder_name = "TID/PLUS";
135  local_mes.subdet_tag = "TID+";
136  local_mes.n_layer = 3;
137  local_mes.det_fractionME = dqm_store.bookFloat("SiStrip_" + tag);
138  SubDetMEsMap.emplace(tag, local_mes);
139 
140  tag = "TIDB";
141  local_mes.folder_name = "TID/MINUS";
142  local_mes.subdet_tag = "TID-";
143  local_mes.n_layer = 3;
144  local_mes.det_fractionME = dqm_store.bookFloat("SiStrip_" + tag);
145  SubDetMEsMap.emplace(tag, local_mes);
146 
147  dqm_store.cd();
148  if (!strip_dir.empty()) dqm_store.setCurrentFolder(strip_dir + "/EventInfo");
149 
151  dqm_store.cd();
152 }
MonitorElement * book2D(char_string const &name, char_string const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1173
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)
MonitorElement * bookFloat(char_string const &name)
Book float.
Definition: DQMStore.cc:1048
std::map< std::string, SubDetMEs > SubDetMEsMap
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:571
void cd()
go to top directory (ie. root)
Definition: DQMStore.cc:546
MonitorElement * SiStripCertificationSummaryMap
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
static void getTopFolderPath(DQMStore &dqm_store, std::string const &top_dir, std::string &path)
void SiStripCertificationInfo::endLuminosityBlock ( edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  iSetup 
)
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 158 of file SiStripCertificationInfo.cc.

References fillSiStripCertificationMEsAtLumi(), and nFEDConnected_.

161 {
162  edm::LogInfo( "SiStripDaqInfo") << "SiStripDaqInfo::endLuminosityBlock";
163 
164  if (nFEDConnected_ > 0) {
165  auto& dqm_store = *edm::Service<DQMStore>{};
167  }
168 }
void fillSiStripCertificationMEsAtLumi(DQMStore &dqm_store)
void SiStripCertificationInfo::endRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 171 of file SiStripCertificationInfo.cc.

References fillSiStripCertificationMEs(), and nFEDConnected_.

173 {
174  edm::LogInfo ("SiStripCertificationInfo") <<"SiStripCertificationInfo:: End Run";
175 
176  if (nFEDConnected_ > 0) {
177  auto& dqm_store = *edm::Service<DQMStore>{};
178  fillSiStripCertificationMEs(dqm_store, eSetup);
179  }
180 }
void fillSiStripCertificationMEs(DQMStore &dqm_store, edm::EventSetup const &eSetup)
void SiStripCertificationInfo::fillDummySiStripCertification ( DQMStore dqm_store)
private

Definition at line 295 of file SiStripCertificationInfo.cc.

References MonitorElement::Fill(), MonitorElement::getNbinsX(), MonitorElement::getNbinsY(), resetSiStripCertificationMEs(), SiStripCertification, sistripCertificationBooked_, SiStripCertificationSummaryMap, and SubDetMEsMap.

Referenced by beginRun().

296 {
297  resetSiStripCertificationMEs(dqm_store);
299  SiStripCertification->Fill(-1.0);
300  for (auto const& pr : SubDetMEsMap) {
301  pr.second.det_fractionME->Reset();
302  pr.second.det_fractionME->Fill(-1.0);
303  }
304 
305  for (int xbin = 1; xbin < SiStripCertificationSummaryMap->getNbinsX()+1; xbin++) {
306  for (int ybin = 1; ybin < SiStripCertificationSummaryMap->getNbinsY()+1; ybin++) {
307  SiStripCertificationSummaryMap->Fill(xbin, ybin, -1.0);
308  }
309  }
310  }
311 }
void Fill(long long x)
std::map< std::string, SubDetMEs > SubDetMEsMap
void resetSiStripCertificationMEs(DQMStore &dqm_store)
int getNbinsY() const
get # of bins in Y-axis
MonitorElement * SiStripCertificationSummaryMap
int getNbinsX() const
get # of bins in X-axis
void SiStripCertificationInfo::fillSiStripCertificationMEs ( DQMStore dqm_store,
edm::EventSetup const &  eSetup 
)
private

Definition at line 186 of file SiStripCertificationInfo.cc.

References funct::abs(), DQMStore::cd(), SiStripDetCabling::connectedNumber(), detCabling_, MonitorElement::DQM_KIND_INT, MonitorElement::DQM_KIND_REAL, MonitorElement::Fill(), edm::EventSetup::get(), DQMStore::get(), DQMStore::getContents(), MonitorElement::getFloatValue(), MonitorElement::getIntValue(), MonitorElement::getName(), MonitorElement::getNbinsY(), SiStripFolderOrganizer::GetSubDetAndLayer(), SiStripUtility::goToDir(), gen::k, MonitorElement::kind(), dataset::name, edm::ESHandle< T >::product(), DQMStore::pwd(), MonitorElement::Reset(), resetSiStripCertificationMEs(), SiStripCertification, sistripCertificationBooked_, SiStripCertificationSummaryMap, AlCaHLTBitMon_QueryRunRegistry::string, SubDetMEsMap, and GlobalPosition_Frontier_DevDB_cff::tag.

Referenced by endRun().

189 {
191  edm::LogError("SiStripCertificationInfo") << " SiStripCertificationInfo::fillSiStripCertificationMEs : MEs missing ";
192  return;
193  }
194 
195  //Retrieve tracker topology from geometry
196  edm::ESHandle<TrackerTopology> tTopoHandle;
197  eSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
198  const TrackerTopology* const tTopo = tTopoHandle.product();
199 
200  resetSiStripCertificationMEs(dqm_store);
201  std::string mdir = "MechanicalView";
202  dqm_store.cd();
203  if (!SiStripUtility::goToDir(dqm_store, mdir)) return;
204  std::string mechanical_dir = dqm_store.pwd();
205  uint16_t nDetTot = 0;
206  uint16_t nFaultyTot = 0;
207  uint16_t nSToNTot = 0;
208  float sToNTot = 0.0;
209  SiStripFolderOrganizer folder_organizer;
210  int xbin = 0;
211  for (auto const& [name, subDetME] : SubDetMEsMap) {
212  ++xbin;
213  MonitorElement* me = subDetME.det_fractionME;
214  if (!me) continue;
215  std::string tag = subDetME.subdet_tag;
216  std::string bad_module_folder =
217  mechanical_dir + "/" + subDetME.folder_name + "/" + "BadModuleList";
218  std::vector<MonitorElement*> faulty_detMEs =
219  dqm_store.getContents(bad_module_folder);
220 
221  uint16_t ndet_subdet = 0;
222  uint16_t nfaulty_subdet = 0;
223  int nlayer = subDetME.n_layer;
224  int ybin = 0;
225  for (int ilayer = 0; ilayer < nlayer; ilayer++) {
226  uint16_t ndet_layer = detCabling_->connectedNumber(tag, ilayer+1);
227  ndet_subdet += ndet_layer;
228  ybin++;
229  uint16_t nfaulty_layer = 0;
230  for (auto me : faulty_detMEs) {
231  if (me->kind() != MonitorElement::DQM_KIND_INT) continue;
232  if (me->getIntValue() == 0) continue;
233  uint32_t detId = atoi(me->getName().c_str());
234  std::pair<std::string, int32_t> det_layer_pair =
235  folder_organizer.GetSubDetAndLayer(detId, tTopo, false);
236  if (abs(det_layer_pair.second) == ilayer + 1) nfaulty_layer++;
237  }
238 
239  nfaulty_subdet += nfaulty_layer;
240  float fraction_layer = -1.0;
241  if (ndet_layer > 0)
242  fraction_layer = 1 - ((nfaulty_layer * 1.0) / ndet_layer);
244  SiStripCertificationSummaryMap->Fill(xbin, ilayer + 1, fraction_layer);
245  }
246  if (ybin <= SiStripCertificationSummaryMap->getNbinsY()) {
247  for (int k = ybin + 1; k <= SiStripCertificationSummaryMap->getNbinsY();
248  k++)
249  SiStripCertificationSummaryMap->Fill(xbin, k, -1.0);
250  }
251  float fraction_subdet = -1.0;
252  if (ndet_subdet > 0) fraction_subdet = 1 - ((nfaulty_subdet*1.0)/ndet_subdet);
253  // Check S/N status flag and use the minimum between the two
254  std::string full_path =
255  mechanical_dir.substr(0, mechanical_dir.find_last_of("/")) +
256  "/EventInfo/reportSummaryContents/SiStrip_SToNFlag_" + name;
257  MonitorElement* me_ston = dqm_store.get(full_path);
258  me->Reset();
259  if (me_ston && me_ston->kind()==MonitorElement::DQM_KIND_REAL) {
260  float ston_flg = me_ston->getFloatValue();
261  sToNTot += ston_flg;
262  nSToNTot++;
263  me->Fill(fminf(fraction_subdet,ston_flg));
264  } else me->Fill(fraction_subdet);
265  nDetTot += ndet_subdet ;
266  nFaultyTot += nfaulty_subdet;
267  }
268  float fraction_global = -1.0;
269  if (nDetTot > 0) fraction_global = 1.0 - ((nFaultyTot*1.0)/nDetTot);
270  float ston_frac_global = 1.0;
271  if (nSToNTot > 0) ston_frac_global = sToNTot / nSToNTot;
272  SiStripCertification->Fill(fminf(fraction_global,ston_frac_global));
273 }
int64_t getIntValue() const
std::vector< MonitorElement * > getContents(std::string const &path) const
Definition: DQMStore.cc:1640
double getFloatValue() const
const std::string & getName() const
get name of ME
edm::ESHandle< SiStripDetCabling > detCabling_
uint32_t connectedNumber(const std::string &subDet, const uint16_t layer) const
void Fill(long long x)
std::map< std::string, SubDetMEs > SubDetMEsMap
MonitorElement * get(std::string const &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
Definition: DQMStore.cc:1613
void resetSiStripCertificationMEs(DQMStore &dqm_store)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
void Reset()
reset ME (ie. contents, errors, etc)
std::string const & pwd() const
Definition: DQMStore.cc:539
int k[5][pyjets_maxn]
void cd()
go to top directory (ie. root)
Definition: DQMStore.cc:546
int getNbinsY() const
get # of bins in Y-axis
std::pair< std::string, int32_t > GetSubDetAndLayer(const uint32_t &detid, const TrackerTopology *tTopo, bool ring_flag=false)
MonitorElement * SiStripCertificationSummaryMap
static bool goToDir(DQMStore &dqm_store, std::string const &name)
T const * product() const
Definition: ESHandle.h:86
Kind kind() const
Get the type of the monitor element.
void SiStripCertificationInfo::fillSiStripCertificationMEsAtLumi ( DQMStore dqm_store)
private

Definition at line 316 of file SiStripCertificationInfo.cc.

References DQMStore::cd(), DEFINE_FWK_MODULE, MonitorElement::DQM_KIND_REAL, MonitorElement::Fill(), DQMStore::get(), MonitorElement::getFloatValue(), SiStripUtility::getTopFolderPath(), MonitorElement::kind(), MonitorElement::Reset(), resetSiStripCertificationMEs(), SiStripCertification, sistripCertificationBooked_, AlCaHLTBitMon_QueryRunRegistry::string, and SubDetMEsMap.

Referenced by endLuminosityBlock().

317 {
319  edm::LogError("SiStripCertificationInfo") << " SiStripCertificationInfo::fillSiStripCertificationMEsAtLumi : MEs missing ";
320  return;
321  }
322  resetSiStripCertificationMEs(dqm_store);
323  dqm_store.cd();
324  std::string strip_dir = "";
325  SiStripUtility::getTopFolderPath(dqm_store, "SiStrip", strip_dir);
326  if (strip_dir.empty()) strip_dir = "SiStrip";
327 
328  std::string full_path;
329  float dcs_flag = 1.0;
330  float dqm_flag = 1.0;
331  for (auto const& [type, subDetME] : SubDetMEsMap) {
332  full_path = strip_dir + "/EventInfo/DCSContents/SiStrip_" + type;
333  MonitorElement* me_dcs = dqm_store.get(full_path);
334  if (me_dcs && me_dcs->kind() == MonitorElement::DQM_KIND_REAL)
335  dcs_flag = me_dcs->getFloatValue();
336  full_path = strip_dir + "/EventInfo/reportSummaryContents/SiStrip_" + type;
337  MonitorElement* me_dqm = dqm_store.get(full_path);
338  if (me_dqm && me_dqm->kind() == MonitorElement::DQM_KIND_REAL)
339  dqm_flag = me_dqm->getFloatValue();
340  subDetME.det_fractionME->Reset();
341  subDetME.det_fractionME->Fill(fminf(dqm_flag, dcs_flag));
342  }
343  dcs_flag = 1.0;
344  dqm_flag = 1.0;
345  full_path = strip_dir + "/EventInfo/reportSummary";
346  MonitorElement* me_dqm = dqm_store.get(full_path);
347  if (me_dqm && me_dqm->kind() == MonitorElement::DQM_KIND_REAL) dqm_flag = me_dqm->getFloatValue();
348  full_path = strip_dir + "/EventInfo/DCSSummary";
349  MonitorElement* me_dcs = dqm_store.get(full_path);
350  if (me_dcs && me_dcs->kind() == MonitorElement::DQM_KIND_REAL) dcs_flag = me_dcs->getFloatValue();
352  SiStripCertification->Fill(fminf(dqm_flag, dcs_flag));
353 }
type
Definition: HCALResponse.h:21
double getFloatValue() const
void Fill(long long x)
std::map< std::string, SubDetMEs > SubDetMEsMap
MonitorElement * get(std::string const &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
Definition: DQMStore.cc:1613
void resetSiStripCertificationMEs(DQMStore &dqm_store)
void Reset()
reset ME (ie. contents, errors, etc)
void cd()
go to top directory (ie. root)
Definition: DQMStore.cc:546
Kind kind() const
Get the type of the monitor element.
static void getTopFolderPath(DQMStore &dqm_store, std::string const &top_dir, std::string &path)
void SiStripCertificationInfo::resetSiStripCertificationMEs ( DQMStore dqm_store)
private

Definition at line 278 of file SiStripCertificationInfo.cc.

References bookSiStripCertificationMEs(), MonitorElement::Reset(), SiStripCertification, sistripCertificationBooked_, SiStripCertificationSummaryMap, and SubDetMEsMap.

Referenced by fillDummySiStripCertification(), fillSiStripCertificationMEs(), and fillSiStripCertificationMEsAtLumi().

279 {
281  bookSiStripCertificationMEs(dqm_store);
282  }
284 
286  for (auto const& pr : SubDetMEsMap) {
287  pr.second.det_fractionME->Reset();
288  }
290 }
std::map< std::string, SubDetMEs > SubDetMEsMap
void Reset()
reset ME (ie. contents, errors, etc)
void bookSiStripCertificationMEs(DQMStore &dqm_store)
MonitorElement * SiStripCertificationSummaryMap

Member Data Documentation

edm::ESHandle<SiStripDetCabling> SiStripCertificationInfo::detCabling_ {}
private

Definition at line 74 of file SiStripCertificationInfo.h.

Referenced by beginRun(), and fillSiStripCertificationMEs().

unsigned long long SiStripCertificationInfo::m_cacheID_ {}
private

Definition at line 72 of file SiStripCertificationInfo.h.

Referenced by beginRun().

int SiStripCertificationInfo::nFEDConnected_ {}
private

Definition at line 76 of file SiStripCertificationInfo.h.

Referenced by beginRun(), endLuminosityBlock(), and endRun().

MonitorElement* SiStripCertificationInfo::SiStripCertification { 0 }
private
bool SiStripCertificationInfo::sistripCertificationBooked_ {false}
private
MonitorElement* SiStripCertificationInfo::SiStripCertificationMap { 0 }
private

Definition at line 67 of file SiStripCertificationInfo.h.

MonitorElement* SiStripCertificationInfo::SiStripCertificationSummaryMap { 0 }
private
std::map<std::string, SubDetMEs> SiStripCertificationInfo::SubDetMEsMap {}
private