CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HLTDummyCollections.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: HLTDummyCollections
4 // Class: HLTDummyCollections
5 //
13 //
14 // Original Author: Emmanuelle Perez
15 // Created: Tue May 19 09:54:19 CEST 2009
16 // $Id: HLTDummyCollections.cc,v 1.4 2010/07/30 04:55:49 wmtan Exp $
17 //
18 //
19 
20 
21 // system include files
22 #include <memory>
23 
24 // user include files
27 
30 
32 
33 // -- Ecal
35 // -- Hcal
37 // -- Ecal Preshower
39 // -- Muons DT
42 // -- Muons CSC
51 // -- SiPixels
54 // -- SiStrips
57 // --- GCT
59 
60 // -- ObjectMap
62 
63 
64 //
65 // class decleration
66 //
67 
69  public:
70  explicit HLTDummyCollections(const edm::ParameterSet&);
72 
73  private:
74  virtual void produce(edm::Event&, const edm::EventSetup&);
75 
76  // ----------member data ---------------------------
77 
78  std::string action_;
79  bool doEcal_ ;
80  bool doHcal_;
81  bool unpackZDC_ ;
83  std::string ESdigiCollection_;
87  bool doSiStrip_ ;
88  bool doGCT_ ;
89  bool doObjectMap_ ;
90 
91 };
92 
93 //
94 // constants, enums and typedefs
95 //
96 
97 
98 //
99 // static data member definitions
100 //
101 
102 //
103 // constructors and destructor
104 //
106 {
107  action_ = iConfig.getParameter<std::string>("action");
108  unpackZDC_ = iConfig.getParameter<bool>("UnpackZDC");
109  ESdigiCollection_ = iConfig.getParameter<std::string>("ESdigiCollection");
110 
111  doEcal_ = ( action_ == "doEcal");
112  doHcal_ = ( action_ == "doHcal");
113  doEcalPreshower_ = ( action_ == "doEcalPreshower");
114  doMuonDTDigis_ = ( action_ == "doMuonDT");
115  doMuonCSCDigis_ = ( action_ == "doMuonCSC");
116  doSiPixelDigis_ = ( action_ == "doSiPixel");
117  doSiStrip_ = ( action_ == "doSiStrip");
118  doObjectMap_ = ( action_ == "doObjectMap");
119  doGCT_ = ( action_ == "doGCT");
120 
121  if (doEcal_) {
122  // ECAL unpacking :
123  produces< edm::LazyGetter<EcalRecHit> >();
124  }
125 
126  if (doHcal_) {
127  // HCAL unpacking
128  produces<HBHEDigiCollection>();
129  produces<HFDigiCollection>();
130  produces<HODigiCollection>();
131  produces<HcalTrigPrimDigiCollection>();
132  produces<HOTrigPrimDigiCollection>();
133  if (unpackZDC_) {
134  produces<ZDCDigiCollection>();
135  }
136  }
137 
138  if (doEcalPreshower_) {
139  produces<ESDigiCollection>();
140  }
141 
142  if (doMuonDTDigis_) {
143  produces<DTDigiCollection>();
144  produces<DTLocalTriggerCollection>();
145  }
146 
147  if (doMuonCSCDigis_) {
148  produces<CSCWireDigiCollection>("MuonCSCWireDigi");
149  produces<CSCStripDigiCollection>("MuonCSCStripDigi");
150  produces<CSCALCTDigiCollection>("MuonCSCALCTDigi");
151  produces<CSCCLCTDigiCollection>("MuonCSCCLCTDigi");
152  produces<CSCComparatorDigiCollection>("MuonCSCComparatorDigi");
153  produces<CSCRPCDigiCollection>("MuonCSCRPCDigi");
154  produces<CSCCorrelatedLCTDigiCollection>("MuonCSCCorrelatedLCTDigi");
155  }
156 
157 
158  if (doSiPixelDigis_) {
159  produces< edm::DetSetVector<PixelDigi> >();
160  }
161 
162  if (doSiStrip_) {
163  produces< edm::LazyGetter<SiStripCluster> >();
164  }
165 
166  if (doGCT_) {
167  // GCT output collections
168  produces<L1GctEmCandCollection>("isoEm");
169  produces<L1GctEmCandCollection>("nonIsoEm");
170  produces<L1GctJetCandCollection>("cenJets");
171  produces<L1GctJetCandCollection>("forJets");
172  produces<L1GctJetCandCollection>("tauJets");
173  produces<L1GctHFBitCountsCollection>();
174  produces<L1GctHFRingEtSumsCollection>();
175  produces<L1GctEtTotalCollection>();
176  produces<L1GctEtHadCollection>();
177  produces<L1GctEtMissCollection>();
178  produces<L1GctHtMissCollection>();
179  produces<L1GctJetCountsCollection>(); // Deprecated (empty collection still needed by GT)
180  }
181 
182  if (doObjectMap_) {
183  produces<L1GlobalTriggerObjectMapRecord>();
184  }
185 }
186 
188 {
189  // do anything here that needs to be done at desctruction time
190  // (e.g. close files, deallocate resources etc.)
191 }
192 
193 
194 //
195 // member functions
196 //
197 
198 // ------------ method called to produce the data ------------
199 void
201 {
202  using namespace edm;
203 
204  if (doEcal_) {
205  std::auto_ptr< edm::LazyGetter<EcalRecHit> > Ecalcollection( new edm::LazyGetter<EcalRecHit> );
206  iEvent.put(Ecalcollection);
207  }
208 
209  if (doHcal_) {
210  std::auto_ptr<HBHEDigiCollection> hbhe_prod(new HBHEDigiCollection());
211  std::auto_ptr<HFDigiCollection> hf_prod(new HFDigiCollection());
212  std::auto_ptr<HODigiCollection> ho_prod(new HODigiCollection());
213  std::auto_ptr<HcalTrigPrimDigiCollection> htp_prod(new HcalTrigPrimDigiCollection());
214  std::auto_ptr<HOTrigPrimDigiCollection> hotp_prod(new HOTrigPrimDigiCollection());
215  iEvent.put(hbhe_prod);
216  iEvent.put(hf_prod);
217  iEvent.put(ho_prod);
218  iEvent.put(htp_prod);
219  iEvent.put(hotp_prod);
220  if (unpackZDC_) {
221  std::auto_ptr<ZDCDigiCollection> zdcprod(new ZDCDigiCollection());
222  iEvent.put(zdcprod);
223  }
224  }
225 
226  if (doEcalPreshower_) {
227  std::auto_ptr<ESDigiCollection> productDigis(new ESDigiCollection);
228  iEvent.put(productDigis, ESdigiCollection_);
229  }
230 
231  if (doMuonDTDigis_) {
232  std::auto_ptr<DTDigiCollection> detectorProduct(new DTDigiCollection);
233  std::auto_ptr<DTLocalTriggerCollection> triggerProduct(new DTLocalTriggerCollection);
234  iEvent.put(detectorProduct);
235  iEvent.put(triggerProduct);
236  }
237 
238  if (doMuonCSCDigis_) {
239  std::auto_ptr<CSCWireDigiCollection> wireProduct(new CSCWireDigiCollection);
240  std::auto_ptr<CSCStripDigiCollection> stripProduct(new CSCStripDigiCollection);
241  std::auto_ptr<CSCALCTDigiCollection> alctProduct(new CSCALCTDigiCollection);
242  std::auto_ptr<CSCCLCTDigiCollection> clctProduct(new CSCCLCTDigiCollection);
243  std::auto_ptr<CSCComparatorDigiCollection> comparatorProduct(new CSCComparatorDigiCollection);
244  std::auto_ptr<CSCRPCDigiCollection> rpcProduct(new CSCRPCDigiCollection);
245  std::auto_ptr<CSCCorrelatedLCTDigiCollection> corrlctProduct(new CSCCorrelatedLCTDigiCollection);
246 
247  iEvent.put(wireProduct,"MuonCSCWireDigi");
248  iEvent.put(stripProduct,"MuonCSCStripDigi");
249  iEvent.put(alctProduct,"MuonCSCALCTDigi");
250  iEvent.put(clctProduct,"MuonCSCCLCTDigi");
251  iEvent.put(comparatorProduct,"MuonCSCComparatorDigi");
252  iEvent.put(rpcProduct,"MuonCSCRPCDigi");
253  iEvent.put(corrlctProduct,"MuonCSCCorrelatedLCTDigi");
254  }
255 
256  if (doSiPixelDigis_) {
257  std::auto_ptr< edm::DetSetVector<PixelDigi> > SiPicollection( new edm::DetSetVector<PixelDigi> );
258  iEvent.put(SiPicollection);
259  }
260 
261  if (doSiStrip_) {
262  std::auto_ptr< edm::LazyGetter<SiStripCluster> > SiStripcollection( new edm::LazyGetter<SiStripCluster> );
263  iEvent.put(SiStripcollection);
264  }
265 
266  if (doGCT_) {
267  std::auto_ptr<L1GctEmCandCollection> m_gctIsoEm( new L1GctEmCandCollection) ;
268  std::auto_ptr<L1GctEmCandCollection> m_gctNonIsoEm(new L1GctEmCandCollection);
269  std::auto_ptr<L1GctJetCandCollection> m_gctCenJets(new L1GctJetCandCollection);
270  std::auto_ptr<L1GctJetCandCollection> m_gctForJets(new L1GctJetCandCollection);
271  std::auto_ptr<L1GctJetCandCollection> m_gctTauJets(new L1GctJetCandCollection);
272  std::auto_ptr<L1GctHFBitCountsCollection> m_gctHfBitCounts(new L1GctHFBitCountsCollection);
273  std::auto_ptr<L1GctHFRingEtSumsCollection> m_gctHfRingEtSums(new L1GctHFRingEtSumsCollection);
274  std::auto_ptr<L1GctEtTotalCollection> m_gctEtTot(new L1GctEtTotalCollection);
275  std::auto_ptr<L1GctEtHadCollection> m_gctEtHad(new L1GctEtHadCollection);
276  std::auto_ptr<L1GctEtMissCollection> m_gctEtMiss(new L1GctEtMissCollection);
277  std::auto_ptr<L1GctHtMissCollection> m_gctHtMiss(new L1GctHtMissCollection);
278  std::auto_ptr<L1GctJetCountsCollection> m_gctJetCounts(new L1GctJetCountsCollection); // DEPRECATED
279 
280  iEvent.put(m_gctIsoEm, "isoEm");
281  iEvent.put(m_gctNonIsoEm, "nonIsoEm");
282  iEvent.put(m_gctCenJets,"cenJets");
283  iEvent.put(m_gctForJets,"forJets");
284  iEvent.put(m_gctTauJets,"tauJets");
285  iEvent.put(m_gctHfBitCounts);
286  iEvent.put(m_gctHfRingEtSums);
287  iEvent.put(m_gctEtTot);
288  iEvent.put(m_gctEtHad);
289  iEvent.put(m_gctEtMiss);
290  iEvent.put(m_gctHtMiss);
291  iEvent.put(m_gctJetCounts); // Deprecated (empty collection still needed by GT)
292  }
293 
294  if (doObjectMap_) {
295  std::auto_ptr<L1GlobalTriggerObjectMapRecord> gtObjectMapRecord(
297  iEvent.put(gtObjectMapRecord);
298  }
299 
300 }
301 
302 //define this as a plug-in
T getParameter(std::string const &) const
virtual void produce(edm::Event &, const edm::EventSetup &)
edm::SortedCollection< HcalTriggerPrimitiveDigi > HcalTrigPrimDigiCollection
std::vector< L1GctEtMiss > L1GctEtMissCollection
std::vector< L1GctHFRingEtSums > L1GctHFRingEtSumsCollection
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
std::vector< L1GctEtHad > L1GctEtHadCollection
std::vector< L1GctJetCounts > L1GctJetCountsCollection
edm::SortedCollection< HOTriggerPrimitiveDigi > HOTrigPrimDigiCollection
edm::SortedCollection< ZDCDataFrame > ZDCDigiCollection
std::vector< L1GctEtTotal > L1GctEtTotalCollection
std::vector< L1GctHFBitCounts > L1GctHFBitCountsCollection
std::vector< L1GctJetCand > L1GctJetCandCollection
edm::SortedCollection< HODataFrame > HODigiCollection
int iEvent
Definition: GenABIO.cc:243
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
HLTDummyCollections(const edm::ParameterSet &)
std::vector< L1GctHtMiss > L1GctHtMissCollection
edm::SortedCollection< HFDataFrame > HFDigiCollection
edm::SortedCollection< HBHEDataFrame > HBHEDigiCollection
std::vector< L1GctEmCand > L1GctEmCandCollection