CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
SiStripFEDDumpPlugin Class Reference
Inheritance diagram for SiStripFEDDumpPlugin:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Member Functions

 SiStripFEDDumpPlugin (const edm::ParameterSet &)
 
 ~SiStripFEDDumpPlugin () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

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_
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 23 of file SiStripFEDDump.cc.

Constructor & Destructor Documentation

◆ SiStripFEDDumpPlugin()

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

Definition at line 43 of file SiStripFEDDump.cc.

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

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

◆ ~SiStripFEDDumpPlugin()

SiStripFEDDumpPlugin::~SiStripFEDDumpPlugin ( )
override

Definition at line 53 of file SiStripFEDDump.cc.

53 {}

Member Function Documentation

◆ analyze()

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

Reimplemented from DQMEDAnalyzer.

Definition at line 60 of file SiStripFEDDump.cc.

60  {
61  //get raw data
62  edm::Handle<FEDRawDataCollection> rawDataCollectionHandle;
63  iEvent.getByToken(rawDataToken_, rawDataCollectionHandle);
64  const FEDRawDataCollection& rawDataCollection = *rawDataCollectionHandle;
65 
66  const FEDRawData& rawData = rawDataCollection.FEDData(fedIdToDump_);
67  const auto st_buffer = sistrip::preconstructCheckFEDBufferBase(rawData, false);
68  if (sistrip::FEDBufferStatusCode::SUCCESS != st_buffer) {
69  throw cms::Exception("FEDBuffer") << st_buffer;
70  }
72  std::ostringstream os;
73  os << buffer << std::endl;
74  buffer.dump(os);
75  edm::LogVerbatim("SiStripFEDDump") << os.str();
76 }

References edmScanValgrind::buffer, Exception, FEDRawDataCollection::FEDData(), fedIdToDump_, iEvent, sistrip::preconstructCheckFEDBufferBase(), l1tstage2_dqm_sourceclient-live_cfg::rawData, rawDataToken_, and sistrip::SUCCESS.

◆ bookHistograms()

void SiStripFEDDumpPlugin::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
overrideprivatevirtual

Implements DQMEDAnalyzer.

Definition at line 78 of file SiStripFEDDump.cc.

80  {}

Member Data Documentation

◆ fedIdToDump_

unsigned int SiStripFEDDumpPlugin::fedIdToDump_
private

Definition at line 36 of file SiStripFEDDump.cc.

Referenced by analyze(), and SiStripFEDDumpPlugin().

◆ rawDataTag_

edm::InputTag SiStripFEDDumpPlugin::rawDataTag_
private

Definition at line 33 of file SiStripFEDDump.cc.

Referenced by SiStripFEDDumpPlugin().

◆ rawDataToken_

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

Definition at line 34 of file SiStripFEDDump.cc.

Referenced by analyze(), and SiStripFEDDumpPlugin().

FEDRawDataCollection
Definition: FEDRawDataCollection.h:18
l1tstage2_dqm_sourceclient-live_cfg.rawData
rawData
Definition: l1tstage2_dqm_sourceclient-live_cfg.py:156
SiStripFEDDumpPlugin::rawDataTag_
edm::InputTag rawDataTag_
Definition: SiStripFEDDump.cc:33
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::Handle
Definition: AssociativeIterator.h:50
sistrip::FEDBufferBase
Definition: SiStripFEDBufferComponents.h:643
FEDRawData
Definition: FEDRawData.h:19
SiStripFEDDumpPlugin::rawDataToken_
edm::EDGetTokenT< FEDRawDataCollection > rawDataToken_
Definition: SiStripFEDDump.cc:34
edmScanValgrind.buffer
buffer
Definition: edmScanValgrind.py:171
FEDRawDataCollection::FEDData
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
Definition: FEDRawDataCollection.cc:19
FEDNumbering::MAXSiStripFEDID
Definition: FEDNumbering.h:30
edm::LogError
Definition: MessageLogger.h:183
SiStripFEDDumpPlugin::fedIdToDump_
unsigned int fedIdToDump_
Definition: SiStripFEDDump.cc:36
iEvent
int iEvent
Definition: GenABIO.cc:224
sistrip::FEDBufferStatusCode::SUCCESS
edm::LogVerbatim
Definition: MessageLogger.h:297
sistrip::preconstructCheckFEDBufferBase
FEDBufferStatusCode preconstructCheckFEDBufferBase(const FEDRawData &fedBuffer, bool checkRecognizedFormat=true)
Definition: SiStripFEDBufferComponents.h:757
Exception
Definition: hltDiff.cc:246
edm::InputTag
Definition: InputTag.h:15
FEDNumbering::MINSiStripFEDID
Definition: FEDNumbering.h:29