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 //
17 //
18 
19 
20 // system include files
21 #include <memory>
22 
23 // user include files
26 
29 
33 
34 // -- Ecal
38 // -- Hcal
40 // -- Ecal Preshower
42 // -- Muons DT
45 // -- Muons CSC
54 // -- SiPixels
57 // -- SiStrips
60 // --- GCT
62 
63 // -- ObjectMap
65 
66 
67 //
68 // class decleration
69 //
70 
72  public:
73  explicit HLTDummyCollections(const edm::ParameterSet&);
75  static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);
76 
77  private:
78  virtual void produce(edm::Event&, const edm::EventSetup&) override;
79 
80  // ----------member data ---------------------------
81 
83  bool doEcal_ ;
84  bool doHcal_;
85  bool unpackZDC_ ;
91  bool doSiStrip_ ;
92  bool doGCT_ ;
93  bool doObjectMap_ ;
94 
95 };
96 
97 //
98 // constants, enums and typedefs
99 //
100 
101 
102 //
103 // static data member definitions
104 //
105 
106 //
107 // constructors and destructor
108 //
110 {
111  action_ = iConfig.getParameter<std::string>("action");
112  unpackZDC_ = iConfig.getParameter<bool>("UnpackZDC");
113  ESdigiCollection_ = iConfig.getParameter<std::string>("ESdigiCollection");
114 
115  doEcal_ = ( action_ == "doEcal");
116  doHcal_ = ( action_ == "doHcal");
117  doEcalPreshower_ = ( action_ == "doEcalPreshower");
118  doMuonDTDigis_ = ( action_ == "doMuonDT");
119  doMuonCSCDigis_ = ( action_ == "doMuonCSC");
120  doSiPixelDigis_ = ( action_ == "doSiPixel");
121  doSiStrip_ = ( action_ == "doSiStrip");
122  doObjectMap_ = ( action_ == "doObjectMap");
123  doGCT_ = ( action_ == "doGCT");
124 
125  if (doEcal_) {
126  // ECAL unpacking :
127  produces< edm::LazyGetter<EcalRecHit> >();
128  }
129 
130  if (doHcal_) {
131  // HCAL unpacking
132  produces<HBHEDigiCollection>();
133  produces<HFDigiCollection>();
134  produces<HODigiCollection>();
135  produces<HcalTrigPrimDigiCollection>();
136  produces<HOTrigPrimDigiCollection>();
137  if (unpackZDC_) {
138  produces<ZDCDigiCollection>();
139  }
140  }
141 
142  if (doEcalPreshower_) {
143  produces<ESDigiCollection>();
144  }
145 
146  if (doMuonDTDigis_) {
147  produces<DTDigiCollection>();
148  produces<DTLocalTriggerCollection>();
149  }
150 
151  if (doMuonCSCDigis_) {
152  produces<CSCWireDigiCollection>("MuonCSCWireDigi");
153  produces<CSCStripDigiCollection>("MuonCSCStripDigi");
154  produces<CSCALCTDigiCollection>("MuonCSCALCTDigi");
155  produces<CSCCLCTDigiCollection>("MuonCSCCLCTDigi");
156  produces<CSCComparatorDigiCollection>("MuonCSCComparatorDigi");
157  produces<CSCRPCDigiCollection>("MuonCSCRPCDigi");
158  produces<CSCCorrelatedLCTDigiCollection>("MuonCSCCorrelatedLCTDigi");
159  }
160 
161 
162  if (doSiPixelDigis_) {
163  produces< edm::DetSetVector<PixelDigi> >();
164  }
165 
166  if (doSiStrip_) {
167  produces< edm::LazyGetter<SiStripCluster> >();
168  }
169 
170  if (doGCT_) {
171  // GCT output collections
172  produces<L1GctEmCandCollection>("isoEm");
173  produces<L1GctEmCandCollection>("nonIsoEm");
174  produces<L1GctJetCandCollection>("cenJets");
175  produces<L1GctJetCandCollection>("forJets");
176  produces<L1GctJetCandCollection>("tauJets");
177  produces<L1GctHFBitCountsCollection>();
178  produces<L1GctHFRingEtSumsCollection>();
179  produces<L1GctEtTotalCollection>();
180  produces<L1GctEtHadCollection>();
181  produces<L1GctEtMissCollection>();
182  produces<L1GctHtMissCollection>();
183  produces<L1GctJetCountsCollection>(); // Deprecated (empty collection still needed by GT)
184  }
185 
186  if (doObjectMap_) {
187  produces<L1GlobalTriggerObjectMapRecord>();
188  }
189 }
190 
192 {
193  // do anything here that needs to be done at desctruction time
194  // (e.g. close files, deallocate resources etc.)
195 }
196 
197 
198 void
201  desc.add<std::string>("action","");
202  desc.add<bool>("UnpackZDC",false);
203  desc.add<std::string>("ESdigiCollection","");
204  descriptions.add("HLTDummyCollections",desc);
205 }
206 
207 //
208 // member functions
209 //
210 
211 // ------------ method called to produce the data ------------
212 void
214 {
215  using namespace edm;
216 
217  if (doEcal_) {
218  std::auto_ptr< edm::LazyGetter<EcalRecHit> > Ecalcollection( new edm::LazyGetter<EcalRecHit> );
219  iEvent.put(Ecalcollection);
220  }
221 
222  if (doHcal_) {
223  std::auto_ptr<HBHEDigiCollection> hbhe_prod(new HBHEDigiCollection());
224  std::auto_ptr<HFDigiCollection> hf_prod(new HFDigiCollection());
225  std::auto_ptr<HODigiCollection> ho_prod(new HODigiCollection());
226  std::auto_ptr<HcalTrigPrimDigiCollection> htp_prod(new HcalTrigPrimDigiCollection());
227  std::auto_ptr<HOTrigPrimDigiCollection> hotp_prod(new HOTrigPrimDigiCollection());
228  iEvent.put(hbhe_prod);
229  iEvent.put(hf_prod);
230  iEvent.put(ho_prod);
231  iEvent.put(htp_prod);
232  iEvent.put(hotp_prod);
233  if (unpackZDC_) {
234  std::auto_ptr<ZDCDigiCollection> zdcprod(new ZDCDigiCollection());
235  iEvent.put(zdcprod);
236  }
237  }
238 
239  if (doEcalPreshower_) {
240  std::auto_ptr<ESDigiCollection> productDigis(new ESDigiCollection);
241  iEvent.put(productDigis, ESdigiCollection_);
242  }
243 
244  if (doMuonDTDigis_) {
245  std::auto_ptr<DTDigiCollection> detectorProduct(new DTDigiCollection);
246  std::auto_ptr<DTLocalTriggerCollection> triggerProduct(new DTLocalTriggerCollection);
247  iEvent.put(detectorProduct);
248  iEvent.put(triggerProduct);
249  }
250 
251  if (doMuonCSCDigis_) {
252  std::auto_ptr<CSCWireDigiCollection> wireProduct(new CSCWireDigiCollection);
253  std::auto_ptr<CSCStripDigiCollection> stripProduct(new CSCStripDigiCollection);
254  std::auto_ptr<CSCALCTDigiCollection> alctProduct(new CSCALCTDigiCollection);
255  std::auto_ptr<CSCCLCTDigiCollection> clctProduct(new CSCCLCTDigiCollection);
256  std::auto_ptr<CSCComparatorDigiCollection> comparatorProduct(new CSCComparatorDigiCollection);
257  std::auto_ptr<CSCRPCDigiCollection> rpcProduct(new CSCRPCDigiCollection);
258  std::auto_ptr<CSCCorrelatedLCTDigiCollection> corrlctProduct(new CSCCorrelatedLCTDigiCollection);
259 
260  iEvent.put(wireProduct,"MuonCSCWireDigi");
261  iEvent.put(stripProduct,"MuonCSCStripDigi");
262  iEvent.put(alctProduct,"MuonCSCALCTDigi");
263  iEvent.put(clctProduct,"MuonCSCCLCTDigi");
264  iEvent.put(comparatorProduct,"MuonCSCComparatorDigi");
265  iEvent.put(rpcProduct,"MuonCSCRPCDigi");
266  iEvent.put(corrlctProduct,"MuonCSCCorrelatedLCTDigi");
267  }
268 
269  if (doSiPixelDigis_) {
270  std::auto_ptr< edm::DetSetVector<PixelDigi> > SiPicollection( new edm::DetSetVector<PixelDigi> );
271  iEvent.put(SiPicollection);
272  }
273 
274  if (doSiStrip_) {
275  std::auto_ptr< edm::LazyGetter<SiStripCluster> > SiStripcollection( new edm::LazyGetter<SiStripCluster> );
276  iEvent.put(SiStripcollection);
277  }
278 
279  if (doGCT_) {
280  std::auto_ptr<L1GctEmCandCollection> m_gctIsoEm( new L1GctEmCandCollection) ;
281  std::auto_ptr<L1GctEmCandCollection> m_gctNonIsoEm(new L1GctEmCandCollection);
282  std::auto_ptr<L1GctJetCandCollection> m_gctCenJets(new L1GctJetCandCollection);
283  std::auto_ptr<L1GctJetCandCollection> m_gctForJets(new L1GctJetCandCollection);
284  std::auto_ptr<L1GctJetCandCollection> m_gctTauJets(new L1GctJetCandCollection);
285  std::auto_ptr<L1GctHFBitCountsCollection> m_gctHfBitCounts(new L1GctHFBitCountsCollection);
286  std::auto_ptr<L1GctHFRingEtSumsCollection> m_gctHfRingEtSums(new L1GctHFRingEtSumsCollection);
287  std::auto_ptr<L1GctEtTotalCollection> m_gctEtTot(new L1GctEtTotalCollection);
288  std::auto_ptr<L1GctEtHadCollection> m_gctEtHad(new L1GctEtHadCollection);
289  std::auto_ptr<L1GctEtMissCollection> m_gctEtMiss(new L1GctEtMissCollection);
290  std::auto_ptr<L1GctHtMissCollection> m_gctHtMiss(new L1GctHtMissCollection);
291  std::auto_ptr<L1GctJetCountsCollection> m_gctJetCounts(new L1GctJetCountsCollection); // DEPRECATED
292 
293  iEvent.put(m_gctIsoEm, "isoEm");
294  iEvent.put(m_gctNonIsoEm, "nonIsoEm");
295  iEvent.put(m_gctCenJets,"cenJets");
296  iEvent.put(m_gctForJets,"forJets");
297  iEvent.put(m_gctTauJets,"tauJets");
298  iEvent.put(m_gctHfBitCounts);
299  iEvent.put(m_gctHfRingEtSums);
300  iEvent.put(m_gctEtTot);
301  iEvent.put(m_gctEtHad);
302  iEvent.put(m_gctEtMiss);
303  iEvent.put(m_gctHtMiss);
304  iEvent.put(m_gctJetCounts); // Deprecated (empty collection still needed by GT)
305  }
306 
307  if (doObjectMap_) {
308  std::auto_ptr<L1GlobalTriggerObjectMapRecord> gtObjectMapRecord(
310  iEvent.put(gtObjectMapRecord);
311  }
312 
313 }
314 
315 //define this as a plug-in
T getParameter(std::string const &) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
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:230
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:115
ParameterDescriptionBase * add(U const &iLabel, T const &value)
HLTDummyCollections(const edm::ParameterSet &)
std::vector< L1GctHtMiss > L1GctHtMissCollection
void add(std::string const &label, ParameterSetDescription const &psetDescription)
edm::SortedCollection< HFDataFrame > HFDigiCollection
virtual void produce(edm::Event &, const edm::EventSetup &) override
edm::SortedCollection< HBHEDataFrame > HBHEDigiCollection
std::vector< L1GctEmCand > L1GctEmCandCollection