CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

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 >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::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 22 of file SiStripFEDDump.cc.

Constructor & Destructor Documentation

◆ SiStripFEDDumpPlugin()

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

Definition at line 42 of file SiStripFEDDump.cc.

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

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

◆ ~SiStripFEDDumpPlugin()

SiStripFEDDumpPlugin::~SiStripFEDDumpPlugin ( )
override

Definition at line 52 of file SiStripFEDDump.cc.

52 {}

Member Function Documentation

◆ analyze()

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

Reimplemented from DQMEDAnalyzer.

Definition at line 59 of file SiStripFEDDump.cc.

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

59  {
60  //get raw data
61  edm::Handle<FEDRawDataCollection> rawDataCollectionHandle;
62  iEvent.getByToken(rawDataToken_, rawDataCollectionHandle);
63  const FEDRawDataCollection& rawDataCollection = *rawDataCollectionHandle;
64 
65  const FEDRawData& rawData = rawDataCollection.FEDData(fedIdToDump_);
66  const auto st_buffer = sistrip::preconstructCheckFEDBufferBase(rawData, false);
67  if (sistrip::FEDBufferStatusCode::SUCCESS != st_buffer) {
68  throw cms::Exception("FEDBuffer") << st_buffer;
69  }
71  std::ostringstream os;
72  os << buffer << std::endl;
73  buffer.dump(os);
74  edm::LogVerbatim("SiStripFEDDump") << os.str();
75 }
Log< level::Info, true > LogVerbatim
int iEvent
Definition: GenABIO.cc:224
unsigned int fedIdToDump_
edm::EDGetTokenT< FEDRawDataCollection > rawDataToken_
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
FEDBufferStatusCode preconstructCheckFEDBufferBase(const FEDRawData &fedBuffer, bool checkRecognizedFormat=true)

◆ bookHistograms()

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

Implements DQMEDAnalyzer.

Definition at line 77 of file SiStripFEDDump.cc.

79  {}

Member Data Documentation

◆ fedIdToDump_

unsigned int SiStripFEDDumpPlugin::fedIdToDump_
private

Definition at line 35 of file SiStripFEDDump.cc.

Referenced by analyze(), and SiStripFEDDumpPlugin().

◆ rawDataTag_

edm::InputTag SiStripFEDDumpPlugin::rawDataTag_
private

Definition at line 32 of file SiStripFEDDump.cc.

Referenced by SiStripFEDDumpPlugin().

◆ rawDataToken_

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

Definition at line 33 of file SiStripFEDDump.cc.

Referenced by analyze(), and SiStripFEDDumpPlugin().