CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
SiStripPopConFEDErrorsHandlerFromDQM Class Reference
Inheritance diagram for SiStripPopConFEDErrorsHandlerFromDQM:
SiStripDQMPopConSourceHandler< SiStripBadStrip > popcon::PopConSourceHandler< SiStripBadStrip >

Public Member Functions

void dqmEndJob (DQMStore::IBooker &booker, DQMStore::IGetter &getter) override
 
SiStripBadStripgetObj () const override
 
void initES (const edm::EventSetup &iSetup) override
 
 SiStripPopConFEDErrorsHandlerFromDQM (const edm::ParameterSet &iConfig)
 
 ~SiStripPopConFEDErrorsHandlerFromDQM () override
 
- Public Member Functions inherited from SiStripDQMPopConSourceHandler< SiStripBadStrip >
virtual bool checkForCompatibility (const std::string otherMetaData) const
 
virtual std::string getMetaDataString () const
 
void getNewObjects () override
 
std::string id () const override
 
 SiStripDQMPopConSourceHandler (const edm::ParameterSet &pset)
 
 ~SiStripDQMPopConSourceHandler () override
 
- Public Member Functions inherited from popcon::PopConSourceHandler< SiStripBadStrip >
void convertFromOld ()
 
SummarydummySummary (typename OldContainer::value_type const &) const
 
void initialize (const cond::persistency::Session &dbSession, cond::TagInfo_t const &tagInfo, cond::LogDBEntry_t const &logDBEntry)
 
Ref lastPayload () const
 
cond::LogDBEntry_t const & logDBEntry () const
 
std::pair< Container const *, std::string const > operator() (const cond::persistency::Session &session, cond::TagInfo_t const &tagInfo, cond::LogDBEntry_t const &logDBEntry) const
 
 PopConSourceHandler ()
 
Container const & returnData ()
 
void sort ()
 
cond::TagInfo_t const & tagInfo () const
 
std::string const & userTextLog () const
 
virtual ~PopConSourceHandler ()
 

Private Member Functions

void addBadAPV (const FedChannelConnection &aConnection, const unsigned short aAPVNumber, const unsigned short aFlag, unsigned int &aCounter)
 
void addBadStrips (const FedChannelConnection &aConnection, const unsigned int aDetId, const unsigned short aApvNum, const unsigned short aFlag, unsigned int &aCounter)
 
void addErrors ()
 Writes the errors to the db. More...
 
void readHistogram (MonitorElement *aMe, unsigned int &aCounter, const float aNorm, const unsigned int aFedId)
 

Private Attributes

const SiStripFedCablingcabling_
 
uint32_t cablingCacheId_
 
unsigned int debug_
 
std::map< uint32_t, std::vector< unsigned int > > detIdErrors_
 
edm::FileInPath fp_
 
SiStripBadStrip obj_
 
double threshold_
 

Additional Inherited Members

- Public Types inherited from popcon::PopConSourceHandler< SiStripBadStrip >
typedef std::vector< Triplet > Container
 
typedef std::vector< std::pair< SiStripBadStrip *, cond::Time_t > > OldContainer
 
typedef PopConSourceHandler< SiStripBadStripself
 
typedef cond::Summary Summary
 
typedef cond::Time_t Time_t
 
typedef SiStripBadStrip value_type
 
- Protected Member Functions inherited from SiStripDQMPopConSourceHandler< SiStripBadStrip >
uint32_t getRunNumber () const
 
- Protected Member Functions inherited from popcon::PopConSourceHandler< SiStripBadStrip >
int add (value_type *payload, Summary *summary, Time_t time)
 
cond::persistency::SessiondbSession () const
 
- Protected Attributes inherited from popcon::PopConSourceHandler< SiStripBadStrip >
OldContainer m_to_transfer
 
std::string m_userTextLog
 

Detailed Description

Author
A.-M. Magnan, M. De Mattia
P. David update to PopConSourceHandler and DQMEDHarvester to read modules flagged by the DQM due to FED errors as bad and write in the database with the proper error flag.

Definition at line 12 of file SiStripPopConFEDErrorsDQM.cc.

Constructor & Destructor Documentation

SiStripPopConFEDErrorsHandlerFromDQM::SiStripPopConFEDErrorsHandlerFromDQM ( const edm::ParameterSet iConfig)
explicit

Definition at line 60 of file SiStripPopConFEDErrorsDQM.cc.

62  , fp_(iConfig.getUntrackedParameter<edm::FileInPath>("file",edm::FileInPath("CalibTracker/SiStripCommon/data/SiStripDetInfo.dat")))
63  , threshold_(iConfig.getUntrackedParameter<double>("Threshold", 0))
64  , debug_(iConfig.getUntrackedParameter<unsigned int>("Debug",0))
65  , cablingCacheId_(0)
66 {
67  edm::LogInfo("SiStripFEDErrorsDQM") << "[SiStripFEDErrorsDQM::SiStripFEDErrorsDQM()]";
68 }
T getUntrackedParameter(std::string const &, T const &) const
SiStripPopConFEDErrorsHandlerFromDQM::~SiStripPopConFEDErrorsHandlerFromDQM ( )
override

Definition at line 70 of file SiStripPopConFEDErrorsDQM.cc.

70  {
71  edm::LogInfo("SiStripFEDErrorsDQM") << "[SiStripFEDErrorsDQM::~SiStripFEDErrorsDQM]";
72 }

Member Function Documentation

void SiStripPopConFEDErrorsHandlerFromDQM::addBadAPV ( const FedChannelConnection aConnection,
const unsigned short  aAPVNumber,
const unsigned short  aFlag,
unsigned int &  aCounter 
)
private

Definition at line 334 of file SiStripPopConFEDErrorsDQM.cc.

References addBadStrips(), FedChannelConnection::apvPairNumber(), FedChannelConnection::detId(), sistrip::invalid32_, and FedChannelConnection::isConnected().

Referenced by readHistogram().

338 {
339  if (!aConnection.isConnected()) {
340  edm::LogWarning("SiStripFEDErrorsDQM") << "[SiStripFEDErrorsDQM::addBadAPV] Warning, incompatible cabling ! Channel is not connected, but entry found in histo ... " << std::endl;
341  return;
342  }
343  unsigned int lDetid = aConnection.detId();
344  if (!lDetid || lDetid == sistrip::invalid32_) {
345  edm::LogWarning("SiStripFEDErrorsDQM") << "[SiStripFEDErrorsDQM::addBadAPV] Warning, DetId is invalid: " << lDetid << std::endl;
346  return;
347  }
348  //unsigned short nChInModule = aConnection.nApvPairs();
349  unsigned short lApvNum = 0;
350  if (aAPVNumber < 2) {
351  lApvNum = 2*aConnection.apvPairNumber();
352  addBadStrips(aConnection,lDetid,lApvNum,aFlag,aCounter);
353  }
354  if (aAPVNumber == 0 || aAPVNumber == 2) {
355  lApvNum = 2*aConnection.apvPairNumber()+1;
356  addBadStrips(aConnection,lDetid,lApvNum,aFlag,aCounter);
357  }
358 }
void addBadStrips(const FedChannelConnection &aConnection, const unsigned int aDetId, const unsigned short aApvNum, const unsigned short aFlag, unsigned int &aCounter)
static const uint32_t invalid32_
Definition: Constants.h:15
uint16_t apvPairNumber() const
const uint32_t & detId() const
void SiStripPopConFEDErrorsHandlerFromDQM::addBadStrips ( const FedChannelConnection aConnection,
const unsigned int  aDetId,
const unsigned short  aApvNum,
const unsigned short  aFlag,
unsigned int &  aCounter 
)
private

Definition at line 361 of file SiStripPopConFEDErrorsDQM.cc.

References detIdErrors_, SiStripBadStrip::encode(), FedChannelConnection::fedCh(), FedChannelConnection::fedId(), LogTrace, and obj_.

Referenced by addBadAPV().

366 {
367  // std::vector<unsigned int> lStripVector;
368  const unsigned short lFirstBadStrip = aApvNum*128;
369  const unsigned short lConsecutiveBadStrips = 128;
370 
371  unsigned int lBadStripRange = obj_.encode(lFirstBadStrip, lConsecutiveBadStrips, aFlag);
372 
373  LogTrace("SiStripFEDErrorsDQM") << "[SiStripFEDErrorsDQM::addBadStrips] ---- Adding : detid " << aDetId
374  << " (FED " << aConnection.fedId()
375  << ", Ch " << aConnection.fedCh () << ")"
376  << ", APV " << aApvNum
377  << ", flag " << aFlag
378  << std::endl;
379 
380  detIdErrors_[aDetId].push_back(lBadStripRange);
381 
382  // lStripVector.push_back(lBadStripRange);
383  // SiStripBadStrip::Range lRange(lStripVector.begin(),lStripVector.end());
384  // if ( !obj.put(aDetId,lRange) ) {
385  // edm::LogError("SiStripFEDErrorsDQM")<<"[SiStripFEDErrorsDQM::addBadStrips] detid already exists." << std::endl;
386  // }
387 
388  aCounter++;
389 }
const uint16_t & fedCh() const
const uint16_t & fedId() const
std::map< uint32_t, std::vector< unsigned int > > detIdErrors_
#define LogTrace(id)
unsigned int encode(const unsigned short &first, const unsigned short &NconsecutiveBadStrips, const unsigned short &flag=0)
void SiStripPopConFEDErrorsHandlerFromDQM::addErrors ( )
private

Writes the errors to the db.

Definition at line 399 of file SiStripPopConFEDErrorsDQM.cc.

References SiStripBadStrip::decode(), detIdErrors_, SiStripBadStrip::encode(), SiStripBadStrip::data::firstStrip, SiStripBadStrip::data::flag, obj_, and SiStripBadStrip::put().

Referenced by dqmEndJob().

400 {
401  for ( const auto& it : detIdErrors_ ) {
402  const std::vector<uint32_t>& lList = it.second;
403 
404  //map of first strip number and flag
405  //purpose is to encode all existing flags into a unique one...
406  std::map<unsigned short,unsigned short> lAPVMap;
407  for ( auto cCont : lList ) {
408  SiStripBadStrip::data lData = obj_.decode(cCont);
409  unsigned short lFlag = 0;
410  setFlagBit(lFlag, lData.flag);
411 
412  //std::cout << " -- Detid " << it.first << ", strip " << lData.firstStrip << ", flag " << lData.flag << std::endl;
413 
414  auto lInsert = lAPVMap.emplace(lData.firstStrip, lFlag);
415  if ( ! lInsert.second ) {
416  //std::cout << " ---- Adding bit : " << lData.flag << " to " << lInsert.first->second << ": ";
417  setFlagBit(lInsert.first->second, lData.flag);
418  //std::cout << lInsert.first->second << std::endl;
419  }
420  }
421 
422  //encode the new flag
423  std::vector<unsigned int> lStripVector;
424  const unsigned short lConsecutiveBadStrips=128;
425  for ( const auto& lIter : lAPVMap ) {
426  lStripVector.push_back(obj_.encode(lIter.first, lConsecutiveBadStrips, lIter.second));
427  }
428 
429  SiStripBadStrip::Range lRange(lStripVector.begin(), lStripVector.end());
430  if ( ! obj_.put(it.first,lRange) ) {
431  edm::LogError("SiStripFEDErrorsDQM")<<"[SiStripFEDErrorsDQM::addBadStrips] detid already exists." << std::endl;
432  }
433  }
434 }
std::map< uint32_t, std::vector< unsigned int > > detIdErrors_
unsigned short firstStrip
std::pair< ContainerIterator, ContainerIterator > Range
bool put(const uint32_t &detID, const InputVector &vect)
unsigned int encode(const unsigned short &first, const unsigned short &NconsecutiveBadStrips, const unsigned short &flag=0)
data decode(const unsigned int &value) const
void SiStripPopConFEDErrorsHandlerFromDQM::dqmEndJob ( DQMStore::IBooker booker,
DQMStore::IGetter getter 
)
overridevirtual

Reimplemented from SiStripDQMPopConSourceHandler< SiStripBadStrip >.

Definition at line 85 of file SiStripPopConFEDErrorsDQM.cc.

References addErrors(), cabling_, DQMStore::IGetter::cd(), debug_, FedChannelConnection::detId(), DQMStore::IGetter::dirExists(), sistrip::FED_ID_MAX, sistrip::FED_ID_MIN, SiStripFedCabling::fedConnections(), SiStripFedCabling::fedIds(), fp_, edm::FileInPath::fullPath(), DQMStore::IGetter::getContents(), SiStripDQMPopConSourceHandler< SiStripBadStrip >::getRunNumber(), sistrip::invalid32_, FedChannelConnection::isConnected(), LogTrace, FEDNumbering::MAXSiStripFEDID, FEDNumbering::MINSiStripFEDID, obj_, readHistogram(), DQMStore::IGetter::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

86 {
88 
90 
91  std::ostringstream lPath;
92  lPath << "Run " << getRunNumber() << "/SiStrip/Run summary/ReadoutView/";
93  const std::string lBaseDir = lPath.str();
94 
95  getter.setCurrentFolder(lBaseDir);
96  LogTrace("SiStripFEDErrorsDQM") << "[SiStripFEDErrorsDQM::readBadAPVs] Now in " << lBaseDir << std::endl;
97 
98  std::vector<std::pair<std::string,unsigned int> > lFedsFolder;
99  //for FED errors, use summary folder and fedId=0
100  //do not put a slash or "goToDir" won't work...
101  lFedsFolder.push_back(std::pair<std::string,unsigned int>("FedMonitoringSummary",0));
102 
103  //for FE/channel/APV errors, they are written in a folder per FED,
104  //if there was at least one error.
105  //So just loop on folders and see which ones exist.
106  for (unsigned int ifed(FEDNumbering::MINSiStripFEDID);
108  ifed++){//loop on FEDs
109 
110  std::ostringstream lFedDir;
111  lFedDir << "FrontEndDriver" << ifed;
112  if ( ! getter.dirExists(lFedDir.str()) ) continue;
113  else {
114  if (debug_) LogTrace("SiStripFEDErrorsDQM") << "[SiStripFEDErrorsDQM::readBadAPVs] - Errors detected for FED " << ifed << std::endl;
115  lFedsFolder.push_back(std::pair<std::string,unsigned int>(lFedDir.str(),ifed));
116  }
117  }
118  getter.cd();
119 
120  unsigned int nAPVsTotal = 0;
121  //retrieve total number of APVs valid and connected from cabling:
122  if (!cabling_) {
123  edm::LogError("SiStripFEDErrorsDQM") << "[SiStripFEDErrorsDQM::readBadAPVs] cabling not filled, return false " << std::endl;
124  return;
125  }
126  auto lFedVec = cabling_->fedIds();
127  for (unsigned int iFed(0);iFed<lFedVec.size();iFed++){
128  if (*(lFedVec.begin() + iFed) < sistrip::FED_ID_MIN || *(lFedVec.begin() + iFed) > sistrip::FED_ID_MAX) {
129  edm::LogError("SiStripFEDErrorsDQM") << "[SiStripFEDErrorsDQM::readBadAPVs] Invalid fedid : " << *(lFedVec.begin() + iFed) << std::endl;
130  continue;
131  }
132  auto lConnVec = cabling_->fedConnections(*(lFedVec.begin() + iFed));
133  for (unsigned int iConn(0); iConn<lConnVec.size();iConn++){
134  const FedChannelConnection & lConnection = *(lConnVec.begin() + iConn);
135  if (!lConnection.isConnected()) continue;
136  unsigned int lDetid = lConnection.detId();
137  if (!lDetid || lDetid == sistrip::invalid32_) continue;
138  //2 APVs per channel....
139  nAPVsTotal += 2;
140  }
141  }
142 
143  edm::LogInfo("SiStripFEDErrorsDQM") << "[SiStripFEDErrorsDQM::readBadAPVs] Total number of APVs found : " << nAPVsTotal << std::endl;
144 
145  unsigned int nAPVsWithErrorTotal = 0;
146  unsigned int nFolders = 0;
147  float lNorm = 0;
148  for ( const auto& iFolder : lFedsFolder ) {
149  const std::string lDirName = lBaseDir + "/" + iFolder.first;
150  const unsigned int lFedId = iFolder.second;
151 
152  if ( ! getter.dirExists(lDirName) ) continue;
153 
154  std::vector<MonitorElement*> lMeVec = getter.getContents(lDirName);
155 
156  if (nFolders == 0) {
157  for ( auto iMe : lMeVec ) { //loop on ME found in directory
158  std::string lMeName = iMe->getName() ;
159  if (lMeName.find("nFEDErrors") != lMeName.npos){
160  lNorm = iMe->getEntries();
161  }
162  }
163  //if norm histo has not been found, no point in continuing....
164  if (lNorm < 1) {
165  edm::LogError("SiStripFEDErrorsDQM") << "[SiStripFEDErrorsDQM::readBadAPVs] nFEDErrors not found, norm is " << lNorm << std::endl;
166  return;
167  }
168  }
169 
170  unsigned int nAPVsWithError = 0;
171  for ( auto iMe : lMeVec ) {//loop on ME found in directory
172  if ( iMe->getEntries() == 0 ) continue;
173  const std::string lMeName = iMe->getName() ;
174 
175  bool lookForErrors = false;
176  if (nFolders == 0) {
177  //for the first element of lFedsFolder: this is FED errors
178  lookForErrors =
179  lMeName.find("DataMissing") != lMeName.npos ||
180  lMeName.find("AnyFEDErrors") != lMeName.npos ||
181  (lMeName.find("CorruptBuffer") != lMeName.npos &&
182  lMeName.find("nFED") == lMeName.npos);
183  }
184  else {
185  //for the others, it is channel or FE errors.
186  lookForErrors =
187  lMeName.find("APVAddressError") != lMeName.npos ||
188  lMeName.find("APVError") != lMeName.npos ||
189  lMeName.find("BadMajorityAddresses") != lMeName.npos ||
190  lMeName.find("FEMissing") != lMeName.npos ||
191  lMeName.find("OOSBits") != lMeName.npos ||
192  lMeName.find("UnlockedBits") != lMeName.npos;
193  }
194 
195  if (lookForErrors) readHistogram(iMe,nAPVsWithError,lNorm,lFedId);
196 
197  }//loop on ME found in directory
198 
199  nAPVsWithErrorTotal += nAPVsWithError;
200  ++nFolders;
201  }//loop on lFedsFolders
202 
203  edm::LogInfo("SiStripFEDErrorsDQM") << "[SiStripFEDErrorsDQM::readBadAPVs] Total APVs with error found above threshold = " << nAPVsWithErrorTotal << std::endl;
204 
205  getter.cd();
206 
207  addErrors();
208 }
static const uint16_t FED_ID_MIN
static const uint32_t invalid32_
Definition: Constants.h:15
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:361
const uint32_t & detId() const
Class containning control, module, detector and connection information, at the level of a FED channel...
FedsConstIterRange fedIds() const
#define LogTrace(id)
void addErrors()
Writes the errors to the db.
std::vector< MonitorElement * > getContents(Args &&...args)
Definition: DQMStore.h:192
void readHistogram(MonitorElement *aMe, unsigned int &aCounter, const float aNorm, const unsigned int aFedId)
bool dirExists(std::string const &path)
Definition: DQMStore.cc:343
ConnsConstIterRange fedConnections(uint16_t fed_id) const
std::string fullPath() const
Definition: FileInPath.cc:197
static const uint16_t FED_ID_MAX
SiStripBadStrip * SiStripPopConFEDErrorsHandlerFromDQM::getObj ( ) const
overridevirtual
void SiStripPopConFEDErrorsHandlerFromDQM::initES ( const edm::EventSetup iSetup)
overridevirtual

Reimplemented from SiStripDQMPopConSourceHandler< SiStripBadStrip >.

Definition at line 74 of file SiStripPopConFEDErrorsDQM.cc.

References cabling_, cablingCacheId_, edm::EventSetup::get(), and edm::ESHandle< T >::product().

75 {
76  uint32_t currentCacheId = iSetup.get<SiStripFedCablingRcd>().cacheIdentifier();
77  if (cablingCacheId_ != currentCacheId) {
79  iSetup.get<SiStripFedCablingRcd>().get(cablingHandle);
80  cabling_ = cablingHandle.product();
81  cablingCacheId_ = currentCacheId;
82  }
83 }
T get() const
Definition: EventSetup.h:68
T const * product() const
Definition: ESHandle.h:84
void SiStripPopConFEDErrorsHandlerFromDQM::readHistogram ( MonitorElement aMe,
unsigned int &  aCounter,
const float  aNorm,
const unsigned int  aFedId 
)
private

Definition at line 215 of file SiStripPopConFEDErrorsDQM.cc.

References addBadAPV(), cabling_, debug_, sistrip::FEDCH_PER_FED, sistrip::FEDCH_PER_FEUNIT, SiStripFedCabling::fedConnection(), MonitorElement::getBinContent(), MonitorElement::getName(), MonitorElement::getNbinsX(), FedChannelConnection::isConnected(), LogTrace, FEDNumbering::MINSiStripFEDID, AlCaHLTBitMon_QueryRunRegistry::string, and threshold_.

Referenced by dqmEndJob().

219 {
220  unsigned short lFlag = 0;
221  std::string lMeName = aMe->getName();
222  if (lMeName.find("DataMissing") != lMeName.npos) {
223  lFlag = 0;
224  }
225  else if (lMeName.find("AnyFEDErrors") != lMeName.npos) {
226  lFlag = 1;
227  }
228  else if (lMeName.find("CorruptBuffer") != lMeName.npos &&
229  lMeName.find("nFED") == lMeName.npos) {
230  lFlag = 2;
231  }
232  else if (lMeName.find("FEMissing") != lMeName.npos) {
233  lFlag = 3;
234  }
235  else if (lMeName.find("BadMajorityAddresses") != lMeName.npos) {
236  lFlag = 4;
237  }
238  else if (lMeName.find("UnlockedBits") != lMeName.npos) {
239  lFlag = 5;
240  }
241  else if (lMeName.find("OOSBits") != lMeName.npos) {
242  lFlag = 6;
243  }
244  else if (lMeName.find("APVAddressError") != lMeName.npos) {
245  lFlag = 7;
246  }
247  else if (lMeName.find("APVError") != lMeName.npos) {
248  lFlag = 8;
249  }
250  else {
251  edm::LogError("SiStripFEDErrorsDQM") << "[SiStripFEDErrorsDQM::readHistogramError] Shouldn't be here ..." << std::endl;
252  return;
253  }
254 
255  if (debug_) {
256  LogTrace("SiStripFEDErrorsDQM") << "[SiStripFEDErrorsDQM::readHistogramError] Reading histo : " << lMeName << ", flag = " << lFlag << std::endl;
257  }
258 
259  unsigned int lNBins = aMe->getNbinsX();
260  int lBinShift = 0;
261  bool lIsFedHist = false;
262  bool lIsAPVHist = false;
263  bool lIsFeHist = false;
264  bool lIsChHist = false;
265 
266  if (lNBins > 200) {
267  lBinShift = FEDNumbering::MINSiStripFEDID-1;//shift for FED ID from bin number
268  lIsFedHist = true;
269  }
270  else {
271  lBinShift = -1;//shift for channel/APV/FE id from bin number
272  if (lNBins > 100) lIsAPVHist = true;
273  else if (lNBins < 10) lIsFeHist = true;
274  else lIsChHist = true;
275  }
276 
277  if (debug_) {
278  LogTrace("SiStripFEDErrorsDQM") << "[SiStripFEDErrorsDQM::readHistogramError] lIsFedHist: " << lIsFedHist << std::endl
279  << "[SiStripFEDErrorsDQM::readHistogramError] lIsAPVHist: " << lIsAPVHist << std::endl
280  << "[SiStripFEDErrorsDQM::readHistogramError] lIsFeHist : " << lIsFeHist << std::endl
281  << "[SiStripFEDErrorsDQM::readHistogramError] lIsChHist : " << lIsChHist << std::endl;
282  }
283 
284  for (unsigned int ibin(1); ibin<lNBins+1; ibin++){
285  if (aMe->getBinContent(ibin)>0){
286  float lStat = aMe->getBinContent(ibin)*1./aNorm;
287  if (lStat <= threshold_) {
288  if (debug_) LogTrace("SiStripFEDErrorsDQM") << "[SiStripFEDErrorsDQM::readHistogramError] ---- Below threshold : " << lStat << std::endl;
289  continue;
290  }
291  if (lIsFedHist) {
292  unsigned int lFedId = ibin+lBinShift;
293  //loop on all enabled channels of this FED....
294  for (unsigned int iChId = 0;
295  iChId < sistrip::FEDCH_PER_FED;
296  iChId++) {//loop on channels
297  const FedChannelConnection & lConnection = cabling_->fedConnection(lFedId,iChId);
298  if (!lConnection.isConnected()) continue;
299  addBadAPV(lConnection,0,lFlag,aCounter);
300  }
301  }
302  else {
303  if(lIsFeHist) {
304  unsigned int iFeId = ibin+lBinShift;
305  //loop on all enabled channels of this FE....
306  for (unsigned int iFeCh = 0;
308  iFeCh++) {//loop on channels
309  unsigned int iChId = sistrip::FEDCH_PER_FEUNIT*iFeId+iFeCh;
310  const FedChannelConnection & lConnection = cabling_->fedConnection(aFedId,iChId);
311  if (!lConnection.isConnected()) continue;
312  addBadAPV(lConnection,0,lFlag,aCounter);
313  }
314  }
315  else {
316  unsigned int iChId = ibin+lBinShift;
317  if (lIsAPVHist) {
318  unsigned int iAPVid = iChId%2+1;
319  iChId = static_cast<unsigned int>(iChId/2.);
320  const FedChannelConnection & lConnection = cabling_->fedConnection(aFedId,iChId);
321  addBadAPV(lConnection,iAPVid,lFlag,aCounter);
322 
323  }//ifAPVhists
324  else {
325  const FedChannelConnection & lConnection = cabling_->fedConnection(aFedId,iChId);
326  addBadAPV(lConnection,0,lFlag,aCounter);
327  }
328  }//if not FE hist
329  }//if not FED hist
330  }//if entries in histo
331  }//loop on bins
332 }//method readHistogram
FedChannelConnection fedConnection(uint16_t fed_id, uint16_t fed_ch) const
const std::string & getName() const
get name of ME
Class containning control, module, detector and connection information, at the level of a FED channel...
#define LogTrace(id)
void addBadAPV(const FedChannelConnection &aConnection, const unsigned short aAPVNumber, const unsigned short aFlag, unsigned int &aCounter)
static const uint16_t FEDCH_PER_FEUNIT
double getBinContent(int binx) const
get content of bin (1-D)
static const uint16_t FEDCH_PER_FED
int getNbinsX() const
get # of bins in X-axis

Member Data Documentation

const SiStripFedCabling* SiStripPopConFEDErrorsHandlerFromDQM::cabling_
private

Definition at line 47 of file SiStripPopConFEDErrorsDQM.cc.

Referenced by dqmEndJob(), initES(), and readHistogram().

uint32_t SiStripPopConFEDErrorsHandlerFromDQM::cablingCacheId_
private

Definition at line 46 of file SiStripPopConFEDErrorsDQM.cc.

Referenced by initES().

unsigned int SiStripPopConFEDErrorsHandlerFromDQM::debug_
private

Definition at line 45 of file SiStripPopConFEDErrorsDQM.cc.

Referenced by dqmEndJob(), and readHistogram().

std::map<uint32_t, std::vector<unsigned int> > SiStripPopConFEDErrorsHandlerFromDQM::detIdErrors_
private

Definition at line 49 of file SiStripPopConFEDErrorsDQM.cc.

Referenced by addBadStrips(), and addErrors().

edm::FileInPath SiStripPopConFEDErrorsHandlerFromDQM::fp_
private

Definition at line 43 of file SiStripPopConFEDErrorsDQM.cc.

Referenced by dqmEndJob().

SiStripBadStrip SiStripPopConFEDErrorsHandlerFromDQM::obj_
private

Definition at line 48 of file SiStripPopConFEDErrorsDQM.cc.

Referenced by addBadStrips(), addErrors(), dqmEndJob(), and getObj().

double SiStripPopConFEDErrorsHandlerFromDQM::threshold_
private

Definition at line 44 of file SiStripPopConFEDErrorsDQM.cc.

Referenced by readHistogram().