CMS 3D CMS Logo

InputDataProducer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: L1Trigger/VertexFinder
4 // Class: InputDataProducer
5 //
13 //
14 // Original Author: Alexx Perloff
15 // Created: Fri, 05 Feb 2021 23:42:17 GMT
16 //
17 //
18 
19 // system include files
20 #include <memory>
21 #include <vector>
22 
23 // user include files
40 
41 //
42 // class declaration
43 //
44 
46 public:
47  explicit InputDataProducer(const edm::ParameterSet&);
48  ~InputDataProducer() override;
49 
50  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
51 
52 private:
53  void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override;
54 
55  // ----------constants, enums and typedefs ---------
57 
58  // ----------member data ---------------------------
69 };
70 
71 //
72 // constructors and destructor
73 //
75  : outputCollectionName_(iConfig.getParameter<std::string>("outputCollectionName")),
76  settings_(iConfig),
77  hepMCToken_(consumes<edm::HepMCProduct>(iConfig.getParameter<edm::InputTag>("hepMCInputTag"))),
78  genParticlesToken_(
79  consumes<edm::View<reco::GenParticle>>(iConfig.getParameter<edm::InputTag>("genParticleInputTag"))),
80  tpToken_(consumes<edm::View<TrackingParticle>>(iConfig.getParameter<edm::InputTag>("tpInputTag"))),
81  tpValueMapToken_(
82  consumes<edm::ValueMap<l1tVertexFinder::TP>>(iConfig.getParameter<edm::InputTag>("tpValueMapInputTag"))),
83  stubToken_(consumes<DetSetVec>(iConfig.getParameter<edm::InputTag>("stubInputTag"))),
86  // Define EDM output to be written to file (if required)
87  produces<l1tVertexFinder::InputData>(outputCollectionName_);
88 
89  //now do what ever other initialization is needed
90 }
91 
93 
94 //
95 // member functions
96 //
97 
98 // ------------ method called to produce the data ------------
100  std::unique_ptr<l1tVertexFinder::InputData> product = std::make_unique<l1tVertexFinder::InputData>(iEvent,
101  iSetup,
102  settings_,
103  hepMCToken_,
105  tpToken_,
107  stubToken_,
108  tTopoToken_,
109  tGeomToken_);
110 
111  iEvent.put(std::move(product), outputCollectionName_);
112 }
113 
114 // ------------ method fills 'descriptions' with the allowed parameters for the module ------------
116  //The following says we do not know what parameters are allowed so do no validation
117  // Please change this to state exactly what you do use, even if it is no parameters
119  desc.setUnknown();
120  descriptions.addDefault(desc);
121 }
122 
123 //define this as a plug-in
l1tVertexFinder
Definition: AlgoSettings.h:10
edm::StreamID
Definition: StreamID.h:30
MessageLogger.h
l1tVertexFinder::AnalysisSettings
Definition: AnalysisSettings.h:15
AnalysisSettings.h
ESInputTag
sistrip::View
View
Definition: ConstantsForView.h:26
TTTypes.h
InputDataProducer::InputDataProducer
InputDataProducer(const edm::ParameterSet &)
Definition: InputDataProducer.cc:74
edm::EDGetTokenT< edm::HepMCProduct >
edm
HLT enums.
Definition: AlignableModifier.h:19
TrackerTopology
Definition: TrackerTopology.h:16
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
DigiToRawDM_cff.TP
TP
Definition: DigiToRawDM_cff.py:51
InputDataProducer::genParticlesToken_
const edm::EDGetTokenT< edm::View< reco::GenParticle > > genParticlesToken_
Definition: InputDataProducer.cc:62
InputDataProducer::~InputDataProducer
~InputDataProducer() override
Definition: InputDataProducer.cc:92
InputDataProducer::tGeomToken_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tGeomToken_
Definition: InputDataProducer.cc:68
InputDataProducer::tTopoToken_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
Definition: InputDataProducer.cc:67
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:46
InputDataProducer::produce
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
Definition: InputDataProducer.cc:99
GenParticle
Definition: GenParticle.py:1
TTClusterAssociationMap.h
GenParticle.h
InputDataProducer::settings_
l1tVertexFinder::AnalysisSettings settings_
Definition: InputDataProducer.cc:60
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:16
TrackingParticle
Monte Carlo truth information used for tracking validation.
Definition: TrackingParticle.h:29
edm::global::EDProducer
Definition: EDProducer.h:32
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
InputDataProducer::stubValueMapToken_
const edm::EDGetTokenT< edm::ValueMap< l1tVertexFinder::Stub > > stubValueMapToken_
Definition: InputDataProducer.cc:66
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
InputDataProducer::tpValueMapToken_
const edm::EDGetTokenT< edm::ValueMap< l1tVertexFinder::TP > > tpValueMapToken_
Definition: InputDataProducer.cc:64
InputDataProducer::hepMCToken_
const edm::EDGetTokenT< edm::HepMCProduct > hepMCToken_
Definition: InputDataProducer.cc:61
iEvent
int iEvent
Definition: GenABIO.cc:224
TTStubAssociationMap.h
InputDataProducer
Definition: InputDataProducer.cc:45
edm::EventSetup
Definition: EventSetup.h:58
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd >
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
InputTag.h
InputDataProducer::outputCollectionName_
const std::string outputCollectionName_
Definition: InputDataProducer.cc:59
InputDataProducer::tpToken_
const edm::EDGetTokenT< edm::View< TrackingParticle > > tpToken_
Definition: InputDataProducer.cc:63
TrackingParticle.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
std
Definition: JetResolutionObject.h:76
InputDataProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: InputDataProducer.cc:115
InputDataProducer::stubToken_
const edm::EDGetTokenT< DetSetVec > stubToken_
Definition: InputDataProducer.cc:65
Frameworkfwd.h
InputData.h
HepMCProduct
TrackerTopologyRcd
Definition: TrackerTopologyRcd.h:10
ParameterSet.h
HepMCProduct.h
EDProducer.h
InputDataProducer::DetSetVec
edmNew::DetSetVector< TTStub< Ref_Phase2TrackerDigi_ > > DetSetVec
Definition: InputDataProducer.cc:56
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
edm::Event
Definition: Event.h:73
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:99
StreamID.h
TrackerGeometry
Definition: TrackerGeometry.h:14