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
37 // -- Hcal
39 // -- Ecal Preshower
41 // -- Muons DT
44 // -- Muons CSC
53 // -- SiPixels
56 // -- SiStrips
59 // --- GCT
61 
62 // -- ObjectMap
64 
65 
66 //
67 // class decleration
68 //
69 
71  public:
72  explicit HLTDummyCollections(const edm::ParameterSet&);
74  static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);
75 
76  private:
77  virtual void produce(edm::Event&, const edm::EventSetup&) override;
78 
79  // ----------member data ---------------------------
80 
82  //bool doEcal_ ;
83  bool doHcal_;
84  bool unpackZDC_ ;
90  bool doSiStrip_ ;
91  bool doGCT_ ;
92  bool doObjectMap_ ;
93 
94 };
95 
96 //
97 // constants, enums and typedefs
98 //
99 
100 
101 //
102 // static data member definitions
103 //
104 
105 //
106 // constructors and destructor
107 //
109 {
110  action_ = iConfig.getParameter<std::string>("action");
111  unpackZDC_ = iConfig.getParameter<bool>("UnpackZDC");
112  ESdigiCollection_ = iConfig.getParameter<std::string>("ESdigiCollection");
113 
114  // doEcal_ = ( action_ == "doEcal");
115  doHcal_ = ( action_ == "doHcal");
116  doEcalPreshower_ = ( action_ == "doEcalPreshower");
117  doMuonDTDigis_ = ( action_ == "doMuonDT");
118  doMuonCSCDigis_ = ( action_ == "doMuonCSC");
119  doSiPixelDigis_ = ( action_ == "doSiPixel");
120  doSiStrip_ = ( action_ == "doSiStrip");
121  doObjectMap_ = ( action_ == "doObjectMap");
122  doGCT_ = ( action_ == "doGCT");
123 
124 /* This interface is out of data and I do not know what is the proper replacement
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< edmNew::DetSetVector<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  /*
218  if (doEcal_) {
219  std::auto_ptr< edm::LazyGetter<EcalRecHit> > Ecalcollection( new edm::LazyGetter<EcalRecHit> );
220  iEvent.put(Ecalcollection);
221  } */
222 
223  if (doHcal_) {
224  std::auto_ptr<HBHEDigiCollection> hbhe_prod(new HBHEDigiCollection());
225  std::auto_ptr<HFDigiCollection> hf_prod(new HFDigiCollection());
226  std::auto_ptr<HODigiCollection> ho_prod(new HODigiCollection());
227  std::auto_ptr<HcalTrigPrimDigiCollection> htp_prod(new HcalTrigPrimDigiCollection());
228  std::auto_ptr<HOTrigPrimDigiCollection> hotp_prod(new HOTrigPrimDigiCollection());
229  iEvent.put(hbhe_prod);
230  iEvent.put(hf_prod);
231  iEvent.put(ho_prod);
232  iEvent.put(htp_prod);
233  iEvent.put(hotp_prod);
234  if (unpackZDC_) {
235  std::auto_ptr<ZDCDigiCollection> zdcprod(new ZDCDigiCollection());
236  iEvent.put(zdcprod);
237  }
238  }
239 
240  if (doEcalPreshower_) {
241  std::auto_ptr<ESDigiCollection> productDigis(new ESDigiCollection);
242  iEvent.put(productDigis, ESdigiCollection_);
243  }
244 
245  if (doMuonDTDigis_) {
246  std::auto_ptr<DTDigiCollection> detectorProduct(new DTDigiCollection);
247  std::auto_ptr<DTLocalTriggerCollection> triggerProduct(new DTLocalTriggerCollection);
248  iEvent.put(detectorProduct);
249  iEvent.put(triggerProduct);
250  }
251 
252  if (doMuonCSCDigis_) {
253  std::auto_ptr<CSCWireDigiCollection> wireProduct(new CSCWireDigiCollection);
254  std::auto_ptr<CSCStripDigiCollection> stripProduct(new CSCStripDigiCollection);
255  std::auto_ptr<CSCALCTDigiCollection> alctProduct(new CSCALCTDigiCollection);
256  std::auto_ptr<CSCCLCTDigiCollection> clctProduct(new CSCCLCTDigiCollection);
257  std::auto_ptr<CSCComparatorDigiCollection> comparatorProduct(new CSCComparatorDigiCollection);
258  std::auto_ptr<CSCRPCDigiCollection> rpcProduct(new CSCRPCDigiCollection);
259  std::auto_ptr<CSCCorrelatedLCTDigiCollection> corrlctProduct(new CSCCorrelatedLCTDigiCollection);
260 
261  iEvent.put(wireProduct,"MuonCSCWireDigi");
262  iEvent.put(stripProduct,"MuonCSCStripDigi");
263  iEvent.put(alctProduct,"MuonCSCALCTDigi");
264  iEvent.put(clctProduct,"MuonCSCCLCTDigi");
265  iEvent.put(comparatorProduct,"MuonCSCComparatorDigi");
266  iEvent.put(rpcProduct,"MuonCSCRPCDigi");
267  iEvent.put(corrlctProduct,"MuonCSCCorrelatedLCTDigi");
268  }
269 
270  if (doSiPixelDigis_) {
271  std::auto_ptr< edm::DetSetVector<PixelDigi> > SiPicollection( new edm::DetSetVector<PixelDigi> );
272  iEvent.put(SiPicollection);
273  }
274 
275  if (doSiStrip_) {
276  std::auto_ptr< edmNew::DetSetVector<SiStripCluster> > SiStripcollection( new edmNew::DetSetVector<SiStripCluster> );
277  iEvent.put(SiStripcollection);
278  }
279 
280  if (doGCT_) {
281  std::auto_ptr<L1GctEmCandCollection> m_gctIsoEm( new L1GctEmCandCollection) ;
282  std::auto_ptr<L1GctEmCandCollection> m_gctNonIsoEm(new L1GctEmCandCollection);
283  std::auto_ptr<L1GctJetCandCollection> m_gctCenJets(new L1GctJetCandCollection);
284  std::auto_ptr<L1GctJetCandCollection> m_gctForJets(new L1GctJetCandCollection);
285  std::auto_ptr<L1GctJetCandCollection> m_gctTauJets(new L1GctJetCandCollection);
286  std::auto_ptr<L1GctHFBitCountsCollection> m_gctHfBitCounts(new L1GctHFBitCountsCollection);
287  std::auto_ptr<L1GctHFRingEtSumsCollection> m_gctHfRingEtSums(new L1GctHFRingEtSumsCollection);
288  std::auto_ptr<L1GctEtTotalCollection> m_gctEtTot(new L1GctEtTotalCollection);
289  std::auto_ptr<L1GctEtHadCollection> m_gctEtHad(new L1GctEtHadCollection);
290  std::auto_ptr<L1GctEtMissCollection> m_gctEtMiss(new L1GctEtMissCollection);
291  std::auto_ptr<L1GctHtMissCollection> m_gctHtMiss(new L1GctHtMissCollection);
292  std::auto_ptr<L1GctJetCountsCollection> m_gctJetCounts(new L1GctJetCountsCollection); // DEPRECATED
293 
294  iEvent.put(m_gctIsoEm, "isoEm");
295  iEvent.put(m_gctNonIsoEm, "nonIsoEm");
296  iEvent.put(m_gctCenJets,"cenJets");
297  iEvent.put(m_gctForJets,"forJets");
298  iEvent.put(m_gctTauJets,"tauJets");
299  iEvent.put(m_gctHfBitCounts);
300  iEvent.put(m_gctHfRingEtSums);
301  iEvent.put(m_gctEtTot);
302  iEvent.put(m_gctEtHad);
303  iEvent.put(m_gctEtMiss);
304  iEvent.put(m_gctHtMiss);
305  iEvent.put(m_gctJetCounts); // Deprecated (empty collection still needed by GT)
306  }
307 
308  if (doObjectMap_) {
309  std::auto_ptr<L1GlobalTriggerObjectMapRecord> gtObjectMapRecord(
311  iEvent.put(gtObjectMapRecord);
312  }
313 
314 }
315 
316 //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:121
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