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
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:131
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
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:70
T const * product() const
Definition: Handle.h:69
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