CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

SiStripFEDDumpPlugin Class Reference

Inheritance diagram for SiStripFEDDumpPlugin:
edm::EDAnalyzer

List of all members.

Public Member Functions

 SiStripFEDDumpPlugin (const edm::ParameterSet &)
 ~SiStripFEDDumpPlugin ()

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_

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.

  : rawDataTag_(iConfig.getUntrackedParameter<edm::InputTag>("RawDataTag",edm::InputTag("source",""))),
    fedIdToDump_(iConfig.getUntrackedParameter<unsigned int>("FEDID",50))
{
  if ( (fedIdToDump_ > FEDNumbering::MAXSiStripFEDID) || (fedIdToDump_ < FEDNumbering::MINSiStripFEDID) )
    edm::LogError("SiStripFEDDump") << "FED ID " << fedIdToDump_ << " is not valid. "
                                    << "SiStrip FED IDs are " << uint16_t(FEDNumbering::MINSiStripFEDID) << "-" << uint16_t(FEDNumbering::MAXSiStripFEDID);
}
SiStripFEDDumpPlugin::~SiStripFEDDumpPlugin ( )

Definition at line 50 of file SiStripFEDDump.cc.

{
}

Member Function Documentation

void SiStripFEDDumpPlugin::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
) [private, virtual]

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

{
  //get raw data
  edm::Handle<FEDRawDataCollection> rawDataCollectionHandle;
  iEvent.getByLabel(rawDataTag_,rawDataCollectionHandle);
  const FEDRawDataCollection& rawDataCollection = *rawDataCollectionHandle;
  
  const FEDRawData& rawData = rawDataCollection.FEDData(fedIdToDump_);
  const sistrip::FEDBufferBase buffer(rawData.data(),rawData.size(),true);
  std::ostringstream os;
  os << buffer << std::endl;
  buffer.dump(os);
  edm::LogVerbatim("SiStripFEDDump") << os.str();
}
void SiStripFEDDumpPlugin::beginJob ( void  ) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 78 of file SiStripFEDDump.cc.

{
}
void SiStripFEDDumpPlugin::endJob ( void  ) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 84 of file SiStripFEDDump.cc.

{
}

Member Data Documentation

unsigned int SiStripFEDDumpPlugin::fedIdToDump_ [private]

Definition at line 33 of file SiStripFEDDump.cc.

Referenced by analyze(), and SiStripFEDDumpPlugin().

Definition at line 31 of file SiStripFEDDump.cc.

Referenced by analyze().