#include <DigiCollectionProfiler.h>
Public Member Functions | |
void | analyze (edm::Handle< edm::DetSetVector< SiStripDigi > > digis) |
DigiCollectionProfiler () | |
DigiCollectionProfiler (TProfile *tibprof, TProfile *tobprof, TProfile *tecpprof, TProfile *tecmprof, TH2F *tib2d, TH2F *tob2d, TH2F *tecp2d, TH2F *tecm2d) | |
void | setMaskedModules (std::vector< unsigned int > maskedmod) |
~DigiCollectionProfiler () | |
Private Member Functions | |
int | ismasked (const DetId &mod) const |
Private Attributes | |
std::vector< unsigned int > | m_maskedmod |
unsigned int | m_nevent |
TH2F * | m_tecm2d |
TProfile * | m_tecmprof |
TH2F * | m_tecp2d |
TProfile * | m_tecpprof |
TH2F * | m_tib2d |
TProfile * | m_tibprof |
TH2F * | m_tob2d |
TProfile * | m_tobprof |
Definition at line 12 of file DigiCollectionProfiler.h.
DigiCollectionProfiler::DigiCollectionProfiler | ( | ) |
Definition at line 14 of file DigiCollectionProfiler.cc.
: m_nevent(0), m_tibprof(0),m_tobprof(0),m_tecpprof(0),m_tecmprof(0), m_tib2d(0),m_tob2d(0),m_tecp2d(0),m_tecm2d(0),m_maskedmod() { }
DigiCollectionProfiler::DigiCollectionProfiler | ( | TProfile * | tibprof, |
TProfile * | tobprof, | ||
TProfile * | tecpprof, | ||
TProfile * | tecmprof, | ||
TH2F * | tib2d, | ||
TH2F * | tob2d, | ||
TH2F * | tecp2d, | ||
TH2F * | tecm2d | ||
) |
Definition at line 19 of file DigiCollectionProfiler.cc.
: m_nevent(0), m_tibprof(tibprof),m_tobprof(tobprof),m_tecpprof(tecpprof),m_tecmprof(tecmprof), m_tib2d(tib2d),m_tob2d(tob2d),m_tecp2d(tecp2d),m_tecm2d(tecm2d),m_maskedmod() { }
DigiCollectionProfiler::~DigiCollectionProfiler | ( | ) | [inline] |
Definition at line 25 of file DigiCollectionProfiler.h.
{};
void DigiCollectionProfiler::analyze | ( | edm::Handle< edm::DetSetVector< SiStripDigi > > | digis | ) |
Definition at line 31 of file DigiCollectionProfiler.cc.
References cond::rpcobgas::detid, ismasked(), m_nevent, m_tecm2d, m_tecmprof, m_tecp2d, m_tecpprof, m_tib2d, m_tibprof, m_tob2d, m_tobprof, text2workspace::mod, TECDetId::side(), sistripsummary::TEC, SiStripDetId::TIB, sistripsummary::TID, and sistripsummary::TOB.
Referenced by BigEventsDebugger::analyze().
{ m_nevent++; for(edm::DetSetVector<SiStripDigi>::const_iterator mod = digis->begin();mod!=digis->end();mod++) { const SiStripDetId detid(mod->detId()); if(!ismasked(detid)) { TProfile* tobefilledprof=0; TH2F* tobefilled2d=0; if(detid.subDetector()==SiStripDetId::TIB || detid.subDetector()==SiStripDetId::TID) { tobefilledprof=m_tibprof; tobefilled2d=m_tib2d; } else if(detid.subDetector()==SiStripDetId::TOB) { tobefilledprof=m_tobprof; tobefilled2d=m_tob2d; } else if(detid.subDetector()==SiStripDetId::TEC) { const TECDetId tecid(detid); if(tecid.side()==1) { tobefilledprof=m_tecpprof; tobefilled2d=m_tecp2d; } else if(tecid.side()==2) { tobefilledprof=m_tecmprof; tobefilled2d=m_tecm2d; } } for(edm::DetSet<SiStripDigi>::const_iterator digi=mod->begin();digi!=mod->end();digi++) { if(digi->adc()>0) { if(tobefilledprof) tobefilledprof->Fill(digi->strip()%256,digi->adc()); if(tobefilled2d) tobefilled2d->Fill(digi->strip()%256,digi->adc()); } } } } }
int DigiCollectionProfiler::ismasked | ( | const DetId & | mod | ) | const [private] |
Definition at line 81 of file DigiCollectionProfiler.cc.
References m_maskedmod, and DetId::rawId().
Referenced by analyze().
{ int masked=0; for(std::vector<unsigned int>::const_iterator it=m_maskedmod.begin();it!=m_maskedmod.end()&&masked==0&&mod>=(*it);it++) { if(mod.rawId() == (*it)) masked = 1; } return masked; }
void DigiCollectionProfiler::setMaskedModules | ( | std::vector< unsigned int > | maskedmod | ) |
Definition at line 73 of file DigiCollectionProfiler.cc.
References m_maskedmod, and python::multivaluedict::sort().
Referenced by BigEventsDebugger::analyze().
{ m_maskedmod = maskedmod; sort(m_maskedmod.begin(),m_maskedmod.end()); }
std::vector<unsigned int> DigiCollectionProfiler::m_maskedmod [private] |
Definition at line 45 of file DigiCollectionProfiler.h.
Referenced by ismasked(), and setMaskedModules().
unsigned int DigiCollectionProfiler::m_nevent [private] |
Definition at line 34 of file DigiCollectionProfiler.h.
Referenced by analyze().
TH2F* DigiCollectionProfiler::m_tecm2d [private] |
Definition at line 43 of file DigiCollectionProfiler.h.
Referenced by analyze().
TProfile* DigiCollectionProfiler::m_tecmprof [private] |
Definition at line 39 of file DigiCollectionProfiler.h.
Referenced by analyze().
TH2F* DigiCollectionProfiler::m_tecp2d [private] |
Definition at line 42 of file DigiCollectionProfiler.h.
Referenced by analyze().
TProfile* DigiCollectionProfiler::m_tecpprof [private] |
Definition at line 38 of file DigiCollectionProfiler.h.
Referenced by analyze().
TH2F* DigiCollectionProfiler::m_tib2d [private] |
Definition at line 40 of file DigiCollectionProfiler.h.
Referenced by analyze().
TProfile* DigiCollectionProfiler::m_tibprof [private] |
Definition at line 36 of file DigiCollectionProfiler.h.
Referenced by analyze().
TH2F* DigiCollectionProfiler::m_tob2d [private] |
Definition at line 41 of file DigiCollectionProfiler.h.
Referenced by analyze().
TProfile* DigiCollectionProfiler::m_tobprof [private] |
Definition at line 37 of file DigiCollectionProfiler.h.
Referenced by analyze().