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 Attributes
CSCDigiToRawModule Class Reference

#include <CSCDigiToRawModule.h>

Inheritance diagram for CSCDigiToRawModule:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 CSCDigiToRawModule (const edm::ParameterSet &pset)
 Constructor. More...
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 
virtual ~CSCDigiToRawModule ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 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
 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
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

edm::EDGetTokenT
< CSCALCTDigiCollection
al_token
 
edm::EDGetTokenT
< CSCComparatorDigiCollection
cd_token
 
edm::EDGetTokenT
< CSCCLCTDigiCollection
cl_token
 
edm::EDGetTokenT
< CSCCorrelatedLCTDigiCollection
co_token
 
CSCDigiToRawpacker
 
edm::EDGetTokenT
< CSCCLCTPreTriggerCollection
pr_token
 
edm::EDGetTokenT
< CSCStripDigiCollection
sd_token
 
edm::EDGetTokenT
< CSCWireDigiCollection
wd_token
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- 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::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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

Author
A. Tumanov - Rice

Definition at line 23 of file CSCDigiToRawModule.h.

Constructor & Destructor Documentation

CSCDigiToRawModule::CSCDigiToRawModule ( const edm::ParameterSet pset)

Constructor.

Definition at line 16 of file CSCDigiToRawModule.cc.

References al_token, cd_token, cl_token, co_token, edm::ParameterSet::getParameter(), pr_token, sd_token, and wd_token.

16  :
17  packer(new CSCDigiToRaw(pset))
18 {
19  //theStrip = pset.getUntrackedParameter<string>("DigiCreator", "cscunpacker");
20 
21  wd_token = consumes<CSCWireDigiCollection>( pset.getParameter<edm::InputTag>("wireDigiTag") );
22  sd_token = consumes<CSCStripDigiCollection>( pset.getParameter<edm::InputTag>("stripDigiTag") );
23  cd_token = consumes<CSCComparatorDigiCollection>( pset.getParameter<edm::InputTag>("comparatorDigiTag") );
24  pr_token = consumes<CSCCLCTPreTriggerCollection>( pset.getParameter<edm::InputTag>("preTriggerTag") );
25  al_token = consumes<CSCALCTDigiCollection>( pset.getParameter<edm::InputTag>("alctDigiTag") );
26  cl_token = consumes<CSCCLCTDigiCollection>( pset.getParameter<edm::InputTag>("clctDigiTag") );
27  co_token = consumes<CSCCorrelatedLCTDigiCollection>( pset.getParameter<edm::InputTag>("correlatedLCTDigiTag") );
28 
29  produces<FEDRawDataCollection>("CSCRawData");
30 
31 }
T getParameter(std::string const &) const
edm::EDGetTokenT< CSCCLCTPreTriggerCollection > pr_token
CSCDigiToRaw * packer
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > co_token
edm::EDGetTokenT< CSCComparatorDigiCollection > cd_token
edm::EDGetTokenT< CSCWireDigiCollection > wd_token
edm::EDGetTokenT< CSCCLCTDigiCollection > cl_token
edm::EDGetTokenT< CSCALCTDigiCollection > al_token
edm::EDGetTokenT< CSCStripDigiCollection > sd_token
CSCDigiToRawModule::~CSCDigiToRawModule ( )
virtual

Destructor.

Definition at line 34 of file CSCDigiToRawModule.cc.

References packer.

34  {
35  delete packer;
36 }
CSCDigiToRaw * packer

Member Function Documentation

void CSCDigiToRawModule::produce ( edm::Event e,
const edm::EventSetup c 
)
virtual

reverse mapping for packer

Implements edm::EDProducer.

Definition at line 39 of file CSCDigiToRawModule.cc.

References al_token, cd_token, cl_token, co_token, CSCDigiToRaw::createFedBuffers(), edm::EventSetup::get(), edm::Event::getByToken(), packer, pr_token, edm::ESHandle< class >::product(), edm::Event::put(), sd_token, and wd_token.

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

39  {
42  c.get<CSCChamberMapRcd>().get(hcham);
43  const CSCChamberMap* theMapping = hcham.product();
44 
45  std::auto_ptr<FEDRawDataCollection> fed_buffers(new FEDRawDataCollection);
46 
47  // Take digis from the event
55 
56  e.getByToken( wd_token, wireDigis );
57  e.getByToken( sd_token, stripDigis );
58  e.getByToken( cd_token, comparatorDigis );
59  e.getByToken( al_token, alctDigis );
60  e.getByToken( cl_token, clctDigis );
61  e.getByToken( pr_token, preTriggers );
62  e.getByToken( co_token, correlatedLCTDigis );
63 
64  // Create the packed data
65  packer->createFedBuffers(*stripDigis, *wireDigis, *comparatorDigis,
66  *alctDigis, *clctDigis, *preTriggers, *correlatedLCTDigis,
67  *(fed_buffers.get()), theMapping, e);
68 
69  // put the raw data to the event
70  e.put(fed_buffers, "CSCRawData");
71 }
edm::EDGetTokenT< CSCCLCTPreTriggerCollection > pr_token
void createFedBuffers(const CSCStripDigiCollection &stripDigis, const CSCWireDigiCollection &wireDigis, const CSCComparatorDigiCollection &comparatorDigis, const CSCALCTDigiCollection &alctDigis, const CSCCLCTDigiCollection &clctDigis, const CSCCLCTPreTriggerCollection &preTriggers, const CSCCorrelatedLCTDigiCollection &correlatedLCTDigis, FEDRawDataCollection &fed_buffers, const CSCChamberMap *theMapping, edm::Event &e)
Take a vector of digis and fill the FEDRawDataCollection.
CSCDigiToRaw * packer
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > co_token
edm::EDGetTokenT< CSCComparatorDigiCollection > cd_token
edm::EDGetTokenT< CSCWireDigiCollection > wd_token
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:116
edm::EDGetTokenT< CSCCLCTDigiCollection > cl_token
edm::EDGetTokenT< CSCALCTDigiCollection > al_token
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
edm::EDGetTokenT< CSCStripDigiCollection > sd_token

Member Data Documentation

edm::EDGetTokenT<CSCALCTDigiCollection> CSCDigiToRawModule::al_token
private

Definition at line 40 of file CSCDigiToRawModule.h.

Referenced by CSCDigiToRawModule(), and produce().

edm::EDGetTokenT<CSCComparatorDigiCollection> CSCDigiToRawModule::cd_token
private

Definition at line 39 of file CSCDigiToRawModule.h.

Referenced by CSCDigiToRawModule(), and produce().

edm::EDGetTokenT<CSCCLCTDigiCollection> CSCDigiToRawModule::cl_token
private

Definition at line 41 of file CSCDigiToRawModule.h.

Referenced by CSCDigiToRawModule(), and produce().

edm::EDGetTokenT<CSCCorrelatedLCTDigiCollection> CSCDigiToRawModule::co_token
private

Definition at line 43 of file CSCDigiToRawModule.h.

Referenced by CSCDigiToRawModule(), and produce().

CSCDigiToRaw* CSCDigiToRawModule::packer
private

Definition at line 35 of file CSCDigiToRawModule.h.

Referenced by produce(), and ~CSCDigiToRawModule().

edm::EDGetTokenT<CSCCLCTPreTriggerCollection> CSCDigiToRawModule::pr_token
private

Definition at line 42 of file CSCDigiToRawModule.h.

Referenced by CSCDigiToRawModule(), and produce().

edm::EDGetTokenT<CSCStripDigiCollection> CSCDigiToRawModule::sd_token
private

Definition at line 38 of file CSCDigiToRawModule.h.

Referenced by CSCDigiToRawModule(), and produce().

edm::EDGetTokenT<CSCWireDigiCollection> CSCDigiToRawModule::wd_token
private

Definition at line 37 of file CSCDigiToRawModule.h.

Referenced by CSCDigiToRawModule(), and produce().