CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
SiStripFEDDumpPlugin Class Reference
Inheritance diagram for SiStripFEDDumpPlugin:
one::DQMEDAnalyzer< T > one::dqmimplementation::DQMBaseClass< T... >

Public Member Functions

 SiStripFEDDumpPlugin (const edm::ParameterSet &)
 
 ~SiStripFEDDumpPlugin () override
 
- Public Member Functions inherited from one::DQMEDAnalyzer< T >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 

Private Attributes

unsigned int fedIdToDump_
 
edm::InputTag rawDataTag_
 
edm::EDGetTokenT< FEDRawDataCollectionrawDataToken_
 

Detailed Description

Definition at line 23 of file SiStripFEDDump.cc.

Constructor & Destructor Documentation

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

Definition at line 44 of file SiStripFEDDump.cc.

References fedIdToDump_, FEDNumbering::MAXSiStripFEDID, FEDNumbering::MINSiStripFEDID, rawDataTag_, and rawDataToken_.

45  : rawDataTag_(iConfig.getUntrackedParameter<edm::InputTag>("RawDataTag",edm::InputTag("source",""))),
46  fedIdToDump_(iConfig.getUntrackedParameter<unsigned int>("FEDID",50))
47 {
48  rawDataToken_ = consumes<FEDRawDataCollection>(rawDataTag_);
50  edm::LogError("SiStripFEDDump") << "FED ID " << fedIdToDump_ << " is not valid. "
51  << "SiStrip FED IDs are " << uint16_t(FEDNumbering::MINSiStripFEDID) << "-" << uint16_t(FEDNumbering::MAXSiStripFEDID);
52 }
T getUntrackedParameter(std::string const &, T const &) const
unsigned int fedIdToDump_
edm::EDGetTokenT< FEDRawDataCollection > rawDataToken_
edm::InputTag rawDataTag_
SiStripFEDDumpPlugin::~SiStripFEDDumpPlugin ( )
override

Definition at line 54 of file SiStripFEDDump.cc.

55 {
56 }

Member Function Documentation

void SiStripFEDDumpPlugin::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 65 of file SiStripFEDDump.cc.

References edmScanValgrind::buffer, FEDRawData::data(), FEDRawDataCollection::FEDData(), fedIdToDump_, edm::Event::getByToken(), rawDataToken_, and FEDRawData::size().

66 {
67  //get raw data
68  edm::Handle<FEDRawDataCollection> rawDataCollectionHandle;
69  iEvent.getByToken(rawDataToken_,rawDataCollectionHandle);
70  const FEDRawDataCollection& rawDataCollection = *rawDataCollectionHandle;
71 
72  const FEDRawData& rawData = rawDataCollection.FEDData(fedIdToDump_);
73  const sistrip::FEDBufferBase buffer(rawData.data(),rawData.size(),true);
74  std::ostringstream os;
75  os << buffer << std::endl;
76  buffer.dump(os);
77  edm::LogVerbatim("SiStripFEDDump") << os.str();
78 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:47
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
unsigned int fedIdToDump_
edm::EDGetTokenT< FEDRawDataCollection > rawDataToken_
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:28
void SiStripFEDDumpPlugin::bookHistograms ( DQMStore::IBooker ,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprivate

Definition at line 80 of file SiStripFEDDump.cc.

References DEFINE_FWK_MODULE.

81 {
82 }

Member Data Documentation

unsigned int SiStripFEDDumpPlugin::fedIdToDump_
private

Definition at line 36 of file SiStripFEDDump.cc.

Referenced by analyze(), and SiStripFEDDumpPlugin().

edm::InputTag SiStripFEDDumpPlugin::rawDataTag_
private

Definition at line 33 of file SiStripFEDDump.cc.

Referenced by SiStripFEDDumpPlugin().

edm::EDGetTokenT<FEDRawDataCollection> SiStripFEDDumpPlugin::rawDataToken_
private

Definition at line 34 of file SiStripFEDDump.cc.

Referenced by analyze(), and SiStripFEDDumpPlugin().