#include <Demo/TriggerOperation/src/TriggerOperation.cc>
Public Member Functions | |
TriggerOperation (const edm::ParameterSet &) | |
~TriggerOperation () | |
Private Member Functions | |
virtual void | analyze (const edm::Event &, const edm::EventSetup &) |
virtual void | beginJob () |
virtual void | endJob () |
Private Attributes | |
edm::InputTag | m_l1GtReadoutRecord |
SimpleHBits * | m_TriggerBits |
Description: <one line="" class="" summary>="">
Implementation: <Notes on="" implementation>="">
Definition at line 52 of file TriggerOperation.cc.
TriggerOperation::TriggerOperation | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 93 of file TriggerOperation.cc.
References m_TriggerBits.
: m_l1GtReadoutRecord(iConfig.getUntrackedParameter<edm::InputTag>("L1GtReadoutRecordTag")) { //now do what ever initialization is needed m_TriggerBits = new SimpleHBits("TriggerBits",iConfig); // initialize cached IDs // m_l1GtTmAlgoCacheID = 0; // m_l1GtTmTechCacheID = 0; // m_l1GtReadoutRecord(iConfig.getUntrackedParameter<edm::InputTag>("L1GtReadoutRecordTag")); }
TriggerOperation::~TriggerOperation | ( | ) |
Definition at line 108 of file TriggerOperation.cc.
References m_TriggerBits.
{ // do anything here that needs to be done at desctruction time // (e.g. close files, deallocate resources etc.) delete m_TriggerBits; }
void TriggerOperation::analyze | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDAnalyzer.
Definition at line 123 of file TriggerOperation.cc.
References SimpleHBits::FillTB(), edm::EventSetup::get(), edm::Event::getByLabel(), LogDebug, m_l1GtReadoutRecord, and m_TriggerBits.
{ using namespace edm; // get L1GlobalTriggerReadoutRecord edm::Handle<L1GlobalTriggerReadoutRecord> gtRecord; iEvent.getByLabel(m_l1GtReadoutRecord, gtRecord); if (!gtRecord.isValid()) { LogDebug("L1GlobalTriggerRecordProducer") << "\n\n Error: no L1GlobalTriggerReadoutRecord found with input tag " << m_l1GtReadoutRecord << "\n Returning empty L1GlobalTriggerRecord.\n\n" << std::endl; return; } DecisionWord algoDecisionWord = gtRecord->decisionWord(); TechnicalTriggerWord techDecisionWord = gtRecord->technicalTriggerWord(); int tBit=0; for (std::vector<bool>::iterator itBit = algoDecisionWord.begin(); itBit != algoDecisionWord.end(); ++itBit) { bool algoTrigger = algoDecisionWord.at(tBit); if (algoTrigger) {m_TriggerBits->FillTB(static_cast<float>(tBit));} tBit++; } #ifdef THIS_IS_AN_EVENT_EXAMPLE Handle<ExampleData> pIn; iEvent.getByLabel("example",pIn); #endif #ifdef THIS_IS_AN_EVENTSETUP_EXAMPLE ESHandle<SetupData> pSetup; iSetup.get<SetupRecord>().get(pSetup); #endif }
void TriggerOperation::beginJob | ( | void | ) | [private, virtual] |
void TriggerOperation::endJob | ( | void | ) | [private, virtual] |
Definition at line 63 of file TriggerOperation.cc.
Referenced by analyze().
SimpleHBits* TriggerOperation::m_TriggerBits [private] |
Definition at line 75 of file TriggerOperation.cc.
Referenced by analyze(), TriggerOperation(), and ~TriggerOperation().