CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
L1ABCDebugger Class Reference

#include <DPGAnalysis/SiStripTools/plugins/L1ABCDebugger.cc>

Inheritance diagram for L1ABCDebugger:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 L1ABCDebugger (const edm::ParameterSet &)
 
 ~L1ABCDebugger () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
void beginRun (const edm::Run &, const edm::EventSetup &) override
 
void endJob () override
 

Private Attributes

TProfile ** m_hbxoffvsorb
 
TH2F ** m_hoffsets
 
TProfile ** m_horboffvsorb
 
edm::EDGetTokenT< L1AcceptBunchCrossingCollectionm_l1abccollectionToken
 
const unsigned int m_LSfrac
 
const unsigned int m_maxLS
 
RunHistogramManager m_rhm
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 48 of file L1ABCDebugger.cc.

Constructor & Destructor Documentation

L1ABCDebugger::L1ABCDebugger ( const edm::ParameterSet iConfig)
explicit

Definition at line 86 of file L1ABCDebugger.cc.

References m_hbxoffvsorb, m_hoffsets, m_horboffvsorb, m_LSfrac, m_maxLS, m_rhm, RunHistogramManager::makeTH2F(), and RunHistogramManager::makeTProfile().

86  :
87  m_l1abccollectionToken(consumes<L1AcceptBunchCrossingCollection>(iConfig.getParameter<edm::InputTag>("l1ABCCollection"))),
88  m_maxLS(iConfig.getUntrackedParameter<unsigned int>("maxLSBeforeRebin",250)),
89  m_LSfrac(iConfig.getUntrackedParameter<unsigned int>("startingLSFraction",16)),
91 {
92  //now do what ever initialization is needed
93 
94  m_hoffsets = m_rhm.makeTH2F("offsets","Orbit vs BX offsets between SCAL and Event",2*3564+1,-3564.5,3564.5,201,-100.5,100.5);
95  m_horboffvsorb = m_rhm.makeTProfile("orboffvsorb","SCAL Orbit offset vs orbit number",m_LSfrac*m_maxLS,0,m_maxLS*262144);
96  m_hbxoffvsorb = m_rhm.makeTProfile("bxoffvsorb","SCAL BX offset vs orbit number",m_LSfrac*m_maxLS,0,m_maxLS*262144);
97 
98 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
TH2F ** m_hoffsets
const unsigned int m_maxLS
RunHistogramManager m_rhm
edm::EDGetTokenT< L1AcceptBunchCrossingCollection > m_l1abccollectionToken
const unsigned int m_LSfrac
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
TProfile ** m_hbxoffvsorb
TProfile ** makeTProfile(const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax)
TProfile ** m_horboffvsorb
TH2F ** makeTH2F(const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax, const unsigned int nbiny, const double ymin, const double ymax)
L1ABCDebugger::~L1ABCDebugger ( )
override

Definition at line 101 of file L1ABCDebugger.cc.

102 {
103 
104  // do anything here that needs to be done at desctruction time
105  // (e.g. close files, deallocate resources etc.)
106 
107 }

Member Function Documentation

void L1ABCDebugger::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 116 of file L1ABCDebugger.cc.

References edm::EventBase::bunchCrossing(), edm::Event::getByToken(), createfilelist::int, m_hbxoffvsorb, m_hoffsets, m_horboffvsorb, m_l1abccollectionToken, and edm::EventBase::orbitNumber().

117 {
118  using namespace edm;
119 
122 
123  // offset computation
124  for(L1AcceptBunchCrossingCollection::const_iterator l1abc=pIn->begin();l1abc!=pIn->end();++l1abc) {
125  if(l1abc->l1AcceptOffset()==0) {
126  if(m_hoffsets && *m_hoffsets)
127  (*m_hoffsets)->Fill((int)l1abc->bunchCrossing()-(int)iEvent.bunchCrossing(),
128  (long long)l1abc->orbitNumber()-(long long)iEvent.orbitNumber());
130  (*m_horboffvsorb)->Fill(iEvent.orbitNumber(),(long long)l1abc->orbitNumber()-(long long)iEvent.orbitNumber());
132  (*m_hbxoffvsorb)->Fill(iEvent.orbitNumber(),(int)l1abc->bunchCrossing()-(int)iEvent.bunchCrossing());
133  }
134  }
135 
136 
137  // dump of L1ABC collection
138 
139  edm::LogInfo("L1ABCDebug") << "Dump of L1AcceptBunchCrossing Collection for event in orbit "
140  << iEvent.orbitNumber() << " and BX " << iEvent.bunchCrossing();
141 
142  for(L1AcceptBunchCrossingCollection::const_iterator l1abc=pIn->begin();l1abc!=pIn->end();++l1abc) {
143  edm::LogVerbatim("L1ABCDebug") << *l1abc;
144  }
145 
146 }
TH2F ** m_hoffsets
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:519
int bunchCrossing() const
Definition: EventBase.h:66
edm::EDGetTokenT< L1AcceptBunchCrossingCollection > m_l1abccollectionToken
TProfile ** m_hbxoffvsorb
int orbitNumber() const
Definition: EventBase.h:67
HLT enums.
TProfile ** m_horboffvsorb
void L1ABCDebugger::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 169 of file L1ABCDebugger.cc.

170 {
171 
172 }
void L1ABCDebugger::beginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 149 of file L1ABCDebugger.cc.

References RunHistogramManager::beginRun(), m_hbxoffvsorb, m_hoffsets, m_horboffvsorb, and m_rhm.

149  {
150 
151  m_rhm.beginRun(iRun);
152 
153  if(m_hoffsets && *m_hoffsets) {
154  (*m_hoffsets)->GetXaxis()->SetTitle("#Delta BX (SCAL-Event)"); (*m_hoffsets)->GetYaxis()->SetTitle("#Delta orbit (SCAL-Event)");
155  }
157  (*m_horboffvsorb)->GetXaxis()->SetTitle("Orbit"); (*m_horboffvsorb)->GetYaxis()->SetTitle("#Delta orbit (SCAL-Event)");
158  (*m_horboffvsorb)->SetCanExtend(TH1::kXaxis);
159  }
160  if(m_hbxoffvsorb && *m_hbxoffvsorb) {
161  (*m_hbxoffvsorb)->GetXaxis()->SetTitle("Orbit"); (*m_hbxoffvsorb)->GetYaxis()->SetTitle("#Delta BX (SCAL-Event)");
162  (*m_hbxoffvsorb)->SetCanExtend(TH1::kXaxis);
163  }
164 
165 
166 }
TH2F ** m_hoffsets
RunHistogramManager m_rhm
TProfile ** m_hbxoffvsorb
void beginRun(const edm::Run &iRun)
TProfile ** m_horboffvsorb
void L1ABCDebugger::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 176 of file L1ABCDebugger.cc.

References DEFINE_FWK_MODULE.

177 {
178 }

Member Data Documentation

TProfile** L1ABCDebugger::m_hbxoffvsorb
private

Definition at line 70 of file L1ABCDebugger.cc.

Referenced by analyze(), beginRun(), and L1ABCDebugger().

TH2F** L1ABCDebugger::m_hoffsets
private

Definition at line 68 of file L1ABCDebugger.cc.

Referenced by analyze(), beginRun(), and L1ABCDebugger().

TProfile** L1ABCDebugger::m_horboffvsorb
private

Definition at line 69 of file L1ABCDebugger.cc.

Referenced by analyze(), beginRun(), and L1ABCDebugger().

edm::EDGetTokenT<L1AcceptBunchCrossingCollection> L1ABCDebugger::m_l1abccollectionToken
private

Definition at line 62 of file L1ABCDebugger.cc.

Referenced by analyze().

const unsigned int L1ABCDebugger::m_LSfrac
private

Definition at line 64 of file L1ABCDebugger.cc.

Referenced by L1ABCDebugger().

const unsigned int L1ABCDebugger::m_maxLS
private

Definition at line 63 of file L1ABCDebugger.cc.

Referenced by L1ABCDebugger().

RunHistogramManager L1ABCDebugger::m_rhm
private

Definition at line 66 of file L1ABCDebugger.cc.

Referenced by beginRun(), and L1ABCDebugger().