CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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
< FEDRawDataCollection
rawDataToken_
 

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
< DQMEDAnalyzerGlobalCache
initializeGlobalCache (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 ( 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  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 }
T getUntrackedParameter(std::string const &, T const &) const
Log< level::Error, false > LogError
unsigned int fedIdToDump_
edm::EDGetTokenT< FEDRawDataCollection > rawDataToken_
edm::InputTag rawDataTag_
SiStripFEDDumpPlugin::~SiStripFEDDumpPlugin ( )
override

Definition at line 53 of file SiStripFEDDump.cc.

53 {}

Member Function Documentation

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

Reimplemented from DQMEDAnalyzer.

Definition at line 60 of file SiStripFEDDump.cc.

References edmScanValgrind::buffer, Exception, FEDRawDataCollection::FEDData(), fedIdToDump_, edm::Event::getByToken(), sistrip::preconstructCheckFEDBufferBase(), rawDataToken_, and sistrip::SUCCESS.

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  }
71  const sistrip::FEDBufferBase buffer{rawData};
72  std::ostringstream os;
73  os << buffer << std::endl;
74  buffer.dump(os);
75  edm::LogVerbatim("SiStripFEDDump") << os.str();
76 }
Log< level::Info, true > LogVerbatim
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
unsigned int fedIdToDump_
edm::EDGetTokenT< FEDRawDataCollection > rawDataToken_
FEDBufferStatusCode preconstructCheckFEDBufferBase(const FEDRawData &fedBuffer, bool checkRecognizedFormat=true)
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

unsigned int SiStripFEDDumpPlugin::fedIdToDump_
private

Definition at line 36 of file SiStripFEDDump.cc.

Referenced by analyze(), and SiStripFEDDumpPlugin().

edm::InputTag SiStripFEDDumpPlugin::rawDataTag_
private

Definition at line 33 of file SiStripFEDDump.cc.

Referenced by SiStripFEDDumpPlugin().

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

Definition at line 34 of file SiStripFEDDump.cc.

Referenced by analyze(), and SiStripFEDDumpPlugin().