CMS 3D CMS Logo

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