#include <HLTGetDigi.h>
This class is an EDAnalyzer implementing a "get data into RAM" functionality for DIGIs, to simulate online FF running/timimg.
See header file for documentation
Definition at line 25 of file HLTGetDigi.h.
HLTGetDigi::HLTGetDigi | ( | const edm::ParameterSet & | ps | ) | [explicit] |
Definition at line 69 of file HLTGetDigi.cc.
References edm::ParameterSet::getParameter(), and edm::ParameterSet::getUntrackedParameter().
{ EBdigiCollection_ = ps.getParameter<edm::InputTag>("EBdigiCollection"); EEdigiCollection_ = ps.getParameter<edm::InputTag>("EEdigiCollection"); ESdigiCollection_ = ps.getParameter<edm::InputTag>("ESdigiCollection"); HBHEdigiCollection_ = ps.getParameter<edm::InputTag>("HBHEdigiCollection"); HOdigiCollection_ = ps.getParameter<edm::InputTag>("HOdigiCollection"); HFdigiCollection_ = ps.getParameter<edm::InputTag>("HFdigiCollection"); PXLdigiCollection_ = ps.getParameter<edm::InputTag>("SiPixeldigiCollection"); SSTdigiCollection_ = ps.getParameter<edm::InputTag>("SiStripdigiCollection"); CSCStripdigiCollection_ = ps.getParameter<edm::InputTag>("CSCStripdigiCollection"); CSCWiredigiCollection_ = ps.getParameter<edm::InputTag>("CSCWiredigiCollection"); DTdigiCollection_ = ps.getParameter<edm::InputTag>("DTdigiCollection"); RPCdigiCollection_ = ps.getParameter<edm::InputTag>("RPCdigiCollection"); GctCaloEmLabel_ = ps.getParameter<edm::InputTag>("L1CaloEmCollection"); GctCaloRegionLabel_ = ps.getParameter<edm::InputTag>("L1CaloRegionCollection"); GctIsoEmLabel_ = ps.getParameter<edm::InputTag>("GctIsoEmCollection"); GctNonIsoEmLabel_ = ps.getParameter<edm::InputTag>("GctNonIsoEmCollection"); GctCenJetLabel_ = ps.getParameter<edm::InputTag>("GctCenJetCollection"); GctForJetLabel_ = ps.getParameter<edm::InputTag>("GctForJetCollection"); GctTauJetLabel_ = ps.getParameter<edm::InputTag>("GctTauJetCollection"); GctJetCountsLabel_ = ps.getParameter<edm::InputTag>("GctJetCounts"); GctEtHadLabel_ = ps.getParameter<edm::InputTag>("GctEtHadCollection"); GctEtMissLabel_ = ps.getParameter<edm::InputTag>("GctEtMissCollection"); GctEtTotalLabel_ = ps.getParameter<edm::InputTag>("GctEtTotalCollection"); GtEvmRRLabel_ = ps.getParameter<edm::InputTag>("GtEvmReadoutRecord"); GtObjectMapLabel_ = ps.getParameter<edm::InputTag>("GtObjectMapRecord"); GtRRLabel_ = ps.getParameter<edm::InputTag>("GtReadoutRecord"); GmtCandsLabel_ = ps.getParameter<edm::InputTag>("GmtCands"); GmtReadoutCollection_ = ps.getParameter<edm::InputTag>("GmtReadoutCollection"); //--- Define which digis we want ---// getEcalDigis_ = ps.getUntrackedParameter<bool>("getEcal",true) ; getEcalESDigis_ = ps.getUntrackedParameter<bool>("getEcalES",true) ; getHcalDigis_ = ps.getUntrackedParameter<bool>("getHcal",true) ; getPixelDigis_ = ps.getUntrackedParameter<bool>("getPixels",true) ; getStripDigis_ = ps.getUntrackedParameter<bool>("getStrips",true) ; getCSCDigis_ = ps.getUntrackedParameter<bool>("getCSC",true) ; getDTDigis_ = ps.getUntrackedParameter<bool>("getDT",true) ; getRPCDigis_ = ps.getUntrackedParameter<bool>("getRPC",true) ; getGctEmDigis_ = ps.getUntrackedParameter<bool>("getGctEm",true) ; getGctJetDigis_ = ps.getUntrackedParameter<bool>("getGctJet",true) ; getGctJetCounts_ = ps.getUntrackedParameter<bool>("getGctJetCounts",true) ; getGctEtDigis_ = ps.getUntrackedParameter<bool>("getGctEt",true) ; getL1Calo_ = ps.getUntrackedParameter<bool>("getL1Calo",true) ; getGtEvmRR_ = ps.getUntrackedParameter<bool>("getGtEvmRR",true) ; getGtObjectMap_ = ps.getUntrackedParameter<bool>("getGtObjectMap",true) ; getGtRR_ = ps.getUntrackedParameter<bool>("getGtReadoutRecord",true) ; getGmtCands_ = ps.getUntrackedParameter<bool>("getGmtCands",true) ; getGmtRC_ = ps.getUntrackedParameter<bool>("getGmtReadout",true) ; }
HLTGetDigi::~HLTGetDigi | ( | ) |
Definition at line 128 of file HLTGetDigi.cc.
{ }
void HLTGetDigi::analyze | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [virtual] |
Implements edm::EDAnalyzer.
Definition at line 137 of file HLTGetDigi.cc.
References edm::EventSetup::get(), edm::Event::getByLabel(), collect_tpl::input, input2, LogDebug, patZpeak::muons, findQualityFiles::rr, and groupFilesInBlocks::tt.
{ using namespace edm; //--- L1 GCT and GT Digis ---// edm::Handle<L1GctEtHad> GctEtHad ; edm::Handle<L1GctEtMiss> GctEtMiss ; edm::Handle<L1GctEtTotal> GctEtTotal ; const L1GctEtHad* etHad = 0 ; const L1GctEtMiss* etMiss = 0 ; const L1GctEtTotal* etTotal = 0 ; if (getGctEtDigis_) { iEvent.getByLabel(GctEtHadLabel_,GctEtHad) ; iEvent.getByLabel(GctEtMissLabel_,GctEtMiss) ; iEvent.getByLabel(GctEtTotalLabel_,GctEtTotal) ; etHad = GctEtHad.product() ; etMiss = GctEtMiss.product() ; etTotal = GctEtTotal.product() ; LogDebug("DigiInfo") << "Value of L1GctEtHad::et(): " << etHad->et() ; LogDebug("DigiInfo") << "Value of L1GctEtMiss::et(): " << etMiss->et() << ", phi(): " << etMiss->phi() ; LogDebug("DigiInfo") << "Value of L1GctEtTotal::et(): " << etTotal->et() ; } edm::Handle<L1GctEmCandCollection> GctIsoEM ; edm::Handle<L1GctEmCandCollection> GctNonIsoEM ; const L1GctEmCandCollection* isoEMdigis = 0 ; const L1GctEmCandCollection* nonIsoEMdigis = 0 ; if (getGctEmDigis_) { iEvent.getByLabel(GctIsoEmLabel_,GctIsoEM) ; isoEMdigis = GctIsoEM.product() ; iEvent.getByLabel(GctNonIsoEmLabel_,GctNonIsoEM) ; nonIsoEMdigis = GctNonIsoEM.product() ; LogDebug("DigiInfo") << "total # Gct Iso EM digis: " << isoEMdigis->size() ; LogDebug("DigiInfo") << "total # Gct non-Iso EM digis: " << nonIsoEMdigis->size() ; } edm::Handle<L1GctJetCandCollection> GctCenJets ; edm::Handle<L1GctJetCandCollection> GctForJets ; edm::Handle<L1GctJetCandCollection> GctTauJets ; edm::Handle<L1GctJetCounts> GctJetCounts ; const L1GctJetCandCollection* cenJetDigis = 0 ; const L1GctJetCandCollection* forJetDigis = 0 ; const L1GctJetCandCollection* tauJetDigis = 0 ; std::auto_ptr<L1GctJetCounts> newCounts( new L1GctJetCounts() ) ; L1GctJetCounts* counts = newCounts.get() ; if (getGctJetDigis_) { iEvent.getByLabel(GctCenJetLabel_,GctCenJets) ; cenJetDigis = GctCenJets.product() ; iEvent.getByLabel(GctForJetLabel_,GctForJets) ; forJetDigis = GctForJets.product() ; iEvent.getByLabel(GctTauJetLabel_,GctTauJets) ; tauJetDigis = GctTauJets.product() ; LogDebug("DigiInfo") << "total # Gct central Jet digis: " << cenJetDigis->size() ; LogDebug("DigiInfo") << "total # Gct forward Jet digis: " << forJetDigis->size() ; LogDebug("DigiInfo") << "total # Gct tau Jet digis: " << tauJetDigis->size() ; } if (getGctJetCounts_) { iEvent.getByLabel(GctJetCountsLabel_,GctJetCounts) ; *counts = *GctJetCounts.product() ; } edm::Handle<L1CaloEmCollection> GctCaloEm ; edm::Handle<L1CaloRegionCollection> GctCaloRegion ; const L1CaloEmCollection* caloEm = 0 ; const L1CaloRegionCollection* caloRegion = 0 ; if (getL1Calo_) { iEvent.getByLabel(GctCaloEmLabel_,GctCaloEm) ; iEvent.getByLabel(GctCaloRegionLabel_,GctCaloRegion) ; caloEm = GctCaloEm.product() ; caloRegion = GctCaloRegion.product() ; LogDebug("DigiInfo") << "Calo EM size: " << caloEm->size() ; LogDebug("DigiInfo") << "Calo region size: " << caloRegion->size() ; } edm::Handle<L1GlobalTriggerEvmReadoutRecord> gtEvmRR ; edm::Handle<L1GlobalTriggerObjectMapRecord> gtMap ; edm::Handle<L1GlobalTriggerReadoutRecord> gtRR ; edm::ESHandle< L1GtParameters > l1GtPar ; iSetup.get< L1GtParametersRcd >().get( l1GtPar ) ; int nBx = l1GtPar->gtTotalBxInEvent() ; std::auto_ptr<L1GlobalTriggerEvmReadoutRecord> newGtEvm( new L1GlobalTriggerEvmReadoutRecord(nBx) ) ; std::auto_ptr<L1GlobalTriggerObjectMapRecord> newGtMap( new L1GlobalTriggerObjectMapRecord() ) ; std::auto_ptr<L1GlobalTriggerReadoutRecord> newGtRR( new L1GlobalTriggerReadoutRecord(nBx) ) ; L1GlobalTriggerEvmReadoutRecord* evm = newGtEvm.get() ; L1GlobalTriggerObjectMapRecord* map = newGtMap.get() ; L1GlobalTriggerReadoutRecord* rr = newGtRR.get() ; if (getGtEvmRR_) { iEvent.getByLabel(GtEvmRRLabel_, gtEvmRR) ; *evm = *gtEvmRR.product() ; } if (getGtObjectMap_) { iEvent.getByLabel(GtObjectMapLabel_, gtMap) ; *map = *gtMap.product() ; } if (getGtRR_) { iEvent.getByLabel(GtRRLabel_, gtRR) ; *rr = *gtRR.product() ; } edm::Handle< std::vector<L1MuGMTCand> > GmtCands ; edm::Handle<L1MuGMTReadoutCollection> GmtMuCollection ; std::auto_ptr<std::vector<L1MuGMTCand> > cands( new std::vector<L1MuGMTCand> ) ; std::auto_ptr<L1MuGMTReadoutCollection> muCollection(new L1MuGMTReadoutCollection(nBx)) ; if (getGmtCands_) { iEvent.getByLabel(GmtCandsLabel_,GmtCands) ; *cands = *GmtCands.product() ; } if (getGmtRC_) { iEvent.getByLabel(GmtReadoutCollection_,GmtMuCollection) ; *muCollection = *GmtMuCollection.product() ; std::vector<L1MuGMTExtendedCand> muons = muCollection->getRecord().getGMTCands() ; LogDebug("DigiInfo") << "GMT muons present: " << muons.size() ; } edm::Handle< DetSetVector<PixelDigi> > input; auto_ptr<DetSetVector<PixelDigi> > NewPixelDigi(new DetSetVector<PixelDigi> ); DetSetVector<PixelDigi>* tt = NewPixelDigi.get(); if (getPixelDigis_) { iEvent.getByLabel(PXLdigiCollection_, input); *tt = *input.product(); } edm::Handle< edm::DetSetVector<SiStripDigi> > input2; auto_ptr<DetSetVector<SiStripDigi> > NewSiDigi(new DetSetVector<SiStripDigi> ); DetSetVector<SiStripDigi>* uu = NewSiDigi.get(); if (getStripDigis_) { iEvent.getByLabel(SSTdigiCollection_, input2); *uu = *input2.product(); } Handle<EBDigiCollection> EcalDigiEB; Handle<EEDigiCollection> EcalDigiEE; Handle<ESDigiCollection> EcalDigiES; const EBDigiCollection* EBdigis = 0; const EEDigiCollection* EEdigis = 0; const ESDigiCollection* ESdigis = 0; if (getEcalDigis_) { iEvent.getByLabel( EBdigiCollection_, EcalDigiEB ); EBdigis = EcalDigiEB.product(); LogDebug("DigiInfo") << "total # EBdigis: " << EBdigis->size() ; iEvent.getByLabel( EEdigiCollection_, EcalDigiEE ); EEdigis = EcalDigiEE.product(); LogDebug("DigiInfo") << "total # EEdigis: " << EEdigis->size() ; } if (getEcalESDigis_) { iEvent.getByLabel( ESdigiCollection_, EcalDigiES ); ESdigis = EcalDigiES.product(); LogDebug("DigiInfo") << "total # ESdigis: " << ESdigis->size() ; } Handle<HBHEDigiCollection> HcalDigiHBHE ; Handle<HODigiCollection> HcalDigiHO ; Handle<HFDigiCollection> HcalDigiHF ; const HBHEDigiCollection* HBHEdigis = 0 ; const HODigiCollection* HOdigis = 0 ; const HFDigiCollection* HFdigis = 0 ; if (getHcalDigis_) { iEvent.getByLabel( HBHEdigiCollection_, HcalDigiHBHE ); HBHEdigis = HcalDigiHBHE.product(); LogDebug("DigiInfo") << "total # HBHEdigis: " << HBHEdigis->size() ; iEvent.getByLabel( HOdigiCollection_, HcalDigiHO ); HOdigis = HcalDigiHO.product(); LogDebug("DigiInfo") << "total # HOdigis: " << HOdigis->size() ; iEvent.getByLabel( HFdigiCollection_, HcalDigiHF ); HFdigis = HcalDigiHF.product(); LogDebug("DigiInfo") << "total # HFdigis: " << HFdigis->size() ; } Handle<CSCStripDigiCollection> CSCDigiStrip ; Handle<CSCWireDigiCollection> CSCDigiWire ; if (getCSCDigis_) { iEvent.getByLabel( CSCStripdigiCollection_, CSCDigiStrip ); iEvent.getByLabel( CSCWiredigiCollection_, CSCDigiWire ); int numDigis = 0 ; for (CSCStripDigiCollection::DigiRangeIterator iter=CSCDigiStrip->begin(); iter!=CSCDigiStrip->end(); iter++) { for ( vector<CSCStripDigi>::const_iterator digiIter = (*iter).second.first; digiIter != (*iter).second.second; digiIter++) numDigis++ ; } LogDebug("DigiInfo") << "total # CSCstripdigis: " << numDigis ; numDigis = 0 ; for (CSCWireDigiCollection::DigiRangeIterator iter=CSCDigiWire->begin(); iter!=CSCDigiWire->end(); iter++) { for ( vector<CSCWireDigi>::const_iterator digiIter = (*iter).second.first; digiIter != (*iter).second.second; digiIter++) numDigis++ ; } LogDebug("DigiInfo") << "total # CSCwiredigis: " << numDigis ; } Handle<DTDigiCollection> DTDigiHandle ; if (getDTDigis_) { iEvent.getByLabel( DTdigiCollection_, DTDigiHandle ); int numDigis = 0 ; for (DTDigiCollection::DigiRangeIterator iter=DTDigiHandle->begin(); iter!=DTDigiHandle->end(); iter++) { for ( vector<DTDigi>::const_iterator digiIter = (*iter).second.first; digiIter != (*iter).second.second; digiIter++) numDigis++ ; } LogDebug("DigiInfo") << "total # DTdigis: " << numDigis ; } Handle<RPCDigiCollection> RPCDigiHandle ; if (getRPCDigis_) { iEvent.getByLabel( RPCdigiCollection_, RPCDigiHandle ); int numDigis = 0 ; for (RPCDigiCollection::DigiRangeIterator iter=RPCDigiHandle->begin(); iter!=RPCDigiHandle->end(); iter++) { for ( vector<RPCDigi>::const_iterator digiIter = (*iter).second.first; digiIter != (*iter).second.second; digiIter++) numDigis++ ; } LogDebug("DigiInfo") << "total # RPCdigis: " << numDigis ; } LogDebug("DigiInfo") << "***--------------- End of Event -----------------***" ; }
Definition at line 41 of file HLTGetDigi.h.
Definition at line 42 of file HLTGetDigi.h.
edm::InputTag HLTGetDigi::DTdigiCollection_ [private] |
Definition at line 43 of file HLTGetDigi.h.
edm::InputTag HLTGetDigi::EBdigiCollection_ [private] |
Definition at line 33 of file HLTGetDigi.h.
edm::InputTag HLTGetDigi::EEdigiCollection_ [private] |
Definition at line 34 of file HLTGetDigi.h.
edm::InputTag HLTGetDigi::ESdigiCollection_ [private] |
Definition at line 35 of file HLTGetDigi.h.
edm::InputTag HLTGetDigi::GctCaloEmLabel_ [private] |
Definition at line 45 of file HLTGetDigi.h.
edm::InputTag HLTGetDigi::GctCaloRegionLabel_ [private] |
Definition at line 46 of file HLTGetDigi.h.
edm::InputTag HLTGetDigi::GctCenJetLabel_ [private] |
Definition at line 49 of file HLTGetDigi.h.
edm::InputTag HLTGetDigi::GctEtHadLabel_ [private] |
Definition at line 53 of file HLTGetDigi.h.
edm::InputTag HLTGetDigi::GctEtMissLabel_ [private] |
Definition at line 54 of file HLTGetDigi.h.
edm::InputTag HLTGetDigi::GctEtTotalLabel_ [private] |
Definition at line 55 of file HLTGetDigi.h.
edm::InputTag HLTGetDigi::GctForJetLabel_ [private] |
Definition at line 50 of file HLTGetDigi.h.
edm::InputTag HLTGetDigi::GctIsoEmLabel_ [private] |
Definition at line 47 of file HLTGetDigi.h.
edm::InputTag HLTGetDigi::GctJetCountsLabel_ [private] |
Definition at line 52 of file HLTGetDigi.h.
edm::InputTag HLTGetDigi::GctNonIsoEmLabel_ [private] |
Definition at line 48 of file HLTGetDigi.h.
edm::InputTag HLTGetDigi::GctTauJetLabel_ [private] |
Definition at line 51 of file HLTGetDigi.h.
bool HLTGetDigi::getCSCDigis_ [private] |
Definition at line 69 of file HLTGetDigi.h.
bool HLTGetDigi::getDTDigis_ [private] |
Definition at line 70 of file HLTGetDigi.h.
bool HLTGetDigi::getEcalDigis_ [private] |
Definition at line 64 of file HLTGetDigi.h.
bool HLTGetDigi::getEcalESDigis_ [private] |
Definition at line 65 of file HLTGetDigi.h.
bool HLTGetDigi::getGctEmDigis_ [private] |
Definition at line 73 of file HLTGetDigi.h.
bool HLTGetDigi::getGctEtDigis_ [private] |
Definition at line 76 of file HLTGetDigi.h.
bool HLTGetDigi::getGctJetCounts_ [private] |
Definition at line 75 of file HLTGetDigi.h.
bool HLTGetDigi::getGctJetDigis_ [private] |
Definition at line 74 of file HLTGetDigi.h.
bool HLTGetDigi::getGmtCands_ [private] |
Definition at line 80 of file HLTGetDigi.h.
bool HLTGetDigi::getGmtRC_ [private] |
Definition at line 81 of file HLTGetDigi.h.
bool HLTGetDigi::getGtEvmRR_ [private] |
Definition at line 77 of file HLTGetDigi.h.
bool HLTGetDigi::getGtObjectMap_ [private] |
Definition at line 78 of file HLTGetDigi.h.
bool HLTGetDigi::getGtRR_ [private] |
Definition at line 79 of file HLTGetDigi.h.
bool HLTGetDigi::getHcalDigis_ [private] |
Definition at line 66 of file HLTGetDigi.h.
bool HLTGetDigi::getL1Calo_ [private] |
Definition at line 72 of file HLTGetDigi.h.
bool HLTGetDigi::getPixelDigis_ [private] |
Definition at line 67 of file HLTGetDigi.h.
bool HLTGetDigi::getRPCDigis_ [private] |
Definition at line 71 of file HLTGetDigi.h.
bool HLTGetDigi::getStripDigis_ [private] |
Definition at line 68 of file HLTGetDigi.h.
edm::InputTag HLTGetDigi::GmtCandsLabel_ [private] |
Definition at line 61 of file HLTGetDigi.h.
Definition at line 62 of file HLTGetDigi.h.
edm::InputTag HLTGetDigi::GtEvmRRLabel_ [private] |
Definition at line 57 of file HLTGetDigi.h.
edm::InputTag HLTGetDigi::GtObjectMapLabel_ [private] |
Definition at line 58 of file HLTGetDigi.h.
edm::InputTag HLTGetDigi::GtRRLabel_ [private] |
Definition at line 59 of file HLTGetDigi.h.
edm::InputTag HLTGetDigi::HBHEdigiCollection_ [private] |
Definition at line 36 of file HLTGetDigi.h.
edm::InputTag HLTGetDigi::HFdigiCollection_ [private] |
Definition at line 38 of file HLTGetDigi.h.
edm::InputTag HLTGetDigi::HOdigiCollection_ [private] |
Definition at line 37 of file HLTGetDigi.h.
edm::InputTag HLTGetDigi::PXLdigiCollection_ [private] |
Definition at line 39 of file HLTGetDigi.h.
edm::InputTag HLTGetDigi::RPCdigiCollection_ [private] |
Definition at line 44 of file HLTGetDigi.h.
edm::InputTag HLTGetDigi::SSTdigiCollection_ [private] |
Definition at line 40 of file HLTGetDigi.h.