CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
SiStripDcsInfo Class Reference

#include <SiStripDcsInfo.h>

Inheritance diagram for SiStripDcsInfo:
edm::EDAnalyzer edm::EDConsumerBase

Classes

struct  SubDetMEs
 

Public Types

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

Public Member Functions

 SiStripDcsInfo (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 addBadModules (DQMStore &dqm_store)
 
void analyze (edm::Event const &, edm::EventSetup const &) override
 
void beginJob () override
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &eSetup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &eSetup) override
 
void bookStatus (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 fillDummyStatus (DQMStore &dqm_store)
 
void fillStatus (DQMStore &dqm_store)
 
void readCabling (edm::EventSetup const &)
 
void readStatus (edm::EventSetup const &)
 

Private Attributes

bool bookedStatus_ {false}
 
MonitorElementDcsFraction_ { 0 }
 
edm::ESHandle< SiStripDetCablingdetCabling_ {}
 
bool IsLumiGoodDcs_ {false}
 
unsigned long long m_cacheIDCabling_ {}
 
unsigned long long m_cacheIDDcs_ {}
 
int nFEDConnected_ {}
 
int nGoodDcsLumi_ {}
 
int nLumiAnalysed_ {}
 
edm::ESHandle< SiStripDetVOffsiStripDetVOff_ {}
 
std::map< std::string, SubDetMEsSubDetMEsMap {}
 

Static Private Attributes

static float MaxAcceptableBadDcsLumi_ {2}
 
static float MinAcceptableDcsDetFrac_ {0.90}
 

Additional Inherited Members

- 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/SiStripDcsInfo.h

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

Definition at line 42 of file SiStripDcsInfo.h.

Member Typedef Documentation

Definition at line 45 of file SiStripDcsInfo.h.

Definition at line 44 of file SiStripDcsInfo.h.

Constructor & Destructor Documentation

SiStripDcsInfo::SiStripDcsInfo ( const edm::ParameterSet ps)

Definition at line 32 of file SiStripDcsInfo.cc.

References LogDebug.

32  {
33  LogDebug("SiStripDcsInfo") << "SiStripDcsInfo::Deleting SiStripDcsInfo ";
34 }
#define LogDebug(id)

Member Function Documentation

void SiStripDcsInfo::addBadModules ( DQMStore dqm_store)
private

Definition at line 278 of file SiStripDcsInfo.cc.

References dqm::dqmstoreimpl::DQMStore::bookInt(), dqm::dqmstoreimpl::DQMStore::cd(), DEFINE_FWK_MODULE, dqm::impl::MonitorElement::Fill(), RemoveAddSevLevel::flag, dqm::dqmstoreimpl::DQMStore::get(), dqm::impl::MonitorElement::getIntValue(), SiStripUtility::goToDir(), MaxAcceptableBadDcsLumi_, hlt_dqm_clientPB-live_cfg::me, dqm::dqmstoreimpl::DQMStore::pwd(), dqm::impl::MonitorElement::Reset(), SiStripUtility::setBadModuleFlag(), dqm::dqmstoreimpl::DQMStore::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, SubDetMEsMap, and GlobalPosition_Frontier_DevDB_cff::tag.

Referenced by endRun().

278  {
279  dqm_store.cd();
280  std::string mdir = "MechanicalView";
281  if (!SiStripUtility::goToDir(dqm_store, mdir)) {
282  dqm_store.setCurrentFolder("SiStrip/" + mdir);
283  }
284  std::string mechanical_dir = dqm_store.pwd();
285  std::string tag = "DCSError";
286 
287  for (auto const& pr : SubDetMEsMap) {
288  auto const& lumiCountBadModules = pr.second.NLumiDetectorIsFaulty;
289  for (auto const [ibad, nBadLumi] : lumiCountBadModules) {
290  if (nBadLumi <= MaxAcceptableBadDcsLumi_)
291  continue;
292  std::string bad_module_folder = mechanical_dir + "/" + pr.second.folder_name +
293  "/"
294  "BadModuleList";
295  dqm_store.setCurrentFolder(bad_module_folder);
296 
297  std::ostringstream detid_str;
298  detid_str << ibad;
299  std::string full_path = bad_module_folder + "/" + detid_str.str();
300  MonitorElement* me = dqm_store.get(full_path);
301  uint16_t flag = 0;
302  if (me) {
303  flag = me->getIntValue();
304  me->Reset();
305  } else
306  me = dqm_store.bookInt(detid_str.str());
308  me->Fill(flag);
309  }
310  }
311  dqm_store.cd();
312 }
static void setBadModuleFlag(std::string &hname, uint16_t &flg)
virtual int64_t getIntValue() const
static float MaxAcceptableBadDcsLumi_
void Fill(long long x)
virtual void Reset()
reset ME (ie. contents, errors, etc)
std::map< std::string, SubDetMEs > SubDetMEsMap
static bool goToDir(DQMStore &dqm_store, std::string const &name)
void SiStripDcsInfo::analyze ( edm::Event const &  event,
edm::EventSetup const &  eSetup 
)
overrideprivatevirtual

Implements edm::EDAnalyzer.

Definition at line 79 of file SiStripDcsInfo.cc.

79 {}
void SiStripDcsInfo::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 36 of file SiStripDcsInfo.cc.

References SubDetMEsMap.

36  {
37  // Since SubDetMEs is a struct, using the brace initialization will
38  // zero-initialize all members that are not specified in the call.
39  SubDetMEsMap.emplace("TIB", SubDetMEs{"TIB", nullptr, 0, {}, {}});
40  SubDetMEsMap.emplace("TOB", SubDetMEs{"TOB", nullptr, 0, {}, {}});
41  SubDetMEsMap.emplace("TECB", SubDetMEs{"TEC/MINUS", nullptr, 0, {}, {}});
42  SubDetMEsMap.emplace("TECF", SubDetMEs{"TEC/PLUS", nullptr, 0, {}, {}});
43  SubDetMEsMap.emplace("TIDB", SubDetMEs{"TID/MINUS", nullptr, 0, {}, {}});
44  SubDetMEsMap.emplace("TIDF", SubDetMEs{"TID/PLUS", nullptr, 0, {}, {}});
45 }
std::map< std::string, SubDetMEs > SubDetMEsMap
void SiStripDcsInfo::beginLuminosityBlock ( edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  eSetup 
)
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 81 of file SiStripDcsInfo.cc.

References LogDebug, nFEDConnected_, nLumiAnalysed_, readStatus(), and SubDetMEsMap.

81  {
82  LogDebug("SiStripDcsInfo") << "SiStripDcsInfo::beginLuminosityBlock";
83 
84  if (nFEDConnected_ == 0)
85  return;
86 
87  // initialise BadModule list
88  for (auto& subDetME : SubDetMEsMap) {
89  subDetME.second.FaultyDetectors.clear();
90  }
91  readStatus(eSetup);
93 }
#define LogDebug(id)
std::map< std::string, SubDetMEs > SubDetMEsMap
void readStatus(edm::EventSetup const &)
void SiStripDcsInfo::beginRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 49 of file SiStripDcsInfo.cc.

References bookStatus(), constexpr, fillDummyStatus(), edm::ESHandleBase::isValid(), LogDebug, RunInfo::m_fed_in, FEDNumbering::MAXSiStripFEDID, FEDNumbering::MINSiStripFEDID, nFEDConnected_, readCabling(), and edm::EventSetup::tryToGet().

49  {
50  LogDebug("SiStripDcsInfo") << "SiStripDcsInfo:: Begining of Run";
51  nFEDConnected_ = 0;
52  constexpr int siStripFedIdMin{FEDNumbering::MINSiStripFEDID};
53  constexpr int siStripFedIdMax{FEDNumbering::MAXSiStripFEDID};
54 
55  // Count Tracker FEDs from RunInfo
56 
57  if (auto runInfoRec = eSetup.tryToGet<RunInfoRcd>()) {
59  runInfoRec->get(sumFED);
60 
61  if (sumFED.isValid()) {
62  std::vector<int> FedsInIds = sumFED->m_fed_in;
63  for (unsigned int it = 0; it < FedsInIds.size(); ++it) {
64  int fedID = FedsInIds[it];
65  if (fedID >= siStripFedIdMin && fedID <= siStripFedIdMax)
67  }
68  LogDebug("SiStripDcsInfo") << " SiStripDcsInfo :: Connected FEDs " << nFEDConnected_;
69  }
70  }
71 
72  auto& dqm_store = *edm::Service<DQMStore>{};
73  bookStatus(dqm_store);
74  fillDummyStatus(dqm_store);
75  if (nFEDConnected_ > 0)
76  readCabling(eSetup);
77 }
#define LogDebug(id)
void bookStatus(DQMStore &dqm_store)
std::vector< int > m_fed_in
Definition: RunInfo.h:25
void readCabling(edm::EventSetup const &)
bool isValid() const
Definition: ESHandle.h:44
#define constexpr
void fillDummyStatus(DQMStore &dqm_store)
void SiStripDcsInfo::bookStatus ( DQMStore dqm_store)
private

Definition at line 121 of file SiStripDcsInfo.cc.

References bookedStatus_, dqm::dqmstoreimpl::DQMStore::bookFloat(), dqm::dqmstoreimpl::DQMStore::cd(), DcsFraction_, SiStripUtility::getTopFolderPath(), dqm::dqmstoreimpl::DQMStore::setCurrentFolder(), dqm::impl::MonitorElement::setLumiFlag(), AlCaHLTBitMon_QueryRunRegistry::string, SubDetMEsMap, and createPayload::suffix.

Referenced by beginRun(), fillDummyStatus(), and fillStatus().

121  {
122  if (bookedStatus_)
123  return;
124 
125  std::string strip_dir = "";
126  SiStripUtility::getTopFolderPath(dqm_store, "SiStrip", strip_dir);
127  if (!strip_dir.empty())
128  dqm_store.setCurrentFolder(strip_dir + "/EventInfo");
129  else
130  dqm_store.setCurrentFolder("SiStrip/EventInfo");
131 
132  DcsFraction_ = dqm_store.bookFloat("DCSSummary");
133 
135 
136  dqm_store.cd();
137  if (!strip_dir.empty())
138  dqm_store.setCurrentFolder(strip_dir + "/EventInfo/DCSContents");
139  else
140  dqm_store.setCurrentFolder("SiStrip/EventInfo/DCSContents");
141  for (auto& [suffix, subDetME] : SubDetMEsMap) {
142  std::string const me_name{"SiStrip_" + suffix};
143  subDetME.DcsFractionME = dqm_store.bookFloat(me_name);
144  subDetME.DcsFractionME->setLumiFlag();
145  }
146  bookedStatus_ = true;
147  dqm_store.cd();
148 }
void setLumiFlag()
this ME is meant to be stored for each luminosity section
std::map< std::string, SubDetMEs > SubDetMEsMap
MonitorElement * DcsFraction_
static void getTopFolderPath(DQMStore &dqm_store, std::string const &top_dir, std::string &path)
void SiStripDcsInfo::endLuminosityBlock ( edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  iSetup 
)
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 95 of file SiStripDcsInfo.cc.

References fillStatus(), LogDebug, nFEDConnected_, and readStatus().

95  {
96  LogDebug("SiStripDcsInfo") << "SiStripDcsInfo::endLuminosityBlock";
97 
98  if (nFEDConnected_ == 0)
99  return;
100  auto& dqm_store = *edm::Service<DQMStore>{};
101  readStatus(eSetup);
102  fillStatus(dqm_store);
103 }
#define LogDebug(id)
void fillStatus(DQMStore &dqm_store)
void readStatus(edm::EventSetup const &)
void SiStripDcsInfo::endRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 105 of file SiStripDcsInfo.cc.

References addBadModules(), LogDebug, nFEDConnected_, readStatus(), and SubDetMEsMap.

105  {
106  LogDebug("SiStripDcsInfo") << "SiStripDcsInfo::EndRun";
107 
108  if (nFEDConnected_ == 0)
109  return;
110 
111  for (auto& subDetME : SubDetMEsMap) {
112  subDetME.second.FaultyDetectors.clear();
113  }
114  readStatus(eSetup);
115  auto& dqm_store = *edm::Service<DQMStore>{};
116  addBadModules(dqm_store);
117 }
#define LogDebug(id)
std::map< std::string, SubDetMEs > SubDetMEsMap
void addBadModules(DQMStore &dqm_store)
void readStatus(edm::EventSetup const &)
void SiStripDcsInfo::fillDummyStatus ( DQMStore dqm_store)
private

Definition at line 265 of file SiStripDcsInfo.cc.

References bookedStatus_, bookStatus(), DcsFraction_, dqm::impl::MonitorElement::Fill(), dqm::impl::MonitorElement::Reset(), and SubDetMEsMap.

Referenced by beginRun().

265  {
266  if (!bookedStatus_)
267  bookStatus(dqm_store);
268  assert(bookedStatus_);
269 
270  for (auto& pr : SubDetMEsMap) {
271  pr.second.DcsFractionME->Reset();
272  pr.second.DcsFractionME->Fill(-1.0);
273  }
274  DcsFraction_->Reset();
275  DcsFraction_->Fill(-1.0);
276 }
void bookStatus(DQMStore &dqm_store)
void Fill(long long x)
virtual void Reset()
reset ME (ie. contents, errors, etc)
std::map< std::string, SubDetMEs > SubDetMEsMap
MonitorElement * DcsFraction_
void SiStripDcsInfo::fillStatus ( DQMStore dqm_store)
private

Definition at line 222 of file SiStripDcsInfo.cc.

References bookedStatus_, bookStatus(), DcsFraction_, dqm::impl::MonitorElement::Fill(), HLT_2018_cff::fraction, IsLumiGoodDcs_, MinAcceptableDcsDetFrac_, Skims_PA_cff::name, nFEDConnected_, nGoodDcsLumi_, dqm::impl::MonitorElement::Reset(), and SubDetMEsMap.

Referenced by endLuminosityBlock().

222  {
223  if (!bookedStatus_)
224  bookStatus(dqm_store);
225  assert(bookedStatus_);
226 
227  float total_det = 0.0;
228  float faulty_det = 0.0;
229  float fraction;
230  for (auto const& [name, subDetMEs] : SubDetMEsMap) {
231  int total_subdet = subDetMEs.TotalDetectors;
232  int faulty_subdet = subDetMEs.FaultyDetectors.size();
233  if (nFEDConnected_ == 0 || total_subdet == 0)
234  fraction = -1;
235  else
236  fraction = 1.0 - faulty_subdet * 1.0 / total_subdet;
237  subDetMEs.DcsFractionME->Reset();
238  subDetMEs.DcsFractionME->Fill(fraction);
239  edm::LogInfo("SiStripDcsInfo") << " SiStripDcsInfo::fillStatus : Sub Detector " << name << " Total Number "
240  << total_subdet << " Faulty ones " << faulty_subdet;
241  total_det += total_subdet;
242  faulty_det += faulty_subdet;
243  }
244  if (nFEDConnected_ == 0 || total_det == 0)
245  fraction = -1.0;
246  else
247  fraction = 1 - faulty_det / total_det;
248  DcsFraction_->Reset();
249  DcsFraction_->Fill(fraction);
251  if (!IsLumiGoodDcs_)
252  return;
253 
254  ++nGoodDcsLumi_;
255  for (auto& pr : SubDetMEsMap) {
256  for (auto const detId_faulty : pr.second.FaultyDetectors) {
257  pr.second.NLumiDetectorIsFaulty[detId_faulty]++;
258  }
259  }
260 }
void bookStatus(DQMStore &dqm_store)
static float MinAcceptableDcsDetFrac_
void Fill(long long x)
virtual void Reset()
reset ME (ie. contents, errors, etc)
std::map< std::string, SubDetMEs > SubDetMEsMap
MonitorElement * DcsFraction_
void SiStripDcsInfo::readCabling ( edm::EventSetup const &  eSetup)
private

Definition at line 150 of file SiStripDcsInfo.cc.

References SiStripDetCabling::addActiveDetectorsRawIds(), detCabling_, edm::EventSetup::get(), SiStripUtility::getSubDetectorTag(), LogDebug, m_cacheIDCabling_, edm::ESHandle< T >::product(), AlCaHLTBitMon_QueryRunRegistry::string, xuti::subdet_tag(), and SubDetMEsMap.

Referenced by beginRun().

150  {
151  //Retrieve tracker topology from geometry
152  edm::ESHandle<TrackerTopology> tTopoHandle;
153  eSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
154  const TrackerTopology* const tTopo = tTopoHandle.product();
155 
156  unsigned long long cacheID = eSetup.get<SiStripFedCablingRcd>().cacheIdentifier();
157  if (m_cacheIDCabling_ != cacheID) {
158  m_cacheIDCabling_ = cacheID;
159  LogDebug("SiStripDcsInfo") << "SiStripDcsInfo::readCabling : "
160  << " Change in Cache";
161  eSetup.get<SiStripDetCablingRcd>().get(detCabling_);
162 
163  std::vector<uint32_t> SelectedDetIds;
164  detCabling_->addActiveDetectorsRawIds(SelectedDetIds);
165  LogDebug("SiStripDcsInfo") << " SiStripDcsInfo::readCabling : "
166  << " Total Detectors " << SelectedDetIds.size();
167 
168  // initialise total # of detectors first
169  for (std::map<std::string, SubDetMEs>::iterator it = SubDetMEsMap.begin(); it != SubDetMEsMap.end(); it++) {
170  it->second.TotalDetectors = 0;
171  }
172 
173  for (std::vector<uint32_t>::const_iterator idetid = SelectedDetIds.begin(); idetid != SelectedDetIds.end();
174  ++idetid) {
175  uint32_t detId = *idetid;
176  if (detId == 0 || detId == 0xFFFFFFFF)
177  continue;
179  SiStripUtility::getSubDetectorTag(detId, subdet_tag, tTopo);
180 
181  std::map<std::string, SubDetMEs>::iterator iPos = SubDetMEsMap.find(subdet_tag);
182  if (iPos != SubDetMEsMap.end()) {
183  iPos->second.TotalDetectors++;
184  }
185  }
186  }
187 }
#define LogDebug(id)
void addActiveDetectorsRawIds(std::vector< uint32_t > &) const
std::map< std::string, SubDetMEs > SubDetMEsMap
const std::string subdet_tag("SubDet")
edm::ESHandle< SiStripDetCabling > detCabling_
static void getSubDetectorTag(uint32_t det_id, std::string &subdet_tag, const TrackerTopology *tTopo)
unsigned long long m_cacheIDCabling_
T const * product() const
Definition: ESHandle.h:86
void SiStripDcsInfo::readStatus ( edm::EventSetup const &  eSetup)
private

Definition at line 191 of file SiStripDcsInfo.cc.

References detCabling_, spr::find(), edm::EventSetup::get(), SiStripDetVOff::getDetIds(), SiStripUtility::getSubDetectorTag(), SiStripDetCabling::IsConnected(), LogDebug, edm::ESHandle< T >::product(), siStripDetVOff_, AlCaHLTBitMon_QueryRunRegistry::string, xuti::subdet_tag(), and SubDetMEsMap.

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

191  {
192  //Retrieve tracker topology from geometry
193  edm::ESHandle<TrackerTopology> tTopoHandle;
194  eSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
195  const TrackerTopology* const tTopo = tTopoHandle.product();
196 
197  eSetup.get<SiStripDetVOffRcd>().get(siStripDetVOff_);
198  std::vector<uint32_t> FaultyDetIds;
199  siStripDetVOff_->getDetIds(FaultyDetIds);
200  LogDebug("SiStripDcsInfo") << " SiStripDcsInfo::readStatus : "
201  << " Faulty Detectors " << FaultyDetIds.size();
202  // Read and fille bad modules
203  for (std::vector<uint32_t>::const_iterator ihvoff = FaultyDetIds.begin(); ihvoff != FaultyDetIds.end(); ++ihvoff) {
204  uint32_t detId_hvoff = (*ihvoff);
205  if (!detCabling_->IsConnected(detId_hvoff))
206  continue;
208  SiStripUtility::getSubDetectorTag(detId_hvoff, subdet_tag, tTopo);
209 
210  std::map<std::string, SubDetMEs>::iterator iPos = SubDetMEsMap.find(subdet_tag);
211  if (iPos != SubDetMEsMap.end()) {
212  std::vector<uint32_t>::iterator ibad =
213  std::find(iPos->second.FaultyDetectors.begin(), iPos->second.FaultyDetectors.end(), detId_hvoff);
214  if (ibad == iPos->second.FaultyDetectors.end())
215  iPos->second.FaultyDetectors.push_back(detId_hvoff);
216  }
217  }
218 }
#define LogDebug(id)
bool IsConnected(const uint32_t &det_id) const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
void getDetIds(std::vector< uint32_t > &DetIds_) const
std::map< std::string, SubDetMEs > SubDetMEsMap
const std::string subdet_tag("SubDet")
edm::ESHandle< SiStripDetCabling > detCabling_
edm::ESHandle< SiStripDetVOff > siStripDetVOff_
static void getSubDetectorTag(uint32_t det_id, std::string &subdet_tag, const TrackerTopology *tTopo)
T const * product() const
Definition: ESHandle.h:86

Member Data Documentation

bool SiStripDcsInfo::bookedStatus_ {false}
private

Definition at line 77 of file SiStripDcsInfo.h.

Referenced by bookStatus(), fillDummyStatus(), and fillStatus().

MonitorElement* SiStripDcsInfo::DcsFraction_ { 0 }
private

Definition at line 64 of file SiStripDcsInfo.h.

Referenced by bookStatus(), fillDummyStatus(), and fillStatus().

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

Definition at line 89 of file SiStripDcsInfo.h.

Referenced by readCabling(), and readStatus().

bool SiStripDcsInfo::IsLumiGoodDcs_ {false}
private

Definition at line 84 of file SiStripDcsInfo.h.

Referenced by fillStatus().

unsigned long long SiStripDcsInfo::m_cacheIDCabling_ {}
private

Definition at line 75 of file SiStripDcsInfo.h.

Referenced by readCabling().

unsigned long long SiStripDcsInfo::m_cacheIDDcs_ {}
private

Definition at line 76 of file SiStripDcsInfo.h.

float SiStripDcsInfo::MaxAcceptableBadDcsLumi_ {2}
staticprivate

Definition at line 87 of file SiStripDcsInfo.h.

Referenced by addBadModules().

float SiStripDcsInfo::MinAcceptableDcsDetFrac_ {0.90}
staticprivate

Definition at line 86 of file SiStripDcsInfo.h.

Referenced by fillStatus().

int SiStripDcsInfo::nFEDConnected_ {}
private
int SiStripDcsInfo::nGoodDcsLumi_ {}
private

Definition at line 85 of file SiStripDcsInfo.h.

Referenced by fillStatus().

int SiStripDcsInfo::nLumiAnalysed_ {}
private

Definition at line 82 of file SiStripDcsInfo.h.

Referenced by beginLuminosityBlock().

edm::ESHandle<SiStripDetVOff> SiStripDcsInfo::siStripDetVOff_ {}
private

Definition at line 79 of file SiStripDcsInfo.h.

Referenced by readStatus().

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