CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
TcdsRawToDigi Class Reference

#include <ProdTutorial/TcdsRawToDigi/plugins/TcdsRawToDigi.cc>

Inheritance diagram for TcdsRawToDigi:
edm::stream::EDProducer<>

Public Member Functions

 TcdsRawToDigi (const edm::ParameterSet &)
 
 ~TcdsRawToDigi () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Member Functions

void produce (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

edm::EDGetTokenT< FEDRawDataCollectiondataToken_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
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
 

Detailed Description

Description: Producer to unpack lumi nibble from TCDS

Definition at line 40 of file TcdsRawToDigi.cc.

Constructor & Destructor Documentation

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

Definition at line 53 of file TcdsRawToDigi.cc.

References dataToken_, and edm::ParameterSet::getParameter().

53  {
54  edm::InputTag dataLabel = iConfig.getParameter<edm::InputTag>("InputLabel");
55  dataToken_ = consumes<FEDRawDataCollection>(dataLabel);
56  produces<TCDSRecord>("tcdsRecord").setBranchAlias("tcdsRecord");
57 }
T getParameter(std::string const &) const
edm::EDGetTokenT< FEDRawDataCollection > dataToken_
TcdsRawToDigi::~TcdsRawToDigi ( )
override

Definition at line 59 of file TcdsRawToDigi.cc.

59 {}

Member Function Documentation

void TcdsRawToDigi::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 83 of file TcdsRawToDigi.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), DEFINE_FWK_MODULE, and HLT_2018_cff::InputTag.

83  {
84  //The following says we do not know what parameters are allowed so do no validation
85  // Please change this to state exactly what you do use, even if it is no parameters
87  desc.add<edm::InputTag>("InputLabel", edm::InputTag("rawDataCollector"));
88  descriptions.add("tcdsRawToDigi", desc);
89 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void TcdsRawToDigi::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 66 of file TcdsRawToDigi.cc.

References FEDRawData::data(), dataToken_, FEDRawDataCollection::FEDData(), edm::Event::getByToken(), edm::HandleBase::isValid(), FEDNumbering::MINTCDSuTCAFEDID, edm::Event::put(), and FEDRawData::size().

Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), and HTMLExport.HTMLExportStatic::export().

66  {
67  using namespace edm;
68 
70  iEvent.getByToken(dataToken_, rawdata);
71 
72  TCDSRecord tcdsRecord;
73  if (rawdata.isValid()) {
74  const FEDRawData& tcdsData = rawdata->FEDData(FEDNumbering::MINTCDSuTCAFEDID);
75  if (tcdsData.size() > 0) {
76  tcdsRecord = TCDSRecord(tcdsData.data());
77  }
78  }
79  iEvent.put(std::make_unique<TCDSRecord>(tcdsRecord), "tcdsRecord");
80 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:131
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:45
Class to contain information from TCDS FED.
Definition: TCDSRecord.h:19
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
bool isValid() const
Definition: HandleBase.h:70
edm::EDGetTokenT< FEDRawDataCollection > dataToken_
HLT enums.
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:24

Member Data Documentation

edm::EDGetTokenT<FEDRawDataCollection> TcdsRawToDigi::dataToken_
private

Definition at line 50 of file TcdsRawToDigi.cc.

Referenced by produce(), and TcdsRawToDigi().