CMS 3D CMS Logo

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

#include <SiPixelRawDataErrorSource.h>

Inheritance diagram for SiPixelRawDataErrorSource:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Types

typedef edm::DetSet
< SiPixelRawDataError >
::const_iterator 
ErrorIterator
 
- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
virtual void bookMEs (DQMStore::IBooker &)
 
virtual void buildStructure (edm::EventSetup const &)
 
virtual void dqmBeginRun (const edm::Run &, edm::EventSetup const &)
 
 SiPixelRawDataErrorSource (const edm::ParameterSet &conf)
 
 ~SiPixelRawDataErrorSource ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- 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 Attributes

bool bladeOn
 
MonitorElementbyLumiErrors
 
edm::ParameterSet conf_
 
MonitorElementerrorRate
 
int eventNo
 
MonitorElementfedcounter
 
bool firstRun
 
edm::EDGetTokenT
< FEDRawDataCollection
inputSourceToken_
 
bool isPIB
 
bool isUpgrade
 
bool ladOn
 
MonitorElementmeErrorType_ [40]
 
MonitorElementmeEvtNbr_ [40]
 
MonitorElementmeEvtSize_ [40]
 
MonitorElementmeFedChLErr_ [40]
 
MonitorElementmeFedChNErr_ [40]
 
MonitorElementmeFedETypeNErr_ [40]
 
MonitorElementmeFullType_ [40]
 
std::map< std::string,
MonitorElement ** > 
meMapFEDs_
 
MonitorElementmeNErrors_ [40]
 
MonitorElementmeTBMMessage_ [40]
 
MonitorElementmeTBMType_ [40]
 
bool modOn
 
bool reducedSet
 
bool saveFile
 
bool slowDown
 
edm::EDGetTokenT
< edm::DetSetVector
< SiPixelRawDataError > > 
src_
 
std::map< uint32_t,
SiPixelRawDataErrorModule * > 
theFEDStructure
 
std::map< uint32_t,
SiPixelRawDataErrorModule * > 
thePixelStructure
 

Additional Inherited Members

- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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: Produces histograms for error information generated at the raw2digi stage for the pixel tracker.

Usage: Takes a DetSetVector<SiPixelRawDataError> as input, and uses it to populate a folder hierarchy (organized by detId) with histograms containing information about the errors. Uses SiPixelRawDataErrorModule class to book and fill individual folders. Note that this source is different than other DQM sources in the creation of an unphysical detId folder (detId=0xffffffff) to hold information about errors for which there is no detId available (except the dummy detId given to it at raw2digi).

Definition at line 53 of file SiPixelRawDataErrorSource.h.

Member Typedef Documentation

Definition at line 58 of file SiPixelRawDataErrorSource.h.

Constructor & Destructor Documentation

SiPixelRawDataErrorSource::SiPixelRawDataErrorSource ( const edm::ParameterSet conf)
explicit

Definition at line 53 of file SiPixelRawDataErrorSource.cc.

References conf_, firstRun, edm::ParameterSet::getUntrackedParameter(), and inputSourceToken_.

53  :
54  conf_(iConfig),
56  saveFile( conf_.getUntrackedParameter<bool>("saveFile",false) ),
57  isPIB( conf_.getUntrackedParameter<bool>("isPIB",false) ),
58  slowDown( conf_.getUntrackedParameter<bool>("slowDown",false) ),
59  reducedSet( conf_.getUntrackedParameter<bool>("reducedSet",false) ),
60  modOn( conf_.getUntrackedParameter<bool>("modOn",true) ),
61  ladOn( conf_.getUntrackedParameter<bool>("ladOn",false) ),
62  bladeOn( conf_.getUntrackedParameter<bool>("bladeOn",false) ),
63  isUpgrade( conf_.getUntrackedParameter<bool>("isUpgrade",false) )
64 {
65  firstRun = true;
66  LogInfo ("PixelDQM") << "SiPixelRawDataErrorSource::SiPixelRawDataErrorSource: Got DQM BackEnd interface"<<endl;
67  inputSourceToken_ = consumes<FEDRawDataCollection>(conf_.getUntrackedParameter<string>("inputSource", "source"));
68 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< edm::DetSetVector< SiPixelRawDataError > > src_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< FEDRawDataCollection > inputSourceToken_
SiPixelRawDataErrorSource::~SiPixelRawDataErrorSource ( )

Definition at line 71 of file SiPixelRawDataErrorSource.cc.

72 {
73  // do anything here that needs to be done at desctruction time
74  // (e.g. close files, deallocate resources etc.)
75  LogInfo ("PixelDQM") << "SiPixelRawDataErrorSource::~SiPixelRawDataErrorSource: Destructor"<<endl;
76 }

Member Function Documentation

void SiPixelRawDataErrorSource::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

Implements edm::stream::EDAnalyzerBase.

Definition at line 101 of file SiPixelRawDataErrorSource.cc.

References bladeOn, byLumiErrors, gather_cfg::cout, FEDRawData::data(), errorRate, eventNo, fedcounter, FEDRawDataCollection::FEDData(), MonitorElement::Fill(), edm::Event::getByToken(), i, input, inputSourceToken_, edm::HandleBase::isValid(), ladOn, edm::EventBase::luminosityBlock(), meMapFEDs_, modOn, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, MonitorElement::setBinContent(), FEDRawData::size(), slowDown, src_, DetId::subdetId(), theFEDStructure, and thePixelStructure.

102 {
103  eventNo++;
104  //check feds in readout
105  if(eventNo==1){
106  // check if any Pixel FED is in readout:
107  edm::Handle<FEDRawDataCollection> rawDataHandle;
108  iEvent.getByToken(inputSourceToken_, rawDataHandle);
109  if(!rawDataHandle.isValid()){
110  std::cout << "inputsource is empty" << std::endl;
111  edm::LogInfo("SiPixelRawDataErrorSource") << "inputsource is empty";
112  }
113  else{
114  const FEDRawDataCollection& rawDataCollection = *rawDataHandle;
115  for(int i = 0; i != 40; i++){
116  if(rawDataCollection.FEDData(i).size() && rawDataCollection.FEDData(i).data()) fedcounter->setBinContent(i+1,1);
117  }
118  }
119  }
120  // get input data
122  iEvent.getByToken( src_, input );
123  if (!input.isValid()) return;
124 
125  int lumiSection = (int)iEvent.luminosityBlock();
126 
127  int nEventBPIXModuleErrors = 0; int nEventFPIXModuleErrors = 0; int nEventBPIXFEDErrors = 0; int nEventFPIXFEDErrors = 0;
128  int nErrors = 0;
129 
130  std::map<uint32_t,SiPixelRawDataErrorModule*>::iterator struct_iter;
131  std::map<uint32_t,SiPixelRawDataErrorModule*>::iterator struct_iter2;
132  for (struct_iter = thePixelStructure.begin() ; struct_iter != thePixelStructure.end() ; struct_iter++) {
133 
134  int numberOfModuleErrors = (*struct_iter).second->fill(*input, &meMapFEDs_, modOn, ladOn, bladeOn);
135  if(DetId( (*struct_iter).first ).subdetId() == static_cast<int>(PixelSubdetector::PixelBarrel)) nEventBPIXModuleErrors = nEventBPIXModuleErrors + numberOfModuleErrors;
136  if(DetId( (*struct_iter).first ).subdetId() == static_cast<int>(PixelSubdetector::PixelEndcap)) nEventFPIXModuleErrors = nEventFPIXModuleErrors + numberOfModuleErrors;
137  //cout<<"NErrors: "<<nEventBPIXModuleErrors<<" "<<nEventFPIXModuleErrors<<endl;
138  nErrors = nErrors + numberOfModuleErrors;
139  //if(nErrors>0) cout<<"MODULES: nErrors: "<<nErrors<<endl;
140  }
141  for (struct_iter2 = theFEDStructure.begin() ; struct_iter2 != theFEDStructure.end() ; struct_iter2++) {
142 
143  int numberOfFEDErrors = (*struct_iter2).second->fillFED(*input, &meMapFEDs_);
144  if((*struct_iter2).first <= 31) nEventBPIXFEDErrors = nEventBPIXFEDErrors + numberOfFEDErrors; // (*struct_iter2).first >= 0, since (*struct_iter2).first is unsigned
145  if((*struct_iter2).first >= 32 && (*struct_iter2).first <= 39) nEventFPIXFEDErrors = nEventFPIXFEDErrors + numberOfFEDErrors;
146  //cout<<"NFEDErrors: "<<nEventBPIXFEDErrors<<" "<<nEventFPIXFEDErrors<<endl;
147  nErrors = nErrors + numberOfFEDErrors;
148  //if(nErrors>0) cout<<"FEDS: nErrors: "<<nErrors<<endl;
149  }
150  if(byLumiErrors){
152  //cout<<"NErrors: "<<nEventBPIXModuleErrors<<" "<<nEventFPIXModuleErrors<<" "<<nEventBPIXFEDErrors<<" "<<nEventFPIXFEDErrors<<endl;
153  if(nEventBPIXModuleErrors+nEventBPIXFEDErrors>0) byLumiErrors->Fill(0,1.);
154  if(nEventFPIXModuleErrors+nEventFPIXFEDErrors>0) byLumiErrors->Fill(1,1.);
155  //cout<<"histo: "<<byLumiErrors->getBinContent(0)<<" "<<byLumiErrors->getBinContent(1)<<" "<<byLumiErrors->getBinContent(2)<<endl;
156  }
157 
158  // Rate of errors per lumi section:
159  if(errorRate) errorRate->Fill(lumiSection, nErrors);
160 
161  // slow down...
162  if(slowDown) usleep(100000);
163 
164 }
int i
Definition: DBlmapReader.cc:9
void setBinContent(int binx, double content)
set content of bin (1-D)
std::map< uint32_t, SiPixelRawDataErrorModule * > theFEDStructure
edm::EDGetTokenT< edm::DetSetVector< SiPixelRawDataError > > src_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:446
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:59
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:47
static std::string const input
Definition: EdmProvDump.cc:44
void Fill(long long x)
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
std::map< uint32_t, SiPixelRawDataErrorModule * > thePixelStructure
bool isValid() const
Definition: HandleBase.h:76
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
Definition: DetId.h:18
edm::EDGetTokenT< FEDRawDataCollection > inputSourceToken_
std::map< std::string, MonitorElement ** > meMapFEDs_
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:28
tuple cout
Definition: gather_cfg.py:121
void SiPixelRawDataErrorSource::bookHistograms ( DQMStore::IBooker iBooker,
edm::Run const &  ,
edm::EventSetup const &  iSetup 
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 93 of file SiPixelRawDataErrorSource.cc.

References bookMEs().

93  {
94  // Book Monitoring Elements
95  bookMEs(iBooker);
96 }
virtual void bookMEs(DQMStore::IBooker &)
void SiPixelRawDataErrorSource::bookMEs ( DQMStore::IBooker iBooker)
virtual

Create folder tree and book histograms

Create folder tree for errors without detId and book histograms

Definition at line 268 of file SiPixelRawDataErrorSource.cc.

References bladeOn, DQMStore::IBooker::book1D(), byLumiErrors, DQMStore::IBooker::cd(), conf_, errorRate, edm::hlt::Exception, fedcounter, edm::ParameterSet::getParameter(), isPIB, isUpgrade, edm::InputTag::label(), ladOn, LogDebug, meErrorType_, meEvtNbr_, meEvtSize_, meFedChLErr_, meFedChNErr_, meFedETypeNErr_, meFullType_, meMapFEDs_, meNErrors_, meTBMMessage_, meTBMType_, modOn, MonitorElement::setAxisTitle(), DQMStore::IBooker::setCurrentFolder(), SiPixelFolderOrganizer::setFedFolder(), MonitorElement::setLumiFlag(), SiPixelFolderOrganizer::setModuleFolder(), alcazmumu_cfi::src, AlCaHLTBitMon_QueryRunRegistry::string, groupFilesInBlocks::temp, theFEDStructure, thePixelStructure, and indexGen::title.

Referenced by bookHistograms().

268  {
269  iBooker.setCurrentFolder("Pixel/EventInfo/DAQContents");
270  char title0[80]; sprintf(title0, "FED isPresent;FED ID;isPresent");
271  fedcounter = iBooker.book1D("fedcounter",title0,40,-0.5,39.5);
272  iBooker.setCurrentFolder("Pixel/AdditionalPixelErrors");
273  char title[80]; sprintf(title, "By-LumiSection Error counters");
274  byLumiErrors = iBooker.book1D("byLumiErrors",title,2,0.,2.);
276  char title1[80]; sprintf(title1, "Errors per LumiSection;LumiSection;NErrors");
277  errorRate = iBooker.book1D("errorRate",title1,5000,0.,5000.);
278 
279  std::map<uint32_t,SiPixelRawDataErrorModule*>::iterator struct_iter;
280  std::map<uint32_t,SiPixelRawDataErrorModule*>::iterator struct_iter2;
281 
282  SiPixelFolderOrganizer theSiPixelFolder(false);
283 
284  for(struct_iter = thePixelStructure.begin(); struct_iter != thePixelStructure.end(); struct_iter++){
286 
287  if(modOn){
288  if(!theSiPixelFolder.setModuleFolder(iBooker,(*struct_iter).first,0,isUpgrade)) {
289  //std::cout<<"PIB! not booking histograms for non-PIB modules!"<<std::endl;
290  if(!isPIB) throw cms::Exception("LogicError")
291  << "[SiPixelRawDataErrorSource::bookMEs] Creation of DQM folder failed";
292  }
293  }
294 
295  if(ladOn){
296  if(!theSiPixelFolder.setModuleFolder(iBooker,(*struct_iter).first,1,isUpgrade)) {
297  LogDebug ("PixelDQM") << "PROBLEM WITH LADDER-FOLDER\n";
298  }
299  }
300 
301  if(bladeOn){
302  if(!theSiPixelFolder.setModuleFolder(iBooker,(*struct_iter).first,4,isUpgrade)) {
303  LogDebug ("PixelDQM") << "PROBLEM WITH BLADE-FOLDER\n";
304  }
305  }
306 
307  }//for loop
308 
309  for(struct_iter2 = theFEDStructure.begin(); struct_iter2 != theFEDStructure.end(); struct_iter2++){
311  if(!theSiPixelFolder.setFedFolder(iBooker,(*struct_iter2).first)) {
312  throw cms::Exception("LogicError")
313  << "[SiPixelRawDataErrorSource::bookMEs] Creation of DQM folder failed";
314  }
315 
316  }
317 
318  //Booking FED histograms
319  std::string hid;
320  // Get collection name and instantiate Histo Id builder
322  SiPixelHistogramId* theHistogramId = new SiPixelHistogramId( src.label() );
323 
324  for (uint32_t id = 0; id < 40; id++){
325  char temp [50];
326  sprintf( temp, "Pixel/AdditionalPixelErrors/FED_%d",id);
327  iBooker.cd(temp);
328  // Types of errors
329  hid = theHistogramId->setHistoId("errorType",id);
330  meErrorType_[id] = iBooker.book1D(hid,"Type of errors",15,24.5,39.5);
331  meErrorType_[id]->setAxisTitle("Type of errors",1);
332  // Number of errors
333  hid = theHistogramId->setHistoId("NErrors",id);
334  meNErrors_[id] = iBooker.book1D(hid,"Number of errors",36,0.,36.);
335  meNErrors_[id]->setAxisTitle("Number of errors",1);
336  // Type of FIFO full (errorType = 28). FIFO 1 is 1-5 (where fullType = channel of FIFO 1),
337  // fullType = 6 signifies FIFO 2 nearly full, 7 signifies trigger FIFO nearly full, 8
338  // indicates an unexpected result
339  hid = theHistogramId->setHistoId("fullType",id);
340  meFullType_[id] = iBooker.book1D(hid,"Type of FIFO full",7,0.5,7.5);
341  meFullType_[id]->setAxisTitle("FIFO type",1);
342  // For error type 30, the type of problem encoded in the TBM trailer
343  // 0 = stack full, 1 = Pre-cal issued, 2 = clear trigger counter, 3 = sync trigger,
344  // 4 = sync trigger error, 5 = reset ROC, 6 = reset TBM, 7 = no token bit pass
345  hid = theHistogramId->setHistoId("TBMMessage",id);
346  meTBMMessage_[id] = iBooker.book1D(hid,"TBM trailer message",8,-0.5,7.5);
347  meTBMMessage_[id]->setAxisTitle("TBM message",1);
348  // For error type 30, the type of problem encoded in the TBM error trailer 0 = none
349  // 1 = data stream too long, 2 = FSM errors, 3 = invalid # of ROCs, 4 = multiple
350  hid = theHistogramId->setHistoId("TBMType",id);
351  meTBMType_[id] = iBooker.book1D(hid,"Type of TBM trailer",5,-0.5,4.5);
352  meTBMType_[id]->setAxisTitle("TBM Type",1);
353  // For error type 31, the event number of the TBM header with the error
354  hid = theHistogramId->setHistoId("EvtNbr",id);
355  meEvtNbr_[id] = iBooker.book1D(hid,"Event number",1,0,1);
356  // For errorType = 34, datastream size according to error word
357  hid = theHistogramId->setHistoId("evtSize",id);
358  meEvtSize_[id] = iBooker.book1D(hid,"Event size",1,0,1);
359  //
360  hid = theHistogramId->setHistoId("FedChNErr",id);
361  meFedChNErr_[id] = iBooker.book1D(hid,"Number of errors per FED channel",37,0,37);
362  meFedChNErr_[id]->setAxisTitle("FED channel",1);
363  //
364  hid = theHistogramId->setHistoId("FedChLErr",id);
365  meFedChLErr_[id] = iBooker.book1D(hid,"Last error per FED channel",37,0,37);
366  meFedChLErr_[id]->setAxisTitle("FED channel",1);
367  //
368  hid = theHistogramId->setHistoId("FedETypeNErr", id);
369  meFedETypeNErr_[id] = iBooker.book1D(hid,"Number of errors per type",21,0,21);
370  meFedETypeNErr_[id]->setAxisTitle("Error type",1);
371  }
372  //Add the booked histograms to the histogram map for booking
373  meMapFEDs_["meErrorType_"] = meErrorType_;
374  meMapFEDs_["meNErrors_"] = meNErrors_;
375  meMapFEDs_["meFullType_"] = meFullType_;
376  meMapFEDs_["meTBMMessage_"] = meTBMMessage_;
377  meMapFEDs_["meTBMType_"] = meTBMType_;
378  meMapFEDs_["meEvtNbr_"] = meEvtNbr_;
379  meMapFEDs_["meEvtSize_"] = meEvtSize_;
380  meMapFEDs_["meFedChNErr_"] = meFedChNErr_;
381  meMapFEDs_["meFedChLErr_"] = meFedChLErr_;
382  meMapFEDs_["meFedETypeNErr_"] = meFedETypeNErr_;
383 
384  //cout<<"...leaving SiPixelRawDataErrorSource::bookMEs now! "<<endl;
385 }
#define LogDebug(id)
T getParameter(std::string const &) const
std::map< uint32_t, SiPixelRawDataErrorModule * > theFEDStructure
void cd(void)
Definition: DQMStore.cc:266
MonitorElement * meFedETypeNErr_[40]
std::map< uint32_t, SiPixelRawDataErrorModule * > thePixelStructure
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
std::string const & label() const
Definition: InputTag.h:42
std::map< std::string, MonitorElement ** > meMapFEDs_
void setLumiFlag(void)
this ME is meant to be stored for each luminosity section
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void SiPixelRawDataErrorSource::buildStructure ( edm::EventSetup const &  iSetup)
virtual

Definition at line 169 of file SiPixelRawDataErrorSource.cc.

References PixelEndcapNameUpgrade::bladeName(), PixelEndcapName::bladeName(), PixelEndcapNameUpgrade::diskName(), PixelEndcapName::diskName(), edm::EventSetup::get(), PixelEndcapNameUpgrade::halfCylinder(), PixelEndcapName::halfCylinder(), isPIB, isUpgrade, LogDebug, FEDNumbering::MAXSiPixelFEDID, FEDNumbering::MINSiPixelFEDID, PixelEndcapNameUpgrade::pannelName(), PixelEndcapName::pannelName(), GeomDetEnumerators::PixelBarrel, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, GeomDetEnumerators::PixelEndcap, PixelEndcapNameUpgrade::plaquetteName(), PixelEndcapName::plaquetteName(), DetId::rawId(), PixelGeomDetUnit::specificTopology(), AlCaHLTBitMon_QueryRunRegistry::string, DetId::subdetId(), theFEDStructure, and thePixelStructure.

Referenced by dqmBeginRun().

169  {
170 
171  LogInfo ("PixelDQM") <<" SiPixelRawDataErrorSource::buildStructure" ;
173  iSetup.get<TrackerDigiGeometryRecord>().get( pDD );
174 
175  LogVerbatim ("PixelDQM") << " *** Geometry node for TrackerGeom is "<<&(*pDD)<<std::endl;
176  LogVerbatim ("PixelDQM") << " *** I have " << pDD->dets().size() <<" detectors"<<std::endl;
177  LogVerbatim ("PixelDQM") << " *** I have " << pDD->detTypes().size() <<" types"<<std::endl;
178 
179  for(TrackerGeometry::DetContainer::const_iterator it = pDD->dets().begin(); it != pDD->dets().end(); it++){
180 
181  if( ((*it)->subDetector()==GeomDetEnumerators::PixelBarrel) || ((*it)->subDetector()==GeomDetEnumerators::PixelEndcap) ){
182  DetId detId = (*it)->geographicalId();
183  const GeomDetUnit * geoUnit = pDD->idToDetUnit( detId );
184  const PixelGeomDetUnit * pixDet = dynamic_cast<const PixelGeomDetUnit*>(geoUnit);
185  int nrows = (pixDet->specificTopology()).nrows();
186  int ncols = (pixDet->specificTopology()).ncolumns();
187 
188  if(detId.subdetId() == static_cast<int>(PixelSubdetector::PixelBarrel)) {
189  if(isPIB) continue;
190  LogDebug ("PixelDQM") << " ---> Adding Barrel Module " << detId.rawId() << endl;
191  uint32_t id = detId();
192  SiPixelRawDataErrorModule* theModule = new SiPixelRawDataErrorModule(id, ncols, nrows);
193  thePixelStructure.insert(pair<uint32_t,SiPixelRawDataErrorModule*> (id,theModule));
194 
195  } else if( (detId.subdetId() == static_cast<int>(PixelSubdetector::PixelEndcap)) && (!isUpgrade)) {
196  LogDebug ("PixelDQM") << " ---> Adding Endcap Module " << detId.rawId() << endl;
197  uint32_t id = detId();
198  SiPixelRawDataErrorModule* theModule = new SiPixelRawDataErrorModule(id, ncols, nrows);
199 
201  int disk = PixelEndcapName(DetId(id)).diskName();
202  int blade = PixelEndcapName(DetId(id)).bladeName();
203  int panel = PixelEndcapName(DetId(id)).pannelName();
205 
206  char sside[80]; sprintf(sside, "HalfCylinder_%i",side);
207  char sdisk[80]; sprintf(sdisk, "Disk_%i",disk);
208  char sblade[80]; sprintf(sblade, "Blade_%02i",blade);
209  char spanel[80]; sprintf(spanel, "Panel_%i",panel);
210  char smodule[80];sprintf(smodule,"Module_%i",module);
211  std::string side_str = sside;
212  std::string disk_str = sdisk;
213  bool mask = side_str.find("HalfCylinder_1")!=string::npos||
214  side_str.find("HalfCylinder_2")!=string::npos||
215  side_str.find("HalfCylinder_4")!=string::npos||
216  disk_str.find("Disk_2")!=string::npos;
217  // clutch to take all of FPIX, but no BPIX:
218  mask = false;
219  if(isPIB && mask) continue;
220 
221  thePixelStructure.insert(pair<uint32_t,SiPixelRawDataErrorModule*> (id,theModule));
222  } else if( (detId.subdetId() == static_cast<int>(PixelSubdetector::PixelEndcap)) && (isUpgrade)) {
223  LogDebug ("PixelDQM") << " ---> Adding Endcap Module " << detId.rawId() << endl;
224  uint32_t id = detId();
225  SiPixelRawDataErrorModule* theModule = new SiPixelRawDataErrorModule(id, ncols, nrows);
226 
228  int disk = PixelEndcapNameUpgrade(DetId(id)).diskName();
229  int blade = PixelEndcapNameUpgrade(DetId(id)).bladeName();
230  int panel = PixelEndcapNameUpgrade(DetId(id)).pannelName();
231  int module = PixelEndcapNameUpgrade(DetId(id)).plaquetteName();
232 
233  char sside[80]; sprintf(sside, "HalfCylinder_%i",side);
234  char sdisk[80]; sprintf(sdisk, "Disk_%i",disk);
235  char sblade[80]; sprintf(sblade, "Blade_%02i",blade);
236  char spanel[80]; sprintf(spanel, "Panel_%i",panel);
237  char smodule[80];sprintf(smodule,"Module_%i",module);
238  std::string side_str = sside;
239  std::string disk_str = sdisk;
240  bool mask = side_str.find("HalfCylinder_1")!=string::npos||
241  side_str.find("HalfCylinder_2")!=string::npos||
242  side_str.find("HalfCylinder_4")!=string::npos||
243  disk_str.find("Disk_2")!=string::npos;
244  // clutch to take all of FPIX, but no BPIX:
245  mask = false;
246  if(isPIB && mask) continue;
247 
248  thePixelStructure.insert(pair<uint32_t,SiPixelRawDataErrorModule*> (id,theModule));
249  }//endif(isUpgrade)
250  }
251  }
252  LogDebug ("PixelDQM") << " ---> Adding Module for Additional Errors " << endl;
254  fedIds.first = 0;
255  fedIds.second = 39;
256  for (int fedId = fedIds.first; fedId <= fedIds.second; fedId++) {
257  //std::cout<<"Adding FED module: "<<fedId<<std::endl;
258  uint32_t id = static_cast<uint32_t> (fedId);
260  theFEDStructure.insert(pair<uint32_t,SiPixelRawDataErrorModule*> (id,theModule));
261  }
262 
263  LogInfo ("PixelDQM") << " *** Pixel Structure Size " << thePixelStructure.size() << endl;
264 }
#define LogDebug(id)
int plaquetteName() const
plaquetteId (in pannel)
std::map< uint32_t, SiPixelRawDataErrorModule * > theFEDStructure
int plaquetteName() const
plaquetteId (in pannel)
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
int bladeName() const
blade id
std::map< uint32_t, SiPixelRawDataErrorModule * > thePixelStructure
int bladeName() const
blade id
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
int diskName() const
disk id
Definition: DetId.h:18
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
int pannelName() const
pannel id
int diskName() const
disk id
HalfCylinder halfCylinder() const
HalfCylinder halfCylinder() const
int pannelName() const
pannel id
Definition: vlib.h:208
void SiPixelRawDataErrorSource::dqmBeginRun ( const edm::Run r,
edm::EventSetup const &  iSetup 
)
virtual

Reimplemented from DQMEDAnalyzer.

Definition at line 78 of file SiPixelRawDataErrorSource.cc.

References bladeOn, buildStructure(), eventNo, firstRun, ladOn, and modOn.

78  {
79 
80  LogInfo ("PixelDQM") << " SiPixelRawDataErrorSource::beginRun - Initialisation ... " << std::endl;
81  LogInfo ("PixelDQM") << "Mod/Lad/Blade " << modOn << "/" << ladOn << "/" << bladeOn << std::endl;
82 
83  if(firstRun){
84  eventNo = 0;
85 
86  firstRun = false;
87  }
88 
89  // Build map
90  buildStructure(iSetup);
91 }
virtual void buildStructure(edm::EventSetup const &)

Member Data Documentation

bool SiPixelRawDataErrorSource::bladeOn
private

Definition at line 78 of file SiPixelRawDataErrorSource.h.

Referenced by analyze(), bookMEs(), and dqmBeginRun().

MonitorElement* SiPixelRawDataErrorSource::byLumiErrors
private

Definition at line 84 of file SiPixelRawDataErrorSource.h.

Referenced by analyze(), and bookMEs().

edm::ParameterSet SiPixelRawDataErrorSource::conf_
private

Definition at line 69 of file SiPixelRawDataErrorSource.h.

Referenced by bookMEs(), and SiPixelRawDataErrorSource().

MonitorElement* SiPixelRawDataErrorSource::errorRate
private

Definition at line 85 of file SiPixelRawDataErrorSource.h.

Referenced by analyze(), and bookMEs().

int SiPixelRawDataErrorSource::eventNo
private

Definition at line 80 of file SiPixelRawDataErrorSource.h.

Referenced by analyze(), and dqmBeginRun().

MonitorElement* SiPixelRawDataErrorSource::fedcounter
private

Definition at line 86 of file SiPixelRawDataErrorSource.h.

Referenced by analyze(), and bookMEs().

bool SiPixelRawDataErrorSource::firstRun
private

Definition at line 83 of file SiPixelRawDataErrorSource.h.

Referenced by dqmBeginRun(), and SiPixelRawDataErrorSource().

edm::EDGetTokenT<FEDRawDataCollection> SiPixelRawDataErrorSource::inputSourceToken_
private

Definition at line 71 of file SiPixelRawDataErrorSource.h.

Referenced by analyze(), and SiPixelRawDataErrorSource().

bool SiPixelRawDataErrorSource::isPIB
private

Definition at line 73 of file SiPixelRawDataErrorSource.h.

Referenced by bookMEs(), and buildStructure().

bool SiPixelRawDataErrorSource::isUpgrade
private

Definition at line 79 of file SiPixelRawDataErrorSource.h.

Referenced by bookMEs(), and buildStructure().

bool SiPixelRawDataErrorSource::ladOn
private

Definition at line 77 of file SiPixelRawDataErrorSource.h.

Referenced by analyze(), bookMEs(), and dqmBeginRun().

MonitorElement* SiPixelRawDataErrorSource::meErrorType_[40]
private

Definition at line 88 of file SiPixelRawDataErrorSource.h.

Referenced by bookMEs().

MonitorElement* SiPixelRawDataErrorSource::meEvtNbr_[40]
private

Definition at line 93 of file SiPixelRawDataErrorSource.h.

Referenced by bookMEs().

MonitorElement* SiPixelRawDataErrorSource::meEvtSize_[40]
private

Definition at line 94 of file SiPixelRawDataErrorSource.h.

Referenced by bookMEs().

MonitorElement* SiPixelRawDataErrorSource::meFedChLErr_[40]
private

Definition at line 97 of file SiPixelRawDataErrorSource.h.

Referenced by bookMEs().

MonitorElement* SiPixelRawDataErrorSource::meFedChNErr_[40]
private

Definition at line 96 of file SiPixelRawDataErrorSource.h.

Referenced by bookMEs().

MonitorElement* SiPixelRawDataErrorSource::meFedETypeNErr_[40]
private

Definition at line 98 of file SiPixelRawDataErrorSource.h.

Referenced by bookMEs().

MonitorElement* SiPixelRawDataErrorSource::meFullType_[40]
private

Definition at line 90 of file SiPixelRawDataErrorSource.h.

Referenced by bookMEs().

std::map<std::string,MonitorElement**> SiPixelRawDataErrorSource::meMapFEDs_
private

Definition at line 100 of file SiPixelRawDataErrorSource.h.

Referenced by analyze(), and bookMEs().

MonitorElement* SiPixelRawDataErrorSource::meNErrors_[40]
private

Definition at line 89 of file SiPixelRawDataErrorSource.h.

Referenced by bookMEs().

MonitorElement* SiPixelRawDataErrorSource::meTBMMessage_[40]
private

Definition at line 91 of file SiPixelRawDataErrorSource.h.

Referenced by bookMEs().

MonitorElement* SiPixelRawDataErrorSource::meTBMType_[40]
private

Definition at line 92 of file SiPixelRawDataErrorSource.h.

Referenced by bookMEs().

bool SiPixelRawDataErrorSource::modOn
private

Definition at line 76 of file SiPixelRawDataErrorSource.h.

Referenced by analyze(), bookMEs(), and dqmBeginRun().

bool SiPixelRawDataErrorSource::reducedSet
private

Definition at line 75 of file SiPixelRawDataErrorSource.h.

bool SiPixelRawDataErrorSource::saveFile
private

Definition at line 72 of file SiPixelRawDataErrorSource.h.

bool SiPixelRawDataErrorSource::slowDown
private

Definition at line 74 of file SiPixelRawDataErrorSource.h.

Referenced by analyze().

edm::EDGetTokenT<edm::DetSetVector<SiPixelRawDataError> > SiPixelRawDataErrorSource::src_
private

Definition at line 70 of file SiPixelRawDataErrorSource.h.

Referenced by analyze().

std::map<uint32_t,SiPixelRawDataErrorModule*> SiPixelRawDataErrorSource::theFEDStructure
private

Definition at line 82 of file SiPixelRawDataErrorSource.h.

Referenced by analyze(), bookMEs(), and buildStructure().

std::map<uint32_t,SiPixelRawDataErrorModule*> SiPixelRawDataErrorSource::thePixelStructure
private

Definition at line 81 of file SiPixelRawDataErrorSource.h.

Referenced by analyze(), bookMEs(), and buildStructure().