CMS 3D CMS Logo

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

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

Inheritance diagram for LTCRawToDigi:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

 LTCRawToDigi (const edm::ParameterSet &)
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 
 ~LTCRawToDigi ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

Detailed Description

Description: Unpack FED data to LTC bank. LTCs are FED id 816-823.

Implementation: No comments

Definition at line 43 of file LTCRawToDigi.cc.

Constructor & Destructor Documentation

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

Definition at line 65 of file LTCRawToDigi.cc.

66 {
67  //register your products
68  produces<LTCDigiCollection>();
69 }
LTCRawToDigi::~LTCRawToDigi ( )

Definition at line 72 of file LTCRawToDigi.cc.

73 {
74 
75  // do anything here that needs to be done at desctruction time
76  // (e.g. close files, deallocate resources etc.)
77 
78 }

Member Function Documentation

void LTCRawToDigi::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

Take a reference to this FED's data

Implements edm::EDProducer.

Definition at line 87 of file LTCRawToDigi.cc.

References FEDRawData::data(), edm::Event::getByLabel(), errorMatrix2Lands_multiChannel::id, edm::Event::put(), lumiPlot::rawdata, and FEDRawData::size().

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

88 {
89  using namespace edm;
90  const int LTCFedIDLo = 815;
91  const int LTCFedIDHi = 823;
92 
93  // Get a handle to the FED data collection
95  iEvent.getByLabel("source" , rawdata);
96 
97  // create collection we'll save in the event record
98  std::auto_ptr<LTCDigiCollection> pOut(new LTCDigiCollection());
99 
100  // Loop over all possible FED's with the appropriate FED ID
101  for ( int id = LTCFedIDLo; id <= LTCFedIDHi; ++id ) {
103  const FEDRawData & fedData = rawdata->FEDData(id);
104  unsigned short int length = fedData.size();
105  if ( ! length )
106  continue; // bank does not exist
107  LTCDigi ltcDigi(fedData.data());
108  pOut->push_back(ltcDigi);
109  }
110  iEvent.put(pOut);
111 }
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:49
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
std::vector< LTCDigi > LTCDigiCollection
Definition: LTCDigi.h:107
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:29
dictionary rawdata
Definition: lumiPlot.py:393