CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCDigiToRawModule.cc
Go to the documentation of this file.
1 
15 
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 }
32 
33 
35  delete packer;
36 }
37 
38 
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 }
72 
73 
T getParameter(std::string const &) const
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
CSCDigiToRawModule(const edm::ParameterSet &pset)
Constructor.
T const * product() const
Definition: ESHandle.h:62
virtual ~CSCDigiToRawModule()
Destructor.
edm::EDGetTokenT< CSCStripDigiCollection > sd_token
virtual void produce(edm::Event &, const edm::EventSetup &)