CMS 3D CMS Logo

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

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Public Types inherited from SiStripDQMPopConSourceHandler< SiStripBadStrip >
typedef dqm::legacy::DQMStore DQMStore
 
- 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
 

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

- 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.

Member Typedef Documentation

Definition at line 15 of file SiStripPopConFEDErrorsDQM.cc.

Definition at line 14 of file SiStripPopConFEDErrorsDQM.cc.

Constructor & Destructor Documentation

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

Definition at line 59 of file SiStripPopConFEDErrorsDQM.cc.

62  "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  edm::LogInfo("SiStripFEDErrorsDQM") << "[SiStripFEDErrorsDQM::SiStripFEDErrorsDQM()]";
67 }
T getUntrackedParameter(std::string const &, T const &) const
SiStripPopConFEDErrorsHandlerFromDQM::~SiStripPopConFEDErrorsHandlerFromDQM ( )
override

Definition at line 69 of file SiStripPopConFEDErrorsDQM.cc.

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

Member Function Documentation

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

Definition at line 329 of file SiStripPopConFEDErrorsDQM.cc.

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

Referenced by readHistogram().

332  {
333  if (!aConnection.isConnected()) {
334  edm::LogWarning("SiStripFEDErrorsDQM") << "[SiStripFEDErrorsDQM::addBadAPV] Warning, incompatible cabling ! "
335  "Channel is not connected, but entry found in histo ... "
336  << std::endl;
337  return;
338  }
339  unsigned int lDetid = aConnection.detId();
340  if (!lDetid || lDetid == sistrip::invalid32_) {
341  edm::LogWarning("SiStripFEDErrorsDQM")
342  << "[SiStripFEDErrorsDQM::addBadAPV] Warning, DetId is invalid: " << lDetid << std::endl;
343  return;
344  }
345  //unsigned short nChInModule = aConnection.nApvPairs();
346  unsigned short lApvNum = 0;
347  if (aAPVNumber < 2) {
348  lApvNum = 2 * aConnection.apvPairNumber();
349  addBadStrips(aConnection, lDetid, lApvNum, aFlag, aCounter);
350  }
351  if (aAPVNumber == 0 || aAPVNumber == 2) {
352  lApvNum = 2 * aConnection.apvPairNumber() + 1;
353  addBadStrips(aConnection, lDetid, lApvNum, aFlag, aCounter);
354  }
355 }
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 357 of file SiStripPopConFEDErrorsDQM.cc.

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

Referenced by addBadAPV().

361  {
362  // std::vector<unsigned int> lStripVector;
363  const unsigned short lFirstBadStrip = aApvNum * 128;
364  const unsigned short lConsecutiveBadStrips = 128;
365 
366  unsigned int lBadStripRange = obj_.encode(lFirstBadStrip, lConsecutiveBadStrips, aFlag);
367 
368  LogTrace("SiStripFEDErrorsDQM") << "[SiStripFEDErrorsDQM::addBadStrips] ---- Adding : detid " << aDetId << " (FED "
369  << aConnection.fedId() << ", Ch " << aConnection.fedCh() << ")"
370  << ", APV " << aApvNum << ", flag " << aFlag << std::endl;
371 
372  detIdErrors_[aDetId].push_back(lBadStripRange);
373 
374  // lStripVector.push_back(lBadStripRange);
375  // SiStripBadStrip::Range lRange(lStripVector.begin(),lStripVector.end());
376  // if ( !obj.put(aDetId,lRange) ) {
377  // edm::LogError("SiStripFEDErrorsDQM")<<"[SiStripFEDErrorsDQM::addBadStrips] detid already exists." << std::endl;
378  // }
379 
380  aCounter++;
381 }
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 388 of file SiStripPopConFEDErrorsDQM.cc.

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

Referenced by dqmEndJob().

388  {
389  for (const auto& it : detIdErrors_) {
390  const std::vector<uint32_t>& lList = it.second;
391 
392  //map of first strip number and flag
393  //purpose is to encode all existing flags into a unique one...
394  std::map<unsigned short, unsigned short> lAPVMap;
395  for (auto cCont : lList) {
396  SiStripBadStrip::data lData = obj_.decode(cCont);
397  unsigned short lFlag = 0;
398  setFlagBit(lFlag, lData.flag);
399 
400  //std::cout << " -- Detid " << it.first << ", strip " << lData.firstStrip << ", flag " << lData.flag << std::endl;
401 
402  auto lInsert = lAPVMap.emplace(lData.firstStrip, lFlag);
403  if (!lInsert.second) {
404  //std::cout << " ---- Adding bit : " << lData.flag << " to " << lInsert.first->second << ": ";
405  setFlagBit(lInsert.first->second, lData.flag);
406  //std::cout << lInsert.first->second << std::endl;
407  }
408  }
409 
410  //encode the new flag
411  std::vector<unsigned int> lStripVector;
412  const unsigned short lConsecutiveBadStrips = 128;
413  for (const auto& lIter : lAPVMap) {
414  lStripVector.push_back(obj_.encode(lIter.first, lConsecutiveBadStrips, lIter.second));
415  }
416 
417  SiStripBadStrip::Range lRange(lStripVector.begin(), lStripVector.end());
418  if (!obj_.put(it.first, lRange)) {
419  edm::LogError("SiStripFEDErrorsDQM") << "[SiStripFEDErrorsDQM::addBadStrips] detid already exists." << std::endl;
420  }
421  }
422 }
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 83 of file SiStripPopConFEDErrorsDQM.cc.

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

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

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

73  {
74  uint32_t currentCacheId = iSetup.get<SiStripFedCablingRcd>().cacheIdentifier();
75  if (cablingCacheId_ != currentCacheId) {
77  iSetup.get<SiStripFedCablingRcd>().get(cablingHandle);
78  cabling_ = cablingHandle.product();
79  cablingCacheId_ = currentCacheId;
80  }
81 }
T get() const
Definition: EventSetup.h:73
T const * product() const
Definition: ESHandle.h:86
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(), dqm::impl::MonitorElement::getBinContent(), dqm::impl::MonitorElement::getName(), dqm::impl::MonitorElement::getNbinsX(), FedChannelConnection::isConnected(), LogTrace, FEDNumbering::MINSiStripFEDID, AlCaHLTBitMon_QueryRunRegistry::string, and threshold_.

Referenced by dqmEndJob().

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

Member Data Documentation

const SiStripFedCabling* SiStripPopConFEDErrorsHandlerFromDQM::cabling_
private

Definition at line 46 of file SiStripPopConFEDErrorsDQM.cc.

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

uint32_t SiStripPopConFEDErrorsHandlerFromDQM::cablingCacheId_
private

Definition at line 45 of file SiStripPopConFEDErrorsDQM.cc.

Referenced by initES().

unsigned int SiStripPopConFEDErrorsHandlerFromDQM::debug_
private

Definition at line 44 of file SiStripPopConFEDErrorsDQM.cc.

Referenced by dqmEndJob(), and readHistogram().

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

Definition at line 48 of file SiStripPopConFEDErrorsDQM.cc.

Referenced by addBadStrips(), and addErrors().

edm::FileInPath SiStripPopConFEDErrorsHandlerFromDQM::fp_
private

Definition at line 42 of file SiStripPopConFEDErrorsDQM.cc.

Referenced by dqmEndJob().

SiStripBadStrip SiStripPopConFEDErrorsHandlerFromDQM::obj_
private

Definition at line 47 of file SiStripPopConFEDErrorsDQM.cc.

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

double SiStripPopConFEDErrorsHandlerFromDQM::threshold_
private

Definition at line 43 of file SiStripPopConFEDErrorsDQM.cc.

Referenced by readHistogram().