CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 // 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::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_;
92 };
93 
94 //
95 // constants, enums and typedefs
96 //
97 
98 //
99 // static data member definitions
100 //
101 
102 //
103 // constructors and destructor
104 //
106  action_ = iConfig.getParameter<std::string>("action");
107  unpackZDC_ = iConfig.getParameter<bool>("UnpackZDC");
108  ESdigiCollection_ = iConfig.getParameter<std::string>("ESdigiCollection");
109 
110  // doEcal_ = ( action_ == "doEcal");
111  doHcal_ = (action_ == "doHcal");
112  doEcalPreshower_ = (action_ == "doEcalPreshower");
113  doMuonDTDigis_ = (action_ == "doMuonDT");
114  doMuonCSCDigis_ = (action_ == "doMuonCSC");
115  doSiPixelDigis_ = (action_ == "doSiPixel");
116  doSiStrip_ = (action_ == "doSiStrip");
117  doObjectMap_ = (action_ == "doObjectMap");
118  doGCT_ = (action_ == "doGCT");
119 
120  /* This interface is out of data and I do not know what is the proper replacement
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  if (doSiPixelDigis_) {
158  produces<edm::DetSetVector<PixelDigi> >();
159  }
160 
161  if (doSiStrip_) {
162  produces<edmNew::DetSetVector<SiStripCluster> >();
163  }
164 
165  if (doGCT_) {
166  // GCT output collections
167  produces<L1GctEmCandCollection>("isoEm");
168  produces<L1GctEmCandCollection>("nonIsoEm");
169  produces<L1GctJetCandCollection>("cenJets");
170  produces<L1GctJetCandCollection>("forJets");
171  produces<L1GctJetCandCollection>("tauJets");
172  produces<L1GctHFBitCountsCollection>();
173  produces<L1GctHFRingEtSumsCollection>();
174  produces<L1GctEtTotalCollection>();
175  produces<L1GctEtHadCollection>();
176  produces<L1GctEtMissCollection>();
177  produces<L1GctHtMissCollection>();
178  produces<L1GctJetCountsCollection>(); // Deprecated (empty collection still needed by GT)
179  }
180 
181  if (doObjectMap_) {
182  produces<L1GlobalTriggerObjectMapRecord>();
183  }
184 }
185 
187  // do anything here that needs to be done at desctruction time
188  // (e.g. close files, deallocate resources etc.)
189 }
190 
193  desc.add<std::string>("action", "");
194  desc.add<bool>("UnpackZDC", false);
195  desc.add<std::string>("ESdigiCollection", "");
196  descriptions.add("HLTDummyCollections", desc);
197 }
198 
199 //
200 // member functions
201 //
202 
203 // ------------ method called to produce the data ------------
205  using namespace edm;
206 
207  /*
208  if (doEcal_) {
209  std::unique_ptr< edm::LazyGetter<EcalRecHit> > Ecalcollection( new edm::LazyGetter<EcalRecHit> );
210  iEvent.put(std::move(Ecalcollection));
211  } */
212 
213  if (doHcal_) {
214  std::unique_ptr<HBHEDigiCollection> hbhe_prod(new HBHEDigiCollection());
215  std::unique_ptr<HFDigiCollection> hf_prod(new HFDigiCollection());
216  std::unique_ptr<HODigiCollection> ho_prod(new HODigiCollection());
217  std::unique_ptr<HcalTrigPrimDigiCollection> htp_prod(new HcalTrigPrimDigiCollection());
218  std::unique_ptr<HOTrigPrimDigiCollection> hotp_prod(new HOTrigPrimDigiCollection());
219  iEvent.put(std::move(hbhe_prod));
220  iEvent.put(std::move(hf_prod));
221  iEvent.put(std::move(ho_prod));
222  iEvent.put(std::move(htp_prod));
223  iEvent.put(std::move(hotp_prod));
224  if (unpackZDC_) {
225  std::unique_ptr<ZDCDigiCollection> zdcprod(new ZDCDigiCollection());
226  iEvent.put(std::move(zdcprod));
227  }
228  }
229 
230  if (doEcalPreshower_) {
231  std::unique_ptr<ESDigiCollection> productDigis(new ESDigiCollection);
232  iEvent.put(std::move(productDigis), ESdigiCollection_);
233  }
234 
235  if (doMuonDTDigis_) {
236  std::unique_ptr<DTDigiCollection> detectorProduct(new DTDigiCollection);
237  std::unique_ptr<DTLocalTriggerCollection> triggerProduct(new DTLocalTriggerCollection);
238  iEvent.put(std::move(detectorProduct));
239  iEvent.put(std::move(triggerProduct));
240  }
241 
242  if (doMuonCSCDigis_) {
243  std::unique_ptr<CSCWireDigiCollection> wireProduct(new CSCWireDigiCollection);
244  std::unique_ptr<CSCStripDigiCollection> stripProduct(new CSCStripDigiCollection);
245  std::unique_ptr<CSCALCTDigiCollection> alctProduct(new CSCALCTDigiCollection);
246  std::unique_ptr<CSCCLCTDigiCollection> clctProduct(new CSCCLCTDigiCollection);
247  std::unique_ptr<CSCComparatorDigiCollection> comparatorProduct(new CSCComparatorDigiCollection);
248  std::unique_ptr<CSCRPCDigiCollection> rpcProduct(new CSCRPCDigiCollection);
249  std::unique_ptr<CSCCorrelatedLCTDigiCollection> corrlctProduct(new CSCCorrelatedLCTDigiCollection);
250 
251  iEvent.put(std::move(wireProduct), "MuonCSCWireDigi");
252  iEvent.put(std::move(stripProduct), "MuonCSCStripDigi");
253  iEvent.put(std::move(alctProduct), "MuonCSCALCTDigi");
254  iEvent.put(std::move(clctProduct), "MuonCSCCLCTDigi");
255  iEvent.put(std::move(comparatorProduct), "MuonCSCComparatorDigi");
256  iEvent.put(std::move(rpcProduct), "MuonCSCRPCDigi");
257  iEvent.put(std::move(corrlctProduct), "MuonCSCCorrelatedLCTDigi");
258  }
259 
260  if (doSiPixelDigis_) {
261  std::unique_ptr<edm::DetSetVector<PixelDigi> > SiPicollection(new edm::DetSetVector<PixelDigi>);
262  iEvent.put(std::move(SiPicollection));
263  }
264 
265  if (doSiStrip_) {
266  std::unique_ptr<edmNew::DetSetVector<SiStripCluster> > SiStripcollection(new edmNew::DetSetVector<SiStripCluster>);
267  iEvent.put(std::move(SiStripcollection));
268  }
269 
270  if (doGCT_) {
271  std::unique_ptr<L1GctEmCandCollection> m_gctIsoEm(new L1GctEmCandCollection);
272  std::unique_ptr<L1GctEmCandCollection> m_gctNonIsoEm(new L1GctEmCandCollection);
273  std::unique_ptr<L1GctJetCandCollection> m_gctCenJets(new L1GctJetCandCollection);
274  std::unique_ptr<L1GctJetCandCollection> m_gctForJets(new L1GctJetCandCollection);
275  std::unique_ptr<L1GctJetCandCollection> m_gctTauJets(new L1GctJetCandCollection);
276  std::unique_ptr<L1GctHFBitCountsCollection> m_gctHfBitCounts(new L1GctHFBitCountsCollection);
277  std::unique_ptr<L1GctHFRingEtSumsCollection> m_gctHfRingEtSums(new L1GctHFRingEtSumsCollection);
278  std::unique_ptr<L1GctEtTotalCollection> m_gctEtTot(new L1GctEtTotalCollection);
279  std::unique_ptr<L1GctEtHadCollection> m_gctEtHad(new L1GctEtHadCollection);
280  std::unique_ptr<L1GctEtMissCollection> m_gctEtMiss(new L1GctEtMissCollection);
281  std::unique_ptr<L1GctHtMissCollection> m_gctHtMiss(new L1GctHtMissCollection);
282  std::unique_ptr<L1GctJetCountsCollection> m_gctJetCounts(new L1GctJetCountsCollection); // DEPRECATED
283 
284  iEvent.put(std::move(m_gctIsoEm), "isoEm");
285  iEvent.put(std::move(m_gctNonIsoEm), "nonIsoEm");
286  iEvent.put(std::move(m_gctCenJets), "cenJets");
287  iEvent.put(std::move(m_gctForJets), "forJets");
288  iEvent.put(std::move(m_gctTauJets), "tauJets");
289  iEvent.put(std::move(m_gctHfBitCounts));
290  iEvent.put(std::move(m_gctHfRingEtSums));
291  iEvent.put(std::move(m_gctEtTot));
292  iEvent.put(std::move(m_gctEtHad));
293  iEvent.put(std::move(m_gctEtMiss));
294  iEvent.put(std::move(m_gctHtMiss));
295  iEvent.put(std::move(m_gctJetCounts)); // Deprecated (empty collection still needed by GT)
296  }
297 
298  if (doObjectMap_) {
299  std::unique_ptr<L1GlobalTriggerObjectMapRecord> gtObjectMapRecord(new L1GlobalTriggerObjectMapRecord());
300  iEvent.put(std::move(gtObjectMapRecord));
301  }
302 }
303 
304 // declare this class as a framework plugin
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
edm::SortedCollection< HcalTriggerPrimitiveDigi > HcalTrigPrimDigiCollection
std::vector< L1GctEtMiss > L1GctEtMissCollection
std::vector< L1GctHFRingEtSums > L1GctHFRingEtSumsCollection
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
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
def move
Definition: eostools.py:511
ParameterDescriptionBase * add(U const &iLabel, T const &value)
HLTDummyCollections(const edm::ParameterSet &)
std::vector< L1GctHtMiss > L1GctHtMissCollection
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
void add(std::string const &label, ParameterSetDescription const &psetDescription)
edm::SortedCollection< HFDataFrame > HFDigiCollection
void produce(edm::Event &, const edm::EventSetup &) override
edm::SortedCollection< HBHEDataFrame > HBHEDigiCollection
std::vector< L1GctEmCand > L1GctEmCandCollection