CMS 3D CMS Logo

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

#include <SiPixelHLTSource.h>

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

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 dqmBeginRun (const edm::Run &, edm::EventSetup const &)
 
 SiPixelHLTSource (const edm::ParameterSet &conf)
 
 ~SiPixelHLTSource ()
 
- 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
std::vector< ConsumesInfoconsumesInfo () const
 
 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
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Public Attributes

std::string topFolderName_
 

Private Attributes

edm::ParameterSet conf_
 
std::string dirName_
 
edm::EDGetTokenT
< edm::DetSetVector
< SiPixelRawDataError > > 
errin_
 
int eventNo
 
bool firstRun
 
MonitorElementmeNCRCs_
 
MonitorElementmeNErrors_
 
MonitorElementmeRawWords_
 
edm::ESHandle< TrackerGeometrypDD
 
edm::EDGetTokenT
< FEDRawDataCollection
rawin_
 
bool saveFile
 
bool slowDown
 

Additional Inherited Members

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

Implementation: Takes raw data and error data as input, and uses it to populate three histograms indexed by FED id.

Definition at line 49 of file SiPixelHLTSource.h.

Constructor & Destructor Documentation

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

Definition at line 49 of file SiPixelHLTSource.cc.

References conf_, firstRun, edm::ParameterSet::getParameter(), AlCaHLTBitMon_QueryRunRegistry::string, and topFolderName_.

49  :
50  conf_(iConfig),
51  rawin_( consumes<FEDRawDataCollection>( conf_.getParameter<edm::InputTag>( "RawInput" ) ) ),
53  saveFile( conf_.getUntrackedParameter<bool>("saveFile",false) ),
54  slowDown( conf_.getUntrackedParameter<bool>("slowDown",false) )
55 {
56  firstRun = true;
57  LogInfo ("PixelDQM") << "SiPixelHLTSource::SiPixelHLTSource: Got DQM BackEnd interface"<<endl;
58  topFolderName_ = conf_.getParameter<std::string>("TopFolderName");
59 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::ParameterSet conf_
std::string topFolderName_
edm::EDGetTokenT< edm::DetSetVector< SiPixelRawDataError > > errin_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< FEDRawDataCollection > rawin_
SiPixelHLTSource::~SiPixelHLTSource ( )

Definition at line 62 of file SiPixelHLTSource.cc.

63 {
64  // do anything here that needs to be done at desctruction time
65  // (e.g. close files, deallocate resources etc.)
66  LogInfo ("PixelDQM") << "SiPixelHLTSource::~SiPixelHLTSource: Destructor"<<endl;
67 }

Member Function Documentation

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

Implements edm::stream::EDAnalyzerBase.

Definition at line 88 of file SiPixelHLTSource.cc.

References edm::DetSetVector< T >::begin(), edm::DetSetVector< T >::end(), errin_, eventNo, HLT_25ns14e33_v1_cff::fedId, HcalObjRepresent::Fill(), edm::Event::getByToken(), GeomDetEnumerators::isTrackerPixel(), edm::HandleBase::isValid(), meNCRCs_, meNErrors_, meRawWords_, pDD, rawin_, FEDRawData::size(), and slowDown.

89 {
90  eventNo++;
91  // get raw input data
93  iEvent.getByToken( rawin_, rawinput );
94  // get error input data
96  iEvent.getByToken( errin_, errorinput );
97  if (!errorinput.isValid()) return;
98 
99  int fedId;
100 
101  for(fedId = 0; fedId <= 39; fedId++) {
102  //get event data for this fed
103  const FEDRawData& fedRawData = rawinput->FEDData( fedId );
104  if (fedRawData.size() != 0) (meRawWords_)->Fill(fedId);
105  } // end for
106 
108 
109  for(TrackerGeometry::DetContainer::const_iterator it = pDD->dets().begin(); it != pDD->dets().end(); it++){
110  if( GeomDetEnumerators::isTrackerPixel((*it)->subDetector())) {
111  uint32_t detId = (*it)->geographicalId();
112  edm::DetSetVector<SiPixelRawDataError>::const_iterator isearch = errorinput->find(detId);
113  if( isearch != errorinput->end() ) {
114  for(di = isearch->data.begin(); di != isearch->data.end(); di++) {
115  fedId = di->getFedId(); // FED the error came from
116  int errorType = di->getType(); // type of error
117  switch(errorType) {
118  case(35) : (meNErrors_)->Fill(fedId); break;
119  case(36) : (meNErrors_)->Fill(fedId); break;
120  case(37) : (meNErrors_)->Fill(fedId); break;
121  case(38) : (meNErrors_)->Fill(fedId); break;
122  default : break;
123  }; // end switch
124  } // end for(di
125  } // end if( isearch
126  } // end if( ((*it)->subDetector()
127  } // for(TrackerGeometry
128 
129  edm::DetSetVector<SiPixelRawDataError>::const_iterator isearch = errorinput->find(0xffffffff);
130 
131  if( isearch != errorinput->end() ) { // Not at empty iterator
132  for(di = isearch->data.begin(); di != isearch->data.end(); di++) {
133  fedId = di->getFedId(); // FED the error came from
134  int errorType = di->getType(); // type of error
135  switch(errorType) {
136  case(35) : (meNErrors_)->Fill(fedId); break;
137  case(36) : (meNErrors_)->Fill(fedId); break;
138  case(37) : (meNErrors_)->Fill(fedId); break;
139  case(38) : (meNErrors_)->Fill(fedId); break;
140  case(39) : (meNCRCs_)->Fill(fedId); break;
141  default : break;
142  }; // end switch
143  } // end for(di
144  } // end if( isearch
145  // slow down...
146  if(slowDown) usleep(100000);
147 
148 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:449
MonitorElement * meNErrors_
edm::EDGetTokenT< edm::DetSetVector< SiPixelRawDataError > > errin_
MonitorElement * meNCRCs_
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:47
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
bool isValid() const
Definition: HandleBase.h:75
edm::EDGetTokenT< FEDRawDataCollection > rawin_
iterator end()
Return the off-the-end iterator.
Definition: DetSetVector.h:365
MonitorElement * meRawWords_
bool isTrackerPixel(const GeomDetEnumerators::SubDetector m)
iterator begin()
Return an iterator to the first DetSet.
Definition: DetSetVector.h:350
collection_type::const_iterator const_iterator
Definition: DetSet.h:33
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:108
edm::ESHandle< TrackerGeometry > pDD
void SiPixelHLTSource::bookHistograms ( DQMStore::IBooker iBooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 80 of file SiPixelHLTSource.cc.

References bookMEs().

80  {
81  // Book Monitoring Elements
82  bookMEs(iBooker);
83 }
virtual void bookMEs(DQMStore::IBooker &)
void SiPixelHLTSource::bookMEs ( DQMStore::IBooker iBooker)
virtual

Definition at line 153 of file SiPixelHLTSource.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::cd(), conf_, edm::ParameterSet::getParameter(), edm::InputTag::label(), meNCRCs_, meNErrors_, meRawWords_, MonitorElement::setAxisTitle(), DQMStore::IBooker::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and topFolderName_.

Referenced by bookHistograms().

153  {
154 
155  iBooker.cd();
156  iBooker.setCurrentFolder(topFolderName_+"/FEDIntegrity/");
157 
158  std::string rawhid;
159  std::string errhid;
160  // Get collection name and instantiate Histo Id builder
161  edm::InputTag rawin = conf_.getParameter<edm::InputTag>( "RawInput" );
162  SiPixelHistogramId* RawHistogramId = new SiPixelHistogramId( rawin.label() );
163  edm::InputTag errin = conf_.getParameter<edm::InputTag>( "ErrorInput" );
164  SiPixelHistogramId* ErrorHistogramId = new SiPixelHistogramId( errin.label() );
165 
166  // Is a FED sending raw data
167  meRawWords_ = iBooker.book1D("FEDEntries","Number of raw words",40,-0.5,39.5);
168  meRawWords_->setAxisTitle("Number of raw words",1);
169 
170  // Number of CRC errors
171  meNCRCs_ = iBooker.book1D("FEDFatal","Number of fatal errors",40,-0.5,39.5);
172  meNCRCs_->setAxisTitle("Number of fatal errors",1);
173 
174  // Number of translation error words
175  meNErrors_ = iBooker.book1D("FEDNonFatal","Number of non-fatal errors",40,-0.5,39.5);
176  meNErrors_->setAxisTitle("Number of non-fatal errors",1);
177 
178  delete RawHistogramId;
179  delete ErrorHistogramId;
180 
181 }
T getParameter(std::string const &) const
edm::ParameterSet conf_
std::string topFolderName_
void cd(void)
Definition: DQMStore.cc:266
MonitorElement * meNErrors_
MonitorElement * meNCRCs_
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
MonitorElement * meRawWords_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
std::string const & label() const
Definition: InputTag.h:42
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void SiPixelHLTSource::dqmBeginRun ( const edm::Run r,
edm::EventSetup const &  iSetup 
)
virtual

Reimplemented from DQMEDAnalyzer.

Definition at line 70 of file SiPixelHLTSource.cc.

References eventNo, firstRun, edm::EventSetup::get(), and pDD.

70  {
71  LogInfo ("PixelDQM") << " SiPixelHLTSource::beginJob - Initialisation ... " << std::endl;
72  iSetup.get<TrackerDigiGeometryRecord>().get( pDD );
73  if(firstRun){
74  eventNo = 0;
75 
76  firstRun = false;
77  }
78 }
edm::ESHandle< TrackerGeometry > pDD

Member Data Documentation

edm::ParameterSet SiPixelHLTSource::conf_
private

Definition at line 62 of file SiPixelHLTSource.h.

Referenced by bookMEs(), and SiPixelHLTSource().

std::string SiPixelHLTSource::dirName_
private

Definition at line 68 of file SiPixelHLTSource.h.

edm::EDGetTokenT<edm::DetSetVector<SiPixelRawDataError> > SiPixelHLTSource::errin_
private

Definition at line 64 of file SiPixelHLTSource.h.

Referenced by analyze().

int SiPixelHLTSource::eventNo
private

Definition at line 69 of file SiPixelHLTSource.h.

Referenced by analyze(), and dqmBeginRun().

bool SiPixelHLTSource::firstRun
private

Definition at line 73 of file SiPixelHLTSource.h.

Referenced by dqmBeginRun(), and SiPixelHLTSource().

MonitorElement* SiPixelHLTSource::meNCRCs_
private

Definition at line 71 of file SiPixelHLTSource.h.

Referenced by analyze(), and bookMEs().

MonitorElement* SiPixelHLTSource::meNErrors_
private

Definition at line 72 of file SiPixelHLTSource.h.

Referenced by analyze(), and bookMEs().

MonitorElement* SiPixelHLTSource::meRawWords_
private

Definition at line 70 of file SiPixelHLTSource.h.

Referenced by analyze(), and bookMEs().

edm::ESHandle<TrackerGeometry> SiPixelHLTSource::pDD
private

Definition at line 65 of file SiPixelHLTSource.h.

Referenced by analyze(), and dqmBeginRun().

edm::EDGetTokenT<FEDRawDataCollection> SiPixelHLTSource::rawin_
private

Definition at line 63 of file SiPixelHLTSource.h.

Referenced by analyze().

bool SiPixelHLTSource::saveFile
private

Definition at line 66 of file SiPixelHLTSource.h.

bool SiPixelHLTSource::slowDown
private

Definition at line 67 of file SiPixelHLTSource.h.

Referenced by analyze().

std::string SiPixelHLTSource::topFolderName_

Definition at line 59 of file SiPixelHLTSource.h.

Referenced by bookMEs(), and SiPixelHLTSource().