CMS 3D CMS Logo

PATTriggerObjectStandAloneUnpacker.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: PatAlgos
4 // Class: pat::PATTriggerObjectStandAloneUnpacker
5 //
6 //
21 
24 
25 namespace pat {
26 
28  public:
31 
32  private:
33  void produce(edm::StreamID, edm::Event& iEvent, const edm::EventSetup& iSetup) const override;
34 
39  };
40 
41 } // namespace pat
42 
43 using namespace pat;
44 
46  : patTriggerObjectsStandAloneToken_(consumes<TriggerObjectStandAloneCollection>(
47  iConfig.getParameter<edm::InputTag>("patTriggerObjectsStandAlone"))),
48  triggerResultsToken_(consumes<edm::TriggerResults>(iConfig.getParameter<edm::InputTag>("triggerResults"))),
49  unpackFilterLabels_(iConfig.getParameter<bool>("unpackFilterLabels")) {
50  produces<TriggerObjectStandAloneCollection>();
51 }
52 
55  const edm::EventSetup& iSetup) const {
60 
61  auto patTriggerObjectsStandAloneUnpacked = std::make_unique<TriggerObjectStandAloneCollection>();
62 
63  for (size_t iTrigObj = 0; iTrigObj < patTriggerObjectsStandAlone->size(); ++iTrigObj) {
64  TriggerObjectStandAlone patTriggerObjectStandAloneUnpacked(patTriggerObjectsStandAlone->at(iTrigObj));
65  const edm::TriggerNames& names = iEvent.triggerNames(*triggerResults);
66  patTriggerObjectStandAloneUnpacked.unpackPathNames(names);
68  patTriggerObjectStandAloneUnpacked.unpackFilterLabels(iEvent, *triggerResults);
69  patTriggerObjectsStandAloneUnpacked->push_back(patTriggerObjectStandAloneUnpacked);
70  }
71 
72  iEvent.put(std::move(patTriggerObjectsStandAloneUnpacked));
73 }
74 
edm::StreamID
Definition: StreamID.h:30
pat::PATTriggerObjectStandAloneUnpacker::filterLabelsToken_
const edm::EDGetTokenT< std::vector< std::string > > filterLabelsToken_
Definition: PATTriggerObjectStandAloneUnpacker.cc:38
electrons_cff.bool
bool
Definition: electrons_cff.py:393
TriggerResults.h
pat::PATTriggerObjectStandAloneUnpacker::~PATTriggerObjectStandAloneUnpacker
~PATTriggerObjectStandAloneUnpacker() override
Definition: PATTriggerObjectStandAloneUnpacker.cc:30
pat::TriggerObjectStandAlone
Analysis-level trigger object class (stand-alone)
Definition: TriggerObjectStandAlone.h:32
edm::EDGetTokenT< TriggerObjectStandAloneCollection >
edm
HLT enums.
Definition: AlignableModifier.h:19
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89287
triggerResults
static const std::string triggerResults
Definition: EdmProvDump.cc:45
triggerObjects_cff.patTriggerObjectsStandAlone
patTriggerObjectsStandAlone
Definition: triggerObjects_cff.py:9
pat::PATTriggerObjectStandAloneUnpacker
Unpacks a pat::TriggerObjectStandAloneCollection with packed path names.
Definition: PATTriggerObjectStandAloneUnpacker.cc:27
edm::Handle
Definition: AssociativeIterator.h:50
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
names
const std::string names[nVars_]
Definition: PhotonIDValueMapProducer.cc:124
edm::global::EDProducer
Definition: EDProducer.h:32
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
pat::PATTriggerObjectStandAloneUnpacker::produce
void produce(edm::StreamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
Definition: PATTriggerObjectStandAloneUnpacker.cc:53
iEvent
int iEvent
Definition: GenABIO.cc:224
pat::TriggerObjectStandAloneCollection
std::vector< TriggerObjectStandAlone > TriggerObjectStandAloneCollection
Collection of TriggerObjectStandAlone.
Definition: TriggerObjectStandAlone.h:219
pat::PATTriggerObjectStandAloneUnpacker::PATTriggerObjectStandAloneUnpacker
PATTriggerObjectStandAloneUnpacker(const edm::ParameterSet &iConfig)
Definition: PATTriggerObjectStandAloneUnpacker.cc:45
edm::EventSetup
Definition: EventSetup.h:57
pat
Definition: HeavyIon.h:7
InputTag.h
pat::PATTriggerObjectStandAloneUnpacker::patTriggerObjectsStandAloneToken_
const edm::EDGetTokenT< TriggerObjectStandAloneCollection > patTriggerObjectsStandAloneToken_
Definition: PATTriggerObjectStandAloneUnpacker.cc:35
eostools.move
def move(src, dest)
Definition: eostools.py:511
pat::PATTriggerObjectStandAloneUnpacker::triggerResultsToken_
const edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
Definition: PATTriggerObjectStandAloneUnpacker.cc:36
edm::TriggerNames
Definition: TriggerNames.h:55
pat::PATTriggerObjectStandAloneUnpacker::unpackFilterLabels_
bool unpackFilterLabels_
Definition: PATTriggerObjectStandAloneUnpacker.cc:37
EventSetup.h
ParameterSet.h
EDProducer.h
HLTObjectsMonitor_cfi.TriggerResults
TriggerResults
Definition: HLTObjectsMonitor_cfi.py:9
edm::Event
Definition: Event.h:73
TriggerObjectStandAlone.h