CMS 3D CMS Logo

HFNoseRawToDigiFake.cc
Go to the documentation of this file.
1 //STL includes
2 #include <memory>
3 
4 //framework includes
12 
13 //other includes
15 
17 public:
18  explicit HFNoseRawToDigiFake(const edm::ParameterSet&);
19  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
20 
21 private:
22  void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override;
24 };
25 
27  : tok_hfn_(consumes<HGCalDigiCollection>(iConfig.getParameter<edm::InputTag>("hfnoseDigis"))) {
28  produces<HGCalDigiCollection>("HFNose");
29 }
30 
33  iEvent.getByToken(tok_hfn_, hfn);
34 
35  auto out_hfn = std::make_unique<HGCalDigiCollection>();
36  if (hfn.isValid()) {
37  out_hfn = std::make_unique<HGCalDigiCollection>(*(hfn.product()));
38  }
39  iEvent.put(std::move(out_hfn), "HFNose");
40 }
41 
44  desc.add<edm::InputTag>("hfnoseDigis", edm::InputTag("simHFNoseUnsuppressedDigis:HFNose"));
45  descriptions.add("HFNoseRawToDigiFake", desc);
46 }
47 
48 //define this as a plug-in
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
T const * product() const
Definition: Handle.h:70
edm::EDGetTokenT< HGCalDigiCollection > tok_hfn_
int iEvent
Definition: GenABIO.cc:224
void add(std::string const &label, ParameterSetDescription const &psetDescription)
bool isValid() const
Definition: HandleBase.h:70
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
HLT enums.
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
HFNoseRawToDigiFake(const edm::ParameterSet &)
def move(src, dest)
Definition: eostools.py:511