CMS 3D CMS Logo

SiStripFEDMonitorPlugin Class Reference

Description: DQM source application to produce data integrety histograms for SiStrip data for use in HLT and Prompt reco. More...

#include <DQM/SiStripMonitorHardware/plugins/SiStripFEDMonitor.cc>

Inheritance diagram for SiStripFEDMonitorPlugin:

edm::EDAnalyzer

List of all members.

Public Member Functions

 SiStripFEDMonitorPlugin (const edm::ParameterSet &)
 ~SiStripFEDMonitorPlugin ()

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
bool analyzeChannels (const sistrip::FEDBuffer *buffer, unsigned int fedId, std::list< unsigned int > *badChannelList, std::list< unsigned int > *activeBadChannelList)
bool analyzeFED (const FEDRawData &rawData, unsigned int fedId)
bool analyzeFEUnits (const sistrip::FEDBufferBase *buffer, unsigned int fedId)
virtual void beginJob (const edm::EventSetup &)
void bookAllFEDHistograms ()
void bookFEDHistograms (unsigned int fedId, bool fullDebugMode=false)
void bookTopLevelHistograms ()
virtual void endJob ()
void fillHistogram (MonitorElement *histogram, double value)
void updateCabling (const edm::EventSetup &eventSetup)

Private Attributes

std::vector< std::vector< bool > > activeChannels_
MonitorElementanyDaqProblems_
MonitorElementanyErrors_
std::map< unsigned int,
MonitorElement * > 
apvAddressErrorDetailed_
std::map< unsigned int,
MonitorElement * > 
apvErrorDetailed_
MonitorElementbadActiveChannelStatusBits_
MonitorElementbadChannelStatusBits_
MonitorElementbadDAQCRCs_
MonitorElementbadFEDCRCs_
MonitorElementbadIDs_
std::map< unsigned int,
MonitorElement * > 
badMajorityAddressDetailed_
MonitorElementbadMajorityAddresses_
std::map< unsigned int,
MonitorElement * > 
badStatusBitsDetailed_
const SiStripFedCablingcabling_
uint32_t cablingCacheId_
MonitorElementcorruptBuffers_
MonitorElementdaqProblems_
std::vector< booldebugHistosBooked_
bool disableFEDHistograms_
bool disableGlobalExpertHistograms_
DQMStoredqm_
std::map< unsigned int,
MonitorElement * > 
feOverflowDetailed_
MonitorElementfeOverflows_
bool fillAllHistograms_
std::string folderName_
std::vector< boolhistosBooked_
MonitorElementinvalidBuffers_
std::map< unsigned int,
MonitorElement * > 
outOfSyncDetailed_
bool printDebug_
edm::InputTag rawDataTag_
std::map< unsigned int,
MonitorElement * > 
unlockedDetailed_
bool writeDQMStore_


Detailed Description

Description: DQM source application to produce data integrety histograms for SiStrip data for use in HLT and Prompt reco.

Definition at line 46 of file SiStripFEDMonitor.cc.


Constructor & Destructor Documentation

SiStripFEDMonitorPlugin::SiStripFEDMonitorPlugin ( const edm::ParameterSet iConfig  )  [explicit]

Definition at line 98 of file SiStripFEDMonitor.cc.

00099   : rawDataTag_(iConfig.getUntrackedParameter<edm::InputTag>("RawDataTag",edm::InputTag("source",""))),
00100     folderName_(iConfig.getUntrackedParameter<std::string>("FolderName","SiStrip/ReadoutView/FedMonitoringSummary")),
00101     printDebug_(iConfig.getUntrackedParameter<bool>("PrintDebugMessages",false)),
00102     writeDQMStore_(iConfig.getUntrackedParameter<bool>("WriteDQMStore",false)),
00103     fillAllHistograms_(iConfig.getUntrackedParameter<bool>("FillAllHistograms",true)),
00104     disableGlobalExpertHistograms_(iConfig.getUntrackedParameter<bool>("DisableGlobalExpertHistograms",true)),
00105     disableFEDHistograms_(iConfig.getUntrackedParameter<bool>("DisableFEDHistograms",true)),
00106     cablingCacheId_(0)
00107 {
00108 }

SiStripFEDMonitorPlugin::~SiStripFEDMonitorPlugin (  ) 

Definition at line 110 of file SiStripFEDMonitor.cc.

00111 {
00112 }


Member Function Documentation

void SiStripFEDMonitorPlugin::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
) [private, virtual]

Implements edm::EDAnalyzer.

Definition at line 121 of file SiStripFEDMonitor.cc.

References analyzeFED(), anyErrors_, FEDRawData::data(), FEDRawDataCollection::FEDData(), fillHistogram(), edm::Event::getByLabel(), FEDNumbering::getSiStripFEDIds(), rawDataTag_, FEDRawData::size(), and updateCabling().

00122 {
00123   //update cabling
00124   updateCabling(iSetup);
00125   
00126   //get raw data
00127   edm::Handle<FEDRawDataCollection> rawDataCollectionHandle;
00128   iEvent.getByLabel(rawDataTag_,rawDataCollectionHandle);
00129   const FEDRawDataCollection& rawDataCollection = *rawDataCollectionHandle;
00130   
00131   //get FED IDs
00132   const FEDNumbering numbering;
00133   const unsigned int siStripFedIdMin = numbering.getSiStripFEDIds().first;
00134   const unsigned int siStripFedIdMax = numbering.getSiStripFEDIds().second;
00135   
00136   //loop over siStrip FED IDs
00137   for (unsigned int fedId = siStripFedIdMin; fedId <= siStripFedIdMax; fedId++) {
00138     const FEDRawData& fedData = rawDataCollection.FEDData(fedId);
00139     //check data exists
00140     if (!fedData.size() || !fedData.data()) continue;
00141     bool anyErrors = !analyzeFED(fedData,fedId);
00142     if (anyErrors) fillHistogram(anyErrors_,fedId);
00143   }//loop over FED IDs
00144 }

bool SiStripFEDMonitorPlugin::analyzeChannels ( const sistrip::FEDBuffer buffer,
unsigned int  fedId,
std::list< unsigned int > *  badChannelList,
std::list< unsigned int > *  activeBadChannelList 
) [private]

Definition at line 333 of file SiStripFEDMonitor.cc.

References activeChannels_, sistrip::FEDFullDebugHeader::apvAddressError(), apvAddressErrorDetailed_, sistrip::FEDFullDebugHeader::apvError(), apvErrorDetailed_, badActiveChannelStatusBits_, badStatusBitsDetailed_, bookFEDHistograms(), cabling_, sistrip::FEDFEHeader::checkStatusBits(), SiStripFedCabling::connection(), sistrip::FEDCH_PER_FED, sistrip::FEDBuffer::feHeader(), fillHistogram(), header, FedChannelConnection::isConnected(), sistrip::FEDFullDebugHeader::outOfSync(), outOfSyncDetailed_, sistrip::FEDFullDebugHeader::unlocked(), and unlockedDetailed_.

Referenced by analyzeFED().

00336 {
00337   bool foundError = false;
00338   bool filledBadChannel = false;
00339   const sistrip::FEDFEHeader* header = buffer->feHeader();
00340   const sistrip::FEDFullDebugHeader* debugHeader = dynamic_cast<const sistrip::FEDFullDebugHeader*>(header);
00341   for (unsigned int iCh = 0; iCh < sistrip::FEDCH_PER_FED; iCh++) {
00342     if (!cabling_->connection(fedId,iCh).isConnected()) continue;
00343     if (debugHeader) {
00344       if (!debugHeader->unlocked(iCh)) activeChannels_[fedId][iCh] = true;
00345     }
00346     bool channelWasBad = false;
00347     for (unsigned int iAPV = 0; iAPV < 2; iAPV++) {
00348       if (!header->checkStatusBits(iCh,iAPV)) {
00349         bookFEDHistograms(fedId,debugHeader);
00350         fillHistogram(badStatusBitsDetailed_[fedId],iCh*2+iAPV);
00351         foundError = true;
00352         channelWasBad = true;
00353       }
00354     }
00355     //add channel to bad channel list
00356     if (channelWasBad && badChannelList) badChannelList->push_back(iCh);
00357     if (channelWasBad && activeChannels_[fedId][iCh] && activeBadChannelList) activeBadChannelList->push_back(iCh);
00358     //fill histogram for active channels
00359     if (channelWasBad && activeChannels_[fedId][iCh] && !filledBadChannel) {
00360       fillHistogram(badActiveChannelStatusBits_,fedId);
00361       filledBadChannel = true;
00362     }
00363   }
00364   if (debugHeader) {
00365     for (unsigned int iCh = 0; iCh < sistrip::FEDCH_PER_FED; iCh++) {
00366       for (unsigned int iAPV = 0; iAPV < 2; iAPV++) {
00367         if (debugHeader->apvError(iCh,iAPV)) {
00368           bookFEDHistograms(fedId,debugHeader);
00369           fillHistogram(apvErrorDetailed_[fedId],iCh*2+iAPV);
00370         }
00371         if (debugHeader->apvAddressError(iCh,iAPV)) {
00372           bookFEDHistograms(fedId,debugHeader);
00373           fillHistogram(apvAddressErrorDetailed_[fedId],iCh*2+iAPV);
00374         }
00375       }
00376       if (debugHeader->unlocked(iCh)) {
00377         bookFEDHistograms(fedId,debugHeader);
00378         fillHistogram(unlockedDetailed_[fedId],iCh);
00379       }
00380       if (debugHeader->outOfSync(iCh)) {
00381         bookFEDHistograms(fedId,debugHeader);
00382         fillHistogram(outOfSyncDetailed_[fedId],iCh);
00383       }
00384     }
00385   }
00386   return !foundError;
00387 }

bool SiStripFEDMonitorPlugin::analyzeFED ( const FEDRawData rawData,
unsigned int  fedId 
) [private]

Definition at line 193 of file SiStripFEDMonitor.cc.

References analyzeChannels(), analyzeFEUnits(), anyDaqProblems_, badChannelStatusBits_, badDAQCRCs_, badFEDCRCs_, badIDs_, corruptBuffers_, daqProblems_, FEDRawData::data(), sistrip::FEDBufferBase::dump(), e, lat::endl(), fillHistogram(), invalidBuffers_, NULL, printDebug_, and FEDRawData::size().

Referenced by analyze().

00194 {
00195   //try to construct the basic buffer object (do not check payload)
00196   //if this fails then count it as an invalid buffer and stop checks since we can't understand things like buffer ordering
00197   std::auto_ptr<const sistrip::FEDBufferBase> bufferBase;
00198   try {
00199     bufferBase.reset(new sistrip::FEDBufferBase(rawData.data(),rawData.size()));
00200   } catch (const cms::Exception& e) {
00201     fillHistogram(invalidBuffers_,fedId);
00202     fillHistogram(anyDaqProblems_,fedId);
00203     //don't check anything else if the buffer is invalid
00204     return false;
00205   }
00206   //CRC checks
00207   //if CRC fails then don't continue as if the buffer has been corrupted in DAQ then anything else could be invalid
00208   if (!bufferBase->checkNoSlinkCRCError()) {
00209     fillHistogram(badFEDCRCs_,fedId);
00210     fillHistogram(anyDaqProblems_,fedId);
00211     return false;
00212   } else if (!bufferBase->checkCRC()) {
00213     fillHistogram(badDAQCRCs_,fedId);
00214     fillHistogram(anyDaqProblems_,fedId);
00215     return false;
00216   }
00217   //next check that it is a SiStrip buffer
00218   //if not then stop checks
00219   if (!bufferBase->checkSourceIDs() || !bufferBase->checkNoUnexpectedSourceID()) {
00220     fillHistogram(badIDs_,fedId);
00221     fillHistogram(anyDaqProblems_,fedId);
00222     return false;
00223   } 
00224   //if so then do DAQ header/trailer checks
00225   //if these fail then buffer may be incomplete and checking contents doesn't make sense
00226   else if (!bufferBase->doDAQHeaderAndTrailerChecks()) {
00227     fillHistogram(daqProblems_,fedId);
00228     fillHistogram(anyDaqProblems_,fedId);
00229     return false;
00230   }
00231   
00232   bool foundError = false;
00233   //now do checks on header
00234   //check that tracker special header is consistent
00235   if (!bufferBase->doTrackerSpecialHeaderChecks() && bufferBase->checkNoFEOverflows()) {
00236     fillHistogram(invalidBuffers_,fedId);
00237     fillHistogram(anyDaqProblems_,fedId);
00238     foundError = true;
00239   }
00240   //FE unit overflows
00241   if (!bufferBase->checkNoFEOverflows()) { 
00242     foundError = true;
00243   }
00244   //if FEs overflowed or tracker special header is invalid then don't bother to check payload
00245   bool checkPayload = !foundError;
00246   bool feUnitsGood = analyzeFEUnits(bufferBase.get(),fedId);
00247   if (!feUnitsGood) foundError = true;
00248   
00249   //payload checks
00250   std::auto_ptr<const sistrip::FEDBuffer> buffer;
00251   std::list<unsigned int> badChannels;
00252   std::list<unsigned int> activeBadChannels;
00253   //need to construct full object to go any further
00254   if (checkPayload) buffer.reset(new sistrip::FEDBuffer(rawData.data(),rawData.size(),true));
00255   if (checkPayload) {
00256     //corrupt buffer checks
00257     if (!buffer->doCorruptBufferChecks()) {
00258       fillHistogram(corruptBuffers_,fedId);
00259       foundError = true;
00260     }
00261     //channel checks
00262     analyzeChannels(buffer.get(),fedId,&badChannels,&activeBadChannels);
00263     if (badChannels.size()) {
00264       fillHistogram(badChannelStatusBits_,fedId);
00265     }
00266     if (activeBadChannels.size()) {
00267       foundError = true;
00268     }
00269   }
00270   
00271   if (foundError && printDebug_) {
00272     const sistrip::FEDBufferBase* debugBuffer = NULL;
00273     if (buffer.get()) debugBuffer = buffer.get();
00274     else if (bufferBase.get()) debugBuffer = bufferBase.get();
00275     if (debugBuffer) {
00276       std::ostringstream debugStream;
00277       if (badChannels.size()) {
00278         badChannels.sort();
00279         debugStream << "Cabled channels which had errors: ";
00280         for (std::list<unsigned int>::const_iterator iBadCh = badChannels.begin(); iBadCh != badChannels.end(); iBadCh++) {
00281           debugStream << *iBadCh << " ";
00282         }
00283         debugStream << std::endl;
00284       }
00285       if (activeBadChannels.size()) {
00286         activeBadChannels.sort();
00287         debugStream << "Active (have been unlocked in at least one event) cabled channels which had errors: ";
00288         for (std::list<unsigned int>::const_iterator iBadCh = activeBadChannels.begin(); iBadCh != activeBadChannels.end(); iBadCh++) {
00289           debugStream << *iBadCh << " ";
00290         }
00291         debugStream << std::endl;
00292       }
00293       debugStream << (*debugBuffer) << std::endl;
00294       debugBuffer->dump(debugStream);
00295       debugStream << std::endl;
00296       edm::LogInfo("SiStripMonitorHardware") << "Errors found in FED " << fedId;
00297       edm::LogVerbatim("SiStripMonitorHardware") << debugStream.str();
00298     }
00299   }
00300   
00301   return !foundError;
00302 }

bool SiStripFEDMonitorPlugin::analyzeFEUnits ( const sistrip::FEDBufferBase buffer,
unsigned int  fedId 
) [private]

Definition at line 304 of file SiStripFEDMonitor.cc.

References badMajorityAddressDetailed_, badMajorityAddresses_, bookFEDHistograms(), sistrip::FEDBufferBase::feEnabled(), sistrip::FEDBufferBase::feOverflow(), feOverflowDetailed_, feOverflows_, sistrip::FEUNITS_PER_FED, fillHistogram(), and sistrip::FEDBufferBase::majorityAddressErrorForFEUnit().

Referenced by analyzeFED().

00305 {
00306   bool foundOverflow = false;
00307   bool foundBadMajority = false;
00308   for (unsigned int iFE = 0; iFE < sistrip::FEUNITS_PER_FED; iFE++) {
00309     if (buffer->feOverflow(iFE)) {
00310       bookFEDHistograms(fedId);
00311       fillHistogram(feOverflowDetailed_[fedId],iFE);
00312       foundOverflow = true;
00313       //if FE overflowed then address isn't valid
00314       continue;
00315     }
00316     if (!buffer->feEnabled(iFE)) continue;
00317     if (buffer->majorityAddressErrorForFEUnit(iFE)) {
00318       bookFEDHistograms(fedId);
00319       fillHistogram(badMajorityAddressDetailed_[fedId],iFE);
00320       foundBadMajority = true;
00321     }
00322   }
00323   if (foundOverflow) {
00324     fillHistogram(feOverflows_,fedId);
00325   }
00326   if (foundBadMajority) {
00327     fillHistogram(badMajorityAddresses_,fedId);
00328   }
00329   bool foundError = foundOverflow || foundBadMajority;
00330   return !foundError;
00331 }

void SiStripFEDMonitorPlugin::beginJob ( const edm::EventSetup  )  [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 148 of file SiStripFEDMonitor.cc.

References activeChannels_, bookAllFEDHistograms(), bookTopLevelHistograms(), debugHistosBooked_, dqm_, sistrip::FEDCH_PER_FED, fillAllHistograms_, folderName_, FEDNumbering::getSiStripFEDIds(), histosBooked_, and DQMStore::setCurrentFolder().

00149 {
00150   //get DQM store
00151   dqm_ = &(*edm::Service<DQMStore>());
00152   dqm_->setCurrentFolder(folderName_);
00153   
00154   bookTopLevelHistograms();
00155   
00156   const FEDNumbering numbering;
00157   const unsigned int siStripFedIdMin = numbering.getSiStripFEDIds().first;
00158   const unsigned int siStripFedIdMax = numbering.getSiStripFEDIds().second;
00159   //book FED level histograms
00160   histosBooked_.resize(siStripFedIdMax+1,false);
00161   debugHistosBooked_.resize(siStripFedIdMax+1,false);
00162   if (fillAllHistograms_) bookAllFEDHistograms();
00163   //mark all channels as inactive until they have been 'locked' at least once
00164   activeChannels_.resize(siStripFedIdMax+1);
00165   for (unsigned int fedId = siStripFedIdMin; fedId <= siStripFedIdMax; fedId++) {
00166     activeChannels_[fedId].resize(sistrip::FEDCH_PER_FED,false);
00167   }
00168 }

void SiStripFEDMonitorPlugin::bookAllFEDHistograms (  )  [private]

Definition at line 436 of file SiStripFEDMonitor.cc.

References bookFEDHistograms(), and FEDNumbering::getSiStripFEDIds().

Referenced by beginJob().

00437 {
00438   //get FED IDs
00439   const FEDNumbering numbering;
00440   const unsigned int siStripFedIdMin = numbering.getSiStripFEDIds().first;
00441   const unsigned int siStripFedIdMax = numbering.getSiStripFEDIds().second;
00442   //book them
00443   for (unsigned int iFed = siStripFedIdMin; iFed <= siStripFedIdMax; iFed++) {
00444     bookFEDHistograms(iFed,true);
00445   }
00446 }

void SiStripFEDMonitorPlugin::bookFEDHistograms ( unsigned int  fedId,
bool  fullDebugMode = false 
) [private]

Definition at line 389 of file SiStripFEDMonitor.cc.

References apvAddressErrorDetailed_, apvErrorDetailed_, sistrip::APVS_PER_FED, badMajorityAddressDetailed_, badStatusBitsDetailed_, DQMStore::book1D(), debugHistosBooked_, disableFEDHistograms_, dqm_, sistrip::FEDCH_PER_FED, feOverflowDetailed_, sistrip::FEUNITS_PER_FED, fillAllHistograms_, histosBooked_, outOfSyncDetailed_, SiStripKey::path(), DQMStore::setCurrentFolder(), and unlockedDetailed_.

Referenced by analyzeChannels(), analyzeFEUnits(), and bookAllFEDHistograms().

00390 {
00391   if (disableFEDHistograms_ && !fillAllHistograms_) return;
00392   if (!histosBooked_[fedId]) {
00393     SiStripFedKey fedKey(fedId,0,0,0);
00394     dqm_->setCurrentFolder(fedKey.path());
00395     std::stringstream fedIdStream;
00396     fedIdStream << fedId;
00397     feOverflowDetailed_[fedId] = dqm_->book1D("FEOverflowsForFED"+fedIdStream.str(),
00398                                               "FE overflows per FE unit for FED ID "+fedIdStream.str(),
00399                                               sistrip::FEUNITS_PER_FED,0,sistrip::FEUNITS_PER_FED);
00400     feOverflowDetailed_[fedId]->setAxisTitle("FE-Index",1);
00401     badMajorityAddressDetailed_[fedId] = dqm_->book1D("BadMajorityAddressesForFED"+fedIdStream.str(),
00402                                                       "Bad majority APV addresses per FE unit for FED ID "+fedIdStream.str(),
00403                                                       sistrip::FEUNITS_PER_FED,0,sistrip::FEUNITS_PER_FED);
00404     badMajorityAddressDetailed_[fedId]->setAxisTitle("FE-Index",1);
00405     badStatusBitsDetailed_[fedId] = dqm_->book1D("BadAPVStatusBitsForFED"+fedIdStream.str(),
00406                                                  "Bad apv status bits for FED ID "+fedIdStream.str(),
00407                                                  sistrip::APVS_PER_FED,0,sistrip::APVS_PER_FED);
00408     badStatusBitsDetailed_[fedId]->setAxisTitle("APV-Index",1);
00409     histosBooked_[fedId] = true;
00410   }
00411   if (fullDebugMode && !debugHistosBooked_[fedId]) {
00412     SiStripFedKey fedKey(fedId,0,0,0);
00413     dqm_->setCurrentFolder(fedKey.path());
00414     std::stringstream fedIdStream;
00415     fedIdStream << fedId;
00416     apvErrorDetailed_[fedId] = dqm_->book1D("APVErrorBitsForFED"+fedIdStream.str(),
00417                                             "APV errors for FED ID "+fedIdStream.str(),
00418                                             sistrip::APVS_PER_FED,0,sistrip::APVS_PER_FED);
00419     apvErrorDetailed_[fedId]->setAxisTitle("APV-Index",1);
00420     apvAddressErrorDetailed_[fedId] = dqm_->book1D("APVAddressErrorBitsForFED"+fedIdStream.str(),
00421                                                    "Wrong APV address errors for FED ID "+fedIdStream.str(),
00422                                                    sistrip::APVS_PER_FED,0,sistrip::APVS_PER_FED);
00423     apvAddressErrorDetailed_[fedId]->setAxisTitle("APV-Index",1);
00424     unlockedDetailed_[fedId] = dqm_->book1D("UnlockedBitsForFED"+fedIdStream.str(),
00425                                             "Unlocked channels for FED ID "+fedIdStream.str(),
00426                                             sistrip::FEDCH_PER_FED,0,sistrip::FEDCH_PER_FED);
00427     unlockedDetailed_[fedId]->setAxisTitle("Channel-Index",1);
00428     outOfSyncDetailed_[fedId] = dqm_->book1D("OOSBitsForFED"+fedIdStream.str(),
00429                                              "Out of sync channels for FED ID "+fedIdStream.str(),
00430                                              sistrip::FEDCH_PER_FED,0,sistrip::FEDCH_PER_FED);
00431     outOfSyncDetailed_[fedId]->setAxisTitle("Channel-Index",1);
00432     debugHistosBooked_[fedId] = true;
00433   }
00434 }

void SiStripFEDMonitorPlugin::bookTopLevelHistograms (  )  [private]

Definition at line 448 of file SiStripFEDMonitor.cc.

References anyDaqProblems_, anyErrors_, badActiveChannelStatusBits_, badChannelStatusBits_, badDAQCRCs_, badFEDCRCs_, badIDs_, badMajorityAddresses_, DQMStore::book1D(), corruptBuffers_, daqProblems_, disableGlobalExpertHistograms_, dqm_, feOverflows_, fillAllHistograms_, FEDNumbering::getSiStripFEDIds(), invalidBuffers_, and MonitorElement::setAxisTitle().

Referenced by beginJob().

00449 {
00450   //get FED IDs
00451   const FEDNumbering numbering;
00452   const unsigned int siStripFedIdMin = numbering.getSiStripFEDIds().first;
00453   const unsigned int siStripFedIdMax = numbering.getSiStripFEDIds().second;
00454   //book histos
00455   anyErrors_ = dqm_->book1D("AnyErrors",
00456                             "Number of buffers with any error per FED",
00457                             siStripFedIdMax-siStripFedIdMin+1,
00458                             siStripFedIdMin-0.5,siStripFedIdMax+0.5);
00459   anyErrors_->setAxisTitle("FED-ID",1);
00460   corruptBuffers_ = dqm_->book1D("CorruptBuffers",
00461                                  "Number of corrupt FED buffers per FED",
00462                                  siStripFedIdMax-siStripFedIdMin+1,
00463                                  siStripFedIdMin-0.5,siStripFedIdMax+0.5);
00464   corruptBuffers_->setAxisTitle("FED-ID",1);
00465   invalidBuffers_ = dqm_->book1D("InvalidBuffers",
00466                                  "Number of invalid FED buffers per FED",
00467                                  siStripFedIdMax-siStripFedIdMin+1,
00468                                  siStripFedIdMin-0.5,siStripFedIdMax+0.5);
00469   invalidBuffers_->setAxisTitle("FED-ID",1);
00470   anyDaqProblems_ = dqm_->book1D("AnyDAQProblems",
00471                                  "Number of buffers with any problems flagged in DAQ header (including CRC)",
00472                                  siStripFedIdMax-siStripFedIdMin+1,
00473                                  siStripFedIdMin-0.5,siStripFedIdMax+0.5);
00474   anyDaqProblems_->setAxisTitle("FED-ID",1);
00475   badIDs_ = dqm_->book1D("BadIDs",
00476                          "Number of buffers with non-SiStrip source IDs in DAQ header",
00477                          siStripFedIdMax-siStripFedIdMin+1,
00478                          siStripFedIdMin-0.5,siStripFedIdMax+0.5);
00479   badIDs_->setAxisTitle("FED-ID",1);
00480   badChannelStatusBits_ = dqm_->book1D("BadChannelStatusBits",
00481                                        "Number of buffers with one or more enabled channel with bad status bits",
00482                                        siStripFedIdMax-siStripFedIdMin+1,
00483                                        siStripFedIdMin-0.5,siStripFedIdMax+0.5);
00484   badChannelStatusBits_->setAxisTitle("FED-ID",1);
00485   badActiveChannelStatusBits_ = dqm_->book1D("BadActiveChannelStatusBits",
00486                                              "Number of buffers with one or more active channel with bad status bits",
00487                                              siStripFedIdMax-siStripFedIdMin+1,
00488                                              siStripFedIdMin-0.5,siStripFedIdMax+0.5);
00489   badActiveChannelStatusBits_->setAxisTitle("FED-ID",1);
00490   if (!disableGlobalExpertHistograms_ || fillAllHistograms_) {
00491     badDAQCRCs_ = dqm_->book1D("BadDAQCRCs",
00492                                "Number of buffers with bad CRCs from the DAQ",
00493                                siStripFedIdMax-siStripFedIdMin+1,
00494                                siStripFedIdMin-0.5,siStripFedIdMax+0.5);
00495     badDAQCRCs_->setAxisTitle("FED-ID",1);
00496     badFEDCRCs_ = dqm_->book1D("BadFEDCRCs",
00497                                "Number of buffers with bad CRCs from the FED",
00498                                siStripFedIdMax-siStripFedIdMin+1,
00499                                siStripFedIdMin-0.5,siStripFedIdMax+0.5);
00500     badFEDCRCs_->setAxisTitle("FED-ID",1);
00501     daqProblems_ = dqm_->book1D("DAQProblems",
00502                                 "Number of buffers with (non-CRC) problems flagged in DAQ header",
00503                                 siStripFedIdMax-siStripFedIdMin+1,
00504                                 siStripFedIdMin-0.5,siStripFedIdMax+0.5);
00505     daqProblems_->setAxisTitle("FED-ID",1);
00506     feOverflows_ = dqm_->book1D("FEOverflows",
00507                                 "Number of buffers with one or more FE overflow",
00508                                 siStripFedIdMax-siStripFedIdMin+1,
00509                                 siStripFedIdMin-0.5,siStripFedIdMax+0.5);
00510     feOverflows_->setAxisTitle("FED-ID",1);
00511     badMajorityAddresses_ = dqm_->book1D("BadMajorityAddresses",
00512                                          "Number of buffers with one or more FE with a bad majority APV address",
00513                                          siStripFedIdMax-siStripFedIdMin+1,
00514                                          siStripFedIdMin-0.5,siStripFedIdMax+0.5);
00515     badMajorityAddresses_->setAxisTitle("FED-ID",1);
00516   }
00517 }

void SiStripFEDMonitorPlugin::endJob ( void   )  [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 172 of file SiStripFEDMonitor.cc.

References dqm_, DQMStore::save(), and writeDQMStore_.

00173 {
00174   if (writeDQMStore_) dqm_->save("DQMStore.root");
00175 }

void SiStripFEDMonitorPlugin::fillHistogram ( MonitorElement histogram,
double  value 
) [inline, private]

Definition at line 188 of file SiStripFEDMonitor.cc.

References MonitorElement::Fill().

Referenced by analyze(), analyzeChannels(), analyzeFED(), and analyzeFEUnits().

00189 {
00190   if (histogram) histogram->Fill(value);
00191 }

void SiStripFEDMonitorPlugin::updateCabling ( const edm::EventSetup eventSetup  )  [private]

Definition at line 177 of file SiStripFEDMonitor.cc.

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

Referenced by analyze().

00178 {
00179   uint32_t currentCacheId = eventSetup.get<SiStripFedCablingRcd>().cacheIdentifier();
00180   if (cablingCacheId_ != currentCacheId) {
00181     edm::ESHandle<SiStripFedCabling> cablingHandle;
00182     eventSetup.get<SiStripFedCablingRcd>().get(cablingHandle);
00183     cabling_ = cablingHandle.product();
00184     cablingCacheId_ = currentCacheId;
00185   }
00186 }


Member Data Documentation

std::vector< std::vector<bool> > SiStripFEDMonitorPlugin::activeChannels_ [private]

Definition at line 90 of file SiStripFEDMonitor.cc.

Referenced by analyzeChannels(), and beginJob().

MonitorElement * SiStripFEDMonitorPlugin::anyDaqProblems_ [private]

Definition at line 83 of file SiStripFEDMonitor.cc.

Referenced by analyzeFED(), and bookTopLevelHistograms().

MonitorElement* SiStripFEDMonitorPlugin::anyErrors_ [private]

Definition at line 83 of file SiStripFEDMonitor.cc.

Referenced by analyze(), and bookTopLevelHistograms().

std::map<unsigned int,MonitorElement*> SiStripFEDMonitorPlugin::apvAddressErrorDetailed_ [private]

Definition at line 87 of file SiStripFEDMonitor.cc.

Referenced by analyzeChannels(), and bookFEDHistograms().

std::map<unsigned int,MonitorElement*> SiStripFEDMonitorPlugin::apvErrorDetailed_ [private]

Definition at line 87 of file SiStripFEDMonitor.cc.

Referenced by analyzeChannels(), and bookFEDHistograms().

MonitorElement * SiStripFEDMonitorPlugin::badActiveChannelStatusBits_ [private]

Definition at line 83 of file SiStripFEDMonitor.cc.

Referenced by analyzeChannels(), and bookTopLevelHistograms().

MonitorElement * SiStripFEDMonitorPlugin::badChannelStatusBits_ [private]

Definition at line 83 of file SiStripFEDMonitor.cc.

Referenced by analyzeFED(), and bookTopLevelHistograms().

MonitorElement * SiStripFEDMonitorPlugin::badDAQCRCs_ [private]

Definition at line 83 of file SiStripFEDMonitor.cc.

Referenced by analyzeFED(), and bookTopLevelHistograms().

MonitorElement * SiStripFEDMonitorPlugin::badFEDCRCs_ [private]

Definition at line 83 of file SiStripFEDMonitor.cc.

Referenced by analyzeFED(), and bookTopLevelHistograms().

MonitorElement * SiStripFEDMonitorPlugin::badIDs_ [private]

Definition at line 83 of file SiStripFEDMonitor.cc.

Referenced by analyzeFED(), and bookTopLevelHistograms().

std::map<unsigned int,MonitorElement*> SiStripFEDMonitorPlugin::badMajorityAddressDetailed_ [private]

Definition at line 86 of file SiStripFEDMonitor.cc.

Referenced by analyzeFEUnits(), and bookFEDHistograms().

MonitorElement * SiStripFEDMonitorPlugin::badMajorityAddresses_ [private]

Definition at line 83 of file SiStripFEDMonitor.cc.

Referenced by analyzeFEUnits(), and bookTopLevelHistograms().

std::map<unsigned int,MonitorElement*> SiStripFEDMonitorPlugin::badStatusBitsDetailed_ [private]

Definition at line 87 of file SiStripFEDMonitor.cc.

Referenced by analyzeChannels(), and bookFEDHistograms().

const SiStripFedCabling* SiStripFEDMonitorPlugin::cabling_ [private]

Definition at line 81 of file SiStripFEDMonitor.cc.

Referenced by analyzeChannels(), and updateCabling().

uint32_t SiStripFEDMonitorPlugin::cablingCacheId_ [private]

Definition at line 80 of file SiStripFEDMonitor.cc.

Referenced by updateCabling().

MonitorElement * SiStripFEDMonitorPlugin::corruptBuffers_ [private]

Definition at line 83 of file SiStripFEDMonitor.cc.

Referenced by analyzeFED(), and bookTopLevelHistograms().

MonitorElement * SiStripFEDMonitorPlugin::daqProblems_ [private]

Definition at line 83 of file SiStripFEDMonitor.cc.

Referenced by analyzeFED(), and bookTopLevelHistograms().

std::vector<bool> SiStripFEDMonitorPlugin::debugHistosBooked_ [private]

Definition at line 89 of file SiStripFEDMonitor.cc.

Referenced by beginJob(), and bookFEDHistograms().

bool SiStripFEDMonitorPlugin::disableFEDHistograms_ [private]

Definition at line 78 of file SiStripFEDMonitor.cc.

Referenced by bookFEDHistograms().

bool SiStripFEDMonitorPlugin::disableGlobalExpertHistograms_ [private]

Definition at line 77 of file SiStripFEDMonitor.cc.

Referenced by bookTopLevelHistograms().

DQMStore* SiStripFEDMonitorPlugin::dqm_ [private]

Definition at line 79 of file SiStripFEDMonitor.cc.

Referenced by beginJob(), bookFEDHistograms(), bookTopLevelHistograms(), and endJob().

std::map<unsigned int,MonitorElement*> SiStripFEDMonitorPlugin::feOverflowDetailed_ [private]

Definition at line 86 of file SiStripFEDMonitor.cc.

Referenced by analyzeFEUnits(), and bookFEDHistograms().

MonitorElement * SiStripFEDMonitorPlugin::feOverflows_ [private]

Definition at line 83 of file SiStripFEDMonitor.cc.

Referenced by analyzeFEUnits(), and bookTopLevelHistograms().

bool SiStripFEDMonitorPlugin::fillAllHistograms_ [private]

Definition at line 76 of file SiStripFEDMonitor.cc.

Referenced by beginJob(), bookFEDHistograms(), and bookTopLevelHistograms().

std::string SiStripFEDMonitorPlugin::folderName_ [private]

Definition at line 73 of file SiStripFEDMonitor.cc.

Referenced by beginJob().

std::vector<bool> SiStripFEDMonitorPlugin::histosBooked_ [private]

Definition at line 89 of file SiStripFEDMonitor.cc.

Referenced by beginJob(), and bookFEDHistograms().

MonitorElement * SiStripFEDMonitorPlugin::invalidBuffers_ [private]

Definition at line 83 of file SiStripFEDMonitor.cc.

Referenced by analyzeFED(), and bookTopLevelHistograms().

std::map<unsigned int,MonitorElement*> SiStripFEDMonitorPlugin::outOfSyncDetailed_ [private]

Definition at line 87 of file SiStripFEDMonitor.cc.

Referenced by analyzeChannels(), and bookFEDHistograms().

bool SiStripFEDMonitorPlugin::printDebug_ [private]

Definition at line 74 of file SiStripFEDMonitor.cc.

Referenced by analyzeFED().

edm::InputTag SiStripFEDMonitorPlugin::rawDataTag_ [private]

Definition at line 72 of file SiStripFEDMonitor.cc.

Referenced by analyze().

std::map<unsigned int,MonitorElement*> SiStripFEDMonitorPlugin::unlockedDetailed_ [private]

Definition at line 87 of file SiStripFEDMonitor.cc.

Referenced by analyzeChannels(), and bookFEDHistograms().

bool SiStripFEDMonitorPlugin::writeDQMStore_ [private]

Definition at line 75 of file SiStripFEDMonitor.cc.

Referenced by endJob().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:32:23 2009 for CMSSW by  doxygen 1.5.4