CMS 3D CMS Logo

UnclusteredBlobProducer.cc
Go to the documentation of this file.
1 #include <string>
2 #include <memory>
3 
9 
14 
15 namespace pat {
17  public:
19  ~UnclusteredBlobProducer() override;
20  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
21  void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override;
22 
23  private:
25  };
26 } // namespace pat
27 
29  : candsrc_(consumes<edm::View<reco::Candidate>>(iConfig.getParameter<edm::InputTag>("candsrc"))) {
30  produces<std::vector<reco::VertexCompositePtrCandidate>>();
31 }
32 
34 
36  auto blob = std::make_unique<std::vector<reco::VertexCompositePtrCandidate>>();
37 
39  iEvent.getByToken(candsrc_, candidates);
40 
41  blob->emplace_back();
42 
43  auto& c_blob = blob->back();
44 
45  // combine all candidates into composite so they can be accessed properly by CandPtrSelector
46  for (unsigned i = 0; i < candidates->size(); ++i) {
47  c_blob.addDaughter(candidates->ptrAt(i));
48  }
49 
50  iEvent.put(std::move(blob));
51 }
52 
55  desc.add<edm::InputTag>("candsrc", edm::InputTag("badUnclustered"));
56 
57  descriptions.add("UnclusteredBlobProducer", desc);
58 }
59 
61 
ConfigurationDescriptions.h
edm::StreamID
Definition: StreamID.h:30
mps_fire.i
i
Definition: mps_fire.py:428
pat::UnclusteredBlobProducer::candsrc_
edm::EDGetTokenT< edm::View< reco::Candidate > > candsrc_
Definition: UnclusteredBlobProducer.cc:24
configurableAnalysis::Candidate
char Candidate[]
Definition: modules.cc:20
sistrip::View
View
Definition: ConstantsForView.h:26
edm::EDGetTokenT
Definition: EDGetToken.h:33
edm
HLT enums.
Definition: AlignableModifier.h:19
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89353
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
edm::Handle
Definition: AssociativeIterator.h:50
CandidateFwd.h
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
VertexCompositePtrCandidate.h
edm::global::EDProducer
Definition: EDProducer.h:32
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
pat::UnclusteredBlobProducer::UnclusteredBlobProducer
UnclusteredBlobProducer(const edm::ParameterSet &)
Definition: UnclusteredBlobProducer.cc:28
edm::ParameterSet
Definition: ParameterSet.h:47
pat::UnclusteredBlobProducer::produce
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
Definition: UnclusteredBlobProducer.cc:35
Event.h
iEvent
int iEvent
Definition: GenABIO.cc:224
RefToPtr.h
edm::EventSetup
Definition: EventSetup.h:57
pat
Definition: HeavyIon.h:7
pat::UnclusteredBlobProducer::~UnclusteredBlobProducer
~UnclusteredBlobProducer() override
Definition: UnclusteredBlobProducer.cc:33
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
Frameworkfwd.h
pat::UnclusteredBlobProducer
Definition: UnclusteredBlobProducer.cc:16
HLT_FULL_cff.candidates
candidates
Definition: HLT_FULL_cff.py:55051
Candidate.h
ParameterSet.h
EDProducer.h
pat::UnclusteredBlobProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: UnclusteredBlobProducer.cc:53
edm::Event
Definition: Event.h:73
edm::InputTag
Definition: InputTag.h:15