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 
23 
24 
25 
26 using namespace edm;
27 using namespace std;
28 
30  packer(new CSCDigiToRaw(pset)),
31  theStripDigiTag(pset.getParameter<edm::InputTag>("stripDigiTag")),
32  theWireDigiTag(pset.getParameter<edm::InputTag>("wireDigiTag")),
33  theComparatorDigiTag(pset.getParameter<edm::InputTag>("comparatorDigiTag")),
34  theALCTDigiTag(pset.getParameter<edm::InputTag>("alctDigiTag")),
35  theCLCTDigiTag(pset.getParameter<edm::InputTag>("clctDigiTag")),
36  thePreTriggerTag(pset.getParameter<edm::InputTag>("preTriggerTag")),
37  theCorrelatedLCTDigiTag(pset.getParameter<edm::InputTag>("correlatedLCTDigiTag"))
38 {
39  //theStrip = pset.getUntrackedParameter<string>("DigiCreator", "cscunpacker");
40  produces<FEDRawDataCollection>("CSCRawData");
41 }
42 
43 
45  delete packer;
46 }
47 
48 
52  c.get<CSCChamberMapRcd>().get(hcham);
53  const CSCChamberMap* theMapping = hcham.product();
54 
55 
56  auto_ptr<FEDRawDataCollection> fed_buffers(new FEDRawDataCollection);
57  // Take digis from the event
59  e.getByLabel(theStripDigiTag, stripDigis);
61  e.getByLabel(theWireDigiTag, wireDigis);
63  e.getByLabel(theComparatorDigiTag, comparatorDigis);
65  e.getByLabel(theALCTDigiTag, alctDigis);
67  e.getByLabel(theCLCTDigiTag, clctDigis);
69  e.getByLabel(thePreTriggerTag, preTriggers);
70  Handle<CSCCorrelatedLCTDigiCollection> correlatedLCTDigis;
71  e.getByLabel(theCorrelatedLCTDigiTag, correlatedLCTDigis);
72 
73 
74 
75  // Create the packed data
76  packer->createFedBuffers(*stripDigis, *wireDigis, *comparatorDigis,
77  *alctDigis, *clctDigis, *preTriggers, *correlatedLCTDigis,
78  *(fed_buffers.get()), theMapping, e);
79 
80  // put the raw data to the event
81  e.put(fed_buffers, "CSCRawData");
82 }
83 
84 
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
edm::InputTag thePreTriggerTag
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:84
tuple pset
Definition: CrabTask.py:85
edm::InputTag theComparatorDigiTag
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:359
edm::InputTag theWireDigiTag
const T & get() const
Definition: EventSetup.h:55
edm::InputTag theALCTDigiTag
CSCDigiToRawModule(const edm::ParameterSet &pset)
Constructor.
T const * product() const
Definition: ESHandle.h:62
edm::InputTag theCLCTDigiTag
virtual ~CSCDigiToRawModule()
Destructor.
edm::InputTag theCorrelatedLCTDigiTag
virtual void produce(edm::Event &, const edm::EventSetup &)
edm::InputTag theStripDigiTag