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 // -- Ecal Preshower
40 // -- Muons DT
43 // -- Muons CSC
52 // -- SiPixels
55 // -- SiStrips
58 // --- GCT
60 
61 // -- ObjectMap
63 
64 //
65 // class decleration
66 //
67 
69 public:
70  explicit HLTDummyCollections(const edm::ParameterSet&);
71  ~HLTDummyCollections() override;
72  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
73 
74 private:
75  void produce(edm::Event&, const edm::EventSetup&) override;
76 
77  // ----------member data ---------------------------
78 
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  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
ConfigurationDescriptions.h
edm::DetSetVector< PixelDigi >
HLTDummyCollections::action_
std::string action_
Definition: HLTDummyCollections.cc:79
CSCCorrelatedLCTDigiCollection.h
DTLocalTriggerCollection
HLTDummyCollections
Definition: HLTDummyCollections.cc:68
HLTDummyCollections::unpackZDC_
bool unpackZDC_
Definition: HLTDummyCollections.cc:82
DTLocalTriggerCollection.h
EDProducer.h
HLTDummyCollections::HLTDummyCollections
HLTDummyCollections(const edm::ParameterSet &)
Definition: HLTDummyCollections.cc:104
HOTrigPrimDigiCollection
edm::SortedCollection< HOTriggerPrimitiveDigi > HOTrigPrimDigiCollection
Definition: HcalDigiCollections.h:29
edm
HLT enums.
Definition: AlignableModifier.h:19
L1GctJetCandCollection
std::vector< L1GctJetCand > L1GctJetCandCollection
Definition: L1GctCollections.h:31
CSCStripDigiCollection
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
HLTDummyCollections::doGCT_
bool doGCT_
Definition: HLTDummyCollections.cc:89
HLTDummyCollections::ESdigiCollection_
std::string ESdigiCollection_
Definition: HLTDummyCollections.cc:84
HLTDummyCollections::doSiPixelDigis_
bool doSiPixelDigis_
Definition: HLTDummyCollections.cc:87
PixelDigi.h
HODigiCollection
edm::SortedCollection< HODataFrame > HODigiCollection
Definition: HcalDigiCollections.h:21
HLTDummyCollections::doEcalPreshower_
bool doEcalPreshower_
Definition: HLTDummyCollections.cc:83
EcalRecHitCollections.h
CSCDetId.h
L1GctJetCountsCollection
std::vector< L1GctJetCounts > L1GctJetCountsCollection
Definition: L1GctCollections.h:37
L1GctEtMissCollection
std::vector< L1GctEtMiss > L1GctEtMissCollection
Definition: L1GctCollections.h:34
MakerMacros.h
HLTDummyCollections::~HLTDummyCollections
~HLTDummyCollections() override
Definition: HLTDummyCollections.cc:185
CSCRPCDigiCollection.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
HLTDummyCollections::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: HLTDummyCollections.cc:203
ZDCDigiCollection
edm::SortedCollection< ZDCDataFrame > ZDCDigiCollection
Definition: HcalDigiCollections.h:26
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
HLTDummyCollections::doHcal_
bool doHcal_
Definition: HLTDummyCollections.cc:81
EcalRecHitComparison.h
ParameterSetDescription.h
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
ESDigiCollection
Definition: EcalDigiCollections.h:82
L1GctEtTotalCollection
std::vector< L1GctEtTotal > L1GctEtTotalCollection
Definition: L1GctCollections.h:35
edm::ParameterSet
Definition: ParameterSet.h:47
SiStripCluster.h
HLTDummyCollections::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: HLTDummyCollections.cc:190
Event.h
L1GlobalTriggerObjectMapRecord
Definition: L1GlobalTriggerObjectMapRecord.h:29
DTDigiCollection
iEvent
int iEvent
Definition: GenABIO.cc:224
CSCALCTDigiCollection
CSCStripDigiCollection.h
CSCComparatorDigiCollection
edm::EventSetup
Definition: EventSetup.h:58
DetSetVector.h
CSCCorrelatedLCTDigiCollection
L1GctHFBitCountsCollection
std::vector< L1GctHFBitCounts > L1GctHFBitCountsCollection
Definition: L1GctCollections.h:39
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
GctRawToDigi.h
edmNew::DetSetVector
Definition: DetSetNew.h:13
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
CSCWireDigiCollection
L1GctEmCandCollection
std::vector< L1GctEmCand > L1GctEmCandCollection
Definition: L1GctCollections.h:30
Frameworkfwd.h
HcalRawToDigi.h
CSCCLCTDigiCollection
HLTDummyCollections::doSiStrip_
bool doSiStrip_
Definition: HLTDummyCollections.cc:88
edm::EDProducer
Definition: EDProducer.h:35
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
CSCComparatorDigiCollection.h
CSCWireDigiCollection.h
CSCRPCDigiCollection
CSCALCTDigiCollection.h
HFDigiCollection
edm::SortedCollection< HFDataFrame > HFDigiCollection
Definition: HcalDigiCollections.h:22
L1GctEtHadCollection
std::vector< L1GctEtHad > L1GctEtHadCollection
Definition: L1GctCollections.h:33
DTDigiCollection.h
L1GlobalTriggerObjectMapRecord.h
ParameterSet.h
CSCCLCTDigiCollection.h
ESRawToDigi.h
HBHEDigiCollection
edm::SortedCollection< HBHEDataFrame > HBHEDigiCollection
Definition: HcalDigiCollections.h:20
HLTDummyCollections::doMuonCSCDigis_
bool doMuonCSCDigis_
Definition: HLTDummyCollections.cc:86
edm::Event
Definition: Event.h:73
L1GctHFRingEtSumsCollection
std::vector< L1GctHFRingEtSums > L1GctHFRingEtSumsCollection
Definition: L1GctCollections.h:38
DetSetVectorNew.h
L1GctHtMissCollection
std::vector< L1GctHtMiss > L1GctHtMissCollection
Definition: L1GctCollections.h:36
HcalTrigPrimDigiCollection
edm::SortedCollection< HcalTriggerPrimitiveDigi > HcalTrigPrimDigiCollection
Definition: HcalDigiCollections.h:24
HLTDummyCollections::doMuonDTDigis_
bool doMuonDTDigis_
Definition: HLTDummyCollections.cc:85
HLTDummyCollections::doObjectMap_
bool doObjectMap_
Definition: HLTDummyCollections.cc:90