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:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 TriggerBxVsOrbitMonitor (edm::ParameterSet const &)
 
 ~TriggerBxVsOrbitMonitor ()=default
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 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
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr< dqmDetails::NoCacheglobalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr< dqmDetails::NoCacheglobalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

virtual void analyze (edm::Event const &, edm::EventSetup const &) override
 
virtual void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &) override
 

Private Attributes

const std::string m_dqm_path
 
const edm::EDGetTokenT< edm::TriggerResultsm_hlt_results
 
HLTConfigProvider m_hltConfig
 
const edm::EDGetTokenT< GlobalAlgBlkBxCollectionm_l1t_results
 
L1TUtmTriggerMenu const * m_l1tMenu
 
const int m_maxBX
 
const int m_maxLS
 
const int m_minBX
 
const int m_minLS
 
std::vector< TH2F * > m_orbit_bx
 
TH2F * m_orbit_bx_all
 
std::vector< TH2F * > m_orbit_bx_all_byLS
 

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::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase 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 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 57 of file TriggerBxVsOrbitMonitor.cc.

Constructor & Destructor Documentation

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

Definition at line 129 of file TriggerBxVsOrbitMonitor.cc.

129  :
130  // module configuration
131  m_l1t_results( consumes<GlobalAlgBlkBxCollection>( config.getUntrackedParameter<edm::InputTag>( "l1tResults" ) ) ),
132  m_hlt_results( consumes<edm::TriggerResults>( config.getUntrackedParameter<edm::InputTag>( "hltResults" ) ) ),
133  m_dqm_path( config.getUntrackedParameter<std::string>( "dqmPath" ) ),
134  m_minLS( config.getUntrackedParameter<int>( "minLS" ) ),
135  m_maxLS( config.getUntrackedParameter<int>( "maxLS" ) ),
136  m_minBX( config.getUntrackedParameter<int>( "minBX" ) ),
137  m_maxBX( config.getUntrackedParameter<int>( "maxBX" ) ),
138  // L1T and HLT configuration
139  m_l1tMenu(nullptr),
140  m_hltConfig(),
142  m_orbit_bx_all(nullptr),
143  m_orbit_bx()
144 {
145 }
std::vector< TH2F * > m_orbit_bx
Definition: config.py:1
std::vector< TH2F * > m_orbit_bx_all_byLS
const edm::EDGetTokenT< GlobalAlgBlkBxCollection > m_l1t_results
L1TUtmTriggerMenu const * m_l1tMenu
const edm::EDGetTokenT< edm::TriggerResults > m_hlt_results
TriggerBxVsOrbitMonitor::~TriggerBxVsOrbitMonitor ( )
default

Member Function Documentation

void TriggerBxVsOrbitMonitor::analyze ( edm::Event const &  event,
edm::EventSetup const &  setup 
)
overrideprivatevirtual

Implements edm::stream::EDAnalyzerBase.

Definition at line 194 of file TriggerBxVsOrbitMonitor.cc.

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

195 {
196  unsigned int bx = event.bunchCrossing();
197  unsigned int orbit = event.orbitNumber();
198  unsigned int ls = event.id().luminosityBlock();
199  int orbit_in_ls = orbit-(s_orbit_range*(ls-1));
200  m_orbit_bx_all->Fill(bx,orbit_in_ls);
201 
202  int iLS = ls-m_minLS;
203  if (iLS >= 0 && iLS < int(m_orbit_bx_all_byLS.size()))
204  m_orbit_bx_all_byLS.at(iLS)->Fill(bx,orbit_in_ls);
205 
206 
207  // monitor the bx distribution for the TCDS trigger types
208  size_t size = sizeof(s_tcds_trigger_types) / sizeof(const char *);
209  unsigned int type = event.experimentType();
210  if (type < size and m_orbit_bx[type]) {
211  m_orbit_bx[type]->Fill(bx,orbit_in_ls);
212  }
213 
214 }
size
Write out results.
std::vector< TH2F * > m_orbit_bx
type
Definition: HCALResponse.h:21
static const char *const s_tcds_trigger_types[]
static const unsigned int s_orbit_range
std::vector< TH2F * > m_orbit_bx_all_byLS
def ls(path, rec=False)
Definition: eostools.py:348
void TriggerBxVsOrbitMonitor::bookHistograms ( DQMStore::IBooker booker,
edm::Run const &  run,
edm::EventSetup const &  setup 
)
overrideprivatevirtual

Implements DQMEDAnalyzer.

Definition at line 160 of file TriggerBxVsOrbitMonitor.cc.

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

161 {
162  // TCDS trigger type plots
163  {
164  size_t size = sizeof(s_tcds_trigger_types) / sizeof(const char *);
165  size_t nLS = m_maxLS-m_minLS+1;
166 
167  unsigned int nBX = m_maxBX-m_minBX+1;
168  // book 2D histogram to monitor all TCDS trigger types in a single plot
169  booker.setCurrentFolder( m_dqm_path + "/orbitVsBX" );
170  m_orbit_bx_all = booker.book2D("OrbitVsBX", "Event orbits vs. bunch crossing", nBX, float(m_minBX)-0.5, float(m_maxBX)+0.5, s_orbit_range+1, -0.5, float(s_orbit_range)+0.5)->getTH2F();
171  m_orbit_bx_all->GetXaxis()->SetTitle("BX");
172  m_orbit_bx_all->GetYaxis()->SetTitle("orbit");
173  m_orbit_bx_all->SetCanExtend(TH1::kAllAxes);
174 
175  for (unsigned int i = 0; i < nLS; ++i) {
176  std::string iname = boost::lexical_cast<std::string>(i);
177  m_orbit_bx_all_byLS.at(i) = booker.book2D("OrbitVsBX_LS"+iname, "OrbitVsBX_LS"+iname, nBX, float(m_minBX)-0.5, float(m_maxBX)+0.5, s_orbit_range+1, -0.5, float(s_orbit_range)+0.5)->getTH2F();
178  m_orbit_bx_all_byLS.at(i)->GetXaxis()->SetTitle("BX");
179  m_orbit_bx_all_byLS.at(i)->GetYaxis()->SetTitle("orbit");
180  }
181 
182  booker.setCurrentFolder( m_dqm_path + "/orbitVsBX/TCDS" );
183  for (unsigned int i = 0; i < size; ++i) {
184  if (s_tcds_trigger_types[i]) {
185  m_orbit_bx.at(i) = booker.book2D("OrbitVsBX_"+std::string(s_tcds_trigger_types[i]), "Event orbits vs. bunch crossing "+std::string(s_tcds_trigger_types[i]), nBX, float(m_minBX)-0.5, float(m_maxBX)+0.5,s_orbit_range+1, -0.5, float(s_orbit_range)+0.5)->getTH2F();
186  m_orbit_bx.at(i)->GetXaxis()->SetTitle("BX");
187  m_orbit_bx.at(i)->GetYaxis()->SetTitle("orbit");
188  }
189  }
190  }
191 }
size
Write out results.
std::vector< TH2F * > m_orbit_bx
static const char *const s_tcds_trigger_types[]
static const unsigned int s_orbit_range
std::vector< TH2F * > m_orbit_bx_all_byLS
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
TH2F * getTH2F(void) const
void TriggerBxVsOrbitMonitor::dqmBeginRun ( edm::Run const &  run,
edm::EventSetup const &  setup 
)
overrideprivatevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 147 of file TriggerBxVsOrbitMonitor.cc.

References m_maxLS, m_minLS, m_orbit_bx, m_orbit_bx_all_byLS, and s_tcds_trigger_types.

148 {
149  size_t nLS = m_maxLS-m_minLS+1;
150 
151  m_orbit_bx_all_byLS.clear();
152  m_orbit_bx_all_byLS.resize(nLS,nullptr);
153 
154  m_orbit_bx.clear();
155  m_orbit_bx.resize(sizeof(s_tcds_trigger_types) / sizeof(const char *), nullptr);
156 
157 
158 }
std::vector< TH2F * > m_orbit_bx
static const char *const s_tcds_trigger_types[]
std::vector< TH2F * > m_orbit_bx_all_byLS
void TriggerBxVsOrbitMonitor::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 116 of file TriggerBxVsOrbitMonitor.cc.

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

117 {
119  desc.addUntracked<edm::InputTag>( "l1tResults", edm::InputTag("gtStage2Digis"));
120  desc.addUntracked<edm::InputTag>( "hltResults", edm::InputTag("TriggerResults"));
121  desc.addUntracked<std::string>( "dqmPath", "HLT/TriggerBx" );
122  desc.addUntracked<int>( "minLS", 134 );
123  desc.addUntracked<int>( "maxLS", 136 );
124  desc.addUntracked<int>( "minBX", 894 );
125  desc.addUntracked<int>( "maxBX", 912 );
126  descriptions.add("triggerBxVsOrbitMonitor", desc);
127 }
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 97 of file TriggerBxVsOrbitMonitor.cc.

Referenced by bookHistograms().

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

Definition at line 96 of file TriggerBxVsOrbitMonitor.cc.

HLTConfigProvider TriggerBxVsOrbitMonitor::m_hltConfig
private

Definition at line 105 of file TriggerBxVsOrbitMonitor.cc.

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

Definition at line 95 of file TriggerBxVsOrbitMonitor.cc.

L1TUtmTriggerMenu const* TriggerBxVsOrbitMonitor::m_l1tMenu
private

Definition at line 104 of file TriggerBxVsOrbitMonitor.cc.

const int TriggerBxVsOrbitMonitor::m_maxBX
private

Definition at line 101 of file TriggerBxVsOrbitMonitor.cc.

Referenced by bookHistograms().

const int TriggerBxVsOrbitMonitor::m_maxLS
private

Definition at line 99 of file TriggerBxVsOrbitMonitor.cc.

Referenced by bookHistograms(), and dqmBeginRun().

const int TriggerBxVsOrbitMonitor::m_minBX
private

Definition at line 100 of file TriggerBxVsOrbitMonitor.cc.

Referenced by bookHistograms().

const int TriggerBxVsOrbitMonitor::m_minLS
private

Definition at line 98 of file TriggerBxVsOrbitMonitor.cc.

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

std::vector<TH2F *> TriggerBxVsOrbitMonitor::m_orbit_bx
private

Definition at line 109 of file TriggerBxVsOrbitMonitor.cc.

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

TH2F* TriggerBxVsOrbitMonitor::m_orbit_bx_all
private

Definition at line 108 of file TriggerBxVsOrbitMonitor.cc.

Referenced by analyze(), and bookHistograms().

std::vector<TH2F *> TriggerBxVsOrbitMonitor::m_orbit_bx_all_byLS
private

Definition at line 107 of file TriggerBxVsOrbitMonitor.cc.

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

const unsigned int TriggerBxVsOrbitMonitor::s_bx_range = 3564
staticprivate

Definition at line 70 of file TriggerBxVsOrbitMonitor.cc.

const unsigned int TriggerBxVsOrbitMonitor::s_orbit_range = 262144
staticprivate

Definition at line 71 of file TriggerBxVsOrbitMonitor.cc.

Referenced by analyze(), and bookHistograms().

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 75 of file TriggerBxVsOrbitMonitor.cc.

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