CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
TriggerBxVsOrbitMonitor Class Reference
Inheritance diagram for TriggerBxVsOrbitMonitor:
DQMGlobalEDAnalyzer< RunBasedHistograms > edm::global::EDAnalyzer< edm::RunCache< RunBasedHistograms >, Args... > edm::global::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 TriggerBxVsOrbitMonitor (edm::ParameterSet const &)
 
 ~TriggerBxVsOrbitMonitor () override=default
 
- Public Member Functions inherited from edm::global::EDAnalyzer< edm::RunCache< RunBasedHistograms >, Args... >
 EDAnalyzer ()=default
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () 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
 
ESProxyIndex const * esGetTokenIndices (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
 
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)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::global::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

void bookHistograms (DQMStore::ConcurrentBooker &, edm::Run const &, edm::EventSetup const &, RunBasedHistograms &) const override
 
void dqmAnalyze (edm::Event const &, edm::EventSetup const &, RunBasedHistograms const &) const override
 
void dqmBeginRun (edm::Run const &, edm::EventSetup const &, RunBasedHistograms &) const override
 

Private Attributes

const std::string m_dqm_path
 
const edm::EDGetTokenT< edm::TriggerResultsm_hlt_results
 
const edm::EDGetTokenT< GlobalAlgBlkBxCollectionm_l1t_results
 
const int m_maxBX
 
const int m_maxLS
 
const int m_minBX
 
const int m_minLS
 

Static Private Attributes

static const unsigned int s_bx_range = 3564
 
static const unsigned int s_orbit_range = 262144
 
static const char *const s_tcds_trigger_types []
 

Additional Inherited Members

- Public Types inherited from edm::global::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- 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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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

Definition at line 37 of file TriggerBxVsOrbitMonitor.cc.

Constructor & Destructor Documentation

TriggerBxVsOrbitMonitor::TriggerBxVsOrbitMonitor ( edm::ParameterSet const &  config)
explicit

Definition at line 101 of file TriggerBxVsOrbitMonitor.cc.

101  :
102  // module configuration
103  m_l1t_results( consumes<GlobalAlgBlkBxCollection>( config.getUntrackedParameter<edm::InputTag>( "l1tResults" ) ) ),
104  m_hlt_results( consumes<edm::TriggerResults>( config.getUntrackedParameter<edm::InputTag>( "hltResults" ) ) ),
105  m_dqm_path( config.getUntrackedParameter<std::string>( "dqmPath" ) ),
106  m_minLS( config.getUntrackedParameter<int>( "minLS" ) ),
107  m_maxLS( config.getUntrackedParameter<int>( "maxLS" ) ),
108  m_minBX( config.getUntrackedParameter<int>( "minBX" ) ),
109  m_maxBX( config.getUntrackedParameter<int>( "maxBX" ) )
110 {
111 }
Definition: config.py:1
const edm::EDGetTokenT< GlobalAlgBlkBxCollection > m_l1t_results
const edm::EDGetTokenT< edm::TriggerResults > m_hlt_results
TriggerBxVsOrbitMonitor::~TriggerBxVsOrbitMonitor ( )
overridedefault

Member Function Documentation

void TriggerBxVsOrbitMonitor::bookHistograms ( DQMStore::ConcurrentBooker booker,
edm::Run const &  run,
edm::EventSetup const &  setup,
RunBasedHistograms &  histograms 
) const
overrideprivatevirtual

Implements DQMGlobalEDAnalyzer< RunBasedHistograms >.

Definition at line 124 of file TriggerBxVsOrbitMonitor.cc.

References DQMStore::ConcurrentBooker::book2D(), mps_fire::i, m_dqm_path, m_maxBX, m_maxLS, m_minBX, m_minLS, s_orbit_range, s_tcds_trigger_types, DQMStore::IBooker::setCurrentFolder(), findQualityFiles::size, and AlCaHLTBitMon_QueryRunRegistry::string.

125 {
126 // TCDS trigger type plots
128  size_t nLS = m_maxLS - m_minLS + 1;
129  size_t nBX = m_maxBX - m_minBX + 1;
130 
131  // book 2D histogram to monitor all TCDS trigger types in a single plot
132  booker.setCurrentFolder( m_dqm_path + "/orbitVsBX" );
133  histograms.orbit_bx_all = booker.book2D(
134  "OrbitVsBX",
135  "Event orbits vs. bunch crossing",
136  nBX, m_minBX - 0.5, m_maxBX + 0.5,
137  s_orbit_range + 1, -0.5, s_orbit_range + 0.5);
138  histograms.orbit_bx_all.setXTitle("BX");
139  histograms.orbit_bx_all.setYTitle("orbit");
140 
141  for (unsigned int i = 0; i < nLS; ++i) {
142  std::string iname = std::to_string(i);
143  histograms.orbit_bx_all_byLS[i] = booker.book2D(
144  "OrbitVsBX_LS" + iname,
145  "Event orbits vs. bunch crossing, for lumisection " + iname,
146  nBX, m_minBX - 0.5, m_maxBX + 0.5,
147  s_orbit_range + 1, -0.5, s_orbit_range + 0.5);
148  histograms.orbit_bx_all_byLS[i].setXTitle("BX");
149  histograms.orbit_bx_all_byLS[i].setYTitle("orbit");
150  }
151 
152  booker.setCurrentFolder( m_dqm_path + "/orbitVsBX/TCDS" );
153  for (unsigned int i = 0; i < size; ++i) {
154  if (s_tcds_trigger_types[i]) {
155  histograms.orbit_bx[i] = booker.book2D(
156  "OrbitVsBX_" + std::string(s_tcds_trigger_types[i]),
157  "Event orbits vs. bunch crossing " + std::string(s_tcds_trigger_types[i]),
158  nBX, m_minBX - 0.5, m_maxBX + 0.5,
159  s_orbit_range + 1, -0.5, s_orbit_range + 0.5);
160  histograms.orbit_bx[i].setXTitle("BX");
161  histograms.orbit_bx[i].setYTitle("orbit");
162  }
163  }
164 }
size
Write out results.
static const char *const s_tcds_trigger_types[]
static const unsigned int s_orbit_range
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
ConcurrentMonitorElement book2D(Args &&...args)
Definition: DQMStore.h:163
void TriggerBxVsOrbitMonitor::dqmAnalyze ( edm::Event const &  event,
edm::EventSetup const &  setup,
RunBasedHistograms const &  histograms 
) const
overrideprivate

Definition at line 167 of file TriggerBxVsOrbitMonitor.cc.

References DEFINE_FWK_MODULE, eostools::ls(), m_minLS, s_orbit_range, s_tcds_trigger_types, and findQualityFiles::size.

168 {
169  unsigned int type = event.experimentType();
170  unsigned int ls = event.id().luminosityBlock();
171  unsigned int orbit = event.orbitNumber() % s_orbit_range;
172  unsigned int bx = event.bunchCrossing();
173  histograms.orbit_bx_all.fill(bx, orbit);
174 
175  int iLS = ls - m_minLS;
176  if (iLS >= 0 and iLS < int(histograms.orbit_bx_all_byLS.size()))
177  histograms.orbit_bx_all_byLS[iLS].fill(bx, orbit);
178 
179  // monitor the bx distribution for the TCDS trigger types
181  if (type < size and histograms.orbit_bx[type]) {
182  histograms.orbit_bx[type].fill(bx, orbit);
183  }
184 }
size
Write out results.
type
Definition: HCALResponse.h:21
static const char *const s_tcds_trigger_types[]
static const unsigned int s_orbit_range
def ls(path, rec=False)
Definition: eostools.py:349
void TriggerBxVsOrbitMonitor::dqmBeginRun ( edm::Run const &  run,
edm::EventSetup const &  setup,
RunBasedHistograms &  histograms 
) const
overrideprivatevirtual

Reimplemented from DQMGlobalEDAnalyzer< RunBasedHistograms >.

Definition at line 113 of file TriggerBxVsOrbitMonitor.cc.

References m_maxLS, m_minLS, s_tcds_trigger_types, and findQualityFiles::size.

114 {
115  size_t nLS = m_maxLS - m_minLS + 1;
116 
117  histograms.orbit_bx_all_byLS.clear();
118  histograms.orbit_bx_all_byLS.resize(nLS);
119 
120  histograms.orbit_bx.clear();
121  histograms.orbit_bx.resize(std::size(s_tcds_trigger_types));
122 }
size
Write out results.
static const char *const s_tcds_trigger_types[]
void TriggerBxVsOrbitMonitor::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 88 of file TriggerBxVsOrbitMonitor.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::addUntracked(), and AlCaHLTBitMon_QueryRunRegistry::string.

89 {
91  desc.addUntracked<edm::InputTag>( "l1tResults", edm::InputTag("gtStage2Digis"));
92  desc.addUntracked<edm::InputTag>( "hltResults", edm::InputTag("TriggerResults"));
93  desc.addUntracked<std::string>( "dqmPath", "HLT/TriggerBx" );
94  desc.addUntracked<int>( "minLS", 134 );
95  desc.addUntracked<int>( "maxLS", 136 );
96  desc.addUntracked<int>( "minBX", 894 );
97  desc.addUntracked<int>( "maxBX", 912 );
98  descriptions.add("triggerBxVsOrbitMonitor", desc);
99 }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)

Member Data Documentation

const std::string TriggerBxVsOrbitMonitor::m_dqm_path
private

Definition at line 77 of file TriggerBxVsOrbitMonitor.cc.

Referenced by bookHistograms().

const edm::EDGetTokenT<edm::TriggerResults> TriggerBxVsOrbitMonitor::m_hlt_results
private

Definition at line 76 of file TriggerBxVsOrbitMonitor.cc.

const edm::EDGetTokenT<GlobalAlgBlkBxCollection> TriggerBxVsOrbitMonitor::m_l1t_results
private

Definition at line 75 of file TriggerBxVsOrbitMonitor.cc.

const int TriggerBxVsOrbitMonitor::m_maxBX
private

Definition at line 81 of file TriggerBxVsOrbitMonitor.cc.

Referenced by bookHistograms().

const int TriggerBxVsOrbitMonitor::m_maxLS
private

Definition at line 79 of file TriggerBxVsOrbitMonitor.cc.

Referenced by bookHistograms(), and dqmBeginRun().

const int TriggerBxVsOrbitMonitor::m_minBX
private

Definition at line 80 of file TriggerBxVsOrbitMonitor.cc.

Referenced by bookHistograms().

const int TriggerBxVsOrbitMonitor::m_minLS
private

Definition at line 78 of file TriggerBxVsOrbitMonitor.cc.

Referenced by bookHistograms(), dqmAnalyze(), and dqmBeginRun().

const unsigned int TriggerBxVsOrbitMonitor::s_bx_range = 3564
staticprivate

Definition at line 50 of file TriggerBxVsOrbitMonitor.cc.

const unsigned int TriggerBxVsOrbitMonitor::s_orbit_range = 262144
staticprivate

Definition at line 51 of file TriggerBxVsOrbitMonitor.cc.

Referenced by bookHistograms(), and dqmAnalyze().

const char *const TriggerBxVsOrbitMonitor::s_tcds_trigger_types
staticprivate
Initial value:
= {
"Empty",
"Physics",
"Calibration",
"Random",
"Auxiliary",
0 ,
0 ,
0 ,
"Cyclic",
"Bunch-pattern",
"Software",
"TTS",
0 ,
0 ,
0 ,
0
}

Definition at line 55 of file TriggerBxVsOrbitMonitor.cc.

Referenced by bookHistograms(), dqmAnalyze(), and dqmBeginRun().