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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
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
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
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 wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

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

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

Definition at line 47 of file L1ABCDebugger.cc.

Constructor & Destructor Documentation

◆ L1ABCDebugger()

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

Definition at line 82 of file L1ABCDebugger.cc.

84  consumes<L1AcceptBunchCrossingCollection>(iConfig.getParameter<edm::InputTag>("l1ABCCollection"))),
85  m_maxLS(iConfig.getUntrackedParameter<unsigned int>("maxLSBeforeRebin", 250)),
86  m_LSfrac(iConfig.getUntrackedParameter<unsigned int>("startingLSFraction", 16)),
88  //now do what ever initialization is needed
89 
91  "offsets", "Orbit vs BX offsets between SCAL and Event", 2 * 3564 + 1, -3564.5, 3564.5, 201, -100.5, 100.5);
93  m_rhm.makeTProfile("orboffvsorb", "SCAL Orbit offset vs orbit number", m_LSfrac * m_maxLS, 0, m_maxLS * 262144);
95  m_rhm.makeTProfile("bxoffvsorb", "SCAL BX offset vs orbit number", m_LSfrac * m_maxLS, 0, m_maxLS * 262144);
96 }

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

◆ ~L1ABCDebugger()

L1ABCDebugger::~L1ABCDebugger ( )
override

Definition at line 98 of file L1ABCDebugger.cc.

98  {
99  // do anything here that needs to be done at desctruction time
100  // (e.g. close files, deallocate resources etc.)
101 }

Member Function Documentation

◆ analyze()

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

Implements edm::EDAnalyzer.

Definition at line 108 of file L1ABCDebugger.cc.

108  {
109  using namespace edm;
110 
112  iEvent.getByToken(m_l1abccollectionToken, pIn);
113 
114  // offset computation
115  for (L1AcceptBunchCrossingCollection::const_iterator l1abc = pIn->begin(); l1abc != pIn->end(); ++l1abc) {
116  if (l1abc->l1AcceptOffset() == 0) {
117  if (m_hoffsets && *m_hoffsets)
118  (*m_hoffsets)
119  ->Fill((int)l1abc->bunchCrossing() - (int)iEvent.bunchCrossing(),
120  (long long)l1abc->orbitNumber() - (long long)iEvent.orbitNumber());
122  (*m_horboffvsorb)->Fill(iEvent.orbitNumber(), (long long)l1abc->orbitNumber() - (long long)iEvent.orbitNumber());
124  (*m_hbxoffvsorb)->Fill(iEvent.orbitNumber(), (int)l1abc->bunchCrossing() - (int)iEvent.bunchCrossing());
125  }
126  }
127 
128  // dump of L1ABC collection
129 
130  edm::LogInfo("L1ABCDebug") << "Dump of L1AcceptBunchCrossing Collection for event in orbit " << iEvent.orbitNumber()
131  << " and BX " << iEvent.bunchCrossing();
132 
133  for (L1AcceptBunchCrossingCollection::const_iterator l1abc = pIn->begin(); l1abc != pIn->end(); ++l1abc) {
134  edm::LogVerbatim("L1ABCDebug") << *l1abc;
135  }
136 }

References iEvent, createfilelist::int, m_hbxoffvsorb, m_hoffsets, m_horboffvsorb, and m_l1abccollectionToken.

◆ beginJob()

void L1ABCDebugger::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 157 of file L1ABCDebugger.cc.

157 {}

◆ beginRun()

void L1ABCDebugger::beginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 138 of file L1ABCDebugger.cc.

138  {
139  m_rhm.beginRun(iRun);
140 
141  if (m_hoffsets && *m_hoffsets) {
142  (*m_hoffsets)->GetXaxis()->SetTitle("#Delta BX (SCAL-Event)");
143  (*m_hoffsets)->GetYaxis()->SetTitle("#Delta orbit (SCAL-Event)");
144  }
145  if (m_horboffvsorb && *m_horboffvsorb) {
146  (*m_horboffvsorb)->GetXaxis()->SetTitle("Orbit");
147  (*m_horboffvsorb)->GetYaxis()->SetTitle("#Delta orbit (SCAL-Event)");
148  (*m_horboffvsorb)->SetCanExtend(TH1::kXaxis);
149  }
150  if (m_hbxoffvsorb && *m_hbxoffvsorb) {
151  (*m_hbxoffvsorb)->GetXaxis()->SetTitle("Orbit");
152  (*m_hbxoffvsorb)->GetYaxis()->SetTitle("#Delta BX (SCAL-Event)");
153  (*m_hbxoffvsorb)->SetCanExtend(TH1::kXaxis);
154  }
155 }

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

◆ endJob()

void L1ABCDebugger::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 160 of file L1ABCDebugger.cc.

160 {}

Member Data Documentation

◆ m_hbxoffvsorb

TProfile** L1ABCDebugger::m_hbxoffvsorb
private

Definition at line 68 of file L1ABCDebugger.cc.

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

◆ m_hoffsets

TH2F** L1ABCDebugger::m_hoffsets
private

Definition at line 66 of file L1ABCDebugger.cc.

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

◆ m_horboffvsorb

TProfile** L1ABCDebugger::m_horboffvsorb
private

Definition at line 67 of file L1ABCDebugger.cc.

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

◆ m_l1abccollectionToken

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

Definition at line 60 of file L1ABCDebugger.cc.

Referenced by analyze().

◆ m_LSfrac

const unsigned int L1ABCDebugger::m_LSfrac
private

Definition at line 62 of file L1ABCDebugger.cc.

Referenced by L1ABCDebugger().

◆ m_maxLS

const unsigned int L1ABCDebugger::m_maxLS
private

Definition at line 61 of file L1ABCDebugger.cc.

Referenced by L1ABCDebugger().

◆ m_rhm

RunHistogramManager L1ABCDebugger::m_rhm
private

Definition at line 64 of file L1ABCDebugger.cc.

Referenced by beginRun(), and L1ABCDebugger().

L1ABCDebugger::m_hoffsets
TH2F ** m_hoffsets
Definition: L1ABCDebugger.cc:66
RunHistogramManager::makeTH2F
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)
Definition: RunHistogramManager.cc:64
edm
HLT enums.
Definition: AlignableModifier.h:19
L1ABCDebugger::m_hbxoffvsorb
TProfile ** m_hbxoffvsorb
Definition: L1ABCDebugger.cc:68
L1ABCDebugger::m_maxLS
const unsigned int m_maxLS
Definition: L1ABCDebugger.cc:61
edm::EDConsumerBase::consumesCollector
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
Definition: EDConsumerBase.cc:46
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
edm::Handle
Definition: AssociativeIterator.h:50
L1ABCDebugger::m_horboffvsorb
TProfile ** m_horboffvsorb
Definition: L1ABCDebugger.cc:67
L1ABCDebugger::m_LSfrac
const unsigned int m_LSfrac
Definition: L1ABCDebugger.cc:62
L1ABCDebugger::m_rhm
RunHistogramManager m_rhm
Definition: L1ABCDebugger.cc:64
RunHistogramManager::beginRun
void beginRun(const edm::Run &iRun)
Definition: RunHistogramManager.cc:101
createfilelist.int
int
Definition: createfilelist.py:10
iEvent
int iEvent
Definition: GenABIO.cc:224
L1ABCDebugger::m_l1abccollectionToken
edm::EDGetTokenT< L1AcceptBunchCrossingCollection > m_l1abccollectionToken
Definition: L1ABCDebugger.cc:60
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::InputTag
Definition: InputTag.h:15
RunHistogramManager::makeTProfile
TProfile ** makeTProfile(const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax)
Definition: RunHistogramManager.cc:52