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