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 edm::EDConsumerBase

Public Member Functions

 SiStripFEDDumpPlugin (const edm::ParameterSet &)
 
 ~SiStripFEDDumpPlugin ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- 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
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

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

Private Attributes

unsigned int fedIdToDump_
 
edm::InputTag rawDataTag_
 
edm::EDGetTokenT
< FEDRawDataCollection
rawDataToken_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- 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

Definition at line 21 of file SiStripFEDDump.cc.

Constructor & Destructor Documentation

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

Definition at line 43 of file SiStripFEDDump.cc.

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

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

Definition at line 53 of file SiStripFEDDump.cc.

54 {
55 }

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 64 of file SiStripFEDDump.cc.

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

65 {
66  //get raw data
67  edm::Handle<FEDRawDataCollection> rawDataCollectionHandle;
68  // iEvent.getByLabel(rawDataTag_,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:434
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_
void dump(std::ostream &os) const
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:28
void SiStripFEDDumpPlugin::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 82 of file SiStripFEDDump.cc.

83 {
84 }
void SiStripFEDDumpPlugin::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 88 of file SiStripFEDDump.cc.

89 {
90 }

Member Data Documentation

unsigned int SiStripFEDDumpPlugin::fedIdToDump_
private

Definition at line 35 of file SiStripFEDDump.cc.

Referenced by analyze(), and SiStripFEDDumpPlugin().

edm::InputTag SiStripFEDDumpPlugin::rawDataTag_
private

Definition at line 32 of file SiStripFEDDump.cc.

Referenced by SiStripFEDDumpPlugin().

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

Definition at line 33 of file SiStripFEDDump.cc.

Referenced by analyze(), and SiStripFEDDumpPlugin().