test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
SiStripDcsInfo Class Reference

#include <DQM/SiStripMonitorCluster/interface/SiStripDcsInfo.h>

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

Classes

struct  SubDetMEs
 

Public Member Functions

 SiStripDcsInfo (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~SiStripDcsInfo ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

void addBadModules ()
 
void analyze (edm::Event const &, edm::EventSetup const &)
 Analyze. More...
 
void beginJob ()
 BeginJob. More...
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &eSetup)
 Begin Luminosity Block. More...
 
void beginRun (edm::Run const &run, edm::EventSetup const &eSetup)
 Begin Run. More...
 
void bookStatus ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &iSetup)
 End Of Luminosity. More...
 
void endRun (edm::Run const &run, edm::EventSetup const &eSetup)
 EndRun. More...
 
void fillDummyStatus ()
 
void fillStatus ()
 
void readCabling (edm::EventSetup const &)
 
void readStatus (edm::EventSetup const &)
 

Private Attributes

bool bookedStatus_
 
MonitorElementDcsFraction_
 
edm::ESHandle< SiStripDetCablingdetCabling_
 
DQMStoredqmStore_
 
unsigned long long m_cacheIDCabling_
 
unsigned long long m_cacheIDDcs_
 
int nFEDConnected_
 
int nLumiAnalysed_
 
edm::ESHandle< SiStripDetVOffsiStripDetVOff_
 
std::map< std::string, SubDetMEsSubDetMEsMap
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- 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 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

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

Definition at line 41 of file SiStripDcsInfo.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 32 of file SiStripDcsInfo.cc.

References LogDebug.

32  :
35  m_cacheIDDcs_(0),
36  bookedStatus_(false),
38 {
39  // Create MessageSender
40  LogDebug( "SiStripDcsInfo") << "SiStripDcsInfo::Deleting SiStripDcsInfo ";
41 }
#define LogDebug(id)
DQMStore * dqmStore_
unsigned long long m_cacheIDDcs_
unsigned long long m_cacheIDCabling_
SiStripDcsInfo::~SiStripDcsInfo ( )
virtual

Destructor.

Definition at line 45 of file SiStripDcsInfo.cc.

References LogDebug.

45  {
46  LogDebug("SiStripDcsInfo") << "SiStripDcsInfo::Deleting SiStripDcsInfo ";
47 
48 }
#define LogDebug(id)

Member Function Documentation

void SiStripDcsInfo::addBadModules ( )
private

Definition at line 317 of file SiStripDcsInfo.cc.

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

Referenced by endRun().

317  {
318 
319  dqmStore_->cd();
320  std::string mdir = "MechanicalView";
321  if (!SiStripUtility::goToDir(dqmStore_, mdir)) {
322  dqmStore_->setCurrentFolder("SiStrip/"+mdir);
323  }
324  std::string mechanical_dir = dqmStore_->pwd();
325  std::string tag = "DCSError";
326 
327  for (std::map<std::string, SubDetMEs>::iterator it = SubDetMEsMap.begin(); it != SubDetMEsMap.end(); it++) {
328  std::vector<uint32_t> badModules = it->second.FaultyDetectors;
329  for (std::vector<uint32_t>::iterator ibad = badModules.begin();
330  ibad != badModules.end(); ibad++) {
331 
332  std::string bad_module_folder = mechanical_dir + "/" +
333  it->second.folder_name + "/"
334  "BadModuleList";
335  dqmStore_->setCurrentFolder(bad_module_folder);
336 
337  std::ostringstream detid_str;
338  detid_str << (*ibad);
339  std::string full_path = bad_module_folder + "/" + detid_str.str();
340  MonitorElement* me = dqmStore_->get(full_path);
341  uint16_t flag = 0;
342  if (me) {
343  flag = me->getIntValue();
344  me->Reset();
345  } else me = dqmStore_->bookInt(detid_str.str());
347  me->Fill(flag);
348  }
349  }
350  dqmStore_->cd();
351 }
static void setBadModuleFlag(std::string &hname, uint16_t &flg)
DQMStore * dqmStore_
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:644
void Fill(long long x)
std::map< std::string, SubDetMEs > SubDetMEsMap
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1708
int64_t getIntValue(void) const
MonitorElement * bookInt(const char *name)
Book int.
Definition: DQMStore.cc:861
void Reset(void)
reset ME (ie. contents, errors, etc)
static bool goToDir(DQMStore *dqm_store, std::string name)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:667
const std::string & pwd(void) const
Definition: DQMStore.cc:639
void SiStripDcsInfo::analyze ( edm::Event const &  event,
edm::EventSetup const &  eSetup 
)
privatevirtual

Analyze.

Implements edm::EDAnalyzer.

Definition at line 131 of file SiStripDcsInfo.cc.

131  {
132 }
void SiStripDcsInfo::beginJob ( void  )
privatevirtual

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 52 of file SiStripDcsInfo.cc.

References SiStripDcsInfo::SubDetMEs::DcsFractionME, SiStripDcsInfo::SubDetMEs::FaultyDetectors, SiStripDcsInfo::SubDetMEs::folder_name, AlCaHLTBitMon_QueryRunRegistry::string, SubDetMEsMap, GlobalPosition_Frontier_DevDB_cff::tag, and SiStripDcsInfo::SubDetMEs::TotalDetectors.

52  {
54  SubDetMEs local_mes;
55 
56  tag = "TIB";
57  local_mes.folder_name = "TIB";
58  local_mes.DcsFractionME = 0;
59  local_mes.TotalDetectors = 0;
60  local_mes.FaultyDetectors.clear();
61  SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
62 
63  tag = "TOB";
64  local_mes.folder_name = "TOB";
65  local_mes.DcsFractionME = 0;
66  local_mes.TotalDetectors = 0;
67  local_mes.FaultyDetectors.clear();
68  SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
69 
70  tag = "TECB";
71  local_mes.folder_name = "TEC/MINUS";
72  local_mes.DcsFractionME = 0;
73  local_mes.TotalDetectors = 0;
74  local_mes.FaultyDetectors.clear();
75  SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
76 
77  tag = "TECF";
78  local_mes.folder_name = "TEC/PLUS";
79  local_mes.DcsFractionME = 0;
80  local_mes.TotalDetectors = 0;
81  local_mes.FaultyDetectors.clear();
82  SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
83 
84  tag = "TIDB";
85  local_mes.folder_name = "TID/MINUS";
86  local_mes.DcsFractionME = 0;
87  local_mes.TotalDetectors = 0;
88  local_mes.FaultyDetectors.clear();
89  SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
90 
91  tag = "TIDF";
92  local_mes.folder_name = "TID/PLUS";
93  local_mes.DcsFractionME = 0;
94  local_mes.TotalDetectors = 0;
95  local_mes.FaultyDetectors.clear();
96  SubDetMEsMap.insert(std::pair<std::string, SubDetMEs >(tag, local_mes));
97 }
std::map< std::string, SubDetMEs > SubDetMEsMap
void SiStripDcsInfo::beginLuminosityBlock ( edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  eSetup 
)
privatevirtual

Begin Luminosity Block.

Reimplemented from edm::EDAnalyzer.

Definition at line 136 of file SiStripDcsInfo.cc.

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

136  {
137  LogDebug( "SiStripDcsInfo") << "SiStripDcsInfo::beginLuminosityBlock";
138 
139  if (nFEDConnected_ == 0) return;
140 
141  // initialise BadModule list
142  for (std::map<std::string, SubDetMEs>::iterator it = SubDetMEsMap.begin(); it != SubDetMEsMap.end(); it++) {
143  it->second.FaultyDetectors.clear();
144  }
145  readStatus(eSetup);
146  nLumiAnalysed_++;
147 }
#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 
)
privatevirtual

Begin Run.

Reimplemented from edm::EDAnalyzer.

Definition at line 101 of file SiStripDcsInfo.cc.

References bookStatus(), fillDummyStatus(), edm::EventSetup::find(), edm::eventsetup::heterocontainer::HCTypeTag::findType(), edm::EventSetup::get(), edm::ESHandleBase::isValid(), LogDebug, FEDNumbering::MAXSiStripFEDID, FEDNumbering::MINSiStripFEDID, nFEDConnected_, and readCabling().

101  {
102  LogDebug ("SiStripDcsInfo") <<"SiStripDcsInfo:: Begining of Run";
103  nFEDConnected_ = 0;
104  const int siStripFedIdMin = FEDNumbering::MINSiStripFEDID;
105  const int siStripFedIdMax = FEDNumbering::MAXSiStripFEDID;
106 
107  // Count Tracker FEDs from RunInfo
109  if( eSetup.find( recordKey ) != 0) {
110 
111  edm::ESHandle<RunInfo> sumFED;
112  eSetup.get<RunInfoRcd>().get(sumFED);
113 
114  if ( sumFED.isValid() ) {
115  std::vector<int> FedsInIds= sumFED->m_fed_in;
116  for(unsigned int it = 0; it < FedsInIds.size(); ++it) {
117  int fedID = FedsInIds[it];
118  if(fedID>=siStripFedIdMin && fedID<=siStripFedIdMax) ++nFEDConnected_;
119  }
120  LogDebug ("SiStripDcsInfo") << " SiStripDcsInfo :: Connected FEDs " << nFEDConnected_;
121  }
122  }
123 
124  bookStatus();
125  fillDummyStatus();
126  if (nFEDConnected_ > 0) readCabling(eSetup);
127 }
#define LogDebug(id)
void readCabling(edm::EventSetup const &)
bool isValid() const
Definition: ESHandle.h:37
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag
Definition: HCTypeTag.cc:125
void SiStripDcsInfo::bookStatus ( )
private

Definition at line 177 of file SiStripDcsInfo.cc.

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

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

177  {
178  if (!bookedStatus_) {
179  std::string strip_dir = "";
180  SiStripUtility::getTopFolderPath(dqmStore_, "SiStrip", strip_dir);
181  if (strip_dir.size() > 0) dqmStore_->setCurrentFolder(strip_dir+"/EventInfo");
182  else dqmStore_->setCurrentFolder("SiStrip/EventInfo");
183 
184  DcsFraction_= dqmStore_->bookFloat("DCSSummary");
185 
187 
188  dqmStore_->cd();
189  if (strip_dir.size() > 0) dqmStore_->setCurrentFolder(strip_dir+"/EventInfo/DCSContents");
190  else dqmStore_->setCurrentFolder("SiStrip/EventInfo/DCSContents");
191  for (std::map<std::string,SubDetMEs>::iterator it = SubDetMEsMap.begin(); it != SubDetMEsMap.end(); it++) {
192  SubDetMEs local_mes;
193  std::string me_name;
194  me_name = "SiStrip_" + it->first;
195  it->second.DcsFractionME = dqmStore_->bookFloat(me_name);
196  it->second.DcsFractionME->setLumiFlag();
197  }
198  bookedStatus_ = true;
199  dqmStore_->cd();
200  }
201 }
DQMStore * dqmStore_
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:644
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:891
std::map< std::string, SubDetMEs > SubDetMEsMap
MonitorElement * DcsFraction_
void setLumiFlag(void)
this ME is meant to be stored for each luminosity section
static void getTopFolderPath(DQMStore *dqm_store, std::string top_dir, std::string &path)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:667
void SiStripDcsInfo::endLuminosityBlock ( edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  iSetup 
)
privatevirtual

End Of Luminosity.

Reimplemented from edm::EDAnalyzer.

Definition at line 152 of file SiStripDcsInfo.cc.

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

152  {
153  LogDebug( "SiStripDcsInfo") << "SiStripDcsInfo::endLuminosityBlock";
154 
155  if (nFEDConnected_ == 0) return;
156  readStatus(eSetup);
157  fillStatus();
158 }
#define LogDebug(id)
void readStatus(edm::EventSetup const &)
void SiStripDcsInfo::endRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
privatevirtual

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 162 of file SiStripDcsInfo.cc.

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

162  {
163  LogDebug ("SiStripDcsInfo") <<"SiStripDcsInfo::EndRun";
164 
165  if (nFEDConnected_ == 0) return;
166 
167  for (std::map<std::string, SubDetMEs>::iterator it = SubDetMEsMap.begin(); it != SubDetMEsMap.end(); it++) {
168  it->second.FaultyDetectors.clear();
169  }
170  readStatus(eSetup);
171  fillStatus();
172  addBadModules();
173 }
#define LogDebug(id)
std::map< std::string, SubDetMEs > SubDetMEsMap
void readStatus(edm::EventSetup const &)
void SiStripDcsInfo::fillDummyStatus ( )
private

Definition at line 303 of file SiStripDcsInfo.cc.

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

Referenced by beginRun().

303  {
304  if (!bookedStatus_) bookStatus();
305  if (bookedStatus_) {
306  for (std::map<std::string, SubDetMEs>::iterator it = SubDetMEsMap.begin(); it != SubDetMEsMap.end(); it++) {
307  it->second.DcsFractionME->Reset();
308  it->second.DcsFractionME->Fill(-1.0);
309  }
310  DcsFraction_->Reset();
311  DcsFraction_->Fill(-1.0);
312  }
313 }
void Fill(long long x)
std::map< std::string, SubDetMEs > SubDetMEsMap
MonitorElement * DcsFraction_
void Reset(void)
reset ME (ie. contents, errors, etc)
void SiStripDcsInfo::fillStatus ( )
private

Definition at line 275 of file SiStripDcsInfo.cc.

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

Referenced by endLuminosityBlock(), and endRun().

275  {
276  if (!bookedStatus_) bookStatus();
277  if (bookedStatus_) {
278  float total_det = 0.0;
279  float faulty_det = 0.0;
280  float fraction;
281  for (std::map<std::string,SubDetMEs>::iterator it = SubDetMEsMap.begin(); it != SubDetMEsMap.end(); it++) {
282  int total_subdet = it->second.TotalDetectors;
283  int faulty_subdet = it->second.FaultyDetectors.size();
284  if (nFEDConnected_ == 0 || total_subdet == 0) fraction = -1;
285  else fraction = 1.0 - faulty_subdet*1.0/total_subdet;
286  it->second.DcsFractionME->Reset();
287  it->second.DcsFractionME->Fill(fraction);
288  edm::LogInfo( "SiStripDcsInfo") << " SiStripDcsInfo::fillStatus : Sub Detector "
289  << it->first << " Total Number " << total_subdet
290  << " Faulty ones " << faulty_subdet;
291  total_det += total_subdet;
292  faulty_det += faulty_subdet;
293  }
294  if (nFEDConnected_ == 0 || total_det == 0) fraction = -1.0;
295  else fraction = 1 - faulty_det/total_det;
296  DcsFraction_->Reset();
297  DcsFraction_->Fill(fraction);
298  }
299 }
void Fill(long long x)
std::map< std::string, SubDetMEs > SubDetMEsMap
MonitorElement * DcsFraction_
void Reset(void)
reset ME (ie. contents, errors, etc)
void SiStripDcsInfo::readCabling ( edm::EventSetup const &  eSetup)
private

Definition at line 205 of file SiStripDcsInfo.cc.

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

Referenced by beginRun().

205  {
206 
207  //Retrieve tracker topology from geometry
208  edm::ESHandle<TrackerTopology> tTopoHandle;
209  eSetup.get<IdealGeometryRecord>().get(tTopoHandle);
210  const TrackerTopology* const tTopo = tTopoHandle.product();
211 
212  unsigned long long cacheID = eSetup.get<SiStripFedCablingRcd>().cacheIdentifier();
213  if (m_cacheIDCabling_ != cacheID) {
214  m_cacheIDCabling_ = cacheID;
215  LogDebug("SiStripDcsInfo") <<"SiStripDcsInfo::readCabling : "
216  << " Change in Cache";
217  eSetup.get<SiStripDetCablingRcd>().get(detCabling_);
218 
219  std::vector<uint32_t> SelectedDetIds;
220  detCabling_->addActiveDetectorsRawIds(SelectedDetIds);
221  LogDebug( "SiStripDcsInfo") << " SiStripDcsInfo::readCabling : "
222  << " Total Detectors " << SelectedDetIds.size();
223 
224 
225  // initialise total # of detectors first
226  for (std::map<std::string, SubDetMEs>::iterator it = SubDetMEsMap.begin(); it != SubDetMEsMap.end(); it++) {
227  it->second.TotalDetectors = 0;
228  }
229 
230  for (std::vector<uint32_t>::const_iterator idetid=SelectedDetIds.begin(); idetid != SelectedDetIds.end(); ++idetid){
231  uint32_t detId = *idetid;
232  if (detId == 0 || detId == 0xFFFFFFFF) continue;
234  SiStripUtility::getSubDetectorTag(detId,subdet_tag,tTopo);
235 
236  std::map<std::string, SubDetMEs>::iterator iPos = SubDetMEsMap.find(subdet_tag);
237  if (iPos != SubDetMEsMap.end()){
238  iPos->second.TotalDetectors++;
239  }
240  }
241  }
242 }
#define LogDebug(id)
std::map< std::string, SubDetMEs > SubDetMEsMap
const std::string subdet_tag("SubDet")
T const * product() const
Definition: ESHandle.h:62
static void getSubDetectorTag(uint32_t det_id, std::string &subdet_tag, const TrackerTopology *tTopo)
edm::ESHandle< SiStripDetCabling > detCabling_
unsigned long long m_cacheIDCabling_
void SiStripDcsInfo::readStatus ( edm::EventSetup const &  eSetup)
private

Definition at line 246 of file SiStripDcsInfo.cc.

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

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

246  {
247 
248  //Retrieve tracker topology from geometry
249  edm::ESHandle<TrackerTopology> tTopoHandle;
250  eSetup.get<IdealGeometryRecord>().get(tTopoHandle);
251  const TrackerTopology* const tTopo = tTopoHandle.product();
252 
253  eSetup.get<SiStripDetVOffRcd>().get(siStripDetVOff_);
254  std::vector <uint32_t> FaultyDetIds;
255  siStripDetVOff_->getDetIds(FaultyDetIds);
256  LogDebug( "SiStripDcsInfo") << " SiStripDcsInfo::readStatus : "
257  << " Faulty Detectors " << FaultyDetIds.size();
258  // Read and fille bad modules
259  for (std::vector<uint32_t>::const_iterator ihvoff=FaultyDetIds.begin(); ihvoff!=FaultyDetIds.end();++ihvoff){
260  uint32_t detId_hvoff = (*ihvoff);
261  if (!detCabling_->IsConnected(detId_hvoff)) continue;
263  SiStripUtility::getSubDetectorTag(detId_hvoff,subdet_tag,tTopo);
264 
265  std::map<std::string, SubDetMEs>::iterator iPos = SubDetMEsMap.find(subdet_tag);
266  if (iPos != SubDetMEsMap.end()){
267  std::vector<uint32_t>::iterator ibad = std::find(iPos->second.FaultyDetectors.begin(), iPos->second.FaultyDetectors.end(), detId_hvoff);
268  if (ibad == iPos->second.FaultyDetectors.end()) iPos->second.FaultyDetectors.push_back( detId_hvoff);
269  }
270  }
271 }
#define LogDebug(id)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
std::map< std::string, SubDetMEs > SubDetMEsMap
const std::string subdet_tag("SubDet")
edm::ESHandle< SiStripDetVOff > siStripDetVOff_
T const * product() const
Definition: ESHandle.h:62
static void getSubDetectorTag(uint32_t det_id, std::string &subdet_tag, const TrackerTopology *tTopo)
edm::ESHandle< SiStripDetCabling > detCabling_

Member Data Documentation

bool SiStripDcsInfo::bookedStatus_
private

Definition at line 94 of file SiStripDcsInfo.h.

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

MonitorElement* SiStripDcsInfo::DcsFraction_
private

Definition at line 82 of file SiStripDcsInfo.h.

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

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

Definition at line 101 of file SiStripDcsInfo.h.

Referenced by readCabling(), and readStatus().

DQMStore* SiStripDcsInfo::dqmStore_
private

Definition at line 81 of file SiStripDcsInfo.h.

Referenced by addBadModules(), and bookStatus().

unsigned long long SiStripDcsInfo::m_cacheIDCabling_
private

Definition at line 92 of file SiStripDcsInfo.h.

Referenced by readCabling().

unsigned long long SiStripDcsInfo::m_cacheIDDcs_
private

Definition at line 93 of file SiStripDcsInfo.h.

int SiStripDcsInfo::nFEDConnected_
private
int SiStripDcsInfo::nLumiAnalysed_
private

Definition at line 99 of file SiStripDcsInfo.h.

Referenced by beginLuminosityBlock().

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

Definition at line 96 of file SiStripDcsInfo.h.

Referenced by readStatus().

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