CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
SiStripFEDDumpPlugin Class Reference
Inheritance diagram for SiStripFEDDumpPlugin:
edm::EDAnalyzer

Public Member Functions

 SiStripFEDDumpPlugin (const edm::ParameterSet &)
 
 ~SiStripFEDDumpPlugin ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob ()
 
virtual void endJob ()
 

Private Attributes

unsigned int fedIdToDump_
 
edm::InputTag rawDataTag_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Detailed Description

Definition at line 20 of file SiStripFEDDump.cc.

Constructor & Destructor Documentation

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

Definition at line 41 of file SiStripFEDDump.cc.

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

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

Definition at line 50 of file SiStripFEDDump.cc.

51 {
52 }

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 61 of file SiStripFEDDump.cc.

References FEDRawData::data(), sistrip::FEDBufferBase::dump(), FEDRawDataCollection::FEDData(), fedIdToDump_, edm::Event::getByLabel(), rawDataTag_, and FEDRawData::size().

62 {
63  //get raw data
64  edm::Handle<FEDRawDataCollection> rawDataCollectionHandle;
65  iEvent.getByLabel(rawDataTag_,rawDataCollectionHandle);
66  const FEDRawDataCollection& rawDataCollection = *rawDataCollectionHandle;
67 
68  const FEDRawData& rawData = rawDataCollection.FEDData(fedIdToDump_);
69  const sistrip::FEDBufferBase buffer(rawData.data(),rawData.size(),true);
70  std::ostringstream os;
71  os << buffer << std::endl;
72  buffer.dump(os);
73  edm::LogVerbatim("SiStripFEDDump") << os.str();
74 }
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::InputTag rawDataTag_
void dump(std::ostream &os) const
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:359
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:29
void SiStripFEDDumpPlugin::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 78 of file SiStripFEDDump.cc.

79 {
80 }
void SiStripFEDDumpPlugin::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 84 of file SiStripFEDDump.cc.

85 {
86 }

Member Data Documentation

unsigned int SiStripFEDDumpPlugin::fedIdToDump_
private

Definition at line 33 of file SiStripFEDDump.cc.

Referenced by analyze(), and SiStripFEDDumpPlugin().

edm::InputTag SiStripFEDDumpPlugin::rawDataTag_
private

Definition at line 31 of file SiStripFEDDump.cc.

Referenced by analyze().