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::one::EDAnalyzer< edm::one::WatchRuns > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 L1ABCDebugger (const edm::ParameterSet &)
 
 ~L1ABCDebugger () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () 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
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > 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::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices 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
 
void endRun (const edm::Run &, const edm::EventSetup &) 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::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 

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 83 of file L1ABCDebugger.cc.

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

85  consumes<L1AcceptBunchCrossingCollection>(iConfig.getParameter<edm::InputTag>("l1ABCCollection"))),
86  m_maxLS(iConfig.getUntrackedParameter<unsigned int>("maxLSBeforeRebin", 250)),
87  m_LSfrac(iConfig.getUntrackedParameter<unsigned int>("startingLSFraction", 16)),
89  //now do what ever initialization is needed
90 
92  "offsets", "Orbit vs BX offsets between SCAL and Event", 2 * 3564 + 1, -3564.5, 3564.5, 201, -100.5, 100.5);
94  m_rhm.makeTProfile("orboffvsorb", "SCAL Orbit offset vs orbit number", m_LSfrac * m_maxLS, 0, m_maxLS * 262144);
96  m_rhm.makeTProfile("bxoffvsorb", "SCAL BX offset vs orbit number", m_LSfrac * m_maxLS, 0, m_maxLS * 262144);
97 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
TH2F ** m_hoffsets
const unsigned int m_maxLS
RunHistogramManager m_rhm
edm::EDGetTokenT< L1AcceptBunchCrossingCollection > m_l1abccollectionToken
T getUntrackedParameter(std::string const &, T const &) const
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::~L1ABCDebugger ( )
override

Definition at line 99 of file L1ABCDebugger.cc.

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

Member Function Documentation

◆ analyze()

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

Implements edm::one::EDAnalyzerBase.

Definition at line 109 of file L1ABCDebugger.cc.

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

109  {
110  using namespace edm;
111 
113  iEvent.getByToken(m_l1abccollectionToken, pIn);
114 
115  // offset computation
116  for (L1AcceptBunchCrossingCollection::const_iterator l1abc = pIn->begin(); l1abc != pIn->end(); ++l1abc) {
117  if (l1abc->l1AcceptOffset() == 0) {
118  if (m_hoffsets && *m_hoffsets)
119  (*m_hoffsets)
120  ->Fill((int)l1abc->bunchCrossing() - (int)iEvent.bunchCrossing(),
121  (long long)l1abc->orbitNumber() - (long long)iEvent.orbitNumber());
123  (*m_horboffvsorb)->Fill(iEvent.orbitNumber(), (long long)l1abc->orbitNumber() - (long long)iEvent.orbitNumber());
125  (*m_hbxoffvsorb)->Fill(iEvent.orbitNumber(), (int)l1abc->bunchCrossing() - (int)iEvent.bunchCrossing());
126  }
127  }
128 
129  // dump of L1ABC collection
130 
131  edm::LogInfo("L1ABCDebug") << "Dump of L1AcceptBunchCrossing Collection for event in orbit " << iEvent.orbitNumber()
132  << " and BX " << iEvent.bunchCrossing();
133 
134  for (L1AcceptBunchCrossingCollection::const_iterator l1abc = pIn->begin(); l1abc != pIn->end(); ++l1abc) {
135  edm::LogVerbatim("L1ABCDebug") << *l1abc;
136  }
137 }
Log< level::Info, true > LogVerbatim
TH2F ** m_hoffsets
edm::EDGetTokenT< L1AcceptBunchCrossingCollection > m_l1abccollectionToken
int iEvent
Definition: GenABIO.cc:224
TProfile ** m_hbxoffvsorb
Log< level::Info, false > LogInfo
HLT enums.
TProfile ** m_horboffvsorb

◆ beginJob()

void L1ABCDebugger::beginJob ( )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 158 of file L1ABCDebugger.cc.

158 {}

◆ beginRun()

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

Definition at line 139 of file L1ABCDebugger.cc.

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

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

◆ endJob()

void L1ABCDebugger::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 161 of file L1ABCDebugger.cc.

161 {}

◆ endRun()

void L1ABCDebugger::endRun ( const edm::Run ,
const edm::EventSetup  
)
inlineoverrideprivate

Definition at line 56 of file L1ABCDebugger.cc.

56 {}

Member Data Documentation

◆ m_hbxoffvsorb

TProfile** L1ABCDebugger::m_hbxoffvsorb
private

Definition at line 69 of file L1ABCDebugger.cc.

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

◆ m_hoffsets

TH2F** L1ABCDebugger::m_hoffsets
private

Definition at line 67 of file L1ABCDebugger.cc.

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

◆ m_horboffvsorb

TProfile** L1ABCDebugger::m_horboffvsorb
private

Definition at line 68 of file L1ABCDebugger.cc.

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

◆ m_l1abccollectionToken

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

Definition at line 61 of file L1ABCDebugger.cc.

Referenced by analyze().

◆ m_LSfrac

const unsigned int L1ABCDebugger::m_LSfrac
private

Definition at line 63 of file L1ABCDebugger.cc.

Referenced by L1ABCDebugger().

◆ m_maxLS

const unsigned int L1ABCDebugger::m_maxLS
private

Definition at line 62 of file L1ABCDebugger.cc.

Referenced by L1ABCDebugger().

◆ m_rhm

RunHistogramManager L1ABCDebugger::m_rhm
private

Definition at line 65 of file L1ABCDebugger.cc.

Referenced by beginRun(), and L1ABCDebugger().