#include <TriggerSummaryProducerRAW.h>
Public Member Functions | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
TriggerSummaryProducerRAW (const edm::ParameterSet &) | |
~TriggerSummaryProducerRAW () | |
Private Attributes | |
edm::GetterOfProducts < trigger::TriggerFilterObjectWithRefs > | getterOfProducts_ |
std::string | pn_ |
process name |
This class is an EDProducer making the HLT summary object for RAW
See header file for documentation
Definition at line 31 of file TriggerSummaryProducerRAW.h.
TriggerSummaryProducerRAW::TriggerSummaryProducerRAW | ( | const edm::ParameterSet & | ps | ) | [explicit] |
Definition at line 30 of file TriggerSummaryProducerRAW.cc.
References edm::ProducerBase::callWhenNewProductsRegistered(), getterOfProducts_, edm::Service< T >::isAvailable(), LogDebug, and pn_.
: pn_(ps.getParameter<std::string>("processName")) { if (pn_=="@") { edm::Service<edm::service::TriggerNamesService> tns; if (tns.isAvailable()) { pn_ = tns->getProcessName(); } else { edm::LogError("TriggerSummaryProducerRaw") << "HLT Error: TriggerNamesService not available!"; pn_="*"; } } LogDebug("TriggerSummaryProducerRaw") << "Using process name: '" << pn_ <<"'"; produces<trigger::TriggerEventWithRefs>(); // Tell the getter what type of products to get and // also the process to get them from getterOfProducts_ = edm::GetterOfProducts<trigger::TriggerFilterObjectWithRefs>(edm::ProcessMatch(pn_), this); callWhenNewProductsRegistered(getterOfProducts_); }
TriggerSummaryProducerRAW::~TriggerSummaryProducerRAW | ( | ) |
Definition at line 53 of file TriggerSummaryProducerRAW.cc.
{ }
void TriggerSummaryProducerRAW::produce | ( | edm::Event & | iEvent, |
const edm::EventSetup & | |||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 63 of file TriggerSummaryProducerRAW.cc.
References edm::GetterOfProducts< T >::fillHandles(), getterOfProducts_, instance, diffTwoXMLs::label, LogDebug, LogTrace, pn_, LaserDQM_cfg::process, edm::Event::put(), L1Trigger_dataformats::reco, and GlobalPosition_Frontier_DevDB_cff::tag.
{ using namespace std; using namespace edm; using namespace reco; using namespace trigger; std::vector<edm::Handle<trigger::TriggerFilterObjectWithRefs> > fobs; getterOfProducts_.fillHandles(iEvent, 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; }
edm::GetterOfProducts<trigger::TriggerFilterObjectWithRefs> TriggerSummaryProducerRAW::getterOfProducts_ [private] |
Definition at line 42 of file TriggerSummaryProducerRAW.h.
Referenced by produce(), and TriggerSummaryProducerRAW().
std::string TriggerSummaryProducerRAW::pn_ [private] |
process name
Definition at line 40 of file TriggerSummaryProducerRAW.h.
Referenced by produce(), and TriggerSummaryProducerRAW().