CMS 3D CMS Logo

L1TMuonBarrelKalmanStubProducer.cc
Go to the documentation of this file.
1 #include <memory>
4 
7 
10 
15 
16 
18 
19 
20 
21 //
22 // class declaration
23 //
24 
26  public:
29 
30  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
31 
32  private:
33  void beginStream(edm::StreamID) override;
34  void produce(edm::Event&, const edm::EventSetup&) override;
35  void endStream() override;
38  std::unique_ptr<L1TMuonBarrelKalmanStubProcessor> proc_;
39 
40 };
41 
42 //
43 // constants, enums and typedefs
44 //
45 
46 
47 //
48 // static data member definitions
49 //
50 
51 //
52 // constructors and destructor
53 //
55  srcPhi_(consumes<L1MuDTChambPhContainer>(iConfig.getParameter<edm::InputTag>("srcPhi"))),
56  srcTheta_(consumes<L1MuDTChambThContainer>(iConfig.getParameter<edm::InputTag>("srcTheta"))),
58 {
59  produces <L1MuKBMTCombinedStubCollection>();
60 }
61 
62 
64 {
65 
66  // do anything here that needs to be done at destruction time
67  // (e.g. close files, deallocate resources etc.)
68 }
69 
70 
71 //
72 // member functions
73 //
74 
75 // ------------ method called to produce the data ------------
76 void
78 {
79  using namespace edm;
81  iEvent.getByToken(srcPhi_,phiIn);
82 
84  iEvent.getByToken(srcTheta_,thetaIn);
85 
86  L1MuKBMTCombinedStubCollection stubs = proc_->makeStubs(phiIn.product(),thetaIn.product());
87  iEvent.put(std::make_unique<L1MuKBMTCombinedStubCollection>(stubs));
88 }
89 
90 // ------------ method called once each stream before processing any runs, lumis or events ------------
91 void
93 {
94 }
95 
96 // ------------ method called once each stream after processing all runs, lumis and events ------------
97 void
99 }
100 
101 void
103  //The following says we do not know what parameters are allowed so do no validation
104  // Please change this to state exactly what you do use, even if it is no parameters
106  desc.setUnknown();
107  descriptions.addDefault(desc);
108 }
109 
110 //define this as a plug-in
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:137
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
L1TMuonBarrelKalmanStubProducer(const edm::ParameterSet &)
edm::EDGetTokenT< L1MuDTChambPhContainer > srcPhi_
void produce(edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< L1MuDTChambThContainer > srcTheta_
int iEvent
Definition: GenABIO.cc:230
void addDefault(ParameterSetDescription const &psetDescription)
std::unique_ptr< L1TMuonBarrelKalmanStubProcessor > proc_
T const * product() const
Definition: Handle.h:81
HLT enums.
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::vector< L1MuKBMTCombinedStub > L1MuKBMTCombinedStubCollection