CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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:133
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
edm::EDGetTokenT< HGCalDigiCollection > tok_hfn_
int iEvent
Definition: GenABIO.cc:224
def move
Definition: eostools.py:511
ParameterDescriptionBase * add(U const &iLabel, T const &value)
bool isValid() const
Definition: HandleBase.h:70
T const * product() const
Definition: Handle.h:70
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
HFNoseRawToDigiFake(const edm::ParameterSet &)