CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
 
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::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
 
bool registeredToConsumeMany (TypeID const &, 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::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
< L1AcceptBunchCrossingCollection
m_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
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (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 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<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
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...
 
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 ( const edm::ParameterSet iConfig)
explicit

Definition at line 82 of file L1ABCDebugger.cc.

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

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 }
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)
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
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 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

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

Implements edm::EDAnalyzer.

Definition at line 108 of file L1ABCDebugger.cc.

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

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 }
Log< level::Info, true > LogVerbatim
TH2F ** m_hoffsets
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
int bunchCrossing() const
Definition: EventBase.h:64
edm::EDGetTokenT< L1AcceptBunchCrossingCollection > m_l1abccollectionToken
TProfile ** m_hbxoffvsorb
int orbitNumber() const
Definition: EventBase.h:65
Log< level::Info, false > LogInfo
TProfile ** m_horboffvsorb
void L1ABCDebugger::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 157 of file L1ABCDebugger.cc.

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

Reimplemented from edm::EDAnalyzer.

Definition at line 138 of file L1ABCDebugger.cc.

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

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

160 {}

Member Data Documentation

TProfile** L1ABCDebugger::m_hbxoffvsorb
private

Definition at line 68 of file L1ABCDebugger.cc.

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

TH2F** L1ABCDebugger::m_hoffsets
private

Definition at line 66 of file L1ABCDebugger.cc.

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

TProfile** L1ABCDebugger::m_horboffvsorb
private

Definition at line 67 of file L1ABCDebugger.cc.

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

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

Definition at line 60 of file L1ABCDebugger.cc.

Referenced by analyze().

const unsigned int L1ABCDebugger::m_LSfrac
private

Definition at line 62 of file L1ABCDebugger.cc.

Referenced by L1ABCDebugger().

const unsigned int L1ABCDebugger::m_maxLS
private

Definition at line 61 of file L1ABCDebugger.cc.

Referenced by L1ABCDebugger().

RunHistogramManager L1ABCDebugger::m_rhm
private

Definition at line 64 of file L1ABCDebugger.cc.

Referenced by beginRun(), and L1ABCDebugger().