CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
L1GtTriggerMenuTester Class Reference

#include <L1GtTriggerMenuTester.h>

Inheritance diagram for L1GtTriggerMenuTester:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 L1GtTriggerMenuTester (const edm::ParameterSet &)
 
 ~L1GtTriggerMenuTester () 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
 
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)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Types

typedef std::map< std::string, const L1GtAlgorithm * >::const_iterator CItAlgoP
 constant iterator More...
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 analyze More...
 
void associateL1SeedsHltPath (const edm::Run &, const edm::EventSetup &)
 L1 seed - HLT path association. More...
 
void beginJob () override
 begin job More...
 
void beginLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &) override
 begin luminosity block More...
 
void beginRun (const edm::Run &, const edm::EventSetup &) override
 begin run More...
 
void endJob () override
 end job More...
 
void endLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &) override
 end luminosity block More...
 
void endRun (const edm::Run &, const edm::EventSetup &) override
 end run More...
 
void printTriggerGroup (const std::string &trigGroupName, const std::map< std::string, const L1GtAlgorithm * > &trigGroup, const bool compactPrint, const bool printPfsRates)
 printing template for a trigger group More...
 
void printWiki ()
 printing in Wiki format More...
 
void retrieveL1EventSetup (const edm::EventSetup &)
 retrieve all the relevant L1 trigger event setup records More...
 

Private Attributes

const AlgorithmMapm_algorithmAliasMap
 
const AlgorithmMapm_algorithmMap
 
std::vector< std::string > m_algoTriggerSeedNotInL1Menu
 vector of algorithm or technical triggers not in the L1 menu More...
 
HLTConfigProvider m_hltConfig
 The instance of the HLTConfigProvider as a data member. More...
 
std::vector< std::vector< std::string > > m_hltPathsForL1AlgorithmTrigger
 vector of HLT paths seeded by a L1 algorithm trigger - vector index corresponds to the bit number More...
 
std::vector< std::vector< std::string > > m_hltPathsForL1TechnicalTrigger
 vector of HLT paths seeded by a L1 technical trigger - vector index corresponds to the bit number More...
 
std::string m_hltProcessName
 process name of HLT process for which to get HLT configuration More...
 
std::string m_hltTableName
 HLT menu was used to associate the HLT path to the L1 algorithm triggers. More...
 
std::string m_htmlFile
 name of HTML file attached to the wiki page More...
 
int m_indexPfSet
 index of prescale factor set to be printed More...
 
const L1GtTriggerMenum_l1GtMenu
 
const L1GtPrescaleFactorsm_l1GtPfAlgo
 prescale factors More...
 
const L1GtPrescaleFactorsm_l1GtPfTech
 
const L1GtStableParametersm_l1GtStablePar
 event setup cached stuff More...
 
const L1GtTriggerMaskm_l1GtTmAlgo
 trigger masks & veto masks More...
 
const L1GtTriggerMaskm_l1GtTmTech
 
const L1GtTriggerMaskm_l1GtTmVetoAlgo
 
const L1GtTriggerMaskm_l1GtTmVetoTech
 
bool m_noThrowIncompatibleMenu
 
unsigned int m_numberAlgorithmTriggers
 number of algorithm triggers More...
 
unsigned int m_numberTechnicalTriggers
 number of technical triggers More...
 
bool m_overwriteHtmlFile
 input parameters More...
 
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrig
 
const std::vector< std::vector< int > > * m_prescaleFactorsTechTrig
 
bool m_printPfsRates
 print prescale factors and rates More...
 
const AlgorithmMapm_technicalTriggerMap
 
std::vector< std::string > m_techTriggerSeedNotInL1Menu
 
const std::vector< unsigned int > * m_triggerMaskAlgoTrig
 
const std::vector< unsigned int > * m_triggerMaskTechTrig
 
const std::vector< unsigned int > * m_triggerMaskVetoAlgoTrig
 
const std::vector< unsigned int > * m_triggerMaskVetoTechTrig
 
bool m_useHltMenu
 use a HLT menu for L1 seed - HLT path association More...
 

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 wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- 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

Description: test analyzer for L1 GT trigger menu.

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

Definition at line 44 of file L1GtTriggerMenuTester.h.

Member Typedef Documentation

typedef std::map<std::string, const L1GtAlgorithm*>::const_iterator L1GtTriggerMenuTester::CItAlgoP
private

constant iterator

Definition at line 99 of file L1GtTriggerMenuTester.h.

Constructor & Destructor Documentation

L1GtTriggerMenuTester::L1GtTriggerMenuTester ( const edm::ParameterSet parSet)
explicit

Definition at line 59 of file L1GtTriggerMenuTester.cc.

59  :
60  m_overwriteHtmlFile(parSet.getParameter<bool> ("OverwriteHtmlFile")),
61  m_htmlFile(parSet.getParameter<std::string> ("HtmlFile")),
62  m_useHltMenu(parSet.getParameter<bool> ("UseHltMenu")),
63  m_hltProcessName(parSet.getParameter<std::string> ("HltProcessName")),
65  parSet.getParameter<bool> ("NoThrowIncompatibleMenu")),
66  m_printPfsRates(parSet.getParameter<bool> ("PrintPfsRates")),
67  m_indexPfSet(parSet.getParameter<int> ("IndexPfSet")),
69 
70  // empty
71 
72 }
T getParameter(std::string const &) const
bool m_overwriteHtmlFile
input parameters
bool m_printPfsRates
print prescale factors and rates
int m_indexPfSet
index of prescale factor set to be printed
bool m_useHltMenu
use a HLT menu for L1 seed - HLT path association
unsigned int m_numberAlgorithmTriggers
number of algorithm triggers
std::string m_htmlFile
name of HTML file attached to the wiki page
std::string m_hltProcessName
process name of HLT process for which to get HLT configuration
unsigned int m_numberTechnicalTriggers
number of technical triggers
L1GtTriggerMenuTester::~L1GtTriggerMenuTester ( )
override

Definition at line 75 of file L1GtTriggerMenuTester.cc.

75  {
76  // empty
77 }

Member Function Documentation

void L1GtTriggerMenuTester::analyze ( const edm::Event iEvent,
const edm::EventSetup evSetup 
)
overrideprivate

analyze

Definition at line 144 of file L1GtTriggerMenuTester.cc.

145  {
146 
147  // empty
148 
149 }
void L1GtTriggerMenuTester::associateL1SeedsHltPath ( const edm::Run iRun,
const edm::EventSetup evSetup 
)
private

L1 seed - HLT path association.

Definition at line 239 of file L1GtTriggerMenuTester.cc.

References Exception, L1GtLogicParser::expressionSeedsOperandList(), L1GtTriggerMenu::gtTriggerMenuName(), HLTConfigProvider::hltL1GTSeeds(), mps_fire::i, HLTConfigProvider::init(), m_algorithmAliasMap, m_algoTriggerSeedNotInL1Menu, m_hltConfig, m_hltPathsForL1AlgorithmTrigger, m_hltPathsForL1TechnicalTrigger, m_hltProcessName, m_hltTableName, m_l1GtMenu, m_noThrowIncompatibleMenu, m_numberAlgorithmTriggers, m_numberTechnicalTriggers, m_techTriggerSeedNotInL1Menu, edm::second(), HLTConfigProvider::size(), AlCaHLTBitMon_QueryRunRegistry::string, HLTConfigProvider::tableName(), and HLTConfigProvider::triggerName().

Referenced by beginRun().

240  {
241 
242  bool hltChanged = true;
243 
244  if (m_hltConfig.init(iRun, evSetup, m_hltProcessName, hltChanged)) {
245 
246  // if init returns TRUE, initialization has succeeded!
247  if (hltChanged) {
248 
249  // HLT configuration has actually changed wrt the previous run
251 
252  edm::LogVerbatim("L1GtTriggerMenuTester")
253  << "\nHLT ConfDB menu name: \n " << m_hltTableName
254  << std::endl;
255 
256  // loop over trigger paths, get the HLTLevel1GTSeed logical expression, and add the path to
257  // each L1 trigger
258 
261 
264 
265  for (unsigned int iHlt = 0; iHlt < m_hltConfig.size(); ++iHlt) {
266 
267  const std::string& hltPathName = m_hltConfig.triggerName(iHlt);
268 
269  const std::vector<std::pair<bool, std::string> >& hltL1Seed =
270  m_hltConfig.hltL1GTSeeds(hltPathName);
271 
272  unsigned int numberHltL1GTSeeds = hltL1Seed.size();
273 
274  edm::LogVerbatim("L1GtTriggerMenuTester") << "\nPath: "
275  << hltPathName << " : <== " << numberHltL1GTSeeds
276  << " HLTLevel1GTSeed module(s)" << std::endl;
277 
278  for (unsigned int iSeedModule = 0; iSeedModule
279  < numberHltL1GTSeeds; ++iSeedModule) {
280 
281  // one needs a non-const logical expression... TODO check why
282  std::string m_l1SeedsLogicalExpression =
283  (hltL1Seed[iSeedModule]).second;
284 
285  edm::LogVerbatim("L1GtTriggerMenuTester") << " '"
286  << m_l1SeedsLogicalExpression << "'";
287 
288  // parse logical expression
289 
290  if (m_l1SeedsLogicalExpression != "L1GlobalDecision") {
291 
292  // check also the logical expression - add/remove spaces if needed
293  L1GtLogicParser m_l1AlgoLogicParser = L1GtLogicParser(
294  m_l1SeedsLogicalExpression);
295 
296  // list of required algorithms for seeding
297  std::vector<L1GtLogicParser::OperandToken>
298  m_l1AlgoSeeds =
299  m_l1AlgoLogicParser.expressionSeedsOperandList();
300  size_t l1AlgoSeedsSize = m_l1AlgoSeeds.size();
301 
302  edm::LogVerbatim("L1GtTriggerMenuTester")
303  << " : <== " << l1AlgoSeedsSize
304  << " L1 seeds" << std::endl;
305 
306  // for each algorithm trigger, check if it is in the L1 menu, get the bit number
307  // and add path to the vector of strings for that bit number
308 
309  for (size_t i = 0; i < l1AlgoSeedsSize; ++i) {
310 
311  const std::string& trigNameOrAlias =
312  (m_l1AlgoSeeds[i]).tokenName;
313 
314  CItAlgo itAlgo = m_algorithmAliasMap->find(
315  trigNameOrAlias);
316  if (itAlgo != m_algorithmAliasMap->end()) {
317 
318  int bitNr = (itAlgo->second).algoBitNumber();
319 
320  (m_hltPathsForL1AlgorithmTrigger.at(bitNr)).push_back(
321  hltPathName);
322 
323  edm::LogVerbatim("L1GtTriggerMenuTester")
324  << " " << trigNameOrAlias
325  << " bit " << bitNr << std::endl;
326 
327  } else {
328 
330  edm::LogVerbatim("L1GtTriggerMenuTester")
331  << " " << trigNameOrAlias
332  << " trigger not in L1 menu "
334  << std::endl;
335 
337  trigNameOrAlias);
338 
339  } else {
340  throw cms::Exception("FailModule")
341  << "\nAlgorithm "
342  << trigNameOrAlias
343  << ", requested as seed by a HLT path, not found in the L1 trigger menu\n "
345  << "\nIncompatible L1 and HLT menus.\n"
346  << std::endl;
347 
348  }
349  }
350  }
351 
352  }
353  }
354 
355  }
356  }
357  } else {
358  // if init returns FALSE, initialization has NOT succeeded, which indicates a problem
359  // with the file and/or code and needs to be investigated!
360  edm::LogError("MyAnalyzer")
361  << " HLT config extraction failure with process name "
362  << m_hltProcessName;
363  }
364 
365 }
unsigned int size() const
number of trigger paths in trigger table
std::vector< L1GtLogicParser::OperandToken > expressionSeedsOperandList()
const std::string & gtTriggerMenuName() const
const std::string & triggerName(unsigned int triggerIndex) const
const std::vector< std::vector< std::pair< bool, std::string > > > & hltL1GTSeeds() const
std::string m_hltTableName
HLT menu was used to associate the HLT path to the L1 algorithm triggers.
const AlgorithmMap * m_algorithmAliasMap
HLTConfigProvider m_hltConfig
The instance of the HLTConfigProvider as a data member.
const L1GtTriggerMenu * m_l1GtMenu
const std::string & tableName() const
HLT ConfDB table name.
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
U second(std::pair< T, U > const &p)
std::vector< std::string > m_techTriggerSeedNotInL1Menu
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
unsigned int m_numberAlgorithmTriggers
number of algorithm triggers
std::vector< std::string > m_algoTriggerSeedNotInL1Menu
vector of algorithm or technical triggers not in the L1 menu
std::vector< std::vector< std::string > > m_hltPathsForL1TechnicalTrigger
vector of HLT paths seeded by a L1 technical trigger - vector index corresponds to the bit number ...
std::vector< std::vector< std::string > > m_hltPathsForL1AlgorithmTrigger
vector of HLT paths seeded by a L1 algorithm trigger - vector index corresponds to the bit number ...
std::string m_hltProcessName
process name of HLT process for which to get HLT configuration
unsigned int m_numberTechnicalTriggers
number of technical triggers
void L1GtTriggerMenuTester::beginJob ( void  )
overrideprivatevirtual

begin job

Reimplemented from edm::EDAnalyzer.

Definition at line 80 of file L1GtTriggerMenuTester.cc.

80  {
81 
82 }
void L1GtTriggerMenuTester::beginLuminosityBlock ( const edm::LuminosityBlock iLumiBlock,
const edm::EventSetup evSetup 
)
overrideprivate

begin luminosity block

Definition at line 138 of file L1GtTriggerMenuTester.cc.

139  {
140 
141 }
void L1GtTriggerMenuTester::beginRun ( const edm::Run iRun,
const edm::EventSetup evSetup 
)
overrideprivate

begin run

Definition at line 85 of file L1GtTriggerMenuTester.cc.

References associateL1SeedsHltPath(), m_algoTriggerSeedNotInL1Menu, m_l1GtMenu, m_noThrowIncompatibleMenu, m_useHltMenu, L1GtTriggerMenu::print(), printWiki(), and retrieveL1EventSetup().

86  {
87 
88  // retrieve L1 trigger configuration
89  retrieveL1EventSetup(evSetup);
90 
91  // print with various level of verbosity
92 
93  // define an output stream to print into
94  // it can then be directed to whatever log level is desired
95  std::ostringstream myCout;
96 
97  int printVerbosity = 0;
98  m_l1GtMenu->print(myCout, printVerbosity);
99  myCout << std::flush << std::endl;
100 
101  printVerbosity = 1;
102  m_l1GtMenu->print(myCout, printVerbosity);
103  myCout << std::flush << std::endl;
104 
105  printVerbosity = 2;
106  m_l1GtMenu->print(myCout, printVerbosity);
107  myCout << std::flush << std::endl;
108 
109  // redirect myCout to edm::LogVerbatim TODO - parameter to choose the log
110  edm::LogVerbatim("L1GtTriggerMenuTester") << myCout.str() << std::endl;
111 
112  // prepare L1 - HLT
113  if (m_useHltMenu) {
114  associateL1SeedsHltPath(iRun, evSetup);
115 
117  edm::LogVerbatim("L1GtTriggerMenuTester")
118  << "\n List of algorithm triggers used as L1 seeds but not in L1 menu"
119  << std::endl;
120 
121  for (std::vector<std::string>::const_iterator strIter =
122  m_algoTriggerSeedNotInL1Menu.begin(); strIter
123  != m_algoTriggerSeedNotInL1Menu.end(); ++strIter) {
124 
125  edm::LogVerbatim("L1GtTriggerMenuTester") << " "
126  << (*strIter) << std::endl;
127  }
128 
129  }
130  }
131 
132  // print in wiki format
133  printWiki();
134 
135 }
void associateL1SeedsHltPath(const edm::Run &, const edm::EventSetup &)
L1 seed - HLT path association.
const L1GtTriggerMenu * m_l1GtMenu
void printWiki()
printing in Wiki format
void print(std::ostream &, int &) const
bool m_useHltMenu
use a HLT menu for L1 seed - HLT path association
std::vector< std::string > m_algoTriggerSeedNotInL1Menu
vector of algorithm or technical triggers not in the L1 menu
void retrieveL1EventSetup(const edm::EventSetup &)
retrieve all the relevant L1 trigger event setup records
void L1GtTriggerMenuTester::endJob ( void  )
overrideprivatevirtual

end job

Reimplemented from edm::EDAnalyzer.

Definition at line 163 of file L1GtTriggerMenuTester.cc.

163  {
164 
165 }
void L1GtTriggerMenuTester::endLuminosityBlock ( const edm::LuminosityBlock iLumiBlock,
const edm::EventSetup evSetup 
)
overrideprivate

end luminosity block

Definition at line 152 of file L1GtTriggerMenuTester.cc.

153  {
154 
155 }
void L1GtTriggerMenuTester::endRun ( const edm::Run ,
const edm::EventSetup evSetup 
)
overrideprivate

end run

Definition at line 158 of file L1GtTriggerMenuTester.cc.

158  {
159 
160 }
void L1GtTriggerMenuTester::printTriggerGroup ( const std::string &  trigGroupName,
const std::map< std::string, const L1GtAlgorithm * > &  trigGroup,
const bool  compactPrint,
const bool  printPfsRates 
)
private

printing template for a trigger group

Definition at line 368 of file L1GtTriggerMenuTester.cc.

References HIPAlignmentAlgorithm_cfi::algoName, DQMSequences_cfi::hltPaths, m_hltPathsForL1AlgorithmTrigger, m_htmlFile, m_numberAlgorithmTriggers, m_numberTechnicalTriggers, m_useHltMenu, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by printWiki().

370  {
371 
372  // FIXME get values - either read from a specific L1 menu file, or from
373  std::string lumiVal1 = "5.0E33";
374  std::string lumiVal2 = "7.0E33";
375  std::string trigComment;
376 
377  int trigPfVal1 = 0;
378  int trigPfVal2 = 0;
379 
380  int trigRateVal1 = 0;
381  int trigRateVal2 = 0;
382 
383  // cumulative list of L1 triggers not used as seed by HLT
384  std::vector < std::string > algoTriggerNotSeed;
385  algoTriggerNotSeed.reserve(m_numberAlgorithmTriggers);
386 
387  std::vector < std::string > techTriggerNotSeed;
388  techTriggerNotSeed.reserve(m_numberTechnicalTriggers);
389 
390  // force a page break before each group
391  edm::LogVerbatim("L1GtTriggerMenuTesterWiki")
392  << "<p style=\"page-break-before: always\">&nbsp;</p>";
393 
394  edm::LogVerbatim("L1GtTriggerMenuTesterWiki") << "\n---++++ "
395  << trigGroupName << "\n" << std::endl;
396 
397  if (compactPrint) {
398  edm::LogVerbatim("L1GtTriggerMenuTesterWiki")
399  << "| *Trigger Name* | *Trigger Alias* | *Bit* | *Comments* |"
400  << std::endl;
401 
402  } else {
403 
404  if (printPfsRates) {
405  edm::LogVerbatim("L1GtTriggerMenuTesterWiki")
406  << "| *Trigger Name* | *Trigger Alias* | *Bit* | *Luminosity* |||| *Seed for !HLT path(s)* | *Comments* |"
407  << std::endl;
408 
409  edm::LogVerbatim("L1GtTriggerMenuTesterWiki") << "|^|^|^| *"
410  << lumiVal1 << "* || *" << lumiVal2
411  << "* || ** | ** |" << std::endl;
412 
413  edm::LogVerbatim("L1GtTriggerMenuTesterWiki")
414  << "|^|^|^| *PF* | *Rate* | *PF* | *Rate* | ** | ** |"
415  << std::endl;
416 
417  } else {
418 
419  edm::LogVerbatim("L1GtTriggerMenuTesterWiki")
420  << "| *Trigger Name* | *Trigger Alias* | *Bit* | *Seed for !HLT path(s)* |"
421  << std::endl;
422  }
423 
424  }
425 
426  for (CItAlgoP itAlgo = trigGroup.begin(); itAlgo != trigGroup.end(); itAlgo++) {
427 
428  const std::string& aName = (itAlgo->second)->algoName();
429  const std::string& aAlias = (itAlgo->second)->algoAlias();
430  const int& bitNumber = (itAlgo->second)->algoBitNumber();
431 
432 
433  // concatenate in a string, to simplify the next print instruction
434  std::string seedsHlt;
435  if (m_useHltMenu) {
436  const std::vector<std::string> & hltPaths =
437  m_hltPathsForL1AlgorithmTrigger.at(bitNumber);
438 
439  if (hltPaths.empty()) {
440  algoTriggerNotSeed.push_back(aAlias);
441  seedsHlt
442  = "<font color = \"red\">Not used as seed by any !HLT path</font>";
443  } else {
444 
445  for (std::vector<std::string>::const_iterator strIter =
446  hltPaths.begin(); strIter != hltPaths.end(); ++strIter) {
447 
448  seedsHlt = seedsHlt + (*strIter) + "<BR>";
449  }
450  }
451 
452  }
453 
454  if (compactPrint) {
455  edm::LogVerbatim("L1GtTriggerMenuTesterWiki") << "|" << std::left
456  << "[[" << (m_htmlFile + "#" + aName) << "][ " << aName
457  << "]] " << " |" << aAlias << " | " << bitNumber << "| |"
458  << std::endl;
459 
460  } else {
461 
462  if (printPfsRates) {
463  edm::LogVerbatim("L1GtTriggerMenuTesterWiki") << "|"
464  << std::left << "[[" << (m_htmlFile + "#" + aName)
465  << "][ " << aName << "]] " << " |" << aAlias
466  << " | " << bitNumber << "| "
467  << ((trigPfVal1 != 0) ? trigPfVal1 : 0) << " | "
468  << ((trigRateVal1 != 0) ? trigRateVal1 : 0) << " | "
469  << ((trigPfVal2 != 0) ? trigPfVal2 : 0) << " | "
470  << ((trigRateVal2 != 0) ? trigRateVal2 : 0) << " | "
471  << seedsHlt << " | " << trigComment << " |"
472  << std::endl;
473 
474  } else {
475 
476  edm::LogVerbatim("L1GtTriggerMenuTesterWiki") << "|"
477  << std::left << "[[" << (m_htmlFile + "#" + aName)
478  << "][ " << aName << "]] " << " |" << aAlias
479  << " | " << bitNumber << "|" << seedsHlt << " | "
480  << std::endl;
481  }
482 
483  }
484 
485  }
486 
487  edm::LogVerbatim("L1GtTriggerMenuTesterWiki") << "\n" << trigGroupName
488  << ": " << (trigGroup.size()) << " bits defined." << std::endl;
489 
490  if (m_useHltMenu && (!compactPrint)) {
491  edm::LogVerbatim("L1GtTriggerMenuTesterWiki")
492  << "\n Algorithm triggers from " << trigGroupName
493  << " not used as seeds by !HLT:" << std::endl;
494 
495  if (!algoTriggerNotSeed.empty()) {
496  for (std::vector<std::string>::const_iterator strIter =
497  algoTriggerNotSeed.begin(); strIter
498  != algoTriggerNotSeed.end(); ++strIter) {
499 
500  edm::LogVerbatim("L1GtTriggerMenuTesterWiki") << " * "
501  << (*strIter) << std::endl;
502  }
503 
504  } else {
505  edm::LogVerbatim("L1GtTriggerMenuTesterWiki") << " * none"
506  << std::endl;
507  }
508  }
509 
510 }
bool m_useHltMenu
use a HLT menu for L1 seed - HLT path association
std::map< std::string, const L1GtAlgorithm * >::const_iterator CItAlgoP
constant iterator
unsigned int m_numberAlgorithmTriggers
number of algorithm triggers
std::vector< std::vector< std::string > > m_hltPathsForL1AlgorithmTrigger
vector of HLT paths seeded by a L1 algorithm trigger - vector index corresponds to the bit number ...
std::string m_htmlFile
name of HTML file attached to the wiki page
unsigned int m_numberTechnicalTriggers
number of technical triggers
void L1GtTriggerMenuTester::printWiki ( )
private

printing in Wiki format

Definition at line 513 of file L1GtTriggerMenuTester.cc.

References HIPAlignmentAlgorithm_cfi::algoName, BPTX, CenJet, CondExternal, ETM, ETT, Exception, ForJet, L1GtTriggerMenu::gtConditionMap(), GtExternal, L1GtTriggerMenu::gtScaleDbKey(), L1GtTriggerMenu::gtTriggerMenuImplementation(), L1GtTriggerMenu::gtTriggerMenuInterface(), L1GtTriggerMenu::gtTriggerMenuName(), HfBitCounts, HfRingEtSums, HTM, HTT, mps_fire::i, IsoEG, JetCounts, m_algorithmMap, m_hltTableName, m_htmlFile, m_indexPfSet, m_l1GtMenu, m_numberAlgorithmTriggers, m_numberTechnicalTriggers, m_overwriteHtmlFile, m_prescaleFactorsAlgoTrig, m_prescaleFactorsTechTrig, m_printPfsRates, m_technicalTriggerMap, m_useHltMenu, Mu, NoIsoEG, electrons_cff::objType, L1GtLogicParser::OP_OPERAND, printTriggerGroup(), python.rootplot.root2matplotlib::replace(), AlCaHLTBitMon_QueryRunRegistry::string, TauJet, and TechTrig.

Referenced by beginRun().

513  {
514 
515  //
516  // print menu, prescale factors and trigger mask in wiki format
517  //
518 
519  // L1 GT prescale factors for algorithm triggers
520 
521  std::vector<int> prescaleFactorsAlgoTrig = m_prescaleFactorsAlgoTrig->at(
522  m_indexPfSet);
523 
524  // L1 GT prescale factors for technical triggers
525 
526  std::vector<int> prescaleFactorsTechTrig = m_prescaleFactorsTechTrig->at(
527  m_indexPfSet);
528 
529  // use another map <int, L1GtAlgorithm> to get the menu sorted after bit number
530  // both algorithm and bit numbers are unique
531  typedef std::map<int, const L1GtAlgorithm*>::const_iterator CItBit;
532 
533  // algorithm triggers
534 
535  std::map<int, const L1GtAlgorithm*> algoBitToAlgo;
536 
537  std::map<std::string, const L1GtAlgorithm*> jetAlgoTrig;
538  std::map<std::string, const L1GtAlgorithm*> egammaAlgoTrig;
539  std::map<std::string, const L1GtAlgorithm*> esumAlgoTrig;
540  std::map<std::string, const L1GtAlgorithm*> muonAlgoTrig;
541  std::map<std::string, const L1GtAlgorithm*> crossAlgoTrig;
542  std::map<std::string, const L1GtAlgorithm*> bkgdAlgoTrig;
543 
544  int algoTrigNumber = 0;
545  int freeAlgoTrigNumber = 0;
546 
547  int jetAlgoTrigNumber = 0;
548  int egammaAlgoTrigNumber = 0;
549  int esumAlgoTrigNumber = 0;
550  int muonAlgoTrigNumber = 0;
551  int crossAlgoTrigNumber = 0;
552  int bkgdAlgoTrigNumber = 0;
553 
554  for (CItAlgo itAlgo = m_algorithmMap->begin(); itAlgo
555  != m_algorithmMap->end(); itAlgo++) {
556 
557  const int bitNumber = (itAlgo->second).algoBitNumber();
558  const std::string& algName = (itAlgo->second).algoName();
559 
560  algoBitToAlgo[bitNumber] = &(itAlgo->second);
561 
562  algoTrigNumber++;
563 
564  // per category
565 
566  const ConditionMap& conditionMap = (m_l1GtMenu->gtConditionMap()).at(
567  (itAlgo->second).algoChipNumber());
568 
569  const std::vector<L1GtLogicParser::TokenRPN>& rpnVector =
570  (itAlgo->second).algoRpnVector();
571  const L1GtLogicParser::OperationType condOperand =
573 
574  std::list<L1GtObject> listObjects;
575 
576  for (size_t i = 0; i < rpnVector.size(); ++i) {
577 
578  if ((rpnVector[i]).operation == condOperand) {
579 
580  const std::string& cndName = (rpnVector[i]).operand;
581 
582  // search the condition in the condition list
583 
584  bool foundCond = false;
585 
586  CItCond itCond = conditionMap.find(cndName);
587  if (itCond != conditionMap.end()) {
588  foundCond = true;
589 
590  // loop through object types and add them to the list
591 
592  const std::vector<L1GtObject>& objType =
593  (itCond->second)->objectType();
594 
595  for (std::vector<L1GtObject>::const_iterator itObject =
596  objType.begin(); itObject != objType.end(); itObject++) {
597  listObjects.push_back(*itObject);
598 
599  edm::LogVerbatim("L1GtTriggerMenuTester")
600  << (*itObject) << std::endl;
601  }
602 
603  // FIXME for XML parser, add GtExternal to objType correctly
604  if ((itCond->second)->condCategory() == CondExternal) {
605  listObjects.push_back(GtExternal);
606  }
607 
608  }
609 
610  if (!foundCond) {
611 
612  // it should never be happen, all conditions are in the maps
613  throw cms::Exception("FailModule") << "\nCondition "
614  << cndName << " not found in the condition map"
615  << " for chip number "
616  << ((itAlgo->second).algoChipNumber()) << std::endl;
617  }
618 
619  }
620 
621  }
622 
623  // eliminate duplicates
624  listObjects.sort();
625  listObjects.unique();
626 
627  // add the algorithm to the corresponding group
628 
629  bool jetGroup = false;
630  bool egammaGroup = false;
631  bool esumGroup = false;
632  bool muonGroup = false;
633  bool crossGroup = false;
634  bool bkgdGroup = false;
635 
636  for (std::list<L1GtObject>::const_iterator itObj = listObjects.begin(); itObj
637  != listObjects.end(); ++itObj) {
638 
639  switch (*itObj) {
640  case Mu: {
641  muonGroup = true;
642  }
643 
644  break;
645  case NoIsoEG: {
646  egammaGroup = true;
647  }
648 
649  break;
650  case IsoEG: {
651  egammaGroup = true;
652  }
653 
654  break;
655  case CenJet: {
656  jetGroup = true;
657  }
658 
659  break;
660  case ForJet: {
661  jetGroup = true;
662  }
663 
664  break;
665  case TauJet: {
666  jetGroup = true;
667  }
668 
669  break;
670  case ETM: {
671  esumGroup = true;
672 
673  }
674 
675  break;
676  case ETT: {
677  esumGroup = true;
678 
679  }
680 
681  break;
682  case HTT: {
683  esumGroup = true;
684 
685  }
686 
687  break;
688  case HTM: {
689  esumGroup = true;
690 
691  }
692 
693  break;
694  case JetCounts: {
695  // do nothing - not available
696  }
697 
698  break;
699  case HfBitCounts: {
700  bkgdGroup = true;
701  }
702 
703  break;
704  case HfRingEtSums: {
705  bkgdGroup = true;
706  }
707 
708  break;
709  case GtExternal: {
710  bkgdGroup = true;
711  }
712 
713  break;
714  case TechTrig:
715  case Castor:
716  case BPTX:
717  default: {
718  // should not arrive here
719 
720  edm::LogVerbatim("L1GtTriggerMenuTester")
721  << "\n Unknown object of type " << *itObj
722  << std::endl;
723  }
724  break;
725  }
726 
727  }
728 
729  int sumGroup = jetGroup + egammaGroup + esumGroup + muonGroup
730  + crossGroup + bkgdGroup;
731 
732  if (sumGroup > 1) {
733  crossAlgoTrig[algName] = &(itAlgo->second);
734  } else {
735 
736  if (jetGroup) {
737  jetAlgoTrig[algName] = &(itAlgo->second);
738 
739  } else if (egammaGroup) {
740  egammaAlgoTrig[algName] = &(itAlgo->second);
741 
742  } else if (esumGroup && (listObjects.size() > 1)) {
743  crossAlgoTrig[algName] = &(itAlgo->second);
744 
745  } else if (esumGroup) {
746  esumAlgoTrig[algName] = &(itAlgo->second);
747 
748  } else if (muonGroup) {
749  muonAlgoTrig[algName] = &(itAlgo->second);
750 
751  } else if (bkgdGroup) {
752  bkgdAlgoTrig[algName] = &(itAlgo->second);
753 
754  } else {
755  // do nothing
756  }
757 
758  }
759 
760  edm::LogVerbatim("L1GtTriggerMenuTester") << algName << " sum: "
761  << sumGroup << " size: " << listObjects.size() << std::endl;
762 
763  }
764 
765  freeAlgoTrigNumber = m_numberAlgorithmTriggers - algoTrigNumber;
766 
767  jetAlgoTrigNumber = jetAlgoTrig.size();
768  egammaAlgoTrigNumber = egammaAlgoTrig.size();
769  esumAlgoTrigNumber = esumAlgoTrig.size();
770  muonAlgoTrigNumber = muonAlgoTrig.size();
771  crossAlgoTrigNumber = crossAlgoTrig.size();
772  bkgdAlgoTrigNumber = bkgdAlgoTrig.size();
773 
774  // technical triggers
775  std::map<int, const L1GtAlgorithm*> techBitToAlgo;
776 
777  int techTrigNumber = 0;
778  int freeTechTrigNumber = 0;
779 
780  for (CItAlgo itAlgo = m_technicalTriggerMap->begin(); itAlgo
781  != m_technicalTriggerMap->end(); itAlgo++) {
782 
783  int bitNumber = (itAlgo->second).algoBitNumber();
784  techBitToAlgo[bitNumber] = &(itAlgo->second);
785 
786  techTrigNumber++;
787  }
788 
789  freeTechTrigNumber = m_numberTechnicalTriggers - techTrigNumber;
790 
791  // name of the attached HTML file
792  if (!m_overwriteHtmlFile) {
794 
795  // replace "/" with "_"
796  std::replace(menuName.begin(), menuName.end(), '/', '_');
797  m_htmlFile = "%ATTACHURL%/" + menuName + ".html";
798  } else {
799  m_htmlFile = "%ATTACHURL%/" + m_htmlFile;
800  }
801 
802  // header for printing algorithms
803 
804  edm::LogVerbatim("L1GtTriggerMenuTesterWiki")
805  << "\n ********** L1 Trigger Menu - printing in wiki format ********** \n\n"
806  << "\n---+++ L1 menu identification\n"
807  << "\n|L1 Trigger Menu Interface: |!"
808  << m_l1GtMenu->gtTriggerMenuInterface() << " |"
809  << "\n|L1 Trigger Menu Name: |!" << m_l1GtMenu->gtTriggerMenuName()
810  << " |" << "\n|L1 Trigger Menu Implementation: |!"
812  << "\n|Associated L1 scale DB key: |!"
813  << m_l1GtMenu->gtScaleDbKey() << " |" << "\n\n" << std::flush
814  << std::endl;
815 
816  // Overview page
817  edm::LogVerbatim("L1GtTriggerMenuTesterWiki") << "\n---+++ Summary\n"
818  << std::endl;
819  edm::LogVerbatim("L1GtTriggerMenuTesterWiki")
820  << " * Number of algorithm triggers: " << algoTrigNumber
821  << " defined, 128 possible." << std::endl;
822  edm::LogVerbatim("L1GtTriggerMenuTesterWiki")
823  << " * Number of technical triggers: " << techTrigNumber
824  << " defined, 64 possible.<BR><BR>" << std::endl;
825 
826  edm::LogVerbatim("L1GtTriggerMenuTesterWiki")
827  << " * Number of free bits for algorithm triggers: "
828  << freeAlgoTrigNumber << std::endl;
829  edm::LogVerbatim("L1GtTriggerMenuTesterWiki")
830  << " * Number of free bits for technical triggers: "
831  << freeTechTrigNumber << "<BR>" << std::endl;
832 
833  edm::LogVerbatim("L1GtTriggerMenuTesterWiki")
834  << "\nNumber of algorithm triggers per trigger group\n"
835  << std::endl;
836  edm::LogVerbatim("L1GtTriggerMenuTesterWiki")
837  << " | *Trigger group* | *Number of bits used*|" << std::endl;
838  edm::LogVerbatim("L1GtTriggerMenuTesterWiki")
839  << " | Jet algorithm triggers: | " << jetAlgoTrigNumber << "|"
840  << std::endl;
841  edm::LogVerbatim("L1GtTriggerMenuTesterWiki")
842  << " | EGamma algorithm triggers: | " << egammaAlgoTrigNumber
843  << "|" << std::endl;
844  edm::LogVerbatim("L1GtTriggerMenuTesterWiki")
845  << " | Energy sum algorithm triggers: | " << esumAlgoTrigNumber
846  << "|" << std::endl;
847  edm::LogVerbatim("L1GtTriggerMenuTesterWiki")
848  << " | Muon algorithm triggers: | " << muonAlgoTrigNumber
849  << "|" << std::endl;
850  edm::LogVerbatim("L1GtTriggerMenuTesterWiki")
851  << " | Cross algorithm triggers: | " << crossAlgoTrigNumber
852  << "|" << std::endl;
853  edm::LogVerbatim("L1GtTriggerMenuTesterWiki")
854  << " | Background algorithm triggers: | " << bkgdAlgoTrigNumber
855  << "|" << std::endl;
856 
857  // force a page break
858  edm::LogVerbatim("L1GtTriggerMenuTesterWiki")
859  << "<p style=\"page-break-before: always\">&nbsp;</p>";
860 
861  // compact print - without HLT path
862  bool compactPrint = true;
863 
864  edm::LogVerbatim("L1GtTriggerMenuTesterWiki")
865  << "\n---+++ List of algorithm triggers sorted by trigger groups\n"
866  << std::endl;
867 
868  // Jet algorithm triggers
869  printTriggerGroup("Jet algorithm triggers", jetAlgoTrig, compactPrint,
871 
872  // EGamma algorithm triggers
873  printTriggerGroup("EGamma algorithm triggers", egammaAlgoTrig,
874  compactPrint, m_printPfsRates);
875 
876  // Energy sum algorithm triggers
877  printTriggerGroup("Energy sum algorithm triggers", esumAlgoTrig,
878  compactPrint, m_printPfsRates);
879 
880  // Muon algorithm triggers
881  printTriggerGroup("Muon algorithm triggers", muonAlgoTrig, compactPrint,
883 
884  // Cross algorithm triggers
885  printTriggerGroup("Cross algorithm triggers", crossAlgoTrig, compactPrint,
887 
888  // Background algorithm triggers
889  printTriggerGroup("Background algorithm triggers", bkgdAlgoTrig,
890  compactPrint, m_printPfsRates);
891 
892  // force a page break
893  edm::LogVerbatim("L1GtTriggerMenuTesterWiki")
894  << "<p style=\"page-break-before: always\">&nbsp;</p>";
895 
896  edm::LogVerbatim("L1GtTriggerMenuTesterWiki")
897  << "\n---+++ List of algorithm triggers sorted by bits\n"
898  << std::endl;
899 
900  edm::LogVerbatim("L1GtTriggerMenuTesterWiki")
901  << "| *Algorithm* | *Alias* | *Bit number* |" << std::endl;
902 
903  for (CItBit itBit = algoBitToAlgo.begin(); itBit != algoBitToAlgo.end(); itBit++) {
904 
905  int bitNumber = itBit->first;
906  std::string aName = (itBit->second)->algoName();
907  std::string aAlias = (itBit->second)->algoAlias();
908 
909  edm::LogVerbatim("L1GtTriggerMenuTesterWiki") << "|" << std::left
910  << "[[" << (m_htmlFile + "#" + aName) << "][ " << aName
911  << "]] " << " |" << aAlias << " | " << bitNumber << "| |"
912  << std::endl;
913 
914  }
915 
916  // force a page break
917  edm::LogVerbatim("L1GtTriggerMenuTesterWiki")
918  << "<p style=\"page-break-before: always\">&nbsp;</p>";
919  edm::LogVerbatim("L1GtTriggerMenuTesterWiki")
920  << "\n---+++ List of technical triggers\n" << std::endl;
921 
922  edm::LogVerbatim("L1GtTriggerMenuTesterWiki")
923  << "| *Technical trigger* | *Bit number* |" << std::endl;
924 
925  for (CItBit itBit = techBitToAlgo.begin(); itBit != techBitToAlgo.end(); itBit++) {
926 
927  int bitNumber = itBit->first;
928  std::string aName = (itBit->second)->algoName();
929  std::string aAlias = (itBit->second)->algoAlias();
930 
931  edm::LogVerbatim("L1GtTriggerMenuTesterWiki") << "|!" << std::left
932  << aName << " | " << std::right << bitNumber << " |"
933  << std::endl;
934  }
935 
936  // force a page break
937  edm::LogVerbatim("L1GtTriggerMenuTesterWiki")
938  << "<p style=\"page-break-before: always\">&nbsp;</p>";
939 
940  // compact print false: with HLT path association, if the parameter m_useHltMenu is true
941  // otherwise, we have no association computed
942 
943  if (m_useHltMenu) {
944  compactPrint = false;
945  } else {
946  return;
947  }
948 
949  edm::LogVerbatim("L1GtTriggerMenuTesterWiki")
950  << "\n---+++ List of algorithm triggers sorted by trigger groups, including !HLT path association \n"
951  << std::endl;
952 
953  edm::LogVerbatim("L1GtTriggerMenuTesterWiki")
954  << "\n The following !HLT menu was used to associate the !HLT path to the L1 algorithm triggers:\n "
955  << std::endl;
956  edm::LogVerbatim("L1GtTriggerMenuTesterWiki") << m_hltTableName
957  << std::endl;
958 
959  // Jet algorithm triggers
960  printTriggerGroup("Jet algorithm triggers", jetAlgoTrig, compactPrint,
962 
963  // EGamma algorithm triggers
964  printTriggerGroup("EGamma algorithm triggers", egammaAlgoTrig,
965  compactPrint, m_printPfsRates);
966 
967  // Energy sum algorithm triggers
968  printTriggerGroup("Energy sum algorithm triggers", esumAlgoTrig,
969  compactPrint, m_printPfsRates);
970 
971  // Muon algorithm triggers
972  printTriggerGroup("Muon algorithm triggers", muonAlgoTrig, compactPrint,
974 
975  // Cross algorithm triggers
976  printTriggerGroup("Cross algorithm triggers", crossAlgoTrig, compactPrint,
978 
979  // Background algorithm triggers
980  printTriggerGroup("Background algorithm triggers", bkgdAlgoTrig,
981  compactPrint, m_printPfsRates);
982 
983 }
const std::string & gtTriggerMenuName() const
void printTriggerGroup(const std::string &trigGroupName, const std::map< std::string, const L1GtAlgorithm * > &trigGroup, const bool compactPrint, const bool printPfsRates)
printing template for a trigger group
bool m_overwriteHtmlFile
input parameters
const std::vector< std::vector< int > > * m_prescaleFactorsTechTrig
Definition: L1GtObject.h:39
std::map< std::string, L1GtCondition * > ConditionMap
map containing the conditions
Definition: L1GtObject.h:36
ConditionMap::const_iterator CItCond
iterators through map containing the conditions
def replace(string, replacements)
bool m_printPfsRates
print prescale factors and rates
std::string m_hltTableName
HLT menu was used to associate the HLT path to the L1 algorithm triggers.
const std::string & gtTriggerMenuImplementation() const
const L1GtTriggerMenu * m_l1GtMenu
const AlgorithmMap * m_algorithmMap
const std::vector< ConditionMap > & gtConditionMap() const
get / set / build the condition maps
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
Definition: L1GtObject.h:38
const std::string & gtScaleDbKey() const
menu associated scale key
int m_indexPfSet
index of prescale factor set to be printed
bool m_useHltMenu
use a HLT menu for L1 seed - HLT path association
const std::string & gtTriggerMenuInterface() const
get / set the trigger menu names
Definition: L1GtObject.h:30
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrig
unsigned int m_numberAlgorithmTriggers
number of algorithm triggers
Definition: L1GtObject.h:37
const AlgorithmMap * m_technicalTriggerMap
std::string m_htmlFile
name of HTML file attached to the wiki page
unsigned int m_numberTechnicalTriggers
number of technical triggers
void L1GtTriggerMenuTester::retrieveL1EventSetup ( const edm::EventSetup evSetup)
private

retrieve all the relevant L1 trigger event setup records

Definition at line 167 of file L1GtTriggerMenuTester.cc.

References edm::EventSetup::get(), L1GtTriggerMenu::gtAlgorithmAliasMap(), L1GtTriggerMenu::gtAlgorithmMap(), L1GtStableParameters::gtNumberPhysTriggers(), L1GtStableParameters::gtNumberTechnicalTriggers(), L1GtPrescaleFactors::gtPrescaleFactors(), L1GtTriggerMenu::gtTechnicalTriggerMap(), L1GtTriggerMask::gtTriggerMask(), m_algorithmAliasMap, m_algorithmMap, m_l1GtMenu, m_l1GtPfAlgo, m_l1GtPfTech, m_l1GtStablePar, m_l1GtTmAlgo, m_l1GtTmTech, m_l1GtTmVetoAlgo, m_l1GtTmVetoTech, m_numberAlgorithmTriggers, m_numberTechnicalTriggers, m_prescaleFactorsAlgoTrig, m_prescaleFactorsTechTrig, m_technicalTriggerMap, m_triggerMaskAlgoTrig, m_triggerMaskTechTrig, m_triggerMaskVetoAlgoTrig, m_triggerMaskVetoTechTrig, and edm::ESHandle< T >::product().

Referenced by beginRun().

167  {
168 
169  // get / update the stable parameters from the EventSetup
170 
172  evSetup.get<L1GtStableParametersRcd> ().get(l1GtStablePar);
173  m_l1GtStablePar = l1GtStablePar.product();
174 
175  // number of algorithm triggers
177 
178  // number of technical triggers
180 
181 // int maxNumberTrigger = std::max(m_numberAlgorithmTriggers,
182 // m_numberTechnicalTriggers);
183 
184 // m_triggerMaskSet.reserve(maxNumberTrigger);
185 // m_prescaleFactorSet.reserve(maxNumberTrigger);
186 
187  // get / update the prescale factors from the EventSetup
188 
189 
191  evSetup.get<L1GtPrescaleFactorsAlgoTrigRcd> ().get(l1GtPfAlgo);
192  m_l1GtPfAlgo = l1GtPfAlgo.product();
193 
195 
197  evSetup.get<L1GtPrescaleFactorsTechTrigRcd> ().get(l1GtPfTech);
198  m_l1GtPfTech = l1GtPfTech.product();
199 
201 
202  // get / update the trigger mask from the EventSetup
203 
205  evSetup.get<L1GtTriggerMaskAlgoTrigRcd> ().get(l1GtTmAlgo);
206  m_l1GtTmAlgo = l1GtTmAlgo.product();
207 
209 
211  evSetup.get<L1GtTriggerMaskTechTrigRcd> ().get(l1GtTmTech);
212  m_l1GtTmTech = l1GtTmTech.product();
213 
215 
216  edm::ESHandle<L1GtTriggerMask> l1GtTmVetoAlgo;
217  evSetup.get<L1GtTriggerMaskVetoAlgoTrigRcd> ().get(l1GtTmVetoAlgo);
218  m_l1GtTmVetoAlgo = l1GtTmVetoAlgo.product();
219 
221 
222  edm::ESHandle<L1GtTriggerMask> l1GtTmVetoTech;
223  evSetup.get<L1GtTriggerMaskVetoTechTrigRcd> ().get(l1GtTmVetoTech);
224  m_l1GtTmVetoTech = l1GtTmVetoTech.product();
225 
227 
228  // get / update the trigger menu from the EventSetup
229 
231  evSetup.get<L1GtTriggerMenuRcd> ().get(l1GtMenu);
232  m_l1GtMenu = l1GtMenu.product();
236 
237 }
const std::vector< std::vector< int > > * m_prescaleFactorsTechTrig
const L1GtStableParameters * m_l1GtStablePar
event setup cached stuff
const std::vector< unsigned int > * m_triggerMaskVetoAlgoTrig
const AlgorithmMap * m_algorithmAliasMap
const L1GtTriggerMenu * m_l1GtMenu
const AlgorithmMap * m_algorithmMap
const L1GtTriggerMask * m_l1GtTmVetoAlgo
const L1GtPrescaleFactors * m_l1GtPfTech
const std::vector< unsigned int > * m_triggerMaskAlgoTrig
unsigned int gtNumberTechnicalTriggers() const
get / set the number of technical triggers
unsigned int gtNumberPhysTriggers() const
get / set the number of physics trigger algorithms
const std::vector< unsigned int > & gtTriggerMask() const
get the trigger mask
const std::vector< unsigned int > * m_triggerMaskVetoTechTrig
const L1GtTriggerMask * m_l1GtTmAlgo
trigger masks & veto masks
const std::vector< std::vector< int > > & gtPrescaleFactors() const
get the prescale factors by reference
const std::vector< std::vector< int > > * m_prescaleFactorsAlgoTrig
const L1GtPrescaleFactors * m_l1GtPfAlgo
prescale factors
unsigned int m_numberAlgorithmTriggers
number of algorithm triggers
T get() const
Definition: EventSetup.h:62
const AlgorithmMap & gtAlgorithmMap() const
get / set the algorithm map (by name)
const AlgorithmMap * m_technicalTriggerMap
const L1GtTriggerMask * m_l1GtTmTech
const L1GtTriggerMask * m_l1GtTmVetoTech
const AlgorithmMap & gtTechnicalTriggerMap() const
get / set the technical trigger map
const AlgorithmMap & gtAlgorithmAliasMap() const
get / set the algorithm map (by alias)
T const * product() const
Definition: ESHandle.h:86
unsigned int m_numberTechnicalTriggers
number of technical triggers
const std::vector< unsigned int > * m_triggerMaskTechTrig

Member Data Documentation

const AlgorithmMap* L1GtTriggerMenuTester::m_algorithmAliasMap
private

Definition at line 166 of file L1GtTriggerMenuTester.h.

Referenced by associateL1SeedsHltPath(), and retrieveL1EventSetup().

const AlgorithmMap* L1GtTriggerMenuTester::m_algorithmMap
private

Definition at line 165 of file L1GtTriggerMenuTester.h.

Referenced by printWiki(), and retrieveL1EventSetup().

std::vector<std::string> L1GtTriggerMenuTester::m_algoTriggerSeedNotInL1Menu
private

vector of algorithm or technical triggers not in the L1 menu

Definition at line 184 of file L1GtTriggerMenuTester.h.

Referenced by associateL1SeedsHltPath(), and beginRun().

HLTConfigProvider L1GtTriggerMenuTester::m_hltConfig
private

The instance of the HLTConfigProvider as a data member.

Definition at line 172 of file L1GtTriggerMenuTester.h.

Referenced by associateL1SeedsHltPath().

std::vector<std::vector<std::string> > L1GtTriggerMenuTester::m_hltPathsForL1AlgorithmTrigger
private

vector of HLT paths seeded by a L1 algorithm trigger - vector index corresponds to the bit number

Definition at line 178 of file L1GtTriggerMenuTester.h.

Referenced by associateL1SeedsHltPath(), and printTriggerGroup().

std::vector<std::vector<std::string> > L1GtTriggerMenuTester::m_hltPathsForL1TechnicalTrigger
private

vector of HLT paths seeded by a L1 technical trigger - vector index corresponds to the bit number

Definition at line 181 of file L1GtTriggerMenuTester.h.

Referenced by associateL1SeedsHltPath().

std::string L1GtTriggerMenuTester::m_hltProcessName
private

process name of HLT process for which to get HLT configuration

Definition at line 116 of file L1GtTriggerMenuTester.h.

Referenced by associateL1SeedsHltPath().

std::string L1GtTriggerMenuTester::m_hltTableName
private

HLT menu was used to associate the HLT path to the L1 algorithm triggers.

Definition at line 175 of file L1GtTriggerMenuTester.h.

Referenced by associateL1SeedsHltPath(), and printWiki().

std::string L1GtTriggerMenuTester::m_htmlFile
private

name of HTML file attached to the wiki page

Definition at line 110 of file L1GtTriggerMenuTester.h.

Referenced by printTriggerGroup(), and printWiki().

int L1GtTriggerMenuTester::m_indexPfSet
private

index of prescale factor set to be printed

Definition at line 126 of file L1GtTriggerMenuTester.h.

Referenced by printWiki().

const L1GtTriggerMenu* L1GtTriggerMenuTester::m_l1GtMenu
private
const L1GtPrescaleFactors* L1GtTriggerMenuTester::m_l1GtPfAlgo
private

prescale factors

Definition at line 142 of file L1GtTriggerMenuTester.h.

Referenced by retrieveL1EventSetup().

const L1GtPrescaleFactors* L1GtTriggerMenuTester::m_l1GtPfTech
private

Definition at line 144 of file L1GtTriggerMenuTester.h.

Referenced by retrieveL1EventSetup().

const L1GtStableParameters* L1GtTriggerMenuTester::m_l1GtStablePar
private

event setup cached stuff

stable parameters

Definition at line 133 of file L1GtTriggerMenuTester.h.

Referenced by retrieveL1EventSetup().

const L1GtTriggerMask* L1GtTriggerMenuTester::m_l1GtTmAlgo
private

trigger masks & veto masks

Definition at line 150 of file L1GtTriggerMenuTester.h.

Referenced by retrieveL1EventSetup().

const L1GtTriggerMask* L1GtTriggerMenuTester::m_l1GtTmTech
private

Definition at line 151 of file L1GtTriggerMenuTester.h.

Referenced by retrieveL1EventSetup().

const L1GtTriggerMask* L1GtTriggerMenuTester::m_l1GtTmVetoAlgo
private

Definition at line 153 of file L1GtTriggerMenuTester.h.

Referenced by retrieveL1EventSetup().

const L1GtTriggerMask* L1GtTriggerMenuTester::m_l1GtTmVetoTech
private

Definition at line 154 of file L1GtTriggerMenuTester.h.

Referenced by retrieveL1EventSetup().

bool L1GtTriggerMenuTester::m_noThrowIncompatibleMenu
private

do not throw an exceptions if a L1 trigger requested as seed is not available in the L1 menu, just report this

Definition at line 120 of file L1GtTriggerMenuTester.h.

Referenced by associateL1SeedsHltPath(), and beginRun().

unsigned int L1GtTriggerMenuTester::m_numberAlgorithmTriggers
private

number of algorithm triggers

Definition at line 136 of file L1GtTriggerMenuTester.h.

Referenced by associateL1SeedsHltPath(), printTriggerGroup(), printWiki(), and retrieveL1EventSetup().

unsigned int L1GtTriggerMenuTester::m_numberTechnicalTriggers
private

number of technical triggers

Definition at line 139 of file L1GtTriggerMenuTester.h.

Referenced by associateL1SeedsHltPath(), printTriggerGroup(), printWiki(), and retrieveL1EventSetup().

bool L1GtTriggerMenuTester::m_overwriteHtmlFile
private

input parameters

overwrite name of the HTML file containing the detailed L1 menu with the name given in m_htmlFile

Definition at line 107 of file L1GtTriggerMenuTester.h.

Referenced by printWiki().

const std::vector<std::vector<int> >* L1GtTriggerMenuTester::m_prescaleFactorsAlgoTrig
private

Definition at line 146 of file L1GtTriggerMenuTester.h.

Referenced by printWiki(), and retrieveL1EventSetup().

const std::vector<std::vector<int> >* L1GtTriggerMenuTester::m_prescaleFactorsTechTrig
private

Definition at line 147 of file L1GtTriggerMenuTester.h.

Referenced by printWiki(), and retrieveL1EventSetup().

bool L1GtTriggerMenuTester::m_printPfsRates
private

print prescale factors and rates

Definition at line 123 of file L1GtTriggerMenuTester.h.

Referenced by printWiki().

const AlgorithmMap* L1GtTriggerMenuTester::m_technicalTriggerMap
private

Definition at line 167 of file L1GtTriggerMenuTester.h.

Referenced by printWiki(), and retrieveL1EventSetup().

std::vector<std::string> L1GtTriggerMenuTester::m_techTriggerSeedNotInL1Menu
private

Definition at line 185 of file L1GtTriggerMenuTester.h.

Referenced by associateL1SeedsHltPath().

const std::vector<unsigned int>* L1GtTriggerMenuTester::m_triggerMaskAlgoTrig
private

Definition at line 156 of file L1GtTriggerMenuTester.h.

Referenced by retrieveL1EventSetup().

const std::vector<unsigned int>* L1GtTriggerMenuTester::m_triggerMaskTechTrig
private

Definition at line 157 of file L1GtTriggerMenuTester.h.

Referenced by retrieveL1EventSetup().

const std::vector<unsigned int>* L1GtTriggerMenuTester::m_triggerMaskVetoAlgoTrig
private

Definition at line 159 of file L1GtTriggerMenuTester.h.

Referenced by retrieveL1EventSetup().

const std::vector<unsigned int>* L1GtTriggerMenuTester::m_triggerMaskVetoTechTrig
private

Definition at line 160 of file L1GtTriggerMenuTester.h.

Referenced by retrieveL1EventSetup().

bool L1GtTriggerMenuTester::m_useHltMenu
private

use a HLT menu for L1 seed - HLT path association

Definition at line 113 of file L1GtTriggerMenuTester.h.

Referenced by beginRun(), printTriggerGroup(), and printWiki().