CMS 3D CMS Logo

HGC3DClusterSimpleSelector.cc
Go to the documentation of this file.
6 
9 
10 namespace l1t {
12  public:
15  void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override;
16 
17  private:
20 
21  }; // class
22 } // namespace l1t
23 
25  : src_(consumes<l1t::HGCalMulticlusterBxCollection>(iConfig.getParameter<edm::InputTag>("src"))),
26  cut_(iConfig.getParameter<std::string>("cut")) {
27  produces<l1t::HGCalMulticlusterBxCollection>();
28 }
29 
31  std::unique_ptr<l1t::HGCalMulticlusterBxCollection> out = std::make_unique<l1t::HGCalMulticlusterBxCollection>();
32 
34  iEvent.getByToken(src_, multiclusters);
35 
36  for (int bx = multiclusters->getFirstBX(); bx <= multiclusters->getLastBX(); ++bx) {
37  for (auto it = multiclusters->begin(bx), ed = multiclusters->end(bx); it != ed; ++it) {
38  const auto &c = *it;
39  if (cut_(c)) {
40  out->push_back(bx, c);
41  }
42  }
43  }
44 
45  iEvent.put(std::move(out));
46 }
HGC3DClusterSimpleSelector(const edm::ParameterSet &)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
delete x;
Definition: CaloConfig.h:22
int iEvent
Definition: GenABIO.cc:224
const edm::EDGetTokenT< l1t::HGCalMulticlusterBxCollection > src_
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
const StringCutObjectSelector< l1t::HGCalMulticluster > cut_
HLT enums.
def move(src, dest)
Definition: eostools.py:511