#include <TriggerSummaryProducerRAW.h>
Public Member Functions | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
TriggerSummaryProducerRAW (const edm::ParameterSet &) | |
~TriggerSummaryProducerRAW () | |
Private Attributes | |
std::vector< edm::Handle < trigger::TriggerFilterObjectWithRefs > > | fobs_ |
handles to the filter objects | |
std::string | pn_ |
process name | |
edm::ProcessNameSelector | selector_ |
selector for getMany methods | |
edm::service::TriggerNamesService * | tns_ |
the pointer to the current TriggerNamesService |
This class is an EDProducer making the HLT summary object for RAW
See header file for documentation
Definition at line 33 of file TriggerSummaryProducerRAW.h.
TriggerSummaryProducerRAW::TriggerSummaryProducerRAW | ( | const edm::ParameterSet & | ps | ) | [explicit] |
Definition at line 22 of file TriggerSummaryProducerRAW.cc.
References edm::service::TriggerNamesService::getProcessName(), LogDebug, cppFunctionSkipper::operator, pn_, selector_, and tns_.
: pn_(ps.getParameter<std::string>("processName")), selector_(edm::ProcessNameSelector(pn_)), tns_(), fobs_() { if (pn_=="@") { // use tns if (edm::Service<edm::service::TriggerNamesService>().isAvailable()) { // get tns pointer tns_ = edm::Service<edm::service::TriggerNamesService>().operator->(); if (tns_!=0) { pn_=tns_->getProcessName(); } else { edm::LogError("TriggerSummaryProducerRaw") << "HLT Error: TriggerNamesService pointer = 0!"; pn_="*"; } } else { edm::LogError("TriggerSummaryProducerRaw") << "HLT Error: TriggerNamesService not available!"; pn_="*"; } selector_=edm::ProcessNameSelector(pn_); } LogDebug("TriggerSummaryProducerRaw") << "Using process name: '" << pn_ <<"'"; produces<trigger::TriggerEventWithRefs>(); }
TriggerSummaryProducerRAW::~TriggerSummaryProducerRAW | ( | ) |
Definition at line 50 of file TriggerSummaryProducerRAW.cc.
{ }
void TriggerSummaryProducerRAW::produce | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 60 of file TriggerSummaryProducerRAW.cc.
References fobs_, edm::Event::getMany(), instance, label, LogDebug, LogTrace, pn_, LaserDQM_cfg::process, edm::Event::put(), dt_dqm_sourceclient_common_cff::reco, selector_, and GlobalPosition_Frontier_DevDB_cff::tag.
{ using namespace std; using namespace edm; using namespace reco; using namespace trigger; // reset from previous event fobs_.clear(); // get all filter objects created in requested process iEvent.getMany(selector_,fobs_); const unsigned int nfob(fobs_.size()); LogDebug("TriggerSummaryProducerRaw") << "Number of filter objects found: " << nfob; // construct single RAW product auto_ptr<TriggerEventWithRefs> product(new TriggerEventWithRefs(pn_,nfob)); for (unsigned int ifob=0; ifob!=nfob; ++ifob) { const string& label (fobs_[ifob].provenance()->moduleLabel()); const string& instance (fobs_[ifob].provenance()->productInstanceName()); const string& process (fobs_[ifob].provenance()->processName()); const InputTag tag(label,instance,process); LogTrace("TriggerSummaryProducerRaw") << ifob << " " << tag << endl << " Sizes: " << " 1/" << fobs_[ifob]->photonSize() << " 2/" << fobs_[ifob]->electronSize() << " 3/" << fobs_[ifob]->muonSize() << " 4/" << fobs_[ifob]->jetSize() << " 5/" << fobs_[ifob]->compositeSize() << " 6/" << fobs_[ifob]->basemetSize() << " 7/" << fobs_[ifob]->calometSize() << " 8/" << fobs_[ifob]->pixtrackSize() << " 9/" << fobs_[ifob]->l1emSize() << " A/" << fobs_[ifob]->l1muonSize() << " B/" << fobs_[ifob]->l1jetSize() << " C/" << fobs_[ifob]->l1etmissSize() << " D/" << fobs_[ifob]->l1hfringsSize() << " E/" << fobs_[ifob]->pfjetSize() << " F/" << fobs_[ifob]->pftauSize() << endl; product->addFilterObject(tag,*fobs_[ifob]); } // place product in Event OrphanHandle<TriggerEventWithRefs> ref = iEvent.put(product); LogTrace("TriggerSummaryProducerRaw") << "Number of filter objects packed: " << ref->size(); return; }
std::vector<edm::Handle<trigger::TriggerFilterObjectWithRefs> > TriggerSummaryProducerRAW::fobs_ [private] |
handles to the filter objects
Definition at line 48 of file TriggerSummaryProducerRAW.h.
Referenced by produce().
std::string TriggerSummaryProducerRAW::pn_ [private] |
process name
Definition at line 42 of file TriggerSummaryProducerRAW.h.
Referenced by produce(), and TriggerSummaryProducerRAW().
selector for getMany methods
Definition at line 44 of file TriggerSummaryProducerRAW.h.
Referenced by produce(), and TriggerSummaryProducerRAW().
the pointer to the current TriggerNamesService
Definition at line 46 of file TriggerSummaryProducerRAW.h.
Referenced by TriggerSummaryProducerRAW().