CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes
SiStripCertificationInfo Class Reference
Inheritance diagram for SiStripCertificationInfo:
edm::one::EDAnalyzer< edm::one::SharedResources, edm::one::WatchRuns, edm::one::WatchLuminosityBlocks > edm::one::EDAnalyzerBase edm::EDConsumerBase

Classes

struct  SubDetMEs
 

Public Types

typedef dqm::harvesting::DQMStore DQMStore
 
typedef dqm::harvesting::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

 SiStripCertificationInfo (const edm::ParameterSet &ps)
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::SharedResources, edm::one::WatchRuns, edm::one::WatchLuminosityBlocks >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const noexcept final
 
bool wantsGlobalRuns () const noexcept final
 
bool wantsInputProcessBlocks () const noexcept final
 
bool wantsProcessBlocks () const noexcept final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const noexcept
 
bool wantsStreamRuns () const noexcept
 
 ~EDAnalyzerBase () 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
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (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::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void analyze (edm::Event const &, edm::EventSetup const &) override
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &eSetup) 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_ {}
 
const edm::ESGetToken< SiStripDetCabling, SiStripDetCablingRcddetCablingToken_
 
int nFEDConnected_ {}
 
const edm::ESGetToken< RunInfo, RunInfoRcdrunInfoToken_
 
MonitorElementSiStripCertification {nullptr}
 
bool sistripCertificationBooked_ {false}
 
MonitorElementSiStripCertificationMap {nullptr}
 
MonitorElementSiStripCertificationSummaryMap {nullptr}
 
std::map< std::string, SubDetMEsSubDetMEsMap {}
 
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtTopoToken_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 28 of file SiStripCertificationInfo.cc.

Member Typedef Documentation

◆ DQMStore

Definition at line 32 of file SiStripCertificationInfo.cc.

◆ MonitorElement

Definition at line 31 of file SiStripCertificationInfo.cc.

Constructor & Destructor Documentation

◆ SiStripCertificationInfo()

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

Definition at line 73 of file SiStripCertificationInfo.cc.

References ProducerED_cfi::InputTag.

74  : detCablingToken_(esConsumes<edm::Transition::BeginRun>()),
75  tTopoToken_(esConsumes<edm::Transition::EndRun>()),
76  runInfoToken_(esConsumes<edm::Transition::BeginRun>()) {
77  usesResource("DQMStore");
78  consumes<DQMToken, edm::InRun>(edm::InputTag("siStripOfflineAnalyser", "DQMGenerationSiStripAnalyserRun"));
79  consumes<DQMToken, edm::InLumi>(edm::InputTag("siStripOfflineAnalyser", "DQMGenerationSiStripAnalyserLumi"));
80 }
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
const edm::ESGetToken< RunInfo, RunInfoRcd > runInfoToken_
const edm::ESGetToken< SiStripDetCabling, SiStripDetCablingRcd > detCablingToken_

Member Function Documentation

◆ analyze()

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

Implements edm::one::EDAnalyzerBase.

Definition at line 190 of file SiStripCertificationInfo.cc.

190 {}

◆ beginLuminosityBlock()

void SiStripCertificationInfo::beginLuminosityBlock ( edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  eSetup 
)
inlineoverrideprivate

Definition at line 38 of file SiStripCertificationInfo.cc.

38 {};

◆ beginRun()

void SiStripCertificationInfo::beginRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
overrideprivate

Definition at line 82 of file SiStripCertificationInfo.cc.

References bookSiStripCertificationMEs(), ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), detCabling_, detCablingToken_, fillDummySiStripCertification(), edm::EventSetup::getData(), edm::EventSetup::getHandle(), LogDebug, FEDNumbering::MAXSiStripFEDID, FEDNumbering::MINSiStripFEDID, nFEDConnected_, runInfoToken_, and edm::EventSetup::tryToGet().

82  {
83  edm::LogInfo("SiStripCertificationInfo") << "SiStripCertificationInfo:: Begining of Run";
84  detCabling_ = &eSetup.getData(detCablingToken_);
85 
86  constexpr int siStripFedIdMin{FEDNumbering::MINSiStripFEDID};
87  constexpr int siStripFedIdMax{FEDNumbering::MAXSiStripFEDID};
88 
89  if (eSetup.tryToGet<RunInfoRcd>()) {
90  if (auto sumFED = eSetup.getHandle(runInfoToken_)) {
91  for (auto const fedID : sumFED->m_fed_in) {
92  if (fedID >= siStripFedIdMin && fedID <= siStripFedIdMax)
94  }
95  LogDebug("SiStripDcsInfo") << " SiStripDcsInfo :: Connected FEDs " << nFEDConnected_;
96  }
97  }
98 
99  auto& dqm_store = *edm::Service<DQMStore>{};
100  bookSiStripCertificationMEs(dqm_store);
102 }
edm::ESHandle< SiStripDetCabling > detCabling_
const edm::ESGetToken< RunInfo, RunInfoRcd > runInfoToken_
void fillDummySiStripCertification(DQMStore &dqm_store)
Log< level::Info, false > LogInfo
const edm::ESGetToken< SiStripDetCabling, SiStripDetCablingRcd > detCablingToken_
void bookSiStripCertificationMEs(DQMStore &dqm_store)
#define LogDebug(id)

◆ bookSiStripCertificationMEs()

void SiStripCertificationInfo::bookSiStripCertificationMEs ( DQMStore dqm_store)
private

Definition at line 106 of file SiStripCertificationInfo.cc.

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

Referenced by beginRun(), and resetSiStripCertificationMEs().

106  {
108  return;
109 
110  dqm_store.cd();
111  std::string strip_dir = "";
112  SiStripUtility::getTopFolderPath(dqm_store, "SiStrip", strip_dir);
113  if (!strip_dir.empty())
114  dqm_store.setCurrentFolder(strip_dir + "/EventInfo");
115  else
116  dqm_store.setCurrentFolder("SiStrip/EventInfo");
117 
118  SiStripCertification = dqm_store.bookFloat("CertificationSummary");
119 
120  std::string hname = "CertificationReportMap";
121  std::string htitle = "SiStrip Certification for Good Detector Fraction";
122  SiStripCertificationSummaryMap = dqm_store.book2D(hname, htitle, 6, 0.5, 6.5, 9, 0.5, 9.5);
123  SiStripCertificationSummaryMap->setAxisTitle("Sub Detector Type", 1);
124  SiStripCertificationSummaryMap->setAxisTitle("Layer/Disc Number", 2);
125  int ibin = 0;
126  for (auto const& pr : SubDetMEsMap) {
127  ++ibin;
128  auto const& det = pr.first;
130  }
131 
132  SubDetMEs local_mes;
134  dqm_store.cd();
135  if (!strip_dir.empty())
136  dqm_store.setCurrentFolder(strip_dir + "/EventInfo/CertificationContents");
137  else
138  dqm_store.setCurrentFolder("SiStrip/EventInfo/CertificationContents");
139  tag = "TIB";
140 
141  local_mes.folder_name = "TIB";
142  local_mes.subdet_tag = "TIB";
143  local_mes.n_layer = 4;
144  local_mes.det_fractionME = dqm_store.bookFloat("SiStrip_" + tag);
145  SubDetMEsMap.emplace(tag, local_mes);
146 
147  tag = "TOB";
148  local_mes.folder_name = "TOB";
149  local_mes.subdet_tag = "TOB";
150  local_mes.n_layer = 6;
151  local_mes.det_fractionME = dqm_store.bookFloat("SiStrip_" + tag);
152  SubDetMEsMap.emplace(tag, local_mes);
153 
154  tag = "TECF";
155  local_mes.folder_name = "TEC/PLUS";
156  local_mes.subdet_tag = "TEC+";
157  local_mes.n_layer = 9;
158  local_mes.det_fractionME = dqm_store.bookFloat("SiStrip_" + tag);
159  SubDetMEsMap.emplace(tag, local_mes);
160 
161  tag = "TECB";
162  local_mes.folder_name = "TEC/MINUS";
163  local_mes.subdet_tag = "TEC-";
164  local_mes.n_layer = 9;
165  local_mes.det_fractionME = dqm_store.bookFloat("SiStrip_" + tag);
166  SubDetMEsMap.emplace(tag, local_mes);
167 
168  tag = "TIDF";
169  local_mes.folder_name = "TID/PLUS";
170  local_mes.subdet_tag = "TID+";
171  local_mes.n_layer = 3;
172  local_mes.det_fractionME = dqm_store.bookFloat("SiStrip_" + tag);
173  SubDetMEsMap.emplace(tag, local_mes);
174 
175  tag = "TIDB";
176  local_mes.folder_name = "TID/MINUS";
177  local_mes.subdet_tag = "TID-";
178  local_mes.n_layer = 3;
179  local_mes.det_fractionME = dqm_store.bookFloat("SiStrip_" + tag);
180  SubDetMEsMap.emplace(tag, local_mes);
181 
182  dqm_store.cd();
183  if (!strip_dir.empty())
184  dqm_store.setCurrentFolder(strip_dir + "/EventInfo");
185 
187  dqm_store.cd();
188 }
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:80
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:656
std::map< std::string, SubDetMEs > SubDetMEsMap
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)
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:221
MonitorElement * SiStripCertificationSummaryMap
static void getTopFolderPath(DQMStore &dqm_store, std::string const &top_dir, std::string &path)
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)

◆ endLuminosityBlock()

void SiStripCertificationInfo::endLuminosityBlock ( edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  iSetup 
)
overrideprivate

Definition at line 192 of file SiStripCertificationInfo.cc.

References fillSiStripCertificationMEsAtLumi(), and nFEDConnected_.

192  {
193  edm::LogInfo("SiStripDaqInfo") << "SiStripDaqInfo::endLuminosityBlock";
194 
195  if (nFEDConnected_ > 0) {
196  auto& dqm_store = *edm::Service<DQMStore>{};
198  }
199 }
void fillSiStripCertificationMEsAtLumi(DQMStore &dqm_store)
Log< level::Info, false > LogInfo

◆ endRun()

void SiStripCertificationInfo::endRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
overrideprivate

Definition at line 201 of file SiStripCertificationInfo.cc.

References fillSiStripCertificationMEs(), and nFEDConnected_.

201  {
202  edm::LogInfo("SiStripCertificationInfo") << "SiStripCertificationInfo:: End Run";
203 
204  if (nFEDConnected_ > 0) {
205  auto& dqm_store = *edm::Service<DQMStore>{};
206  fillSiStripCertificationMEs(dqm_store, eSetup);
207  }
208 }
Log< level::Info, false > LogInfo
void fillSiStripCertificationMEs(DQMStore &dqm_store, edm::EventSetup const &eSetup)

◆ fillDummySiStripCertification()

void SiStripCertificationInfo::fillDummySiStripCertification ( DQMStore dqm_store)
private

Definition at line 319 of file SiStripCertificationInfo.cc.

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

Referenced by beginRun().

319  {
320  resetSiStripCertificationMEs(dqm_store);
322  SiStripCertification->Fill(-1.0);
323  for (auto const& pr : SubDetMEsMap) {
324  pr.second.det_fractionME->Reset();
325  pr.second.det_fractionME->Fill(-1.0);
326  }
327 
328  for (int xbin = 1; xbin < SiStripCertificationSummaryMap->getNbinsX() + 1; xbin++) {
329  for (int ybin = 1; ybin < SiStripCertificationSummaryMap->getNbinsY() + 1; ybin++) {
330  SiStripCertificationSummaryMap->Fill(xbin, ybin, -1.0);
331  }
332  }
333  }
334 }
void Fill(long long x)
std::map< std::string, SubDetMEs > SubDetMEsMap
void resetSiStripCertificationMEs(DQMStore &dqm_store)
virtual int getNbinsY() const
get # of bins in Y-axis
MonitorElement * SiStripCertificationSummaryMap
virtual int getNbinsX() const
get # of bins in X-axis

◆ fillSiStripCertificationMEs()

void SiStripCertificationInfo::fillSiStripCertificationMEs ( DQMStore dqm_store,
edm::EventSetup const &  eSetup 
)
private

Definition at line 213 of file SiStripCertificationInfo.cc.

References funct::abs(), dqm::implementation::DQMStore::cd(), SiStripDetCabling::connectedNumber(), detCabling_, hcalRecHitTable_cff::detId, dqm::impl::MonitorElement::Fill(), dqm::implementation::IGetter::get(), dqm::implementation::IGetter::getContents(), edm::EventSetup::getData(), dqm::impl::MonitorElement::getFloatValue(), dqm::impl::MonitorElement::getNbinsY(), SiStripFolderOrganizer::GetSubDetAndLayer(), SiStripUtility::goToDir(), MonitorElementData::INT, dqmdumpme::k, dqm::impl::MonitorElement::kind(), hlt_dqm_clientPB-live_cfg::me, Skims_PA_cff::name, dqm::implementation::DQMStore::pwd(), MonitorElementData::REAL, resetSiStripCertificationMEs(), SiStripCertification, sistripCertificationBooked_, SiStripCertificationSummaryMap, AlCaHLTBitMon_QueryRunRegistry::string, SubDetMEsMap, makeGlobalPositionRcd_cfg::tag, and tTopoToken_.

Referenced by endRun().

213  {
215  edm::LogError("SiStripCertificationInfo")
216  << " SiStripCertificationInfo::fillSiStripCertificationMEs : MEs missing ";
217  return;
218  }
219 
220  //Retrieve tracker topology from geometry
221  const auto tTopo = &eSetup.getData(tTopoToken_);
222 
223  resetSiStripCertificationMEs(dqm_store);
224  std::string mdir = "MechanicalView";
225  dqm_store.cd();
226  if (!SiStripUtility::goToDir(dqm_store, mdir))
227  return;
228  std::string mechanical_dir = dqm_store.pwd();
229  uint16_t nDetTot = 0;
230  uint16_t nFaultyTot = 0;
231  uint16_t nSToNTot = 0;
232  float sToNTot = 0.0;
233  SiStripFolderOrganizer folder_organizer;
234  int xbin = 0;
235  for (auto const& [name, subDetME] : SubDetMEsMap) {
236  ++xbin;
237  MonitorElement* me = subDetME.det_fractionME;
238  if (!me)
239  continue;
240  std::string tag = subDetME.subdet_tag;
241  std::string bad_module_folder = mechanical_dir + "/" + subDetME.folder_name + "/" + "BadModuleList";
242  std::vector<MonitorElement*> faulty_detMEs = dqm_store.getContents(bad_module_folder);
243 
244  uint16_t ndet_subdet = 0;
245  uint16_t nfaulty_subdet = 0;
246  int nlayer = subDetME.n_layer;
247  int ybin = 0;
248  for (int ilayer = 0; ilayer < nlayer; ilayer++) {
249  uint16_t ndet_layer = detCabling_->connectedNumber(tag, ilayer + 1);
250  ndet_subdet += ndet_layer;
251  ybin++;
252  uint16_t nfaulty_layer = 0;
253  for (auto me : faulty_detMEs) {
254  if (me->kind() != MonitorElement::Kind::INT)
255  continue;
256  if (me->getIntValue() == 0)
257  continue;
258  uint32_t detId = atoi(me->getName().c_str());
259  std::pair<std::string, int32_t> det_layer_pair = folder_organizer.GetSubDetAndLayer(detId, tTopo, false);
260  if (abs(det_layer_pair.second) == ilayer + 1)
261  nfaulty_layer++;
262  }
263 
264  nfaulty_subdet += nfaulty_layer;
265  float fraction_layer = -1.0;
266  if (ndet_layer > 0)
267  fraction_layer = 1 - ((nfaulty_layer * 1.0) / ndet_layer);
269  SiStripCertificationSummaryMap->Fill(xbin, ilayer + 1, fraction_layer);
270  }
271  if (ybin <= SiStripCertificationSummaryMap->getNbinsY()) {
272  for (int k = ybin + 1; k <= SiStripCertificationSummaryMap->getNbinsY(); k++)
273  SiStripCertificationSummaryMap->Fill(xbin, k, -1.0);
274  }
275  float fraction_subdet = -1.0;
276  if (ndet_subdet > 0)
277  fraction_subdet = 1 - ((nfaulty_subdet * 1.0) / ndet_subdet);
278  // Check S/N status flag and use the minimum between the two
279  std::string full_path = mechanical_dir.substr(0, mechanical_dir.find_last_of('/')) +
280  "/EventInfo/reportSummaryContents/SiStrip_SToNFlag_" + name;
281  MonitorElement* me_ston = dqm_store.get(full_path);
282  me->Reset();
283  if (me_ston && me_ston->kind() == MonitorElement::Kind::REAL) {
284  float ston_flg = me_ston->getFloatValue();
285  sToNTot += ston_flg;
286  nSToNTot++;
287  me->Fill(fminf(fraction_subdet, ston_flg));
288  } else
289  me->Fill(fraction_subdet);
290  nDetTot += ndet_subdet;
291  nFaultyTot += nfaulty_subdet;
292  }
293  float fraction_global = -1.0;
294  if (nDetTot > 0)
295  fraction_global = 1.0 - ((nFaultyTot * 1.0) / nDetTot);
296  float ston_frac_global = 1.0;
297  if (nSToNTot > 0)
298  ston_frac_global = sToNTot / nSToNTot;
299  SiStripCertification->Fill(fminf(fraction_global, ston_frac_global));
300 }
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
Kind kind() const
Get the type of the monitor element.
edm::ESHandle< SiStripDetCabling > detCabling_
std::string pwd() override
Definition: DQMStore.h:654
Log< level::Error, false > LogError
void Fill(long long x)
std::map< std::string, SubDetMEs > SubDetMEsMap
virtual double getFloatValue() const
void resetSiStripCertificationMEs(DQMStore &dqm_store)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
virtual int getNbinsY() const
get # of bins in Y-axis
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:712
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)
uint32_t connectedNumber(const std::string &subDet, const uint16_t layer) const
virtual std::vector< dqm::harvesting::MonitorElement * > getContents(std::string const &path) const
Definition: DQMStore.cc:625

◆ fillSiStripCertificationMEsAtLumi()

void SiStripCertificationInfo::fillSiStripCertificationMEsAtLumi ( DQMStore dqm_store)
private

Definition at line 338 of file SiStripCertificationInfo.cc.

References dqm::implementation::DQMStore::cd(), dqm::impl::MonitorElement::Fill(), dqm::implementation::IGetter::get(), dqm::impl::MonitorElement::getFloatValue(), SiStripUtility::getTopFolderPath(), dqm::impl::MonitorElement::kind(), MonitorElementData::REAL, dqm::impl::MonitorElement::Reset(), resetSiStripCertificationMEs(), SiStripCertification, sistripCertificationBooked_, AlCaHLTBitMon_QueryRunRegistry::string, and SubDetMEsMap.

Referenced by endLuminosityBlock().

338  {
340  edm::LogError("SiStripCertificationInfo")
341  << " SiStripCertificationInfo::fillSiStripCertificationMEsAtLumi : MEs missing ";
342  return;
343  }
344  resetSiStripCertificationMEs(dqm_store);
345  dqm_store.cd();
346  std::string strip_dir = "";
347  SiStripUtility::getTopFolderPath(dqm_store, "SiStrip", strip_dir);
348  if (strip_dir.empty())
349  strip_dir = "SiStrip";
350 
351  std::string full_path;
352  float dcs_flag = 1.0;
353  float dqm_flag = 1.0;
354  for (auto const& [type, subDetME] : SubDetMEsMap) {
355  full_path = strip_dir + "/EventInfo/DCSContents/SiStrip_" + type;
356  MonitorElement* me_dcs = dqm_store.get(full_path);
357  if (me_dcs && me_dcs->kind() == MonitorElement::Kind::REAL)
358  dcs_flag = me_dcs->getFloatValue();
359  full_path = strip_dir + "/EventInfo/reportSummaryContents/SiStrip_" + type;
360  MonitorElement* me_dqm = dqm_store.get(full_path);
361  if (me_dqm && me_dqm->kind() == MonitorElement::Kind::REAL)
362  dqm_flag = me_dqm->getFloatValue();
363  subDetME.det_fractionME->Reset();
364  subDetME.det_fractionME->Fill(fminf(dqm_flag, dcs_flag));
365  }
366  dcs_flag = 1.0;
367  dqm_flag = 1.0;
368  full_path = strip_dir + "/EventInfo/reportSummary";
369  MonitorElement* me_dqm = dqm_store.get(full_path);
370  if (me_dqm && me_dqm->kind() == MonitorElement::Kind::REAL)
371  dqm_flag = me_dqm->getFloatValue();
372  full_path = strip_dir + "/EventInfo/DCSSummary";
373  MonitorElement* me_dcs = dqm_store.get(full_path);
374  if (me_dcs && me_dcs->kind() == MonitorElement::Kind::REAL)
375  dcs_flag = me_dcs->getFloatValue();
377  SiStripCertification->Fill(fminf(dqm_flag, dcs_flag));
378 }
Kind kind() const
Get the type of the monitor element.
Log< level::Error, false > LogError
void Fill(long long x)
virtual void Reset()
Remove all data from the ME, keept the empty histogram with all its settings.
std::map< std::string, SubDetMEs > SubDetMEsMap
virtual double getFloatValue() const
void resetSiStripCertificationMEs(DQMStore &dqm_store)
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:712
static void getTopFolderPath(DQMStore &dqm_store, std::string const &top_dir, std::string &path)

◆ resetSiStripCertificationMEs()

void SiStripCertificationInfo::resetSiStripCertificationMEs ( DQMStore dqm_store)
private

Definition at line 304 of file SiStripCertificationInfo.cc.

References cms::cuda::assert(), bookSiStripCertificationMEs(), dqm::impl::MonitorElement::Reset(), SiStripCertification, sistripCertificationBooked_, SiStripCertificationSummaryMap, and SubDetMEsMap.

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

304  {
306  bookSiStripCertificationMEs(dqm_store);
307  }
309 
311  for (auto const& pr : SubDetMEsMap) {
312  pr.second.det_fractionME->Reset();
313  }
315 }
assert(be >=bs)
virtual void Reset()
Remove all data from the ME, keept the empty histogram with all its settings.
std::map< std::string, SubDetMEs > SubDetMEsMap
void bookSiStripCertificationMEs(DQMStore &dqm_store)
MonitorElement * SiStripCertificationSummaryMap

Member Data Documentation

◆ detCabling_

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

Definition at line 64 of file SiStripCertificationInfo.cc.

Referenced by beginRun(), and fillSiStripCertificationMEs().

◆ detCablingToken_

const edm::ESGetToken<SiStripDetCabling, SiStripDetCablingRcd> SiStripCertificationInfo::detCablingToken_
private

Definition at line 68 of file SiStripCertificationInfo.cc.

Referenced by beginRun().

◆ nFEDConnected_

int SiStripCertificationInfo::nFEDConnected_ {}
private

Definition at line 66 of file SiStripCertificationInfo.cc.

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

◆ runInfoToken_

const edm::ESGetToken<RunInfo, RunInfoRcd> SiStripCertificationInfo::runInfoToken_
private

Definition at line 70 of file SiStripCertificationInfo.cc.

Referenced by beginRun().

◆ SiStripCertification

MonitorElement* SiStripCertificationInfo::SiStripCertification {nullptr}
private

◆ sistripCertificationBooked_

bool SiStripCertificationInfo::sistripCertificationBooked_ {false}
private

◆ SiStripCertificationMap

MonitorElement* SiStripCertificationInfo::SiStripCertificationMap {nullptr}
private

Definition at line 58 of file SiStripCertificationInfo.cc.

◆ SiStripCertificationSummaryMap

MonitorElement* SiStripCertificationInfo::SiStripCertificationSummaryMap {nullptr}
private

◆ SubDetMEsMap

std::map<std::string, SubDetMEs> SiStripCertificationInfo::SubDetMEsMap {}
private

◆ tTopoToken_

const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> SiStripCertificationInfo::tTopoToken_
private

Definition at line 69 of file SiStripCertificationInfo.cc.

Referenced by fillSiStripCertificationMEs().