CMS 3D CMS Logo

List of all members | Classes | 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 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

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

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

Definition at line 43 of file SiStripDcsInfo.h.

Constructor & Destructor Documentation

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

Definition at line 33 of file SiStripDcsInfo.cc.

References LogDebug.

34 {
35  LogDebug( "SiStripDcsInfo") << "SiStripDcsInfo::Deleting SiStripDcsInfo ";
36 }
#define LogDebug(id)

Member Function Documentation

void SiStripDcsInfo::addBadModules ( DQMStore dqm_store)
private

Definition at line 293 of file SiStripDcsInfo.cc.

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

Referenced by endRun().

294 {
295  dqm_store.cd();
296  std::string mdir = "MechanicalView";
297  if (!SiStripUtility::goToDir(dqm_store, mdir)) {
298  dqm_store.setCurrentFolder("SiStrip/" + mdir);
299  }
300  std::string mechanical_dir = dqm_store.pwd();
301  std::string tag = "DCSError";
302 
303  for (auto const& pr : SubDetMEsMap) {
304  auto const& lumiCountBadModules = pr.second.NLumiDetectorIsFaulty;
305  for (auto const [ibad, nBadLumi] : lumiCountBadModules) {
306  if(nBadLumi <= MaxAcceptableBadDcsLumi_) continue;
307  std::string bad_module_folder = mechanical_dir + "/" +
308  pr.second.folder_name +
309  "/"
310  "BadModuleList";
311  dqm_store.setCurrentFolder(bad_module_folder);
312 
313  std::ostringstream detid_str;
314  detid_str << ibad;
315  std::string full_path = bad_module_folder + "/" + detid_str.str();
316  MonitorElement* me = dqm_store.get(full_path);
317  uint16_t flag = 0;
318  if (me) {
319  flag = me->getIntValue();
320  me->Reset();
321  } else
322  me = dqm_store.bookInt(detid_str.str());
324  me->Fill(flag);
325  }
326  }
327  dqm_store.cd();
328 }
static void setBadModuleFlag(std::string &hname, uint16_t &flg)
int64_t getIntValue() const
static float MaxAcceptableBadDcsLumi_
MonitorElement * bookInt(char_string const &name)
Book int.
Definition: DQMStore.cc:1027
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 Reset()
reset ME (ie. contents, errors, etc)
std::string const & pwd() const
Definition: DQMStore.cc:539
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:571
void cd()
go to top directory (ie. root)
Definition: DQMStore.cc:546
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 85 of file SiStripDcsInfo.cc.

85  {
86 }
void SiStripDcsInfo::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 39 of file SiStripDcsInfo.cc.

References SubDetMEsMap.

40 {
41  // Since SubDetMEs is a struct, using the brace initialization will
42  // zero-initialize all members that are not specified in the call.
43  SubDetMEsMap.emplace("TIB", SubDetMEs{"TIB"});
44  SubDetMEsMap.emplace("TOB", SubDetMEs{"TOB"});
45  SubDetMEsMap.emplace("TECB", SubDetMEs{"TEC/MINUS"});
46  SubDetMEsMap.emplace("TECF", SubDetMEs{"TEC/PLUS"});
47  SubDetMEsMap.emplace("TIDB", SubDetMEs{"TID/MINUS"});
48  SubDetMEsMap.emplace("TIDF", SubDetMEs{"TID/PLUS"});
49 }
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 89 of file SiStripDcsInfo.cc.

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

91 {
92  LogDebug( "SiStripDcsInfo") << "SiStripDcsInfo::beginLuminosityBlock";
93 
94  if (nFEDConnected_ == 0) return;
95 
96  // initialise BadModule list
97  for (auto& subDetME : SubDetMEsMap) {
98  subDetME.second.FaultyDetectors.clear();
99  }
100  readStatus(eSetup);
101  nLumiAnalysed_++;
102 }
#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 54 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().

55 {
56  LogDebug ("SiStripDcsInfo") <<"SiStripDcsInfo:: Begining of Run";
57  nFEDConnected_ = 0;
58  constexpr int siStripFedIdMin{FEDNumbering::MINSiStripFEDID};
59  constexpr int siStripFedIdMax{FEDNumbering::MAXSiStripFEDID};
60 
61  // Count Tracker FEDs from RunInfo
62 
63  if (auto runInfoRec = eSetup.tryToGet<RunInfoRcd>()) {
64 
66  runInfoRec->get(sumFED);
67 
68  if ( sumFED.isValid() ) {
69  std::vector<int> FedsInIds = sumFED->m_fed_in;
70  for(unsigned int it = 0; it < FedsInIds.size(); ++it) {
71  int fedID = FedsInIds[it];
72  if (fedID >= siStripFedIdMin && fedID <= siStripFedIdMax)
74  }
75  LogDebug ("SiStripDcsInfo") << " SiStripDcsInfo :: Connected FEDs " << nFEDConnected_;
76  }
77  }
78 
79  auto& dqm_store = *edm::Service<DQMStore>{};
80  bookStatus(dqm_store);
81  fillDummyStatus(dqm_store);
82  if (nFEDConnected_ > 0) readCabling(eSetup);
83 }
#define LogDebug(id)
void bookStatus(DQMStore &dqm_store)
std::vector< int > m_fed_in
Definition: RunInfo.h:26
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 134 of file SiStripDcsInfo.cc.

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

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

135 {
136  if (bookedStatus_) return;
137 
138  std::string strip_dir = "";
139  SiStripUtility::getTopFolderPath(dqm_store, "SiStrip", strip_dir);
140  if (!strip_dir.empty())
141  dqm_store.setCurrentFolder(strip_dir + "/EventInfo");
142  else
143  dqm_store.setCurrentFolder("SiStrip/EventInfo");
144 
145  DcsFraction_ = dqm_store.bookFloat("DCSSummary");
146 
148 
149  dqm_store.cd();
150  if (!strip_dir.empty())
151  dqm_store.setCurrentFolder(strip_dir + "/EventInfo/DCSContents");
152  else
153  dqm_store.setCurrentFolder("SiStrip/EventInfo/DCSContents");
154  for (auto& [suffix, subDetME] : SubDetMEsMap) {
155  std::string const me_name{"SiStrip_" + suffix};
156  subDetME.DcsFractionME = dqm_store.bookFloat(me_name);
157  subDetME.DcsFractionME->setLumiFlag();
158  }
159  bookedStatus_ = true;
160  dqm_store.cd();
161 }
MonitorElement * bookFloat(char_string const &name)
Book float.
Definition: DQMStore.cc:1048
void setLumiFlag()
this ME is meant to be stored for each luminosity section
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 * 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 105 of file SiStripDcsInfo.cc.

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

107 {
108  LogDebug( "SiStripDcsInfo") << "SiStripDcsInfo::endLuminosityBlock";
109 
110  if (nFEDConnected_ == 0) return;
111  auto& dqm_store = *edm::Service<DQMStore>{};
112  readStatus(eSetup);
113  fillStatus(dqm_store);
114 }
#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 117 of file SiStripDcsInfo.cc.

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

118 {
119  LogDebug ("SiStripDcsInfo") <<"SiStripDcsInfo::EndRun";
120 
121  if (nFEDConnected_ == 0) return;
122 
123  for (auto& subDetME : SubDetMEsMap) {
124  subDetME.second.FaultyDetectors.clear();
125  }
126  readStatus(eSetup);
127  auto& dqm_store = *edm::Service<DQMStore>{};
128  addBadModules(dqm_store);
129 }
#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 279 of file SiStripDcsInfo.cc.

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

Referenced by beginRun().

280 {
281  if (!bookedStatus_) bookStatus(dqm_store);
282  assert(bookedStatus_);
283 
284  for (auto& pr : SubDetMEsMap) {
285  pr.second.DcsFractionME->Reset();
286  pr.second.DcsFractionME->Fill(-1.0);
287  }
288  DcsFraction_->Reset();
289  DcsFraction_->Fill(-1.0);
290 }
void bookStatus(DQMStore &dqm_store)
void Fill(long long x)
std::map< std::string, SubDetMEs > SubDetMEsMap
void Reset()
reset ME (ie. contents, errors, etc)
MonitorElement * DcsFraction_
void SiStripDcsInfo::fillStatus ( DQMStore dqm_store)
private

Definition at line 235 of file SiStripDcsInfo.cc.

References bookedStatus_, bookStatus(), DcsFraction_, MonitorElement::Fill(), dedxEstimators_cff::fraction, IsLumiGoodDcs_, MinAcceptableDcsDetFrac_, dataset::name, nFEDConnected_, nGoodDcsLumi_, MonitorElement::Reset(), and SubDetMEsMap.

Referenced by endLuminosityBlock().

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

Definition at line 163 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().

163  {
164 
165  //Retrieve tracker topology from geometry
166  edm::ESHandle<TrackerTopology> tTopoHandle;
167  eSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
168  const TrackerTopology* const tTopo = tTopoHandle.product();
169 
170  unsigned long long cacheID = eSetup.get<SiStripFedCablingRcd>().cacheIdentifier();
171  if (m_cacheIDCabling_ != cacheID) {
172  m_cacheIDCabling_ = cacheID;
173  LogDebug("SiStripDcsInfo") << "SiStripDcsInfo::readCabling : "
174  << " Change in Cache";
175  eSetup.get<SiStripDetCablingRcd>().get(detCabling_);
176 
177  std::vector<uint32_t> SelectedDetIds;
178  detCabling_->addActiveDetectorsRawIds(SelectedDetIds);
179  LogDebug("SiStripDcsInfo") << " SiStripDcsInfo::readCabling : "
180  << " Total Detectors " << SelectedDetIds.size();
181 
182  // initialise total # of detectors first
183  for (std::map<std::string, SubDetMEs>::iterator it = SubDetMEsMap.begin(); it != SubDetMEsMap.end(); it++) {
184  it->second.TotalDetectors = 0;
185  }
186 
187  for (std::vector<uint32_t>::const_iterator idetid = SelectedDetIds.begin();
188  idetid != SelectedDetIds.end();
189  ++idetid) {
190  uint32_t detId = *idetid;
191  if (detId == 0 || detId == 0xFFFFFFFF) continue;
193  SiStripUtility::getSubDetectorTag(detId, subdet_tag, tTopo);
194 
195  std::map<std::string, SubDetMEs>::iterator iPos = SubDetMEsMap.find(subdet_tag);
196  if (iPos != SubDetMEsMap.end()) {
197  iPos->second.TotalDetectors++;
198  }
199  }
200  }
201 }
#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 205 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().

205  {
206 
207  //Retrieve tracker topology from geometry
208  edm::ESHandle<TrackerTopology> tTopoHandle;
209  eSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
210  const TrackerTopology* const tTopo = tTopoHandle.product();
211 
212  eSetup.get<SiStripDetVOffRcd>().get(siStripDetVOff_);
213  std::vector <uint32_t> FaultyDetIds;
214  siStripDetVOff_->getDetIds(FaultyDetIds);
215  LogDebug("SiStripDcsInfo") << " SiStripDcsInfo::readStatus : "
216  << " Faulty Detectors " << FaultyDetIds.size();
217  // Read and fille bad modules
218  for (std::vector<uint32_t>::const_iterator ihvoff=FaultyDetIds.begin(); ihvoff!=FaultyDetIds.end();++ihvoff){
219  uint32_t detId_hvoff = (*ihvoff);
220  if (!detCabling_->IsConnected(detId_hvoff)) continue;
222  SiStripUtility::getSubDetectorTag(detId_hvoff, subdet_tag, tTopo);
223 
224  std::map<std::string, SubDetMEs>::iterator iPos = SubDetMEsMap.find(subdet_tag);
225  if (iPos != SubDetMEsMap.end()) {
226  std::vector<uint32_t>::iterator ibad = std::find(iPos->second.FaultyDetectors.begin(), iPos->second.FaultyDetectors.end(), detId_hvoff);
227  if (ibad == iPos->second.FaultyDetectors.end()) iPos->second.FaultyDetectors.push_back( detId_hvoff);
228  }
229  }
230 }
#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:20
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 75 of file SiStripDcsInfo.h.

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

MonitorElement* SiStripDcsInfo::DcsFraction_ { 0 }
private

Definition at line 62 of file SiStripDcsInfo.h.

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

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

Definition at line 87 of file SiStripDcsInfo.h.

Referenced by readCabling(), and readStatus().

bool SiStripDcsInfo::IsLumiGoodDcs_ {false}
private

Definition at line 82 of file SiStripDcsInfo.h.

Referenced by fillStatus().

unsigned long long SiStripDcsInfo::m_cacheIDCabling_ {}
private

Definition at line 73 of file SiStripDcsInfo.h.

Referenced by readCabling().

unsigned long long SiStripDcsInfo::m_cacheIDDcs_ {}
private

Definition at line 74 of file SiStripDcsInfo.h.

float SiStripDcsInfo::MaxAcceptableBadDcsLumi_ {2}
staticprivate

Definition at line 85 of file SiStripDcsInfo.h.

Referenced by addBadModules().

float SiStripDcsInfo::MinAcceptableDcsDetFrac_ {0.90}
staticprivate

Definition at line 84 of file SiStripDcsInfo.h.

Referenced by fillStatus().

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

Definition at line 83 of file SiStripDcsInfo.h.

Referenced by fillStatus().

int SiStripDcsInfo::nLumiAnalysed_ {}
private

Definition at line 80 of file SiStripDcsInfo.h.

Referenced by beginLuminosityBlock().

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

Definition at line 77 of file SiStripDcsInfo.h.

Referenced by readStatus().

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