CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
RctRawToDigi Class Reference

#include <EventFilter/RctRawToDigi/src/RctRawToDigi.cc>

Inheritance diagram for RctRawToDigi:
edm::stream::EDProducer<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 RctRawToDigi (const edm::ParameterSet &)
 
 ~RctRawToDigi ()
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

void checkHeaders ()
 
bool decodeLinkID (const uint32_t inputValue, uint32_t &crateNumber, uint32_t &linkNumber, bool &even)
 
virtual void endJob ()
 method called at job end - use to print summary report More...
 
bool printAll (const unsigned char *data, const unsigned size)
 
void produce (edm::Event &, const edm::EventSetup &)
 
void unpack (const FEDRawData &d, edm::Event &e, RctUnpackCollections *const colls)
 Unpacks the raw data. More...
 
void unpackCTP7 (const uint32_t *data, const unsigned block_id, const unsigned size, RctUnpackCollections *const colls)
 

Private Attributes

std::vector< unsigned > errorCounters_
 Counts number of errors for each code (index) More...
 
L1TriggerErrorCollectionerrors_
 pointer to error collection More...
 
int fedId_
 RCT FED ID. More...
 
edm::InputTag inputLabel_
 FED collection label. More...
 
unsigned unpackFailures_
 To count the total number of RCT unpack failures. More...
 
const bool verbose_
 If true, then debug print out for each event. More...
 

Static Private Attributes

static const unsigned amc13HeaderSize_ = 16
 
static const unsigned amc13TrailerSize_ = 8
 
static const unsigned ctp7HeaderSize_ = 8
 
static const unsigned ctp7TrailerSize_ = 8
 
static const unsigned MAX_DATA = 4680
 The maximum number of blocks we will try to unpack before thinking something is wrong. More...
 
static const unsigned MAX_ERR_CODE = 6
 
static const unsigned MIN_DATA = 900
 The minimum number of blocks we will try to unpack before thinking something is wrong (really this should be 920, to be tested) More...
 
static const unsigned sLinkHeaderSize_ = 8
 
static const unsigned sLinkTrailerSize_ = 8
 

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, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Description: Produce RCT digis from raw data

Implementation: <Notes on="" implementation>="">

Definition at line 40 of file RctRawToDigi.h.

Constructor & Destructor Documentation

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

Register Products

Definition at line 36 of file RctRawToDigi.cc.

RctRawToDigi::~RctRawToDigi ( )

Definition at line 53 of file RctRawToDigi.cc.

Member Function Documentation

void RctRawToDigi::checkHeaders ( )
private

Looks at the firmware version header in the S-Link packet and instantiates relevant format translator. check block headers for consistency

bool RctRawToDigi::decodeLinkID ( const uint32_t  inputValue,
uint32_t &  crateNumber,
uint32_t &  linkNumber,
bool &  even 
)
private
void RctRawToDigi::endJob ( void  )
privatevirtual

method called at job end - use to print summary report

Definition at line 348 of file RctRawToDigi.cc.

bool RctRawToDigi::printAll ( const unsigned char *  data,
const unsigned  size 
)
private

Definition at line 336 of file RctRawToDigi.cc.

void RctRawToDigi::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::stream::EDProducerBase.

Definition at line 61 of file RctRawToDigi.cc.

Referenced by JSONExport.JsonExport::export().

void RctRawToDigi::unpack ( const FEDRawData d,
edm::Event e,
RctUnpackCollections *const  colls 
)
private

Unpacks the raw data.

Parameters
invalidDataFlag- if true, then won't attempt unpack but just output empty collecions.

Definition at line 106 of file RctRawToDigi.cc.

void RctRawToDigi::unpackCTP7 ( const uint32_t *  data,
const unsigned  block_id,
const unsigned  size,
RctUnpackCollections *const  colls 
)
private

Definition at line 146 of file RctRawToDigi.cc.

Member Data Documentation

const unsigned RctRawToDigi::amc13HeaderSize_ = 16
staticprivate

Definition at line 80 of file RctRawToDigi.h.

const unsigned RctRawToDigi::amc13TrailerSize_ = 8
staticprivate

Definition at line 83 of file RctRawToDigi.h.

const unsigned RctRawToDigi::ctp7HeaderSize_ = 8
staticprivate

Definition at line 86 of file RctRawToDigi.h.

const unsigned RctRawToDigi::ctp7TrailerSize_ = 8
staticprivate

Definition at line 89 of file RctRawToDigi.h.

std::vector<unsigned> RctRawToDigi::errorCounters_
private

Counts number of errors for each code (index)

Definition at line 109 of file RctRawToDigi.h.

L1TriggerErrorCollection* RctRawToDigi::errors_
private

pointer to error collection

Definition at line 108 of file RctRawToDigi.h.

int RctRawToDigi::fedId_
private

RCT FED ID.

Definition at line 99 of file RctRawToDigi.h.

edm::InputTag RctRawToDigi::inputLabel_
private

FED collection label.

Definition at line 98 of file RctRawToDigi.h.

const unsigned RctRawToDigi::MAX_DATA = 4680
staticprivate

The maximum number of blocks we will try to unpack before thinking something is wrong.

Definition at line 92 of file RctRawToDigi.h.

const unsigned RctRawToDigi::MAX_ERR_CODE = 6
staticprivate

Definition at line 107 of file RctRawToDigi.h.

const unsigned RctRawToDigi::MIN_DATA = 900
staticprivate

The minimum number of blocks we will try to unpack before thinking something is wrong (really this should be 920, to be tested)

Definition at line 95 of file RctRawToDigi.h.

const unsigned RctRawToDigi::sLinkHeaderSize_ = 8
staticprivate

Definition at line 74 of file RctRawToDigi.h.

const unsigned RctRawToDigi::sLinkTrailerSize_ = 8
staticprivate

Definition at line 77 of file RctRawToDigi.h.

unsigned RctRawToDigi::unpackFailures_
private

To count the total number of RCT unpack failures.

Definition at line 110 of file RctRawToDigi.h.

const bool RctRawToDigi::verbose_
private

If true, then debug print out for each event.

Definition at line 101 of file RctRawToDigi.h.