CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
l1t::TriggerMenuParser Class Reference

#include <TriggerMenuParser.h>

Public Member Functions

const std::vector< std::vector
< CaloTemplate > > & 
corCaloTemplate () const
 
const std::vector< std::vector
< EnergySumTemplate > > & 
corEnergySumTemplate () const
 
const std::vector< std::vector
< MuonTemplate > > & 
corMuonTemplate () const
 
const AlgorithmMapgtAlgorithmAliasMap () const
 get / set the algorithm map (by alias) More...
 
const std::string & gtAlgorithmImplementation () const
 
const AlgorithmMapgtAlgorithmMap () const
 get / set the algorithm map (by name) More...
 
const std::vector< ConditionMap > & gtConditionMap () const
 get / set / build the condition maps More...
 
const unsigned int gtNumberConditionChips () const
 get / set the number of condition chips in GTL More...
 
const unsigned int gtNumberPhysTriggers () const
 get / set the number of physics trigger algorithms More...
 
std::vector< int > gtOrderConditionChip () const
 
const unsigned int gtPinsOnConditionChip () const
 get / set the number of pins on the GTL condition chips More...
 
const std::string & gtScaleDbKey () const
 menu associated scale key More...
 
const L1TGlobalScalesgtScales () const
 menu associated scales More...
 
const std::string & gtTriggerMenuAuthor () const
 
const std::string & gtTriggerMenuDate () const
 
const std::string & gtTriggerMenuDescription () const
 
const std::string & gtTriggerMenuImplementation () const
 
const std::string & gtTriggerMenuInterface () const
 get / set the trigger menu names More...
 
const std::string & gtTriggerMenuInterfaceAuthor () const
 
const std::string & gtTriggerMenuInterfaceDate () const
 get / set the XML parser creation date, author, description for menu interface, menu More...
 
const std::string & gtTriggerMenuInterfaceDescription () const
 
const std::string & gtTriggerMenuName () const
 
void parseCondFormats (const L1TUtmTriggerMenu *utmMenu)
 
void setCorCaloTemplate (const std::vector< std::vector< CaloTemplate > > &)
 
void setCorEnergySumTemplate (const std::vector< std::vector< EnergySumTemplate > > &)
 
void setCorMuonTemplate (const std::vector< std::vector< MuonTemplate > > &)
 
void setGtAlgorithmAliasMap (const AlgorithmMap &)
 
void setGtAlgorithmImplementation (const std::string &)
 
void setGtAlgorithmMap (const AlgorithmMap &)
 
void setGtConditionMap (const std::vector< ConditionMap > &)
 
void setGtNumberConditionChips (const unsigned int &)
 
void setGtNumberPhysTriggers (const unsigned int &)
 
void setGtOrderConditionChip (const std::vector< int > &)
 
void setGtPinsOnConditionChip (const unsigned int &)
 
void setGtScaleDbKey (const std::string &)
 
void setGtTriggerMenuAuthor (const std::string &)
 
void setGtTriggerMenuDate (const std::string &)
 
void setGtTriggerMenuDescription (const std::string &)
 
void setGtTriggerMenuImplementation (const std::string &)
 
void setGtTriggerMenuInterface (const std::string &)
 
void setGtTriggerMenuInterfaceAuthor (const std::string &)
 
void setGtTriggerMenuInterfaceDate (const std::string &)
 
void setGtTriggerMenuInterfaceDescription (const std::string &)
 
void setGtTriggerMenuName (const std::string &)
 
void setVecCaloTemplate (const std::vector< std::vector< CaloTemplate > > &)
 
void setVecCorrelationTemplate (const std::vector< std::vector< CorrelationTemplate > > &)
 
void setVecEnergySumTemplate (const std::vector< std::vector< EnergySumTemplate > > &)
 
void setVecExternalTemplate (const std::vector< std::vector< ExternalTemplate > > &)
 
void setVecMuonTemplate (const std::vector< std::vector< MuonTemplate > > &)
 
 TriggerMenuParser ()
 
const std::vector< std::vector
< CaloTemplate > > & 
vecCaloTemplate () const
 
const std::vector< std::vector
< CorrelationTemplate > > & 
vecCorrelationTemplate () const
 
const std::vector< std::vector
< EnergySumTemplate > > & 
vecEnergySumTemplate () const
 
const std::vector< std::vector
< ExternalTemplate > > & 
vecExternalTemplate () const
 
const std::vector< std::vector
< MuonTemplate > > & 
vecMuonTemplate () const
 get / set the vectors containing the conditions More...
 
virtual ~TriggerMenuParser ()
 destructor More...
 

Private Member Functions

void clearMaps ()
 
bool insertAlgorithmIntoMap (const L1GtAlgorithm &alg)
 insert an algorithm into algorithm map More...
 
bool insertConditionIntoMap (GtCondition &cond, const int chipNr)
 
int l1t2int (l1t::RelativeBx)
 
template<typename T >
std::string l1t2string (T)
 
std::string l1tDateTime2string (l1t::DateTime)
 
int l1tstr2int (const std::string data)
 
bool parseAlgorithm (tmeventsetup::esAlgorithm algorithm, unsigned int chipNr=0)
 parse all algorithms More...
 
bool parseCalo (tmeventsetup::esCondition condCalo, unsigned int chipNr=0, const bool corrFlag=false)
 parse a calorimeter condition More...
 
bool parseCaloCorr (const tmeventsetup::esObject *corrCalo, unsigned int chipNr=0)
 
bool parseCorrelation (tmeventsetup::esCondition corrCond, unsigned int chipNr=0)
 parse a correlation condition More...
 
bool parseEnergySum (tmeventsetup::esCondition condEnergySums, unsigned int chipNr=0, const bool corrFlag=false)
 parse an "energy sum" condition More...
 
bool parseEnergySumCorr (const tmeventsetup::esObject *corrESum, unsigned int chipNr=0)
 
bool parseExternal (tmeventsetup::esCondition condExt, unsigned int chipNr=0)
 
bool parseMuon (tmeventsetup::esCondition condMu, unsigned int chipNr=0, const bool corrFlag=false)
 parse a muon condition More...
 
bool parseMuonCorr (const tmeventsetup::esObject *condMu, unsigned int chipNr=0)
 
bool parseScales (std::map< std::string, tmeventsetup::esScale > scaleMap)
 parse scales More...
 

Private Attributes

AlgorithmMap m_algorithmAliasMap
 map containing the physics algorithms (by alias) More...
 
std::string m_algorithmImplementation
 
AlgorithmMap m_algorithmMap
 map containing the physics algorithms (by name) More...
 
std::vector< ConditionMapm_conditionMap
 map containing the conditions (per condition chip) - transient More...
 
std::vector< std::vector
< CaloTemplate > > 
m_corCaloTemplate
 
std::vector< std::vector
< EnergySumTemplate > > 
m_corEnergySumTemplate
 
std::vector< std::vector
< MuonTemplate > > 
m_corMuonTemplate
 
L1TGlobalScales m_gtScales
 
unsigned int m_numberConditionChips
 hardware limits More...
 
unsigned int m_numberPhysTriggers
 number of physics trigger algorithms More...
 
std::vector< int > m_orderConditionChip
 
unsigned int m_pinsOnConditionChip
 number of pins on the GTL condition chips More...
 
std::string m_scaleDbKey
 menu associated scale key More...
 
std::string m_triggerMenuAuthor
 
std::string m_triggerMenuDate
 
std::string m_triggerMenuDescription
 
std::string m_triggerMenuImplementation
 
std::string m_triggerMenuInterface
 menu names More...
 
std::string m_triggerMenuInterfaceAuthor
 
std::string m_triggerMenuInterfaceDate
 number of technical triggers More...
 
std::string m_triggerMenuInterfaceDescription
 
std::string m_triggerMenuName
 
std::vector< std::vector
< CaloTemplate > > 
m_vecCaloTemplate
 
std::vector< std::vector
< CorrelationTemplate > > 
m_vecCorrelationTemplate
 
std::vector< std::vector
< EnergySumTemplate > > 
m_vecEnergySumTemplate
 
std::vector< std::vector
< ExternalTemplate > > 
m_vecExternalTemplate
 
std::vector< std::vector
< MuonTemplate > > 
m_vecMuonTemplate
 

Detailed Description

Definition at line 54 of file TriggerMenuParser.h.

Constructor & Destructor Documentation

TriggerMenuParser::TriggerMenuParser ( )

constructor empty

Definition at line 48 of file TriggerMenuParser.cc.

48  :
49  m_triggerMenuInterface("NULL"),
51 
52 {
53 
54  // menu names, scale key initialized to NULL due to ORACLE treatment of strings
55 
56  // empty
57 
58 }
std::string m_triggerMenuImplementation
std::string m_triggerMenuInterface
menu names
std::string m_scaleDbKey
menu associated scale key
TriggerMenuParser::~TriggerMenuParser ( )
virtual

destructor

Definition at line 61 of file TriggerMenuParser.cc.

61  {
62 
63  clearMaps();
64 
65 }

Member Function Documentation

void TriggerMenuParser::clearMaps ( )
private

clearMaps - delete all conditions and algorithms in the maps and clear the maps.

Definition at line 370 of file TriggerMenuParser.cc.

370  {
371 
372  // loop over condition maps (one map per condition chip)
373  // then loop over conditions in the map
374  for (std::vector<ConditionMap>::iterator itCondOnChip = m_conditionMap.begin(); itCondOnChip
375  != m_conditionMap.end(); itCondOnChip++) {
376 
377  // the conditions in the maps are deleted in L1uGtTriggerMenu, not here
378 
379  itCondOnChip->clear();
380 
381  }
382 
383  // the algorithms in the maps are deleted in L1uGtTriggerMenu, not here
384  m_algorithmMap.clear();
385 
386 }
AlgorithmMap m_algorithmMap
map containing the physics algorithms (by name)
std::vector< ConditionMap > m_conditionMap
map containing the conditions (per condition chip) - transient
const std::vector<std::vector<CaloTemplate> >& l1t::TriggerMenuParser::corCaloTemplate ( ) const
inline

Definition at line 192 of file TriggerMenuParser.h.

References m_corCaloTemplate.

Referenced by L1TGlobalProducer::produce().

192  {
193  return m_corCaloTemplate;
194  }
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate
const std::vector<std::vector<EnergySumTemplate> >& l1t::TriggerMenuParser::corEnergySumTemplate ( ) const
inline

Definition at line 199 of file TriggerMenuParser.h.

References m_corEnergySumTemplate.

Referenced by L1TGlobalProducer::produce().

199  {
200 
201  return m_corEnergySumTemplate;
202  }
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
const std::vector<std::vector<MuonTemplate> >& l1t::TriggerMenuParser::corMuonTemplate ( ) const
inline

Definition at line 185 of file TriggerMenuParser.h.

References m_corMuonTemplate.

Referenced by L1TGlobalProducer::produce().

185  {
186  return m_corMuonTemplate;
187  }
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate
const AlgorithmMap& l1t::TriggerMenuParser::gtAlgorithmAliasMap ( ) const
inline

get / set the algorithm map (by alias)

Definition at line 215 of file TriggerMenuParser.h.

References m_algorithmAliasMap.

Referenced by L1TGlobalProducer::produce().

215  {
216  return m_algorithmAliasMap;
217  }
AlgorithmMap m_algorithmAliasMap
map containing the physics algorithms (by alias)
const std::string& l1t::TriggerMenuParser::gtAlgorithmImplementation ( ) const
inline

Definition at line 269 of file TriggerMenuParser.h.

References m_algorithmImplementation.

269  {
271  }
std::string m_algorithmImplementation
const AlgorithmMap& l1t::TriggerMenuParser::gtAlgorithmMap ( ) const
inline

get / set the algorithm map (by name)

Definition at line 208 of file TriggerMenuParser.h.

References m_algorithmMap.

Referenced by L1TGlobalProducer::produce().

208  {
209  return m_algorithmMap;
210  }
AlgorithmMap m_algorithmMap
map containing the physics algorithms (by name)
const std::vector<ConditionMap>& l1t::TriggerMenuParser::gtConditionMap ( ) const
inline

get / set / build the condition maps

Definition at line 102 of file TriggerMenuParser.h.

References m_conditionMap.

102  {
103  return m_conditionMap;
104  }
std::vector< ConditionMap > m_conditionMap
map containing the conditions (per condition chip) - transient
const unsigned int l1t::TriggerMenuParser::gtNumberConditionChips ( ) const
inline

get / set the number of condition chips in GTL

Definition at line 69 of file TriggerMenuParser.h.

References m_numberConditionChips.

69  {
71  }
unsigned int m_numberConditionChips
hardware limits
const unsigned int l1t::TriggerMenuParser::gtNumberPhysTriggers ( ) const
inline

get / set the number of physics trigger algorithms

Definition at line 91 of file TriggerMenuParser.h.

References m_numberPhysTriggers.

91  {
92  return m_numberPhysTriggers;
93  }
unsigned int m_numberPhysTriggers
number of physics trigger algorithms
std::vector<int> l1t::TriggerMenuParser::gtOrderConditionChip ( ) const
inline

get / set the correspondence "condition chip - GTL algorithm word" in the hardware

Definition at line 84 of file TriggerMenuParser.h.

References m_orderConditionChip.

84  {
85  return m_orderConditionChip;
86  }
std::vector< int > m_orderConditionChip
const unsigned int l1t::TriggerMenuParser::gtPinsOnConditionChip ( ) const
inline

get / set the number of pins on the GTL condition chips

Definition at line 76 of file TriggerMenuParser.h.

References m_pinsOnConditionChip.

76  {
77  return m_pinsOnConditionChip;
78  }
unsigned int m_pinsOnConditionChip
number of pins on the GTL condition chips
const std::string& l1t::TriggerMenuParser::gtScaleDbKey ( ) const
inline

menu associated scale key

Definition at line 130 of file TriggerMenuParser.h.

References m_scaleDbKey.

Referenced by L1TGlobalProducer::produce().

130  {
131  return m_scaleDbKey;
132  }
std::string m_scaleDbKey
menu associated scale key
const L1TGlobalScales& l1t::TriggerMenuParser::gtScales ( ) const
inline

menu associated scales

Definition at line 135 of file TriggerMenuParser.h.

References m_gtScales.

Referenced by L1TGlobalProducer::produce().

135  {
136  return m_gtScales;
137  }
L1TGlobalScales m_gtScales
const std::string& l1t::TriggerMenuParser::gtTriggerMenuAuthor ( ) const
inline

Definition at line 256 of file TriggerMenuParser.h.

References m_triggerMenuAuthor.

256  {
257  return m_triggerMenuAuthor;
258  }
const std::string& l1t::TriggerMenuParser::gtTriggerMenuDate ( ) const
inline

Definition at line 250 of file TriggerMenuParser.h.

References m_triggerMenuDate.

250  {
251  return m_triggerMenuDate;
252  }
const std::string& l1t::TriggerMenuParser::gtTriggerMenuDescription ( ) const
inline

Definition at line 262 of file TriggerMenuParser.h.

References m_triggerMenuDescription.

262  {
264  }
std::string m_triggerMenuDescription
const std::string& l1t::TriggerMenuParser::gtTriggerMenuImplementation ( ) const
inline

Definition at line 123 of file TriggerMenuParser.h.

References m_triggerMenuImplementation.

Referenced by L1TGlobalProducer::produce().

123  {
125  }
std::string m_triggerMenuImplementation
const std::string& l1t::TriggerMenuParser::gtTriggerMenuInterface ( ) const
inline

get / set the trigger menu names

Definition at line 109 of file TriggerMenuParser.h.

References m_triggerMenuInterface.

Referenced by L1TGlobalProducer::produce().

109  {
110  return m_triggerMenuInterface;
111  }
std::string m_triggerMenuInterface
menu names
const std::string& l1t::TriggerMenuParser::gtTriggerMenuInterfaceAuthor ( ) const
inline

Definition at line 236 of file TriggerMenuParser.h.

References m_triggerMenuInterfaceAuthor.

236  {
238  }
std::string m_triggerMenuInterfaceAuthor
const std::string& l1t::TriggerMenuParser::gtTriggerMenuInterfaceDate ( ) const
inline

get / set the XML parser creation date, author, description for menu interface, menu

Definition at line 230 of file TriggerMenuParser.h.

References m_triggerMenuInterfaceDate.

230  {
232  }
std::string m_triggerMenuInterfaceDate
number of technical triggers
const std::string& l1t::TriggerMenuParser::gtTriggerMenuInterfaceDescription ( ) const
inline

Definition at line 242 of file TriggerMenuParser.h.

References m_triggerMenuInterfaceDescription.

242  {
244  }
std::string m_triggerMenuInterfaceDescription
const std::string& l1t::TriggerMenuParser::gtTriggerMenuName ( ) const
inline

Definition at line 116 of file TriggerMenuParser.h.

References m_triggerMenuName.

Referenced by L1TGlobalProducer::produce().

116  {
117  return m_triggerMenuName;
118  }
bool TriggerMenuParser::insertAlgorithmIntoMap ( const L1GtAlgorithm alg)
private

insert an algorithm into algorithm map

Definition at line 414 of file TriggerMenuParser.cc.

References L1GtAlgorithm::algoAlias(), L1GtAlgorithm::algoBitNumber(), L1GtAlgorithm::algoChipNumber(), L1GtAlgorithm::algoName(), L1GtAlgorithm::algoOutputPin(), LogTrace, and AlCaHLTBitMon_QueryRunRegistry::string.

414  {
415 
416  std::string algName = alg.algoName();
417  std::string algAlias = alg.algoAlias();
418  //LogTrace("TriggerMenuParser")
419  //<< " Trying to insert algorithm \"" << algName << "\" in the algorithm map." ;
420 
421  // no algorithm name has to appear twice!
422  if (m_algorithmMap.count(algName) != 0) {
423  LogTrace("TriggerMenuParser") << " Algorithm \"" << algName
424  << "\"already exists in the algorithm map- not inserted!" << std::endl;
425  return false;
426  }
427 
428  if (m_algorithmAliasMap.count(algAlias) != 0) {
429  LogTrace("TriggerMenuParser") << " Algorithm alias \"" << algAlias
430  << "\"already exists in the algorithm alias map- not inserted!" << std::endl;
431  return false;
432  }
433 
434  // bit number less than zero or greater than maximum number of algorithms
435  int bitNumber = alg.algoBitNumber();
436  if ((bitNumber < 0) || (bitNumber >= static_cast<int>(m_numberPhysTriggers))) {
437  LogTrace("TriggerMenuParser") << " Bit number " << bitNumber
438  << " outside allowed range [0, " << m_numberPhysTriggers
439  << ") - algorithm not inserted!" << std::endl;
440  return false;
441  }
442 
443  // maximum number of algorithms
444  if (m_algorithmMap.size() >= m_numberPhysTriggers) {
445  LogTrace("TriggerMenuParser") << " More than maximum allowed "
446  << m_numberPhysTriggers << " algorithms in the algorithm map - not inserted!"
447  << std::endl;
448  return false;
449  }
450 
451  // chip number outside allowed values
452  int chipNr = alg.algoChipNumber(static_cast<int>(m_numberConditionChips),
453  static_cast<int>(m_pinsOnConditionChip), m_orderConditionChip);
454 
455  if ((chipNr < 0) || (chipNr > static_cast<int>(m_numberConditionChips))) {
456  LogTrace("TriggerMenuParser") << " Chip number " << chipNr
457  << " outside allowed range [0, " << m_numberConditionChips
458  << ") - algorithm not inserted!" << std::endl;
459  return false;
460  }
461 
462  // output pin outside allowed values
463  int outputPin = alg.algoOutputPin(static_cast<int>(m_numberConditionChips),
464  static_cast<int>(m_pinsOnConditionChip), m_orderConditionChip);
465 
466  if ((outputPin < 0) || (outputPin > static_cast<int>(m_pinsOnConditionChip))) {
467  LogTrace("TriggerMenuParser") << " Output pin " << outputPin
468  << " outside allowed range [0, " << m_pinsOnConditionChip
469  << "] - algorithm not inserted!" << std::endl;
470  return false;
471  }
472 
473  // no two algorithms on the same chip can have the same output pin
474  for (CItAlgo itAlgo = m_algorithmMap.begin(); itAlgo != m_algorithmMap.end(); itAlgo++) {
475 
476  int iPin = (itAlgo->second).algoOutputPin( static_cast<int>(m_numberConditionChips),
477  static_cast<int>(m_pinsOnConditionChip), m_orderConditionChip);
478  std::string iName = itAlgo->first;
479  int iChip = (itAlgo->second).algoChipNumber(static_cast<int>(m_numberConditionChips),
480  static_cast<int>(m_pinsOnConditionChip), m_orderConditionChip);
481 
482  if ( (outputPin == iPin) && (chipNr == iChip)) {
483  LogTrace("TriggerMenuParser") << " Output pin " << outputPin
484  << " is the same as for algorithm " << iName
485  << "\n from the same chip number " << chipNr << " - algorithm not inserted!"
486  << std::endl;
487  return false;
488  }
489 
490  }
491 
492  // insert algorithm
493  m_algorithmMap[algName] = alg;
494  m_algorithmAliasMap[algAlias] = alg;
495 
496  //LogTrace("TriggerMenuParser")
497  //<< " OK - algorithm inserted!"
498  //<< std::endl;
499 
500  return true;
501 
502 }
unsigned int m_numberPhysTriggers
number of physics trigger algorithms
unsigned int m_numberConditionChips
hardware limits
const std::string algoName() const
get / set algorithm name
Definition: L1GtAlgorithm.h:56
AlgorithmMap m_algorithmMap
map containing the physics algorithms (by name)
std::string const & algoAlias() const
get / set algorithm alias
Definition: L1GtAlgorithm.h:67
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
const int algoOutputPin(const int numberConditionChips, const int pinsOnConditionChip, const std::vector< int > &orderConditionChip) const
get the output pin on the condition chip for the algorithm
int algoBitNumber() const
get / set algorithm bit number
Definition: L1GtAlgorithm.h:94
#define LogTrace(id)
unsigned int m_pinsOnConditionChip
number of pins on the GTL condition chips
std::vector< int > m_orderConditionChip
const int algoChipNumber() const
get / set algorithm bit number
AlgorithmMap m_algorithmAliasMap
map containing the physics algorithms (by alias)
bool TriggerMenuParser::insertConditionIntoMap ( GtCondition cond,
const int  chipNr 
)
private

insertConditionIntoMap - safe insert of condition into condition map. if the condition name already exists, do not insert it and return false

Definition at line 390 of file TriggerMenuParser.cc.

References GtCondition::condName(), KineDebug3::count(), LogTrace, and AlCaHLTBitMon_QueryRunRegistry::string.

390  {
391 
392  std::string cName = cond.condName();
393  LogTrace("TriggerMenuParser")
394  << " Trying to insert condition \"" << cName << "\" in the condition map." ;
395 
396  // no condition name has to appear twice!
397  if ((m_conditionMap[chipNr]).count(cName) != 0) {
398  LogTrace("TriggerMenuParser") << " Condition " << cName
399  << " already exists - not inserted!" << std::endl;
400  return false;
401  }
402 
403  (m_conditionMap[chipNr])[cName] = &cond;
404  LogTrace("TriggerMenuParser")
405  << " OK - condition inserted!"
406  << std::endl;
407 
408 
409  return true;
410 
411 }
std::vector< ConditionMap > m_conditionMap
map containing the conditions (per condition chip) - transient
#define LogTrace(id)
const std::string & condName() const
get / set condition name
Definition: GtCondition.h:57
int TriggerMenuParser::l1t2int ( l1t::RelativeBx  data)
private

Definition at line 518 of file TriggerMenuParser.cc.

References data, contentValuesCheck::ss, and relativeConstraints::value.

518  { //l1t::RelativeBx
519  std::stringstream ss;
520  ss << data;
521  int value;
522  ss >> value;
523  return value;
524 }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
template<typename T >
std::string TriggerMenuParser::l1t2string ( T  data)
private

Definition at line 505 of file TriggerMenuParser.cc.

References data, and contentValuesCheck::ss.

505  {
506  std::stringstream ss;
507  ss << data;
508  return ss.str();
509 }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
std::string TriggerMenuParser::l1tDateTime2string ( l1t::DateTime  date)
private

Definition at line 510 of file TriggerMenuParser.cc.

References contentValuesCheck::ss.

510  {
511  std::stringstream ss;
512  ss << std::setfill('0');
513  ss << std::setw(4) << date.year() << "-" << std::setw(2) << date.month() << "-" << std::setw(2) << date.day() << "T";
514  ss << std::setw(2) << date.hours() << ":" << std::setw(2) << date.minutes() << ":" << std::setw(2) << date.seconds();
515  //ss << data;
516  return ss.str();
517 }
int TriggerMenuParser::l1tstr2int ( const std::string  data)
private

Definition at line 525 of file TriggerMenuParser.cc.

References data, contentValuesCheck::ss, and relativeConstraints::value.

525  {
526  std::stringstream ss;
527  ss << data;
528  int value;
529  ss >> value;
530  return value;
531 }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
bool TriggerMenuParser::parseAlgorithm ( tmeventsetup::esAlgorithm  algorithm,
unsigned int  chipNr = 0 
)
private

parse all algorithms

workAlgorithm - parse the algorithm and insert it into algorithm map.

Parameters
nodeThe corresponding node to the algorithm.
nameThe name of the algorithm.
chipNrThe number of the chip the conditions for that algorithm are located on.
Returns
"true" on success, "false" if an error occurred.

Definition at line 2485 of file TriggerMenuParser.cc.

References edm::isDebugEnabled(), LogDebug, LogTrace, L1GtAlgorithm::print(), L1GtAlgorithm::setAlgoAlias(), L1GtAlgorithm::setAlgoChipNumber(), and AlCaHLTBitMon_QueryRunRegistry::string.

2486  {
2487 
2488 
2489  using namespace tmeventsetup;
2490  //using namespace Algorithm;
2491 
2492 
2493  // get alias
2494  std::string algAlias = algorithm.getName();
2495  std::string algName = algorithm.getName();
2496 
2497  if (algAlias == "") {
2498  algAlias = algName;
2499  LogDebug("TriggerMenuParser")
2500  << "\n No alias defined for algorithm. Alias set to algorithm name."
2501  << "\n Algorithm name: " << algName << "\n Algorithm alias: " << algAlias
2502  << std::endl;
2503  } else {
2504  //LogDebug("TriggerMenuParser")
2505  LogDebug("TriggerMenuParser") << "\n Alias defined for algorithm."
2506  << "\n Algorithm name: " << algName << "\n Algorithm alias: " << algAlias
2507  << std::endl;
2508  }
2509 
2510  // get the logical expression
2511  std::string logExpression = algorithm.getExpressionInCondition();
2512 
2513  LogDebug("TriggerMenuParser")
2514  << " Logical expression: " << logExpression
2515  << " Chip number: " << chipNr
2516  << std::endl;
2517 
2518  // determine output pin
2519  int outputPin = algorithm.getIndex();
2520 
2521 
2522  //LogTrace("TriggerMenuParser")
2523  LogDebug("TriggerMenuParser") << " Output pin: " << outputPin
2524  << std::endl;
2525 
2526 
2527  // compute the bit number from chip number, output pin and order of the chips
2528  // pin numbering start with 1, bit numbers with 0
2529  int bitNumber = outputPin;// + (m_orderConditionChip[chipNr] -1)*m_pinsOnConditionChip -1;
2530 
2531  //LogTrace("TriggerMenuParser")
2532  LogDebug("TriggerMenuParser") << " Bit number: " << bitNumber
2533  << std::endl;
2534 
2535  // create a new algorithm and insert it into algorithm map
2536  L1GtAlgorithm alg(algName, logExpression, bitNumber);
2537  alg.setAlgoChipNumber(static_cast<int>(chipNr));
2538  alg.setAlgoAlias(algAlias);
2539 
2540  if (edm::isDebugEnabled() ) {
2541 
2542  std::ostringstream myCoutStream;
2543  alg.print(myCoutStream);
2544  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
2545 
2546  }
2547 
2548  // insert algorithm into the map
2549  if ( !insertAlgorithmIntoMap(alg)) {
2550  return false;
2551  }
2552 
2553  return true;
2554 
2555 }
#define LogDebug(id)
bool isDebugEnabled()
#define LogTrace(id)
bool insertAlgorithmIntoMap(const L1GtAlgorithm &alg)
insert an algorithm into algorithm map
bool TriggerMenuParser::parseCalo ( tmeventsetup::esCondition  condCalo,
unsigned int  chipNr = 0,
const bool  corrFlag = false 
)
private

parse a calorimeter condition

parseCalo Parse a calo condition and insert an entry to the conditions map

Parameters
nodeThe corresponding node.
nameThe name of the condition.
chipNrThe number of the chip this condition is located.
Returns
"true" if succeeded, "false" if an error occurred.

Definition at line 1151 of file TriggerMenuParser.cc.

References CenJet, GOODCOLL_filter_cfg::cut, hpstanc_transforms::cuts, TauDecayModes::dec, reco::tau::disc::Eta(), ora::GE, edm::isDebugEnabled(), findQualityFiles::jj, GetRecoTauVFromDQM_MC_cff::kk, LogDebug, LogTrace, mergeVDriftHistosByStation::name, NoIsoEG, colinearityKinematic::Phi, CaloTemplate::print(), GtCondition::setCondChipNr(), GtCondition::setCondGEq(), CaloTemplate::setConditionParameter(), GtCondition::setCondRelativeBx(), GtCondition::setCondType(), GtCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, TauJet, l1t::Type1s, l1t::Type2s, l1t::Type3s, l1t::Type4s, and l1t::TypeNull.

1152  {
1153 
1154 
1155 // XERCES_CPP_NAMESPACE_USE
1156  using namespace tmeventsetup;
1157 
1158  // get condition, particle name and type name
1159 
1160  std::string condition = "calo";
1161  std::string particle = "test-fix" ;
1162  std::string type = l1t2string( condCalo.getType() );
1163  std::string name = l1t2string( condCalo.getName() );
1164 
1165  LogDebug("TriggerMenuParser")
1166  << "\n ****************************************** "
1167  << "\n (in parseCalo) "
1168  << "\n condition = " << condition
1169  << "\n particle = " << particle
1170  << "\n type = " << type
1171  << "\n name = " << name
1172  << std::endl;
1173 
1174 
1175  GtConditionType cType = l1t::TypeNull;
1176 
1177  // determine object type type
1178  // BLW TO DO: Can this object type wait and be done later in the parsing. Or done differently completely..
1179  L1GtObject caloObjType;
1180  int nrObj = -1;
1181 
1182  if (condCalo.getType() == esConditionType::SingleEgamma) {
1183  caloObjType = NoIsoEG;
1184  type = "1_s";
1185  cType= l1t::Type1s;
1186  nrObj = 1;
1187  } else if (condCalo.getType() == esConditionType::DoubleEgamma) {
1188  caloObjType = NoIsoEG;
1189  type = "2_s";
1190  cType= l1t::Type2s;
1191  nrObj = 2;
1192  } else if (condCalo.getType() == esConditionType::TripleEgamma) {
1193  caloObjType = NoIsoEG;
1194  cType= l1t::Type3s;
1195  type = "3";
1196  nrObj = 3;
1197  } else if (condCalo.getType() == esConditionType::QuadEgamma) {
1198  caloObjType = NoIsoEG;
1199  cType= l1t::Type4s;
1200  type = "4";
1201  nrObj = 4;
1202  } else if (condCalo.getType() == esConditionType::SingleJet) {
1203  caloObjType = CenJet;
1204  cType= l1t::Type1s;
1205  type = "1_s";
1206  nrObj = 1;
1207  } else if (condCalo.getType() == esConditionType::DoubleJet) {
1208  caloObjType = CenJet;
1209  cType= l1t::Type2s;
1210  type = "2_s";
1211  nrObj = 2;
1212  } else if (condCalo.getType() == esConditionType::TripleJet) {
1213  caloObjType = CenJet;
1214  cType= l1t::Type3s;
1215  type = "3";
1216  nrObj = 3;
1217  } else if (condCalo.getType() == esConditionType::QuadJet) {
1218  caloObjType = CenJet;
1219  cType= l1t::Type4s;
1220  type = "4";
1221  nrObj = 4;
1222  } else if (condCalo.getType() == esConditionType::SingleTau) {
1223  caloObjType = TauJet;
1224  cType= l1t::Type1s;
1225  type = "1_s";
1226  nrObj = 1;
1227  } else if (condCalo.getType() == esConditionType::DoubleTau) {
1228  caloObjType = TauJet;
1229  cType= l1t::Type2s;
1230  type = "2_s";
1231  nrObj = 2;
1232  } else if (condCalo.getType() == esConditionType::TripleTau) {
1233  caloObjType = TauJet;
1234  cType= l1t::Type3s;
1235  type = "3";
1236  nrObj = 3;
1237  } else if (condCalo.getType() == esConditionType::QuadTau) {
1238  caloObjType = TauJet;
1239  cType= l1t::Type4s;
1240  type = "4";
1241  nrObj = 4;
1242  } else {
1243  edm::LogError("TriggerMenuParser") << "Wrong particle for calo-condition ("
1244  << particle << ")" << std::endl;
1245  return false;
1246  }
1247 
1248 // std::string str_etComparison = l1t2string( condCalo.comparison_operator() );
1249 
1250  if (nrObj < 0) {
1251  edm::LogError("TriggerMenuParser") << "Unknown type for calo-condition (" << type
1252  << ")" << "\nCan not determine number of trigger objects. " << std::endl;
1253  return false;
1254  }
1255 
1256  // get values
1257 
1258  // temporary storage of the parameters
1259  std::vector<CaloTemplate::ObjectParameter> objParameter(nrObj);
1260 
1261  //BLW TO DO: Can this be dropped?
1262  CaloTemplate::CorrelationParameter corrParameter;
1263 
1264  // need at least one value for deltaPhiRange
1265  std::vector<boost::uint64_t> tmpValues((nrObj > 1) ? nrObj : 1);
1266  tmpValues.reserve( nrObj );
1267 
1268 
1269  if( int(condCalo.getObjects().size())!=nrObj ){
1270  edm::LogError("TriggerMenuParser") << " condCalo objects: nrObj = " << nrObj
1271  << "condCalo.getObjects().size() = "
1272  << condCalo.getObjects().size()
1273  << std::endl;
1274  return false;
1275  }
1276 
1277 
1278 // std::string str_condCalo = "";
1279 // boost::uint64_t tempUIntH, tempUIntL;
1280 // boost::uint64_t dst;
1281  int cnt = 0;
1282 
1283 // BLW TO DO: These needs to the added to the object rather than the whole condition.
1284  int relativeBx = 0;
1285  bool gEq = false;
1286 
1287 // Loop over objects and extract the cuts on the objects
1288  const std::vector<esObject>& objects = condCalo.getObjects();
1289  for (size_t jj = 0; jj < objects.size(); jj++) {
1290 
1291  const esObject object = objects.at(jj);
1292  gEq = (object.getComparisonOperator() == esComparisonOperator::GE);
1293 
1294 // BLW TO DO: This needs to be added to the Object Parameters
1295  relativeBx = object.getBxOffset();
1296 
1297 // Loop over the cuts for this object
1298  int upperThresholdInd = -1;
1299  int lowerThresholdInd = 0;
1300  int cntEta = 0;
1301  unsigned int etaWindow1Lower=-1, etaWindow1Upper=-1, etaWindow2Lower=-1, etaWindow2Upper=-1;
1302  int cntPhi = 0;
1303  unsigned int phiWindow1Lower=-1, phiWindow1Upper=-1, phiWindow2Lower=-1, phiWindow2Upper=-1;
1304  int isolationLUT = 0xF; //default is to ignore isolation unless specified.
1305  int qualityLUT = 0xF; //default is to ignore quality unless specified.
1306 
1307 
1308  const std::vector<esCut>& cuts = object.getCuts();
1309  for (size_t kk = 0; kk < cuts.size(); kk++)
1310  {
1311  const esCut cut = cuts.at(kk);
1312 
1313  switch(cut.getCutType()){
1314  case esCutType::Threshold:
1315  lowerThresholdInd = cut.getMinimum().index;
1316  upperThresholdInd = cut.getMaximum().index;
1317  break;
1318  case esCutType::Eta: {
1319 
1320  if(cntEta == 0) {
1321  etaWindow1Lower = cut.getMinimum().index;
1322  etaWindow1Upper = cut.getMaximum().index;
1323  } else if(cntEta == 1) {
1324  etaWindow2Lower = cut.getMinimum().index;
1325  etaWindow2Upper = cut.getMaximum().index;
1326  } else {
1327  edm::LogError("TriggerMenuParser") << "Too Many Eta Cuts for calo-condition ("
1328  << particle << ")" << std::endl;
1329  return false;
1330  }
1331  cntEta++;
1332 
1333  } break;
1334 
1335  case esCutType::Phi: {
1336 
1337  if(cntPhi == 0) {
1338  phiWindow1Lower = cut.getMinimum().index;
1339  phiWindow1Upper = cut.getMaximum().index;
1340  } else if(cntPhi == 1) {
1341  phiWindow2Lower = cut.getMinimum().index;
1342  phiWindow2Upper = cut.getMaximum().index;
1343  } else {
1344  edm::LogError("TriggerMenuParser") << "Too Many Phi Cuts for calo-condition ("
1345  << particle << ")" << std::endl;
1346  return false;
1347  }
1348  cntPhi++;
1349 
1350  }break;
1351 
1352  case esCutType::Charge: {
1353 
1354  edm::LogError("TriggerMenuParser") << "No charge cut for calo-condition ("
1355  << particle << ")" << std::endl;
1356  return false;
1357 
1358  }break;
1359  case esCutType::Quality: {
1360 
1361  qualityLUT = l1tstr2int(cut.getData());
1362 
1363  }break;
1364  case esCutType::Isolation: {
1365 
1366  isolationLUT = l1tstr2int(cut.getData());
1367 
1368  } break;
1369  default:
1370  break;
1371  } //end switch
1372 
1373  } //end loop over cuts
1374 
1375 // Fill the object parameters
1376  objParameter[cnt].etHighThreshold = upperThresholdInd;
1377  objParameter[cnt].etLowThreshold = lowerThresholdInd;
1378  objParameter[cnt].etaWindow1Lower = etaWindow1Lower;
1379  objParameter[cnt].etaWindow1Upper = etaWindow1Upper;
1380  objParameter[cnt].etaWindow2Lower = etaWindow2Lower;
1381  objParameter[cnt].etaWindow2Upper = etaWindow2Upper;
1382  objParameter[cnt].phiWindow1Lower = phiWindow1Lower;
1383  objParameter[cnt].phiWindow1Upper = phiWindow1Upper;
1384  objParameter[cnt].phiWindow2Lower = phiWindow2Lower;
1385  objParameter[cnt].phiWindow2Upper = phiWindow2Upper;
1386  objParameter[cnt].isolationLUT = isolationLUT;
1387  objParameter[cnt].qualityLUT = qualityLUT; //TO DO: Must add
1388 
1389  // Output for debugging
1390  LogDebug("TriggerMenuParser")
1391  << "\n Calo ET high thresholds (hex) for calo object " << caloObjType << " " << cnt << " = "
1392  << std::hex << objParameter[cnt].etLowThreshold << " - " << objParameter[cnt].etHighThreshold
1393  << "\n etaWindow Lower / Upper for calo object " << cnt << " = 0x"
1394  << objParameter[cnt].etaWindow1Lower << " / 0x" << objParameter[cnt].etaWindow1Upper
1395  << "\n etaWindowVeto Lower / Upper for calo object " << cnt << " = 0x"
1396  << objParameter[cnt].etaWindow2Lower << " / 0x" << objParameter[cnt].etaWindow2Upper
1397  << "\n phiWindow Lower / Upper for calo object " << cnt << " = 0x"
1398  << objParameter[cnt].phiWindow1Lower << " / 0x" << objParameter[cnt].phiWindow1Upper
1399  << "\n phiWindowVeto Lower / Upper for calo object " << cnt << " = 0x"
1400  << objParameter[cnt].phiWindow2Lower << " / 0x" << objParameter[cnt].phiWindow2Upper
1401  << "\n Isolation LUT for calo object " << cnt << " = 0x"
1402  << objParameter[cnt].isolationLUT
1403  << "\n Quality LUT for calo object " << cnt << " = 0x"
1404  << objParameter[cnt].qualityLUT << std::dec
1405  << std::endl;
1406 
1407  cnt++;
1408  } //end loop over objects
1409 
1410 
1411 
1412  // object types - all same caloObjType
1413  std::vector<L1GtObject> objType(nrObj, caloObjType);
1414 
1415 
1416 
1417 
1418  // now create a new calo condition
1419  CaloTemplate caloCond(name);
1420 
1421  caloCond.setCondType(cType);
1422  caloCond.setObjectType(objType);
1423 
1424  //BLW TO DO: This needs to be added to the object rather than the whole condition
1425  caloCond.setCondGEq(gEq);
1426  caloCond.setCondChipNr(chipNr);
1427 
1428  //BLW TO DO: This needs to be added to the object rather than the whole condition
1429  caloCond.setCondRelativeBx(relativeBx);
1430 
1431  caloCond.setConditionParameter(objParameter, corrParameter);
1432 
1433  if (edm::isDebugEnabled() ) {
1434 
1435  std::ostringstream myCoutStream;
1436  caloCond.print(myCoutStream);
1437  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
1438 
1439  }
1440 
1441 
1442  // insert condition into the map
1443  if ( !insertConditionIntoMap(caloCond, chipNr)) {
1444 
1445  edm::LogError("TriggerMenuParser")
1446  << " Error: duplicate condition (" << name << ")"
1447  << std::endl;
1448 
1449  return false;
1450  }
1451  else {
1452 
1453  if (corrFlag) {
1454  (m_corCaloTemplate[chipNr]).push_back(caloCond);
1455  }
1456  else {
1457  (m_vecCaloTemplate[chipNr]).push_back(caloCond);
1458  }
1459 
1460  }
1461 
1462 
1463  //
1464  return true;
1465 }
#define LogDebug(id)
type
Definition: HCALResponse.h:21
bool isDebugEnabled()
GtConditionType
Definition: GtDefinitions.h:99
std::vector< std::vector< CaloTemplate > > m_vecCaloTemplate
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate
bool insertConditionIntoMap(GtCondition &cond, const int chipNr)
#define LogTrace(id)
int l1tstr2int(const std::string data)
typedef for correlation parameters
Definition: CaloTemplate.h:81
bool TriggerMenuParser::parseCaloCorr ( const tmeventsetup::esObject *  corrCalo,
unsigned int  chipNr = 0 
)
private

parseCalo Parse a calo condition and insert an entry to the conditions map

Parameters
nodeThe corresponding node.
nameThe name of the condition.
chipNrThe number of the chip this condition is located.
Returns
"true" if succeeded, "false" if an error occurred.

Definition at line 1480 of file TriggerMenuParser.cc.

References CenJet, GOODCOLL_filter_cfg::cut, hpstanc_transforms::cuts, TauDecayModes::dec, reco::tau::disc::Eta(), ora::GE, edm::isDebugEnabled(), configurableAnalysis::Jet, GetRecoTauVFromDQM_MC_cff::kk, LogDebug, LogTrace, mergeVDriftHistosByStation::name, NoIsoEG, colinearityKinematic::Phi, CaloTemplate::print(), GtCondition::setCondChipNr(), GtCondition::setCondGEq(), CaloTemplate::setConditionParameter(), GtCondition::setCondRelativeBx(), GtCondition::setCondType(), GtCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, TauJet, and l1t::Type1s.

1481  {
1482 
1483 
1484 // XERCES_CPP_NAMESPACE_USE
1485  using namespace tmeventsetup;
1486 
1487  // get condition, particle name and type name
1488 
1489  std::string condition = "calo";
1490  std::string particle = "test-fix" ;
1491  std::string type = l1t2string( corrCalo->getType() );
1492  std::string name = l1t2string( corrCalo->getName() );
1493 
1494  LogDebug("TriggerMenuParser")
1495  << "\n ****************************************** "
1496  << "\n (in parseCalo) "
1497  << "\n condition = " << condition
1498  << "\n particle = " << particle
1499  << "\n type = " << type
1500  << "\n name = " << name
1501  << std::endl;
1502 
1503 
1504  // determine object type type
1505  // BLW TO DO: Can this object type wait and be done later in the parsing. Or done differently completely..
1506  L1GtObject caloObjType;
1507  int nrObj = 1;
1508  type = "1_s";
1509  GtConditionType cType = l1t::Type1s;
1510 
1511 
1512  if (corrCalo->getType() == esObjectType::Egamma) {
1513  caloObjType = NoIsoEG;
1514  } else if (corrCalo->getType() == esObjectType::Jet) {
1515  caloObjType = CenJet;
1516  } else if (corrCalo->getType() == esObjectType::Tau) {
1517  caloObjType = TauJet;
1518  } else {
1519  edm::LogError("TriggerMenuParser") << "Wrong particle for calo-condition ("
1520  << particle << ")" << std::endl;
1521  return false;
1522  }
1523 
1524 
1525 // std::string str_etComparison = l1t2string( condCalo.comparison_operator() );
1526 
1527  if (nrObj < 0) {
1528  edm::LogError("TriggerMenuParser") << "Unknown type for calo-condition (" << type
1529  << ")" << "\nCan not determine number of trigger objects. " << std::endl;
1530  return false;
1531  }
1532 
1533  // get values
1534 
1535  // temporary storage of the parameters
1536  std::vector<CaloTemplate::ObjectParameter> objParameter(nrObj);
1537 
1538  //BLW TO DO: Can this be dropped?
1539  CaloTemplate::CorrelationParameter corrParameter;
1540 
1541  // need at least one value for deltaPhiRange
1542  std::vector<boost::uint64_t> tmpValues((nrObj > 1) ? nrObj : 1);
1543  tmpValues.reserve( nrObj );
1544 
1545 
1546 
1547 // BLW TO DO: These needs to the added to the object rather than the whole condition.
1548  int relativeBx = 0;
1549  bool gEq = false;
1550 
1551 
1552  gEq = (corrCalo->getComparisonOperator() == esComparisonOperator::GE);
1553 
1554 // BLW TO DO: This needs to be added to the Object Parameters
1555  relativeBx = corrCalo->getBxOffset();
1556 
1557 // Loop over the cuts for this object
1558  int upperThresholdInd = -1;
1559  int lowerThresholdInd = 0;
1560  int cntEta = 0;
1561  unsigned int etaWindow1Lower=-1, etaWindow1Upper=-1, etaWindow2Lower=-1, etaWindow2Upper=-1;
1562  int cntPhi = 0;
1563  unsigned int phiWindow1Lower=-1, phiWindow1Upper=-1, phiWindow2Lower=-1, phiWindow2Upper=-1;
1564  int isolationLUT = 0xF; //default is to ignore isolation unless specified.
1565  int qualityLUT = 0xF; //default is to ignore quality unless specified.
1566 
1567 
1568  const std::vector<esCut>& cuts = corrCalo->getCuts();
1569  for (size_t kk = 0; kk < cuts.size(); kk++)
1570  {
1571  const esCut cut = cuts.at(kk);
1572 
1573  switch(cut.getCutType()){
1574  case esCutType::Threshold:
1575  lowerThresholdInd = cut.getMinimum().index;
1576  upperThresholdInd = cut.getMaximum().index;
1577  break;
1578  case esCutType::Eta: {
1579 
1580  if(cntEta == 0) {
1581  etaWindow1Lower = cut.getMinimum().index;
1582  etaWindow1Upper = cut.getMaximum().index;
1583  } else if(cntEta == 1) {
1584  etaWindow2Lower = cut.getMinimum().index;
1585  etaWindow2Upper = cut.getMaximum().index;
1586  } else {
1587  edm::LogError("TriggerMenuParser") << "Too Many Eta Cuts for calo-condition ("
1588  << particle << ")" << std::endl;
1589  return false;
1590  }
1591  cntEta++;
1592 
1593  } break;
1594 
1595  case esCutType::Phi: {
1596 
1597  if(cntPhi == 0) {
1598  phiWindow1Lower = cut.getMinimum().index;
1599  phiWindow1Upper = cut.getMaximum().index;
1600  } else if(cntPhi == 1) {
1601  phiWindow2Lower = cut.getMinimum().index;
1602  phiWindow2Upper = cut.getMaximum().index;
1603  } else {
1604  edm::LogError("TriggerMenuParser") << "Too Many Phi Cuts for calo-condition ("
1605  << particle << ")" << std::endl;
1606  return false;
1607  }
1608  cntPhi++;
1609 
1610  }break;
1611 
1612  case esCutType::Charge: {
1613 
1614  edm::LogError("TriggerMenuParser") << "No charge cut for calo-condition ("
1615  << particle << ")" << std::endl;
1616  return false;
1617 
1618  }break;
1619  case esCutType::Quality: {
1620 
1621  qualityLUT = l1tstr2int(cut.getData());
1622 
1623  }break;
1624  case esCutType::Isolation: {
1625 
1626  isolationLUT = l1tstr2int(cut.getData());
1627 
1628  } break;
1629  default:
1630  break;
1631  } //end switch
1632 
1633  } //end loop over cuts
1634 
1635 // Fill the object parameters
1636  objParameter[0].etLowThreshold = lowerThresholdInd;
1637  objParameter[0].etHighThreshold = upperThresholdInd;
1638  objParameter[0].etaWindow1Lower = etaWindow1Lower;
1639  objParameter[0].etaWindow1Upper = etaWindow1Upper;
1640  objParameter[0].etaWindow2Lower = etaWindow2Lower;
1641  objParameter[0].etaWindow2Upper = etaWindow2Upper;
1642  objParameter[0].phiWindow1Lower = phiWindow1Lower;
1643  objParameter[0].phiWindow1Upper = phiWindow1Upper;
1644  objParameter[0].phiWindow2Lower = phiWindow2Lower;
1645  objParameter[0].phiWindow2Upper = phiWindow2Upper;
1646  objParameter[0].isolationLUT = isolationLUT;
1647  objParameter[0].qualityLUT = qualityLUT; //TO DO: Must add
1648 
1649  // Output for debugging
1650  LogDebug("TriggerMenuParser")
1651  << "\n Calo ET high threshold (hex) for calo object " << caloObjType << " " << " = "
1652  << std::hex << objParameter[0].etLowThreshold << " - " << objParameter[0].etHighThreshold
1653  << "\n etaWindow Lower / Upper for calo object " << " = 0x"
1654  << objParameter[0].etaWindow1Lower << " / 0x" << objParameter[0].etaWindow1Upper
1655  << "\n etaWindowVeto Lower / Upper for calo object " << " = 0x"
1656  << objParameter[0].etaWindow2Lower << " / 0x" << objParameter[0].etaWindow2Upper
1657  << "\n phiWindow Lower / Upper for calo object " << " = 0x"
1658  << objParameter[0].phiWindow1Lower << " / 0x" << objParameter[0].phiWindow1Upper
1659  << "\n phiWindowVeto Lower / Upper for calo object " << " = 0x"
1660  << objParameter[0].phiWindow2Lower << " / 0x" << objParameter[0].phiWindow2Upper
1661  << "\n Isolation LUT for calo object " << " = 0x"
1662  << objParameter[0].isolationLUT
1663  << "\n Quality LUT for calo object " << " = 0x"
1664  << objParameter[0].qualityLUT << std::dec
1665  << std::endl;
1666 
1667 
1668 
1669 
1670 
1671  // object types - all same caloObjType
1672  std::vector<L1GtObject> objType(nrObj, caloObjType);
1673 
1674 
1675 
1676 
1677  // now create a new calo condition
1678  CaloTemplate caloCond(name);
1679 
1680  caloCond.setCondType(cType);
1681  caloCond.setObjectType(objType);
1682 
1683  //BLW TO DO: This needs to be added to the object rather than the whole condition
1684  caloCond.setCondGEq(gEq);
1685  caloCond.setCondChipNr(chipNr);
1686 
1687  //BLW TO DO: This needs to be added to the object rather than the whole condition
1688  caloCond.setCondRelativeBx(relativeBx);
1689 
1690  caloCond.setConditionParameter(objParameter, corrParameter);
1691 
1692  if (edm::isDebugEnabled() ) {
1693 
1694  std::ostringstream myCoutStream;
1695  caloCond.print(myCoutStream);
1696  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
1697 
1698  }
1699 
1700 
1701  // insert condition into the map
1702  if ( !insertConditionIntoMap(caloCond, chipNr)) {
1703 
1704  edm::LogError("TriggerMenuParser")
1705  << " Error: duplicate condition (" << name << ")"
1706  << std::endl;
1707 
1708  return false;
1709  }
1710  else {
1711  (m_corCaloTemplate[chipNr]).push_back(caloCond);
1712  }
1713 
1714 
1715  //
1716  return true;
1717 }
#define LogDebug(id)
type
Definition: HCALResponse.h:21
bool isDebugEnabled()
GtConditionType
Definition: GtDefinitions.h:99
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate
bool insertConditionIntoMap(GtCondition &cond, const int chipNr)
#define LogTrace(id)
int l1tstr2int(const std::string data)
typedef for correlation parameters
Definition: CaloTemplate.h:81
void TriggerMenuParser::parseCondFormats ( const L1TUtmTriggerMenu utmMenu)

Definition at line 195 of file TriggerMenuParser.cc.

References ecalcalib_dqm_sourceclient-live_cfg::algo, KineDebug3::count(), HLT_FULL_cff::DoubleMuon, cuy::ii, reco::tau::disc::InvariantMass(), relval_steps::menu, HLT_FULL_cff::SingleMuon, AlCaHLTBitMon_QueryRunRegistry::string, and unpackBuffers-CaloStage2::token.

Referenced by L1TGlobalProducer::produce().

195  {
196 
197 
198  // resize the vector of condition maps
199  // the number of condition chips should be correctly set before calling parseXmlFile
201 
206 
211 
212  using namespace tmeventsetup;
213  using namespace Algorithm;
214 
215  const esTriggerMenu* menu = reinterpret_cast<const esTriggerMenu*> (utmMenu);
216 
217  //get the meta data
218  m_triggerMenuDescription = menu->getComment();
219  m_triggerMenuDate = menu->getDatetime();
220  m_triggerMenuImplementation = menu->getFirmwareUuid(); //BLW: correct descriptor?
221  m_triggerMenuName = menu->getName();
222  m_triggerMenuInterface = menu->getVersion(); //BLW: correct descriptor?
223 
224  const std::map<std::string, esAlgorithm>& algoMap = menu->getAlgorithmMap();
225  const std::map<std::string, esCondition>& condMap = menu->getConditionMap();
226  const std::map<std::string, esScale>& scaleMap = menu->getScaleMap();
227 
228  // parse the scales
229  m_gtScales.setScalesName( menu->getScaleSetName() );
230  parseScales(scaleMap);
231 
232 
233  //loop over the algorithms
234  for (std::map<std::string, esAlgorithm>::const_iterator cit = algoMap.begin();
235  cit != algoMap.end(); cit++)
236  {
237  //condition chip (artifact) TO DO: Update
238  int chipNr = 0;
239 
240  //get algorithm
241  const esAlgorithm& algo = cit->second;
242 
243  //parse the algorithm
244  parseAlgorithm(algo,chipNr); //blw
245 
246  //get conditions for this algorithm
247  const std::vector<std::string>& rpn_vec = algo.getRpnVector();
248  for (size_t ii = 0; ii < rpn_vec.size(); ii++)
249  {
250  const std::string& token = rpn_vec.at(ii);
251  if (isGate(token)) continue;
252 // long hash = getHash(token);
253  const esCondition& condition = condMap.find(token)->second;
254 
255  //check to see if this condtion already exists
256  if ((m_conditionMap[chipNr]).count(condition.getName()) == 0) {
257 
258  // parse Calo Conditions (EG, Jets, Taus)
259  if(condition.getType() == esConditionType::SingleEgamma ||
260  condition.getType() == esConditionType::DoubleEgamma ||
261  condition.getType() == esConditionType::TripleEgamma ||
262  condition.getType() == esConditionType::QuadEgamma ||
263  condition.getType() == esConditionType::SingleTau ||
264  condition.getType() == esConditionType::DoubleTau ||
265  condition.getType() == esConditionType::TripleTau ||
266  condition.getType() == esConditionType::QuadTau ||
267  condition.getType() == esConditionType::SingleJet ||
268  condition.getType() == esConditionType::DoubleJet ||
269  condition.getType() == esConditionType::TripleJet ||
270  condition.getType() == esConditionType::QuadJet )
271  {
272  parseCalo(condition,chipNr,false); //blw
273 
274  // parse Energy Sums
275  } else if(condition.getType() == esConditionType::TotalEt ||
276  condition.getType() == esConditionType::TotalHt ||
277  condition.getType() == esConditionType::MissingEt ||
278  condition.getType() == esConditionType::MissingHt )
279  {
280  parseEnergySum(condition,chipNr,false);
281 
282  //parse Muons
283  } else if(condition.getType() == esConditionType::SingleMuon ||
284  condition.getType() == esConditionType::DoubleMuon ||
285  condition.getType() == esConditionType::TripleMuon ||
286  condition.getType() == esConditionType::QuadMuon )
287  {
288  parseMuon(condition,chipNr,false);
289 
290 
291  //parse Correlation Conditions
292  } else if(condition.getType() == esConditionType::MuonMuonCorrelation ||
293  condition.getType() == esConditionType::MuonEsumCorrelation ||
294  condition.getType() == esConditionType::CaloMuonCorrelation ||
295  condition.getType() == esConditionType::CaloCaloCorrelation ||
296  condition.getType() == esConditionType::CaloEsumCorrelation ||
297  condition.getType() == esConditionType::InvariantMass )
298  {
299  parseCorrelation(condition,chipNr);
300 
301  //parse Muons
302  } else if(condition.getType() == esConditionType::Externals )
303  {
304  parseExternal(condition,chipNr);
305 
306  }
307 
308  }//if condition is a new one
309  }//loop over conditions
310  }//loop over algorithms
311 
312  return;
313 
314 
315 }
unsigned int m_numberConditionChips
hardware limits
std::vector< std::vector< CaloTemplate > > m_vecCaloTemplate
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
bool parseExternal(tmeventsetup::esCondition condExt, unsigned int chipNr=0)
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate
std::string m_triggerMenuImplementation
int ii
Definition: cuy.py:588
std::string m_triggerMenuInterface
menu names
L1TGlobalScales m_gtScales
std::vector< ConditionMap > m_conditionMap
map containing the conditions (per condition chip) - transient
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate
std::string m_triggerMenuDescription
void setScalesName(std::string name)
std::vector< std::vector< CorrelationTemplate > > m_vecCorrelationTemplate
bool parseScales(std::map< std::string, tmeventsetup::esScale > scaleMap)
parse scales
bool parseEnergySum(tmeventsetup::esCondition condEnergySums, unsigned int chipNr=0, const bool corrFlag=false)
parse an &quot;energy sum&quot; condition
std::vector< std::vector< ExternalTemplate > > m_vecExternalTemplate
bool parseMuon(tmeventsetup::esCondition condMu, unsigned int chipNr=0, const bool corrFlag=false)
parse a muon condition
bool parseAlgorithm(tmeventsetup::esAlgorithm algorithm, unsigned int chipNr=0)
parse all algorithms
bool parseCalo(tmeventsetup::esCondition condCalo, unsigned int chipNr=0, const bool corrFlag=false)
parse a calorimeter condition
std::vector< std::vector< EnergySumTemplate > > m_vecEnergySumTemplate
bool parseCorrelation(tmeventsetup::esCondition corrCond, unsigned int chipNr=0)
parse a correlation condition
std::vector< std::vector< MuonTemplate > > m_vecMuonTemplate
bool TriggerMenuParser::parseCorrelation ( tmeventsetup::esCondition  corrCond,
unsigned int  chipNr = 0 
)
private

parse a correlation condition

parseCorrelation Parse a correlation condition and insert an entry to the conditions map

Parameters
nodeThe corresponding node.
nameThe name of the condition.
chipNrThe number of the chip this condition is located.
Returns
"true" if succeeded, "false" if an error occurred.

Definition at line 2226 of file TriggerMenuParser.cc.

References CenJet, CorrelationTemplate::CorrelationParameter::chargeCorrelation, l1t::CondCalo, l1t::CondEnergySum, l1t::CondMuon, KineDebug3::count(), GOODCOLL_filter_cfg::cut, hpstanc_transforms::cuts, ETM, ora::GE, HTM, edm::isDebugEnabled(), configurableAnalysis::Jet, findQualityFiles::jj, LogDebug, LogTrace, Mu, configurableAnalysis::Muon, mergeVDriftHistosByStation::name, NoIsoEG, CorrelationTemplate::print(), CorrelationTemplate::setCond0Category(), CorrelationTemplate::setCond0Index(), CorrelationTemplate::setCond1Category(), CorrelationTemplate::setCond1Index(), GtCondition::setCondChipNr(), GtCondition::setCondGEq(), GtCondition::setCondType(), CorrelationTemplate::setCorrelationParameter(), GtCondition::setObjectType(), findQualityFiles::size, AlCaHLTBitMon_QueryRunRegistry::string, TauJet, and l1t::Type2cor.

2228  {
2229 
2230  using namespace tmeventsetup;
2231 
2232  std::string condition = "corr";
2233  std::string particle = "test-fix" ;
2234  std::string type = l1t2string( corrCond.getType() );
2235  std::string name = l1t2string( corrCond.getName() );
2236 
2237  LogDebug("TriggerMenuParser") << " ****************************************** " << std::endl
2238  << " (in parseCorrelation) " << std::endl
2239  << " condition = " << condition << std::endl
2240  << " particle = " << particle << std::endl
2241  << " type = " << type << std::endl
2242  << " name = " << name << std::endl;
2243 
2244 
2245 
2246 
2247  // create a new correlation condition
2248  CorrelationTemplate correlationCond(name);
2249 
2250  // check that the condition does not exist already in the map
2251  if ( !insertConditionIntoMap(correlationCond, chipNr)) {
2252 
2253  edm::LogError("TriggerMenuParser")
2254  << " Error: duplicate correlation condition (" << name << ")"
2255  << std::endl;
2256 
2257  return false;
2258  }
2259 
2260 
2261 // Define some of the quantities to store the parased information
2262 
2263  // condition type BLW (Do we change this to the type of correlation condition?)
2265 
2266  // two objects (for sure)
2267  const int nrObj = 2;
2268 
2269  // object types and greater equal flag - filled in the loop
2270  int intGEq[nrObj] = { -1, -1 };
2271  std::vector<L1GtObject> objType(nrObj); //BLW do we want to define these as a different type?
2272  std::vector<GtConditionCategory> condCateg(nrObj); //BLW do we want to change these categories
2273 
2274  // correlation flag and index in the cor*vector
2275  const bool corrFlag = true;
2276  int corrIndexVal[nrObj] = { -1, -1 };
2277 
2278 
2279  // Storage of the correlation selection
2281  corrParameter.chargeCorrelation = 1; //ignore charge correlation
2282 
2283 // Get the correlation Cuts on the legs
2284 
2285  const std::vector<esCut>& cuts = corrCond.getCuts();
2286  for (size_t jj = 0; jj < cuts.size(); jj++)
2287  {
2288  const esCut cut = cuts.at(jj);
2289 
2290  if(cut.getCutType() == esCutType::ChargeCorrelation) {
2291  if( cut.getData()=="ls" ) corrParameter.chargeCorrelation = 2;
2292  else if( cut.getData()=="os" ) corrParameter.chargeCorrelation = 4;
2293  else corrParameter.chargeCorrelation = 1; //ignore charge correlation
2294  } else {
2295  //keep the type from what the correlation is.
2296  corrParameter.corrCutType = cut.getCutType();
2297  corrParameter.minCutValue = cut.getMinimum().value;
2298  corrParameter.maxCutValue = cut.getMaximum().value;
2299  }
2300 
2301  }
2302 
2303 
2304 // Get the two objects that form the legs
2305  const std::vector<esObject>& objects = corrCond.getObjects();
2306  if(objects.size() != 2) {
2307  edm::LogError("TriggerMenuParser")
2308  << "incorrect number of objects for the correlation condition " << name << " corrFlag " << corrFlag << std::endl;
2309  return false;
2310  }
2311 
2312 // loop over legs
2313  for (size_t jj = 0; jj < objects.size(); jj++)
2314  {
2315  const esObject object = objects.at(jj);
2316 /* std::cout << " obj name = " << object->getName() << "\n";
2317  std::cout << " obj type = " << object->getType() << "\n";
2318  std::cout << " obj op = " << object->getComparisonOperator() << "\n";
2319  std::cout << " obj bx = " << object->getBxOffset() << "\n";
2320 */
2321 
2322 // check the leg type
2323  if(object.getType() == esObjectType::Muon) {
2324  // we have a muon
2325 
2326  //BLW Is there a problem here with not entering second instanance into the m_corMuonTemplate[]?
2327  if ((m_conditionMap[chipNr]).count(object.getName()) == 0) {
2328 
2329  parseMuonCorr(&object,chipNr);
2330 
2331  } else {
2332  LogDebug("TriggerMenuParser") << "Not Adding Correlation Muon Condition." << std::endl;
2333  }
2334 
2335  //Now set some flags for this subCondition
2336  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
2337  objType[jj] = Mu;
2338  condCateg[jj] = CondMuon;
2339  corrIndexVal[jj] = (m_corMuonTemplate[chipNr]).size() - 1;
2340 
2341 
2342 
2343  } else if(object.getType() == esObjectType::Egamma ||
2344  object.getType() == esObjectType::Jet ||
2345  object.getType() == esObjectType::Tau ) {
2346  // we have an Calo object
2347 
2348  //BLW Is there a problem here with not entering second instanance into the m_corMuonTemplate[]?
2349  if ((m_conditionMap[chipNr]).count(object.getName()) == 0) {
2350 
2351  parseCaloCorr(&object,chipNr);
2352 
2353  } else {
2354  LogDebug("TriggerMenuParser") << "Not Adding Correlation Calo Condition." << std::endl;
2355  }
2356 
2357 
2358  //Now set some flags for this subCondition
2359  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
2360  switch(object.getType()) {
2361  case esObjectType::Egamma: {
2362  objType[jj] = NoIsoEG;
2363  }
2364  break;
2365  case esObjectType::Jet: {
2366  objType[jj] = CenJet;
2367  }
2368  break;
2369  case esObjectType::Tau: {
2370  objType[jj] = TauJet;
2371  }
2372  break;
2373  default: {
2374  }
2375  break;
2376  }
2377  condCateg[jj] = CondCalo;
2378  corrIndexVal[jj] = (m_corCaloTemplate[chipNr]).size() - 1;
2379 
2380 
2381  } else if(object.getType() == esObjectType::ETM ||
2382  object.getType() == esObjectType::HTM ) {
2383  // we have Energy Sum
2384 
2385  //BLW Is there a problem here with not entering second instanance into the m_corMuonTemplate[]?
2386  if ((m_conditionMap[chipNr]).count(object.getName()) == 0) {
2387 
2388  parseEnergySumCorr(&object,chipNr);
2389 
2390  } else {
2391  LogDebug("TriggerMenuParser") << "Not Adding Correlation EtSum Condition." << std::endl;
2392  }
2393 
2394 
2395  //Now set some flags for this subCondition
2396  intGEq[jj] = (object.getComparisonOperator() == esComparisonOperator::GE);
2397  switch(object.getType()) {
2398  case esObjectType::ETM: {
2399  objType[jj] = L1GtObject::ETM;
2400  }
2401  break;
2402  case esObjectType::HTM: {
2403  objType[jj] = L1GtObject::HTM;
2404  }
2405  break;
2406  default: {
2407  }
2408  break;
2409  }
2410  condCateg[jj] = CondEnergySum;
2411  corrIndexVal[jj] = (m_corEnergySumTemplate[chipNr]).size() - 1;
2412 
2413  } else {
2414 
2415  edm::LogError("TriggerMenuParser")
2416  << "Illegal Object Type "
2417  << " for the correlation condition " << name << std::endl;
2418  return false;
2419 
2420  } //if block on leg types
2421 
2422  } //loop over legs
2423 
2424 
2425  // get greater equal flag for the correlation condition
2426  bool gEq = true;
2427  if (intGEq[0] != intGEq[1]) {
2428  edm::LogError("TriggerMenuParser")
2429  << "Inconsistent GEq flags for sub-conditions "
2430  << " for the correlation condition " << name << std::endl;
2431  return false;
2432 
2433  }
2434  else {
2435  gEq = (intGEq[0] != 0);
2436 
2437  }
2438 
2439 
2440  // fill the correlation condition
2441  correlationCond.setCondType(cType);
2442  correlationCond.setObjectType(objType);
2443  correlationCond.setCondGEq(gEq);
2444  correlationCond.setCondChipNr(chipNr);
2445 
2446  correlationCond.setCond0Category(condCateg[0]);
2447  correlationCond.setCond1Category(condCateg[1]);
2448 
2449  correlationCond.setCond0Index(corrIndexVal[0]);
2450  correlationCond.setCond1Index(corrIndexVal[1]);
2451 
2452  correlationCond.setCorrelationParameter(corrParameter);
2453 
2454  if (edm::isDebugEnabled() ) {
2455 
2456  std::ostringstream myCoutStream;
2457  correlationCond.print(myCoutStream);
2458  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n"
2459  << std::endl;
2460 
2461  }
2462 
2463  // insert condition into the map
2464  // condition is not duplicate, check was done at the beginning
2465 
2466  (m_vecCorrelationTemplate[chipNr]).push_back(correlationCond);
2467 
2468 
2469  //
2470  return true;
2471 }
#define LogDebug(id)
type
Definition: HCALResponse.h:21
bool isDebugEnabled()
GtConditionType
Definition: GtDefinitions.h:99
Definition: L1GtObject.h:39
Definition: L1GtObject.h:36
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate
bool insertConditionIntoMap(GtCondition &cond, const int chipNr)
std::vector< ConditionMap > m_conditionMap
map containing the conditions (per condition chip) - transient
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate
std::vector< std::vector< CorrelationTemplate > > m_vecCorrelationTemplate
#define LogTrace(id)
bool parseCaloCorr(const tmeventsetup::esObject *corrCalo, unsigned int chipNr=0)
Definition: L1GtObject.h:30
bool parseEnergySumCorr(const tmeventsetup::esObject *corrESum, unsigned int chipNr=0)
bool parseMuonCorr(const tmeventsetup::esObject *condMu, unsigned int chipNr=0)
typedef for correlation parameters
tuple size
Write out results.
bool TriggerMenuParser::parseEnergySum ( tmeventsetup::esCondition  condEnergySum,
unsigned int  chipNr = 0,
const bool  corrFlag = false 
)
private

parse an "energy sum" condition

parseEnergySum Parse an "energy sum" condition and insert an entry to the conditions map

Parameters
nodeThe corresponding node.
nameThe name of the condition.
chipNrThe number of the chip this condition is located.
Returns
"true" if succeeded, "false" if an error occurred.

Definition at line 1732 of file TriggerMenuParser.cc.

References GOODCOLL_filter_cfg::cut, hpstanc_transforms::cuts, TauDecayModes::dec, reco::tau::disc::Eta(), ETM, ETT, ora::GE, HTM, HTT, edm::isDebugEnabled(), findQualityFiles::jj, GetRecoTauVFromDQM_MC_cff::kk, LogDebug, LogTrace, mergeVDriftHistosByStation::name, colinearityKinematic::Phi, EnergySumTemplate::print(), GtCondition::setCondChipNr(), GtCondition::setCondGEq(), EnergySumTemplate::setConditionParameter(), GtCondition::setCondRelativeBx(), GtCondition::setCondType(), GtCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, l1t::TypeETM, l1t::TypeETT, l1t::TypeHTM, and l1t::TypeHTT.

1733  {
1734 
1735 
1736 // XERCES_CPP_NAMESPACE_USE
1737  using namespace tmeventsetup;
1738 
1739  // get condition, particle name and type name
1740 
1741  std::string condition = "calo";
1742  std::string type = l1t2string( condEnergySum.getType() );
1743  std::string name = l1t2string( condEnergySum.getName() );
1744 
1745  LogDebug("TriggerMenuParser")
1746  << "\n ****************************************** "
1747  << "\n (in parseEnergySum) "
1748  << "\n condition = " << condition
1749  << "\n type = " << type
1750  << "\n name = " << name
1751  << std::endl;
1752 
1753 
1754 
1755  // determine object type type
1756  L1GtObject energySumObjType;
1757  GtConditionType cType;
1758 
1759  if( condEnergySum.getType() == esConditionType::MissingEt ){
1760  energySumObjType = L1GtObject::ETM;
1761  cType = TypeETM;
1762  }
1763  else if( condEnergySum.getType() == esConditionType::TotalEt ){
1764  energySumObjType = L1GtObject::ETT;
1765  cType = TypeETT;
1766  }
1767  else if( condEnergySum.getType() == esConditionType::TotalHt ){
1768  energySumObjType = L1GtObject::HTT;
1769  cType = TypeHTT;
1770  }
1771  else if( condEnergySum.getType() == esConditionType::MissingHt ){
1772  energySumObjType = L1GtObject::HTM;
1773  cType = TypeHTM;
1774  }
1775  else {
1776  edm::LogError("TriggerMenuParser")
1777  << "Wrong type for energy-sum condition (" << type
1778  << ")" << std::endl;
1779  return false;
1780  }
1781 
1782 
1783 
1784  // global object
1785  int nrObj = 1;
1786 
1787 // std::string str_etComparison = l1t2string( condEnergySum.comparison_operator() );
1788 
1789  // get values
1790 
1791  // temporary storage of the parameters
1792  std::vector<EnergySumTemplate::ObjectParameter> objParameter(nrObj);
1793 
1794 
1795  int cnt = 0;
1796 
1797 // BLW TO DO: These needs to the added to the object rather than the whole condition.
1798  int relativeBx = 0;
1799  bool gEq = false;
1800 
1801 // l1t::EnergySumsObjectRequirement objPar = condEnergySum.objectRequirement();
1802 
1803 // Loop over objects and extract the cuts on the objects
1804  const std::vector<esObject>& objects = condEnergySum.getObjects();
1805  for (size_t jj = 0; jj < objects.size(); jj++) {
1806 
1807  const esObject object = objects.at(jj);
1808  gEq = (object.getComparisonOperator() == esComparisonOperator::GE);
1809 
1810 // BLW TO DO: This needs to be added to the Object Parameters
1811  relativeBx = object.getBxOffset();
1812 
1813 // Loop over the cuts for this object
1814  int lowerThresholdInd = 0;
1815  int upperThresholdInd = -1;
1816  int cntPhi = 0;
1817  unsigned int phiWindow1Lower=-1, phiWindow1Upper=-1, phiWindow2Lower=-1, phiWindow2Upper=-1;
1818 
1819 
1820  const std::vector<esCut>& cuts = object.getCuts();
1821  for (size_t kk = 0; kk < cuts.size(); kk++)
1822  {
1823  const esCut cut = cuts.at(kk);
1824 
1825  switch(cut.getCutType()){
1826  case esCutType::Threshold:
1827  lowerThresholdInd = cut.getMinimum().index;
1828  upperThresholdInd = cut.getMaximum().index;
1829  break;
1830 
1831  case esCutType::Eta:
1832  break;
1833 
1834  case esCutType::Phi: {
1835 
1836  if(cntPhi == 0) {
1837  phiWindow1Lower = cut.getMinimum().index;
1838  phiWindow1Upper = cut.getMaximum().index;
1839  } else if(cntPhi == 1) {
1840  phiWindow2Lower = cut.getMinimum().index;
1841  phiWindow2Upper = cut.getMaximum().index;
1842  } else {
1843  edm::LogError("TriggerMenuParser") << "Too Many Phi Cuts for esum-condition ("
1844  << type << ")" << std::endl;
1845  return false;
1846  }
1847  cntPhi++;
1848 
1849  }
1850  break;
1851 
1852  default:
1853  break;
1854  } //end switch
1855 
1856  } //end loop over cuts
1857 
1858 
1859 
1860  // Fill the object parameters
1861  objParameter[cnt].etLowThreshold = lowerThresholdInd;
1862  objParameter[cnt].etHighThreshold = upperThresholdInd;
1863  objParameter[cnt].phiWindow1Lower = phiWindow1Lower;
1864  objParameter[cnt].phiWindow1Upper = phiWindow1Upper;
1865  objParameter[cnt].phiWindow2Lower = phiWindow2Lower;
1866  objParameter[cnt].phiWindow2Upper = phiWindow2Upper;
1867 
1868 
1869  // Output for debugging
1870  LogDebug("TriggerMenuParser")
1871  << "\n EnergySum ET high threshold (hex) for energy sum object " << cnt << " = "
1872  << std::hex << objParameter[cnt].etLowThreshold << " - " << objParameter[cnt].etHighThreshold
1873  << "\n phiWindow Lower / Upper for calo object " << cnt << " = 0x"
1874  << objParameter[cnt].phiWindow1Lower << " / 0x" << objParameter[cnt].phiWindow1Upper
1875  << "\n phiWindowVeto Lower / Upper for calo object " << cnt << " = 0x"
1876  << objParameter[cnt].phiWindow2Lower << " / 0x" << objParameter[cnt].phiWindow2Upper << std::dec
1877  << std::endl;
1878 
1879  cnt++;
1880  } //end loop over objects
1881 
1882  // object types - all same energySumObjType
1883  std::vector<L1GtObject> objType(nrObj, energySumObjType);
1884 
1885  // now create a new energySum condition
1886 
1887  EnergySumTemplate energySumCond(name);
1888 
1889  energySumCond.setCondType(cType);
1890  energySumCond.setObjectType(objType);
1891  energySumCond.setCondGEq(gEq);
1892  energySumCond.setCondChipNr(chipNr);
1893  energySumCond.setCondRelativeBx(relativeBx);
1894 
1895  energySumCond.setConditionParameter(objParameter);
1896 
1897  if (edm::isDebugEnabled() ) {
1898 
1899  std::ostringstream myCoutStream;
1900  energySumCond.print(myCoutStream);
1901  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
1902 
1903  }
1904 
1905  // insert condition into the map
1906  if ( !insertConditionIntoMap(energySumCond, chipNr)) {
1907 
1908  edm::LogError("TriggerMenuParser")
1909  << " Error: duplicate condition (" << name << ")"
1910  << std::endl;
1911 
1912  return false;
1913  }
1914  else {
1915 
1916  if (corrFlag) {
1917  (m_corEnergySumTemplate[chipNr]).push_back(energySumCond);
1918 
1919  }
1920  else {
1921  (m_vecEnergySumTemplate[chipNr]).push_back(energySumCond);
1922  }
1923 
1924  }
1925 
1926 
1927 
1928  //
1929  return true;
1930 }
#define LogDebug(id)
type
Definition: HCALResponse.h:21
bool isDebugEnabled()
GtConditionType
Definition: GtDefinitions.h:99
Definition: L1GtObject.h:39
Definition: L1GtObject.h:36
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
bool insertConditionIntoMap(GtCondition &cond, const int chipNr)
Definition: L1GtObject.h:38
#define LogTrace(id)
Definition: L1GtObject.h:37
std::vector< std::vector< EnergySumTemplate > > m_vecEnergySumTemplate
bool TriggerMenuParser::parseEnergySumCorr ( const tmeventsetup::esObject *  corrESum,
unsigned int  chipNr = 0 
)
private

parseEnergySum Parse an "energy sum" condition and insert an entry to the conditions map

Parameters
nodeThe corresponding node.
nameThe name of the condition.
chipNrThe number of the chip this condition is located.
Returns
"true" if succeeded, "false" if an error occurred.

Definition at line 1944 of file TriggerMenuParser.cc.

References GOODCOLL_filter_cfg::cut, hpstanc_transforms::cuts, TauDecayModes::dec, reco::tau::disc::Eta(), ETM, ora::GE, HTM, edm::isDebugEnabled(), GetRecoTauVFromDQM_MC_cff::kk, LogDebug, LogTrace, mergeVDriftHistosByStation::name, colinearityKinematic::Phi, EnergySumTemplate::print(), GtCondition::setCondChipNr(), GtCondition::setCondGEq(), EnergySumTemplate::setConditionParameter(), GtCondition::setCondRelativeBx(), GtCondition::setCondType(), GtCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, l1t::TypeETM, and l1t::TypeHTM.

1945  {
1946 
1947 
1948 // XERCES_CPP_NAMESPACE_USE
1949  using namespace tmeventsetup;
1950 
1951  // get condition, particle name and type name
1952 
1953  std::string condition = "calo";
1954  std::string type = l1t2string( corrESum->getType() );
1955  std::string name = l1t2string( corrESum->getName() );
1956 
1957  LogDebug("TriggerMenuParser")
1958  << "\n ****************************************** "
1959  << "\n (in parseEnergySum) "
1960  << "\n condition = " << condition
1961  << "\n type = " << type
1962  << "\n name = " << name
1963  << std::endl;
1964 
1965 
1966 
1967  // determine object type type
1968  L1GtObject energySumObjType;
1969  GtConditionType cType;
1970 
1971  if( corrESum->getType()== esObjectType::ETM ){
1972  energySumObjType = L1GtObject::ETM;
1973  cType = TypeETM;
1974  }
1975  else if( corrESum->getType()== esObjectType::HTM ){
1976  energySumObjType = L1GtObject::HTM;
1977  cType = TypeHTM;
1978  }
1979  else {
1980  edm::LogError("TriggerMenuParser")
1981  << "Wrong type for energy-sum correclation condition (" << type
1982  << ")" << std::endl;
1983  return false;
1984  }
1985 
1986 
1987 
1988  // global object
1989  int nrObj = 1;
1990 
1991 // std::string str_etComparison = l1t2string( condEnergySum.comparison_operator() );
1992 
1993  // get values
1994 
1995  // temporary storage of the parameters
1996  std::vector<EnergySumTemplate::ObjectParameter> objParameter(nrObj);
1997 
1998 
1999  int cnt = 0;
2000 
2001 // BLW TO DO: These needs to the added to the object rather than the whole condition.
2002  int relativeBx = 0;
2003  bool gEq = false;
2004 
2005 // l1t::EnergySumsObjectRequirement objPar = condEnergySum.objectRequirement();
2006 
2007 
2008  gEq = (corrESum->getComparisonOperator() == esComparisonOperator::GE);
2009 
2010 // BLW TO DO: This needs to be added to the Object Parameters
2011  relativeBx = corrESum->getBxOffset();
2012 
2013 // Loop over the cuts for this object
2014  int lowerThresholdInd = 0;
2015  int upperThresholdInd = -1;
2016  int cntPhi = 0;
2017  unsigned int phiWindow1Lower=-1, phiWindow1Upper=-1, phiWindow2Lower=-1, phiWindow2Upper=-1;
2018 
2019 
2020  const std::vector<esCut>& cuts = corrESum->getCuts();
2021  for (size_t kk = 0; kk < cuts.size(); kk++)
2022  {
2023  const esCut cut = cuts.at(kk);
2024 
2025  switch(cut.getCutType()){
2026  case esCutType::Threshold:
2027  lowerThresholdInd = cut.getMinimum().index;
2028  upperThresholdInd = cut.getMaximum().index;
2029  break;
2030 
2031  case esCutType::Eta:
2032  break;
2033 
2034  case esCutType::Phi: {
2035 
2036  if(cntPhi == 0) {
2037  phiWindow1Lower = cut.getMinimum().index;
2038  phiWindow1Upper = cut.getMaximum().index;
2039  } else if(cntPhi == 1) {
2040  phiWindow2Lower = cut.getMinimum().index;
2041  phiWindow2Upper = cut.getMaximum().index;
2042  } else {
2043  edm::LogError("TriggerMenuParser") << "Too Many Phi Cuts for esum-condition ("
2044  << type << ")" << std::endl;
2045  return false;
2046  }
2047  cntPhi++;
2048 
2049  }
2050  break;
2051 
2052  default:
2053  break;
2054  } //end switch
2055 
2056  } //end loop over cuts
2057 
2058 
2059 
2060  // Fill the object parameters
2061  objParameter[0].etLowThreshold = lowerThresholdInd;
2062  objParameter[0].etHighThreshold = upperThresholdInd;
2063  objParameter[0].phiWindow1Lower = phiWindow1Lower;
2064  objParameter[0].phiWindow1Upper = phiWindow1Upper;
2065  objParameter[0].phiWindow2Lower = phiWindow2Lower;
2066  objParameter[0].phiWindow2Upper = phiWindow2Upper;
2067 
2068 
2069  // Output for debugging
2070  LogDebug("TriggerMenuParser")
2071  << "\n EnergySum ET high threshold (hex) for energy sum object " << cnt << " = "
2072  << std::hex << objParameter[0].etLowThreshold << " - " << objParameter[0].etLowThreshold
2073  << "\n phiWindow Lower / Upper for calo object " << cnt << " = 0x"
2074  << objParameter[0].phiWindow1Lower << " / 0x" << objParameter[0].phiWindow1Upper
2075  << "\n phiWindowVeto Lower / Upper for calo object " << cnt << " = 0x"
2076  << objParameter[0].phiWindow2Lower << " / 0x" << objParameter[0].phiWindow2Upper << std::dec
2077  << std::endl;
2078 
2079 
2080  // object types - all same energySumObjType
2081  std::vector<L1GtObject> objType(nrObj, energySumObjType);
2082 
2083  // now create a new energySum condition
2084 
2085  EnergySumTemplate energySumCond(name);
2086 
2087  energySumCond.setCondType(cType);
2088  energySumCond.setObjectType(objType);
2089  energySumCond.setCondGEq(gEq);
2090  energySumCond.setCondChipNr(chipNr);
2091  energySumCond.setCondRelativeBx(relativeBx);
2092 
2093  energySumCond.setConditionParameter(objParameter);
2094 
2095  if (edm::isDebugEnabled() ) {
2096 
2097  std::ostringstream myCoutStream;
2098  energySumCond.print(myCoutStream);
2099  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
2100 
2101  }
2102 
2103  // insert condition into the map
2104  if ( !insertConditionIntoMap(energySumCond, chipNr)) {
2105 
2106  edm::LogError("TriggerMenuParser")
2107  << " Error: duplicate condition (" << name << ")"
2108  << std::endl;
2109 
2110  return false;
2111  }
2112  else {
2113 
2114  (m_corEnergySumTemplate[chipNr]).push_back(energySumCond);
2115 
2116  }
2117 
2118 
2119 
2120  //
2121  return true;
2122 }
#define LogDebug(id)
type
Definition: HCALResponse.h:21
bool isDebugEnabled()
GtConditionType
Definition: GtDefinitions.h:99
Definition: L1GtObject.h:39
Definition: L1GtObject.h:36
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
bool insertConditionIntoMap(GtCondition &cond, const int chipNr)
#define LogTrace(id)
bool TriggerMenuParser::parseExternal ( tmeventsetup::esCondition  condExt,
unsigned int  chipNr = 0 
)
private

parseExternal Parse an External condition and insert an entry to the conditions map

Parameters
nodeThe corresponding node.
nameThe name of the condition.
chipNrThe number of the chip this condition is located.
Returns
"true" if succeeded, "false" if an error occurred.

Definition at line 2138 of file TriggerMenuParser.cc.

References findQualityFiles::jj, LogDebug, LogTrace, mergeVDriftHistosByStation::name, GtCondition::setCondChipNr(), GtCondition::setCondGEq(), GtCondition::setCondRelativeBx(), GtCondition::setCondType(), ExternalTemplate::setExternalChannel(), AlCaHLTBitMon_QueryRunRegistry::string, and l1t::TypeExternal.

2139  {
2140 
2141 
2142  using namespace tmeventsetup;
2143 
2144 
2145  // get condition, particle name and type name
2146  std::string condition = "ext";
2147  std::string particle = "test-fix";
2148  std::string type = l1t2string( condExt.getType() );
2149  std::string name = l1t2string( condExt.getName() );
2150 
2151 
2152  LogDebug("TriggerMenuParser")
2153  << "\n ****************************************** "
2154  << "\n (in parseExternal) "
2155  << "\n condition = " << condition
2156  << "\n particle = " << particle
2157  << "\n type = " << type
2158  << "\n name = " << name
2159  << std::endl;
2160 
2161 
2162  // object type and condition type
2163  // object type - irrelevant for External conditions
2164  GtConditionType cType = TypeExternal;
2165 
2166  int relativeBx = 0;
2167  unsigned int channelID = 0;
2168 
2169  // Get object for External conditions
2170  const std::vector<esObject>& objects = condExt.getObjects();
2171  for (size_t jj = 0; jj < objects.size(); jj++) {
2172 
2173  const esObject object = objects.at(jj);
2174  if(object.getType() == esObjectType::EXT) {
2175  relativeBx = object.getBxOffset();
2176  channelID = object.getExternalChannelId();
2177  }
2178  }
2179 
2180 
2181  // set the boolean value for the ge_eq mode - irrelevant for External conditions
2182  bool gEq = false;
2183 
2184  // now create a new External condition
2185  ExternalTemplate externalCond(name);
2186 
2187  externalCond.setCondType(cType);
2188  externalCond.setCondGEq(gEq);
2189  externalCond.setCondChipNr(chipNr);
2190  externalCond.setCondRelativeBx(relativeBx);
2191  externalCond.setExternalChannel(channelID);
2192 
2193  LogTrace("TriggerMenuParser")
2194  << externalCond << "\n" << std::endl;
2195 
2196  // insert condition into the map
2197  if ( !insertConditionIntoMap(externalCond, chipNr)) {
2198 
2199  edm::LogError("TriggerMenuParser")
2200  << " Error: duplicate condition (" << name
2201  << ")" << std::endl;
2202 
2203  return false;
2204  } else {
2205 
2206  (m_vecExternalTemplate[chipNr]).push_back(externalCond);
2207 
2208  }
2209 
2210  return true;
2211 }
#define LogDebug(id)
type
Definition: HCALResponse.h:21
GtConditionType
Definition: GtDefinitions.h:99
bool insertConditionIntoMap(GtCondition &cond, const int chipNr)
#define LogTrace(id)
std::vector< std::vector< ExternalTemplate > > m_vecExternalTemplate
bool TriggerMenuParser::parseMuon ( tmeventsetup::esCondition  condMu,
unsigned int  chipNr = 0,
const bool  corrFlag = false 
)
private

parse a muon condition

parseMuon Parse a muon condition and insert an entry to the conditions map

Parameters
nodeThe corresponding node.
nameThe name of the condition.
chipNrThe number of the chip this condition is located.
Returns
"true" if succeeded, "false" if an error occurred.

Definition at line 665 of file TriggerMenuParser.cc.

References RecoTauCleanerPlugins::charge, gather_cfg::cout, GOODCOLL_filter_cfg::cut, hpstanc_transforms::cuts, HLT_FULL_cff::DoubleMuon, reco::tau::disc::Eta(), ora::GE, edm::isDebugEnabled(), findQualityFiles::jj, GetRecoTauVFromDQM_MC_cff::kk, LogDebug, LogTrace, Mu, mergeVDriftHistosByStation::name, colinearityKinematic::Phi, MuonTemplate::print(), GtCondition::setCondChipNr(), GtCondition::setCondGEq(), MuonTemplate::setConditionParameter(), GtCondition::setCondRelativeBx(), GtCondition::setCondType(), GtCondition::setObjectType(), HLT_FULL_cff::SingleMuon, AlCaHLTBitMon_QueryRunRegistry::string, l1t::Type1s, l1t::Type2s, l1t::Type3s, l1t::Type4s, and l1t::TypeNull.

666  {
667 
668  using namespace tmeventsetup;
669 
670  // get condition, particle name (must be muon) and type name
671  std::string condition = "muon";
672  std::string particle = "muon";//l1t2string( condMu.objectType() );
673  std::string type = l1t2string( condMu.getType() );
674  std::string name = l1t2string( condMu.getName() );
675  int nrObj = -1;
676 
677 
678 
680 
681  if (condMu.getType() == esConditionType::SingleMuon) {
682  type = "1_s";
683  cType = l1t::Type1s;
684  nrObj = 1;
685  } else if (condMu.getType() == esConditionType::DoubleMuon) {
686  type = "2_s";
687  cType = l1t::Type2s;
688  nrObj = 2;
689  } else if (condMu.getType() == esConditionType::TripleMuon) {
690  type = "3";
691  cType = l1t::Type3s;
692  nrObj = 3;
693  } else if (condMu.getType() == esConditionType::QuadMuon) {
694  type = "4";
695  cType = l1t::Type4s;
696  nrObj = 4;
697  } else {
698  edm::LogError("TriggerMenuParser") << "Wrong type for muon-condition ("
699  << type << ")" << std::endl;
700  return false;
701  }
702 
703  if (nrObj < 0) {
704  edm::LogError("TriggerMenuParser") << "Unknown type for muon-condition (" << type
705  << ")" << "\nCan not determine number of trigger objects. " << std::endl;
706  return false;
707  }
708 
709  LogDebug("TriggerMenuParser")
710  << "\n ****************************************** "
711  << "\n parseMuon "
712  << "\n condition = " << condition
713  << "\n particle = " << particle
714  << "\n type = " << type
715  << "\n name = " << name
716  << std::endl;
717 
718 
719 
720 // // get values
721 
722  // temporary storage of the parameters
723  std::vector<MuonTemplate::ObjectParameter> objParameter(nrObj);
724 
725  // Do we need this?
727 
728  // need at least two values for deltaPhi
729  std::vector<boost::uint64_t> tmpValues((nrObj > 2) ? nrObj : 2);
730  tmpValues.reserve( nrObj );
731 
732  if( int(condMu.getObjects().size())!=nrObj ){
733  edm::LogError("TriggerMenuParser") << " condMu objects: nrObj = " << nrObj
734  << "condMu.getObjects().size() = "
735  << condMu.getObjects().size()
736  << std::endl;
737  return false;
738  }
739 
740 
741 // Look for cuts on the objects in the condition
742  unsigned int chargeCorrelation = 1;
743  const std::vector<esCut>& cuts = condMu.getCuts();
744  for (size_t jj = 0; jj < cuts.size(); jj++)
745  {
746  const esCut cut = cuts.at(jj);
747  if(cut.getCutType() == esCutType::ChargeCorrelation) {
748  if( cut.getData()=="ls" ) chargeCorrelation = 2;
749  else if( cut.getData()=="os" ) chargeCorrelation = 4;
750  else chargeCorrelation = 1; //ignore correlation
751  }
752  }
753 
754  //set charge correlation parameter
755  corrParameter.chargeCorrelation = chargeCorrelation;//tmpValues[0];
756 
757 
758  int cnt = 0;
759 
760 
761 // BLW TO DO: These needs to the added to the object rather than the whole condition.
762  int relativeBx = 0;
763  bool gEq = false;
764 
765 // Loop over objects and extract the cuts on the objects
766  const std::vector<esObject>& objects = condMu.getObjects();
767  for (size_t jj = 0; jj < objects.size(); jj++) {
768 
769  const esObject object = objects.at(jj);
770  gEq = (object.getComparisonOperator() == esComparisonOperator::GE);
771 
772 // BLW TO DO: This needs to be added to the Object Parameters
773  relativeBx = object.getBxOffset();
774 
775 // Loop over the cuts for this object
776  int upperThresholdInd = -1;
777  int lowerThresholdInd = 0;
778  int cntEta = 0;
779  unsigned int etaWindow1Lower=-1, etaWindow1Upper=-1, etaWindow2Lower=-1, etaWindow2Upper=-1;
780  int cntPhi = 0;
781  unsigned int phiWindow1Lower=-1, phiWindow1Upper=-1, phiWindow2Lower=-1, phiWindow2Upper=-1;
782  int isolationLUT = 0xF; //default is to ignore unless specified.
783  int charge = -1; //default value is to ignore unless specified
784  int qualityLUT = 0xFFFF; //default is to ignore unless specified.
785 
786  const std::vector<esCut>& cuts = object.getCuts();
787  for (size_t kk = 0; kk < cuts.size(); kk++)
788  {
789  const esCut cut = cuts.at(kk);
790 
791  switch(cut.getCutType()){
792  case esCutType::Threshold:
793  lowerThresholdInd = cut.getMinimum().index;
794  upperThresholdInd = cut.getMaximum().index;
795  break;
796 
797  case esCutType::Eta: {
798 
799  if(cntEta == 0) {
800  etaWindow1Lower = cut.getMinimum().index;
801  etaWindow1Upper = cut.getMaximum().index;
802  } else if(cntEta == 1) {
803  etaWindow2Lower = cut.getMinimum().index;
804  etaWindow2Upper = cut.getMaximum().index;
805  } else {
806  edm::LogError("TriggerMenuParser") << "Too Many Eta Cuts for muon-condition ("
807  << particle << ")" << std::endl;
808  return false;
809  }
810  cntEta++;
811 
812  } break;
813 
814  case esCutType::Phi: {
815 
816  if(cntPhi == 0) {
817  phiWindow1Lower = cut.getMinimum().index;
818  phiWindow1Upper = cut.getMaximum().index;
819  } else if(cntPhi == 1) {
820  phiWindow2Lower = cut.getMinimum().index;
821  phiWindow2Upper = cut.getMaximum().index;
822  } else {
823  edm::LogError("TriggerMenuParser") << "Too Many Phi Cuts for muon-condition ("
824  << particle << ")" << std::endl;
825  return false;
826  }
827  cntPhi++;
828 
829  }break;
830 
831  case esCutType::Charge:
832  std::cout << "Found Charge Cut " << std::endl;
833  if( cut.getData()=="positive" ) charge = 0;
834  else if( cut.getData()=="negative" ) charge = 1;
835  else charge = -1;
836  break;
837  case esCutType::Quality:
838 
839  qualityLUT = l1tstr2int(cut.getData());
840 
841  break;
842  case esCutType::Isolation: {
843 
844  isolationLUT = l1tstr2int(cut.getData());
845 
846  } break;
847  default:
848  break;
849  } //end switch
850 
851  } //end loop over cuts
852 
853 
854 // Set the parameter cuts
855  objParameter[cnt].ptHighThreshold = upperThresholdInd;
856  objParameter[cnt].ptLowThreshold = lowerThresholdInd;
857 
858  objParameter[cnt].etaWindow1Lower = etaWindow1Lower;
859  objParameter[cnt].etaWindow1Upper = etaWindow1Upper;
860  objParameter[cnt].etaWindow2Lower = etaWindow2Lower;
861  objParameter[cnt].etaWindow2Upper = etaWindow2Upper;
862 
863  objParameter[cnt].phiWindow1Lower = phiWindow1Lower;
864  objParameter[cnt].phiWindow1Upper = phiWindow1Upper;
865  objParameter[cnt].phiWindow2Lower = phiWindow2Lower;
866  objParameter[cnt].phiWindow2Upper = phiWindow2Upper;
867 
868 // BLW TO DO: Do we need these anymore? Drop them?
869  objParameter[cnt].enableMip = false;//tmpMip[i];
870  objParameter[cnt].enableIso = false;//tmpEnableIso[i];
871  objParameter[cnt].requestIso = false;//tmpRequestIso[i];
872 
873  objParameter[cnt].charge = charge;
874  objParameter[cnt].qualityLUT = qualityLUT;
875  objParameter[cnt].isolationLUT = isolationLUT;
876 
877 
878  cnt++;
879  } //end loop over objects
880 
881 
882  // object types - all muons
883  std::vector<L1GtObject> objType(nrObj, Mu);
884 
885 
886 
887  // now create a new CondMuonition
888  MuonTemplate muonCond(name);
889 
890  muonCond.setCondType(cType);
891  muonCond.setObjectType(objType);
892  muonCond.setCondGEq(gEq);
893  muonCond.setCondChipNr(chipNr);
894  muonCond.setCondRelativeBx(relativeBx);
895 
896  muonCond.setConditionParameter(objParameter, corrParameter);
897 
898  if (edm::isDebugEnabled()) {
899  std::ostringstream myCoutStream;
900  muonCond.print(myCoutStream);
901  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
902  }
903 
904  // insert condition into the map and into muon template vector
905  if ( !insertConditionIntoMap(muonCond, chipNr)) {
906  edm::LogError("TriggerMenuParser")
907  << " Error: duplicate condition (" << name << ")"
908  << std::endl;
909  return false;
910  }
911  else {
912  LogDebug("TriggerMenuParser") << "Added Condition " << name << " to the ConditionMap" << std::endl;
913  if (corrFlag) {
914 
915  (m_corMuonTemplate[chipNr]).push_back(muonCond);
916  }
917  else {
918  LogDebug("TriggerMenuParser") << "Added Condition " << name << " to the vecMuonTemplate vector" << std::endl;
919  (m_vecMuonTemplate[chipNr]).push_back(muonCond);
920  }
921 
922  }
923 
924  //
925  return true;
926 }
#define LogDebug(id)
type
Definition: HCALResponse.h:21
bool isDebugEnabled()
GtConditionType
Definition: GtDefinitions.h:99
bool insertConditionIntoMap(GtCondition &cond, const int chipNr)
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate
#define LogTrace(id)
Definition: L1GtObject.h:30
int l1tstr2int(const std::string data)
tuple cout
Definition: gather_cfg.py:145
std::vector< std::vector< MuonTemplate > > m_vecMuonTemplate
bool TriggerMenuParser::parseMuonCorr ( const tmeventsetup::esObject *  condMu,
unsigned int  chipNr = 0 
)
private

Definition at line 929 of file TriggerMenuParser.cc.

References RecoTauCleanerPlugins::charge, gather_cfg::cout, GOODCOLL_filter_cfg::cut, hpstanc_transforms::cuts, reco::tau::disc::Eta(), ora::GE, edm::isDebugEnabled(), GetRecoTauVFromDQM_MC_cff::kk, LogDebug, LogTrace, Mu, mergeVDriftHistosByStation::name, colinearityKinematic::Phi, MuonTemplate::print(), GtCondition::setCondChipNr(), GtCondition::setCondGEq(), MuonTemplate::setConditionParameter(), GtCondition::setCondRelativeBx(), GtCondition::setCondType(), GtCondition::setObjectType(), AlCaHLTBitMon_QueryRunRegistry::string, and l1t::Type1s.

930  {
931 
932 
933 // XERCES_CPP_NAMESPACE_USE
934  using namespace tmeventsetup;
935 
936  // get condition, particle name (must be muon) and type name
937  std::string condition = "muon";
938  std::string particle = "muon";//l1t2string( condMu.objectType() );
939  std::string type = l1t2string( corrMu->getType() );
940  std::string name = l1t2string( corrMu->getName() );
941  int nrObj = 1;
942  type = "1_s";
944 
945 
946 
947  if (nrObj < 0) {
948  edm::LogError("TriggerMenuParser") << "Unknown type for muon-condition (" << type
949  << ")" << "\nCan not determine number of trigger objects. " << std::endl;
950  return false;
951  }
952 
953  LogDebug("TriggerMenuParser")
954  << "\n ****************************************** "
955  << "\n parseMuon "
956  << "\n condition = " << condition
957  << "\n particle = " << particle
958  << "\n type = " << type
959  << "\n name = " << name
960  << std::endl;
961 
962 
963 
964 // // get values
965 
966  // temporary storage of the parameters
967  std::vector<MuonTemplate::ObjectParameter> objParameter(nrObj);
968 
969  // Do we need this?
971 
972  // need at least two values for deltaPhi
973  std::vector<boost::uint64_t> tmpValues((nrObj > 2) ? nrObj : 2);
974  tmpValues.reserve( nrObj );
975 
976 
977 // BLW TO DO: How do we deal with these in the new format
978 // std::string str_chargeCorrelation = l1t2string( condMu.requestedChargeCorr() );
979  std::string str_chargeCorrelation = "ig";
980  unsigned int chargeCorrelation = 0;
981  if( str_chargeCorrelation=="ig" ) chargeCorrelation = 1;
982  else if( str_chargeCorrelation=="ls" ) chargeCorrelation = 2;
983  else if( str_chargeCorrelation=="os" ) chargeCorrelation = 4;
984 
985  //getXMLHexTextValue("1", dst);
986  corrParameter.chargeCorrelation = chargeCorrelation;//tmpValues[0];
987 
988 
989 
990  // BLW TO DO: These needs to the added to the object rather than the whole condition.
991  int relativeBx = 0;
992  bool gEq = false;
993 
994 
995  //const esObject* object = condMu;
996  gEq = (corrMu->getComparisonOperator() == esComparisonOperator::GE);
997 
998  // BLW TO DO: This needs to be added to the Object Parameters
999  relativeBx = corrMu->getBxOffset();
1000 
1001  // Loop over the cuts for this object
1002  int upperThresholdInd = -1;
1003  int lowerThresholdInd = 0;
1004  int cntEta = 0;
1005  unsigned int etaWindow1Lower=-1, etaWindow1Upper=-1, etaWindow2Lower=-1, etaWindow2Upper=-1;
1006  int cntPhi = 0;
1007  unsigned int phiWindow1Lower=-1, phiWindow1Upper=-1, phiWindow2Lower=-1, phiWindow2Upper=-1;
1008  int isolationLUT = 0xF; //default is to ignore unless specified.
1009  int charge = -1; //defaut is to ignore unless specified
1010  int qualityLUT = 0xFFFF; //default is to ignore unless specified.
1011 
1012  const std::vector<esCut>& cuts = corrMu->getCuts();
1013  for (size_t kk = 0; kk < cuts.size(); kk++)
1014  {
1015  const esCut cut = cuts.at(kk);
1016 
1017  switch(cut.getCutType()){
1018  case esCutType::Threshold:
1019  lowerThresholdInd = cut.getMinimum().index;
1020  upperThresholdInd = cut.getMaximum().index;
1021  break;
1022 
1023  case esCutType::Eta: {
1024 
1025  if(cntEta == 0) {
1026  etaWindow1Lower = cut.getMinimum().index;
1027  etaWindow1Upper = cut.getMaximum().index;
1028  } else if(cntEta == 1) {
1029  etaWindow2Lower = cut.getMinimum().index;
1030  etaWindow2Upper = cut.getMaximum().index;
1031  } else {
1032  edm::LogError("TriggerMenuParser") << "Too Many Eta Cuts for muon-condition ("
1033  << particle << ")" << std::endl;
1034  return false;
1035  }
1036  cntEta++;
1037 
1038  } break;
1039 
1040  case esCutType::Phi: {
1041 
1042  if(cntPhi == 0) {
1043  phiWindow1Lower = cut.getMinimum().index;
1044  phiWindow1Upper = cut.getMaximum().index;
1045  } else if(cntPhi == 1) {
1046  phiWindow2Lower = cut.getMinimum().index;
1047  phiWindow2Upper = cut.getMaximum().index;
1048  } else {
1049  edm::LogError("TriggerMenuParser") << "Too Many Phi Cuts for muon-condition ("
1050  << particle << ")" << std::endl;
1051  return false;
1052  }
1053  cntPhi++;
1054 
1055  }break;
1056 
1057  case esCutType::Charge:
1058  std::cout << "Found Charge Cut " << std::endl;
1059  if( cut.getData()=="positive" ) charge = 0;
1060  else if( cut.getData()=="negative" ) charge = 1;
1061  else charge = -1;
1062  break;
1063  case esCutType::Quality:
1064 
1065  qualityLUT = l1tstr2int(cut.getData());
1066 
1067  break;
1068  case esCutType::Isolation: {
1069 
1070  isolationLUT = l1tstr2int(cut.getData());
1071 
1072  } break;
1073  default:
1074  break;
1075  } //end switch
1076 
1077  } //end loop over cuts
1078 
1079 
1080  // Set the parameter cuts
1081  objParameter[0].ptHighThreshold = upperThresholdInd;
1082  objParameter[0].ptLowThreshold = lowerThresholdInd;
1083 
1084  objParameter[0].etaWindow1Lower = etaWindow1Lower;
1085  objParameter[0].etaWindow1Upper = etaWindow1Upper;
1086  objParameter[0].etaWindow2Lower = etaWindow2Lower;
1087  objParameter[0].etaWindow2Upper = etaWindow2Upper;
1088 
1089  objParameter[0].phiWindow1Lower = phiWindow1Lower;
1090  objParameter[0].phiWindow1Upper = phiWindow1Upper;
1091  objParameter[0].phiWindow2Lower = phiWindow2Lower;
1092  objParameter[0].phiWindow2Upper = phiWindow2Upper;
1093 
1094  // BLW TO DO: Do we need these anymore? Drop them?
1095  objParameter[0].enableMip = false;//tmpMip[i];
1096  objParameter[0].enableIso = false;//tmpEnableIso[i];
1097  objParameter[0].requestIso = false;//tmpRequestIso[i];
1098 
1099  objParameter[0].charge = charge;
1100  objParameter[0].qualityLUT = qualityLUT;
1101  objParameter[0].isolationLUT = isolationLUT;
1102 
1103 
1104  // object types - all muons
1105  std::vector<L1GtObject> objType(nrObj, Mu);
1106 
1107  // now create a new CondMuonition
1108  MuonTemplate muonCond(name);
1109 
1110  muonCond.setCondType(cType);
1111  muonCond.setObjectType(objType);
1112  muonCond.setCondGEq(gEq);
1113  muonCond.setCondChipNr(chipNr);
1114  muonCond.setCondRelativeBx(relativeBx);
1115  muonCond.setConditionParameter(objParameter, corrParameter);
1116 
1117  if (edm::isDebugEnabled()) {
1118  std::ostringstream myCoutStream;
1119  muonCond.print(myCoutStream);
1120  LogTrace("TriggerMenuParser") << myCoutStream.str() << "\n" << std::endl;
1121  }
1122 
1123  // insert condition into the map and into muon template vector
1124  if ( !insertConditionIntoMap(muonCond, chipNr)) {
1125  edm::LogError("TriggerMenuParser")
1126  << " Error: duplicate condition (" << name << ")"
1127  << std::endl;
1128  return false;
1129  }
1130  else {
1131  LogDebug("TriggerMenuParser") << "Added Condition " << name << " to the ConditionMap" << std::endl;
1132  (m_corMuonTemplate[chipNr]).push_back(muonCond);
1133  }
1134 
1135  //
1136  return true;
1137 }
#define LogDebug(id)
type
Definition: HCALResponse.h:21
bool isDebugEnabled()
GtConditionType
Definition: GtDefinitions.h:99
bool insertConditionIntoMap(GtCondition &cond, const int chipNr)
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate
#define LogTrace(id)
Definition: L1GtObject.h:30
int l1tstr2int(const std::string data)
tuple cout
Definition: gather_cfg.py:145
bool TriggerMenuParser::parseScales ( std::map< std::string, tmeventsetup::esScale >  scaleMap)
private

parse scales

parseScales Parse Et, Eta, and Phi Scales

Returns
"true" if succeeded, "false" if an error occurred.

Definition at line 541 of file TriggerMenuParser.cc.

References newFWLiteAna::bin, l1t::L1TGlobalScales::ScaleParameters::etaBins, l1t::L1TGlobalScales::ScaleParameters::etaMax, l1t::L1TGlobalScales::ScaleParameters::etaMin, l1t::L1TGlobalScales::ScaleParameters::etaStep, l1t::L1TGlobalScales::ScaleParameters::etBins, ETM, l1t::L1TGlobalScales::ScaleParameters::etMax, l1t::L1TGlobalScales::ScaleParameters::etMin, l1t::L1TGlobalScales::ScaleParameters::etStep, ETT, HTM, HTT, i, configurableAnalysis::Jet, configurableAnalysis::Muon, l1t::L1TGlobalScales::ScaleParameters::phiBins, l1t::L1TGlobalScales::ScaleParameters::phiMax, l1t::L1TGlobalScales::ScaleParameters::phiMin, l1t::L1TGlobalScales::ScaleParameters::phiStep, and pileupReCalc_HLTpaths::scale.

541  {
542 
543  using namespace tmeventsetup;
544 
545 // Setup ScaleParameter to hold information from parsing
546  L1TGlobalScales::ScaleParameters muScales;
547  L1TGlobalScales::ScaleParameters egScales;
548  L1TGlobalScales::ScaleParameters tauScales;
549  L1TGlobalScales::ScaleParameters jetScales;
550  L1TGlobalScales::ScaleParameters ettScales;
551  L1TGlobalScales::ScaleParameters etmScales;
552  L1TGlobalScales::ScaleParameters httScales;
553  L1TGlobalScales::ScaleParameters htmScales;
554 
555 // Start by parsing the Scale Map
556  for (std::map<std::string, esScale>::const_iterator cit = scaleMap.begin();
557  cit != scaleMap.end(); cit++)
558  {
559  const esScale& scale = cit->second;
560 
561  L1TGlobalScales::ScaleParameters *scaleParam;
562  if (scale.getObjectType() == esObjectType::Muon) scaleParam = &muScales;
563  else if (scale.getObjectType() == esObjectType::Egamma) scaleParam = &egScales;
564  else if (scale.getObjectType() == esObjectType::Tau) scaleParam = &tauScales;
565  else if (scale.getObjectType() == esObjectType::Jet) scaleParam = &jetScales;
566  else if (scale.getObjectType() == esObjectType::ETT) scaleParam = &ettScales;
567  else if (scale.getObjectType() == esObjectType::ETM) scaleParam = &etmScales;
568  else if (scale.getObjectType() == esObjectType::HTT) scaleParam = &httScales;
569  else if (scale.getObjectType() == esObjectType::HTM) scaleParam = &htmScales;
570  else scaleParam = 0;
571 
572  if(scaleParam != 0) {
573  switch(scale.getScaleType()) {
574  case esScaleType::EtScale: {
575  scaleParam->etMin = scale.getMinimum();
576  scaleParam->etMax = scale.getMaximum();
577  scaleParam->etStep = scale.getStep();
578 
579  //Get bin edges
580  const std::vector<esBin> binsV = scale.getBins();
581  for(unsigned int i=0; i<binsV.size(); i++) {
582  const esBin& bin = binsV.at(i);
583  std::pair<double, double> binLimits(bin.minimum, bin.maximum);
584  scaleParam->etBins.push_back(binLimits);
585  }
586 
587  // If this is an energy sum fill dummy values for eta and phi
588  // There are no scales for these in the XML so the other case statements will not be seen....do it here.
589  if(scale.getObjectType() == esObjectType::ETT || scale.getObjectType() == esObjectType::HTT ||
590  scale.getObjectType() == esObjectType::ETM || scale.getObjectType() == esObjectType::HTM ) {
591 
592  scaleParam->etaMin = -1.;
593  scaleParam->etaMax = -1.;
594  scaleParam->etaStep = -1.;
595  if(scale.getObjectType() == esObjectType::ETT || scale.getObjectType() == esObjectType::HTT) {
596  scaleParam->phiMin = -1.;
597  scaleParam->phiMax = -1.;
598  scaleParam->phiStep = -1.;
599  }
600  }
601  }
602  break;
603  case esScaleType::EtaScale: {
604  scaleParam->etaMin = scale.getMinimum();
605  scaleParam->etaMax = scale.getMaximum();
606  scaleParam->etaStep = scale.getStep();
607 
608  //Get bin edges
609  const std::vector<esBin> binsV = scale.getBins();
610  for(unsigned int i=0; i<binsV.size(); i++) {
611  const esBin& bin = binsV.at(i);
612  std::pair<double, double> binLimits(bin.minimum, bin.maximum);
613  scaleParam->etaBins.push_back(binLimits);
614  }
615  }
616  break;
617  case esScaleType::PhiScale: {
618  scaleParam->phiMin = scale.getMinimum();
619  scaleParam->phiMax = scale.getMaximum();
620  scaleParam->phiStep = scale.getStep();
621 
622  //Get bin edges
623  const std::vector<esBin> binsV = scale.getBins();
624  for(unsigned int i=0; i<binsV.size(); i++) {
625  const esBin& bin = binsV.at(i);
626  std::pair<double, double> binLimits(bin.minimum, bin.maximum);
627  scaleParam->phiBins.push_back(binLimits);
628  }
629  }
630  break;
631  default:
632 
633  break;
634  } //end switch
635  } //end valid scale
636  } //end loop over scaleMap
637 
638  // put the ScaleParameters into the class
639  m_gtScales.setMuonScales(muScales);
640  m_gtScales.setEGScales(egScales);
641  m_gtScales.setTauScales(tauScales);
642  m_gtScales.setJetScales(jetScales);
643  m_gtScales.setETTScales(ettScales);
644  m_gtScales.setETMScales(etmScales);
645  m_gtScales.setHTTScales(httScales);
646  m_gtScales.setHTMScales(htmScales);
647 
648 
649 
650  return true;
651 }
int i
Definition: DBlmapReader.cc:9
Definition: L1GtObject.h:39
Definition: L1GtObject.h:36
void setETMScales(ScaleParameters &scales)
void setHTMScales(ScaleParameters &scales)
Definition: L1GtObject.h:38
L1TGlobalScales m_gtScales
void setTauScales(ScaleParameters &scales)
void setETTScales(ScaleParameters &scales)
void setHTTScales(ScaleParameters &scales)
void setJetScales(ScaleParameters &scales)
void setEGScales(ScaleParameters &scales)
Definition: L1GtObject.h:37
void setMuonScales(ScaleParameters &scales)
void TriggerMenuParser::setCorCaloTemplate ( const std::vector< std::vector< CaloTemplate > > &  corCaloTempl)

Definition at line 165 of file TriggerMenuParser.cc.

166  {
167 
168  m_corCaloTemplate = corCaloTempl;
169 }
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate
void TriggerMenuParser::setCorEnergySumTemplate ( const std::vector< std::vector< EnergySumTemplate > > &  corEnergySumTempl)

Definition at line 171 of file TriggerMenuParser.cc.

172  {
173 
174  m_corEnergySumTemplate = corEnergySumTempl;
175 }
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
void TriggerMenuParser::setCorMuonTemplate ( const std::vector< std::vector< MuonTemplate > > &  corMuonTempl)

Definition at line 159 of file TriggerMenuParser.cc.

160  {
161 
162  m_corMuonTemplate = corMuonTempl;
163 }
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate
void TriggerMenuParser::setGtAlgorithmAliasMap ( const AlgorithmMap algoMap)

Definition at line 186 of file TriggerMenuParser.cc.

186  {
187  m_algorithmAliasMap = algoMap;
188 }
AlgorithmMap m_algorithmAliasMap
map containing the physics algorithms (by alias)
void TriggerMenuParser::setGtAlgorithmImplementation ( const std::string &  val)

Definition at line 358 of file TriggerMenuParser.cc.

358  {
359 
361 
362 }
std::string m_algorithmImplementation
void TriggerMenuParser::setGtAlgorithmMap ( const AlgorithmMap algoMap)

Definition at line 181 of file TriggerMenuParser.cc.

181  {
182  m_algorithmMap = algoMap;
183 }
AlgorithmMap m_algorithmMap
map containing the physics algorithms (by name)
void TriggerMenuParser::setGtConditionMap ( const std::vector< ConditionMap > &  condMap)

Definition at line 101 of file TriggerMenuParser.cc.

101  {
102  m_conditionMap = condMap;
103 }
std::vector< ConditionMap > m_conditionMap
map containing the conditions (per condition chip) - transient
void TriggerMenuParser::setGtNumberConditionChips ( const unsigned int &  numberConditionChipsValue)

Definition at line 68 of file TriggerMenuParser.cc.

Referenced by L1TGlobalProducer::produce().

69  {
70 
71  m_numberConditionChips = numberConditionChipsValue;
72 
73 }
unsigned int m_numberConditionChips
hardware limits
void TriggerMenuParser::setGtNumberPhysTriggers ( const unsigned int &  numberPhysTriggersValue)

Definition at line 92 of file TriggerMenuParser.cc.

Referenced by L1TGlobalProducer::produce().

93  {
94 
95  m_numberPhysTriggers = numberPhysTriggersValue;
96 
97 }
unsigned int m_numberPhysTriggers
number of physics trigger algorithms
void TriggerMenuParser::setGtOrderConditionChip ( const std::vector< int > &  orderConditionChipValue)

Definition at line 84 of file TriggerMenuParser.cc.

Referenced by L1TGlobalProducer::produce().

85  {
86 
87  m_orderConditionChip = orderConditionChipValue;
88 
89 }
std::vector< int > m_orderConditionChip
void TriggerMenuParser::setGtPinsOnConditionChip ( const unsigned int &  pinsOnConditionChipValue)

Definition at line 76 of file TriggerMenuParser.cc.

Referenced by L1TGlobalProducer::produce().

76  {
77 
78  m_pinsOnConditionChip = pinsOnConditionChipValue;
79 
80 }
unsigned int m_pinsOnConditionChip
number of pins on the GTL condition chips
void TriggerMenuParser::setGtScaleDbKey ( const std::string &  scaleKey)

Definition at line 119 of file TriggerMenuParser.cc.

119  {
120  m_scaleDbKey = scaleKey;
121 }
std::string m_scaleDbKey
menu associated scale key
void TriggerMenuParser::setGtTriggerMenuAuthor ( const std::string &  val)

Definition at line 346 of file TriggerMenuParser.cc.

346  {
347 
348  m_triggerMenuAuthor = val;
349 
350 }
void TriggerMenuParser::setGtTriggerMenuDate ( const std::string &  val)

Definition at line 340 of file TriggerMenuParser.cc.

340  {
341 
342  m_triggerMenuDate = val;
343 
344 }
void TriggerMenuParser::setGtTriggerMenuDescription ( const std::string &  val)

Definition at line 352 of file TriggerMenuParser.cc.

352  {
353 
355 
356 }
std::string m_triggerMenuDescription
void TriggerMenuParser::setGtTriggerMenuImplementation ( const std::string &  menuImplementation)

Definition at line 114 of file TriggerMenuParser.cc.

114  {
115  m_triggerMenuImplementation = menuImplementation;
116 }
std::string m_triggerMenuImplementation
void TriggerMenuParser::setGtTriggerMenuInterface ( const std::string &  menuInterface)

Definition at line 106 of file TriggerMenuParser.cc.

106  {
107  m_triggerMenuInterface = menuInterface;
108 }
std::string m_triggerMenuInterface
menu names
void TriggerMenuParser::setGtTriggerMenuInterfaceAuthor ( const std::string &  val)

Definition at line 327 of file TriggerMenuParser.cc.

327  {
328 
330 
331 }
std::string m_triggerMenuInterfaceAuthor
void TriggerMenuParser::setGtTriggerMenuInterfaceDate ( const std::string &  val)

Definition at line 321 of file TriggerMenuParser.cc.

321  {
322 
324 
325 }
std::string m_triggerMenuInterfaceDate
number of technical triggers
void TriggerMenuParser::setGtTriggerMenuInterfaceDescription ( const std::string &  val)

Definition at line 333 of file TriggerMenuParser.cc.

333  {
334 
336 
337 }
std::string m_triggerMenuInterfaceDescription
void TriggerMenuParser::setGtTriggerMenuName ( const std::string &  menuName)

Definition at line 110 of file TriggerMenuParser.cc.

110  {
111  m_triggerMenuName = menuName;
112 }
void TriggerMenuParser::setVecCaloTemplate ( const std::vector< std::vector< CaloTemplate > > &  vecCaloTempl)

Definition at line 130 of file TriggerMenuParser.cc.

131  {
132 
133  m_vecCaloTemplate = vecCaloTempl;
134 }
std::vector< std::vector< CaloTemplate > > m_vecCaloTemplate
void TriggerMenuParser::setVecCorrelationTemplate ( const std::vector< std::vector< CorrelationTemplate > > &  vecCorrelationTempl)

Definition at line 151 of file TriggerMenuParser.cc.

152  {
153 
154  m_vecCorrelationTemplate = vecCorrelationTempl;
155 }
std::vector< std::vector< CorrelationTemplate > > m_vecCorrelationTemplate
void TriggerMenuParser::setVecEnergySumTemplate ( const std::vector< std::vector< EnergySumTemplate > > &  vecEnergySumTempl)

Definition at line 136 of file TriggerMenuParser.cc.

137  {
138 
139  m_vecEnergySumTemplate = vecEnergySumTempl;
140 }
std::vector< std::vector< EnergySumTemplate > > m_vecEnergySumTemplate
void TriggerMenuParser::setVecExternalTemplate ( const std::vector< std::vector< ExternalTemplate > > &  vecExternalTempl)

Definition at line 144 of file TriggerMenuParser.cc.

145  {
146 
147  m_vecExternalTemplate = vecExternalTempl;
148 }
std::vector< std::vector< ExternalTemplate > > m_vecExternalTemplate
void TriggerMenuParser::setVecMuonTemplate ( const std::vector< std::vector< MuonTemplate > > &  vecMuonTempl)

Definition at line 124 of file TriggerMenuParser.cc.

125  {
126 
127  m_vecMuonTemplate = vecMuonTempl;
128 }
std::vector< std::vector< MuonTemplate > > m_vecMuonTemplate
const std::vector<std::vector<CaloTemplate> >& l1t::TriggerMenuParser::vecCaloTemplate ( ) const
inline

Definition at line 148 of file TriggerMenuParser.h.

References m_vecCaloTemplate.

Referenced by L1TGlobalProducer::produce().

148  {
149  return m_vecCaloTemplate;
150  }
std::vector< std::vector< CaloTemplate > > m_vecCaloTemplate
const std::vector<std::vector<CorrelationTemplate> >& l1t::TriggerMenuParser::vecCorrelationTemplate ( ) const
inline

Definition at line 175 of file TriggerMenuParser.h.

References m_vecCorrelationTemplate.

Referenced by L1TGlobalProducer::produce().

175  {
176 
178  }
std::vector< std::vector< CorrelationTemplate > > m_vecCorrelationTemplate
const std::vector<std::vector<EnergySumTemplate> >& l1t::TriggerMenuParser::vecEnergySumTemplate ( ) const
inline

Definition at line 155 of file TriggerMenuParser.h.

References m_vecEnergySumTemplate.

Referenced by L1TGlobalProducer::produce().

155  {
156 
157  return m_vecEnergySumTemplate;
158  }
std::vector< std::vector< EnergySumTemplate > > m_vecEnergySumTemplate
const std::vector<std::vector<ExternalTemplate> >& l1t::TriggerMenuParser::vecExternalTemplate ( ) const
inline

Definition at line 166 of file TriggerMenuParser.h.

References m_vecExternalTemplate.

Referenced by L1TGlobalProducer::produce().

166  {
167 
168  return m_vecExternalTemplate;
169  }
std::vector< std::vector< ExternalTemplate > > m_vecExternalTemplate
const std::vector<std::vector<MuonTemplate> >& l1t::TriggerMenuParser::vecMuonTemplate ( ) const
inline

get / set the vectors containing the conditions

Definition at line 142 of file TriggerMenuParser.h.

References m_vecMuonTemplate.

Referenced by L1TGlobalProducer::produce().

142  {
143  return m_vecMuonTemplate;
144  }
std::vector< std::vector< MuonTemplate > > m_vecMuonTemplate

Member Data Documentation

AlgorithmMap l1t::TriggerMenuParser::m_algorithmAliasMap
private

map containing the physics algorithms (by alias)

Definition at line 418 of file TriggerMenuParser.h.

Referenced by gtAlgorithmAliasMap().

std::string l1t::TriggerMenuParser::m_algorithmImplementation
private

Definition at line 384 of file TriggerMenuParser.h.

Referenced by gtAlgorithmImplementation().

AlgorithmMap l1t::TriggerMenuParser::m_algorithmMap
private

map containing the physics algorithms (by name)

Definition at line 415 of file TriggerMenuParser.h.

Referenced by gtAlgorithmMap().

std::vector<ConditionMap> l1t::TriggerMenuParser::m_conditionMap
private

map containing the conditions (per condition chip) - transient

Definition at line 390 of file TriggerMenuParser.h.

Referenced by gtConditionMap().

std::vector<std::vector<CaloTemplate> > l1t::TriggerMenuParser::m_corCaloTemplate
private

Definition at line 411 of file TriggerMenuParser.h.

Referenced by corCaloTemplate().

std::vector<std::vector<EnergySumTemplate> > l1t::TriggerMenuParser::m_corEnergySumTemplate
private

Definition at line 412 of file TriggerMenuParser.h.

Referenced by corEnergySumTemplate().

std::vector<std::vector<MuonTemplate> > l1t::TriggerMenuParser::m_corMuonTemplate
private

Definition at line 410 of file TriggerMenuParser.h.

Referenced by corMuonTemplate().

L1TGlobalScales l1t::TriggerMenuParser::m_gtScales
private

Definition at line 421 of file TriggerMenuParser.h.

Referenced by gtScales().

unsigned int l1t::TriggerMenuParser::m_numberConditionChips
private

hardware limits

number of condition chips

Definition at line 357 of file TriggerMenuParser.h.

Referenced by gtNumberConditionChips().

unsigned int l1t::TriggerMenuParser::m_numberPhysTriggers
private

number of physics trigger algorithms

Definition at line 367 of file TriggerMenuParser.h.

Referenced by gtNumberPhysTriggers().

std::vector<int> l1t::TriggerMenuParser::m_orderConditionChip
private

correspondence "condition chip - GTL algorithm word" in the hardware chip 2: 0 - 95; chip 1: 96 - 128 (191)

Definition at line 364 of file TriggerMenuParser.h.

Referenced by gtOrderConditionChip().

unsigned int l1t::TriggerMenuParser::m_pinsOnConditionChip
private

number of pins on the GTL condition chips

Definition at line 360 of file TriggerMenuParser.h.

Referenced by gtPinsOnConditionChip().

std::string l1t::TriggerMenuParser::m_scaleDbKey
private

menu associated scale key

Definition at line 400 of file TriggerMenuParser.h.

Referenced by gtScaleDbKey().

std::string l1t::TriggerMenuParser::m_triggerMenuAuthor
private

Definition at line 381 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuAuthor().

std::string l1t::TriggerMenuParser::m_triggerMenuDate
private

Definition at line 380 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuDate().

std::string l1t::TriggerMenuParser::m_triggerMenuDescription
private

Definition at line 382 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuDescription().

std::string l1t::TriggerMenuParser::m_triggerMenuImplementation
private

Definition at line 397 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuImplementation().

std::string l1t::TriggerMenuParser::m_triggerMenuInterface
private

menu names

Definition at line 395 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuInterface().

std::string l1t::TriggerMenuParser::m_triggerMenuInterfaceAuthor
private

Definition at line 377 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuInterfaceAuthor().

std::string l1t::TriggerMenuParser::m_triggerMenuInterfaceDate
private

number of technical triggers

Definition at line 376 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuInterfaceDate().

std::string l1t::TriggerMenuParser::m_triggerMenuInterfaceDescription
private

Definition at line 378 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuInterfaceDescription().

std::string l1t::TriggerMenuParser::m_triggerMenuName
private

Definition at line 396 of file TriggerMenuParser.h.

Referenced by gtTriggerMenuName().

std::vector<std::vector<CaloTemplate> > l1t::TriggerMenuParser::m_vecCaloTemplate
private

Definition at line 405 of file TriggerMenuParser.h.

Referenced by vecCaloTemplate().

std::vector<std::vector<CorrelationTemplate> > l1t::TriggerMenuParser::m_vecCorrelationTemplate
private

Definition at line 409 of file TriggerMenuParser.h.

Referenced by vecCorrelationTemplate().

std::vector<std::vector<EnergySumTemplate> > l1t::TriggerMenuParser::m_vecEnergySumTemplate
private

Definition at line 406 of file TriggerMenuParser.h.

Referenced by vecEnergySumTemplate().

std::vector<std::vector<ExternalTemplate> > l1t::TriggerMenuParser::m_vecExternalTemplate
private

Definition at line 407 of file TriggerMenuParser.h.

Referenced by vecExternalTemplate().

std::vector<std::vector<MuonTemplate> > l1t::TriggerMenuParser::m_vecMuonTemplate
private

vectors containing the conditions explicit, due to persistency...

Definition at line 404 of file TriggerMenuParser.h.

Referenced by vecMuonTemplate().