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 private:
21  void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override;
23 };
24 
26  tok_hfn_(consumes<HGCalDigiCollection>(iConfig.getParameter<edm::InputTag>("hfnoseDigis")))
27 {
28  produces<HGCalDigiCollection>("HFNose");
29 }
30 
32  const edm::EventSetup& iSetup) const {
34  iEvent.getByToken(tok_hfn_,hfn);
35 
36  auto out_hfn = std::make_unique<HGCalDigiCollection>();
37  if (hfn.isValid()) {
38  out_hfn = std::make_unique<HGCalDigiCollection>(*(hfn.product()));
39  }
40  iEvent.put(std::move(out_hfn),"HFNose");
41 }
42 
45  desc.add<edm::InputTag>("hfnoseDigis",edm::InputTag("simHFNoseUnsuppressedDigis:HFNose"));
46  descriptions.add("HFNoseRawToDigiFake",desc);
47 }
48 
49 //define this as a plug-in
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
edm::EDGetTokenT< HGCalDigiCollection > tok_hfn_
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
int iEvent
Definition: GenABIO.cc:224
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
ParameterDescriptionBase * add(U const &iLabel, T const &value)
bool isValid() const
Definition: HandleBase.h:74
T const * product() const
Definition: Handle.h:74
void add(std::string const &label, ParameterSetDescription const &psetDescription)
HLT enums.
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
HFNoseRawToDigiFake(const edm::ParameterSet &)
def move(src, dest)
Definition: eostools.py:511