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
edm::StreamID
Definition: StreamID.h:30
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
edm::Handle::product
T const * product() const
Definition: Handle.h:70
ESHandle.h
HFNoseRawToDigiFake::tok_hfn_
edm::EDGetTokenT< HGCalDigiCollection > tok_hfn_
Definition: HFNoseRawToDigiFake.cc:23
HFNoseRawToDigiFake::HFNoseRawToDigiFake
HFNoseRawToDigiFake(const edm::ParameterSet &)
Definition: HFNoseRawToDigiFake.cc:26
edm::EDGetTokenT
Definition: EDGetToken.h:33
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edm::SortedCollection
Definition: SortedCollection.h:49
edm::Handle
Definition: AssociativeIterator.h:50
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
HFNoseRawToDigiFake::produce
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
Definition: HFNoseRawToDigiFake.cc:31
edm::global::EDProducer
Definition: EDProducer.h:32
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
HFNoseRawToDigiFake::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: HFNoseRawToDigiFake.cc:42
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
edm::ParameterSet
Definition: ParameterSet.h:36
Event.h
iEvent
int iEvent
Definition: GenABIO.cc:224
HGCDigiCollections.h
edm::EventSetup
Definition: EventSetup.h:57
eostools.move
def move(src, dest)
Definition: eostools.py:511
Frameworkfwd.h
EventSetup.h
HFNoseRawToDigiFake
Definition: HFNoseRawToDigiFake.cc:16
ParameterSet.h
EDProducer.h
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
edm::Event
Definition: Event.h:73
edm::InputTag
Definition: InputTag.h:15