test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TriggerMenuParser.h
Go to the documentation of this file.
1 #ifndef L1TGlobal_TriggerMenuParser_h
2 #define L1TGlobal_TriggerMenuParser_h
3 
21 // system include files
22 #include <string>
23 #include <vector>
24 
26 
32 
34 
36 
37 #include "tmEventSetup/esTriggerMenu.hh"
38 #include "tmEventSetup/esAlgorithm.hh"
39 #include "tmEventSetup/esCondition.hh"
40 #include "tmEventSetup/esObject.hh"
41 #include "tmEventSetup/esCut.hh"
42 #include "tmEventSetup/esScale.hh"
43 
44 // forward declarations
45 class GlobalCondition;
46 class GlobalAlgorithm;
47 
48 namespace l1t {
49 
50 // class declaration
52 {
53 
54 public:
55 
59 
61  virtual ~TriggerMenuParser();
62 
63 public:
64 
66  inline const unsigned int gtNumberConditionChips() const {
68  }
69 
70  void setGtNumberConditionChips(const unsigned int&);
71 
73  inline const unsigned int gtPinsOnConditionChip() const {
74  return m_pinsOnConditionChip;
75  }
76 
77  void setGtPinsOnConditionChip(const unsigned int&);
78 
81  inline std::vector<int> gtOrderConditionChip() const {
82  return m_orderConditionChip;
83  }
84 
85  void setGtOrderConditionChip(const std::vector<int>&);
86 
88  inline const unsigned int gtNumberPhysTriggers() const {
89  return m_numberPhysTriggers;
90  }
91 
92  void setGtNumberPhysTriggers(const unsigned int&);
93 
94 
95 
96 public:
97 
99  inline const std::vector<ConditionMap>& gtConditionMap() const {
100  return m_conditionMap;
101  }
102 
103  void setGtConditionMap(const std::vector<ConditionMap>&);
104 
106  inline const std::string& gtTriggerMenuInterface() const {
107  return m_triggerMenuInterface;
108  }
109 
111 
112  //
113  inline const std::string& gtTriggerMenuName() const {
114  return m_triggerMenuName;
115  }
116 
117  void setGtTriggerMenuName(const std::string&);
118 
119  //
120  inline const unsigned long gtTriggerMenuImplementation() const {
122  }
123 
124  void setGtTriggerMenuImplementation(const unsigned long&);
125 
127  inline const std::string& gtScaleDbKey() const {
128  return m_scaleDbKey;
129  }
130 
132  inline const GlobalScales& gtScales() const {
133  return m_gtScales;
134  }
135 
136  void setGtScaleDbKey(const std::string&);
137 
139  inline const std::vector<std::vector<MuonTemplate> >& vecMuonTemplate() const {
140  return m_vecMuonTemplate;
141  }
142  void setVecMuonTemplate(const std::vector<std::vector<MuonTemplate> >&);
143 
144  //
145  inline const std::vector<std::vector<CaloTemplate> >& vecCaloTemplate() const {
146  return m_vecCaloTemplate;
147  }
148 
149  void setVecCaloTemplate(const std::vector<std::vector<CaloTemplate> >&);
150 
151  //
152  inline const std::vector<std::vector<EnergySumTemplate> >& vecEnergySumTemplate() const {
153 
154  return m_vecEnergySumTemplate;
155  }
156 
158  const std::vector<std::vector<EnergySumTemplate> >&);
159 
160  //
161 
162  inline const std::vector<std::vector<ExternalTemplate> >&
164 
165  return m_vecExternalTemplate;
166  }
167 
169  const std::vector<std::vector<ExternalTemplate> >&);
170 
171  //
172  inline const std::vector<std::vector<CorrelationTemplate> >& vecCorrelationTemplate() const {
173 
175  }
176 
178  const std::vector<std::vector<CorrelationTemplate> >&);
179 
180  // get / set the vectors containing the conditions for correlation templates
181  //
182  inline const std::vector<std::vector<MuonTemplate> >& corMuonTemplate() const {
183  return m_corMuonTemplate;
184  }
185 
186  void setCorMuonTemplate(const std::vector<std::vector<MuonTemplate> >&);
187 
188  //
189  inline const std::vector<std::vector<CaloTemplate> >& corCaloTemplate() const {
190  return m_corCaloTemplate;
191  }
192 
193  void setCorCaloTemplate(const std::vector<std::vector<CaloTemplate> >&);
194 
195  //
196  inline const std::vector<std::vector<EnergySumTemplate> >& corEnergySumTemplate() const {
197 
198  return m_corEnergySumTemplate;
199  }
200 
202  const std::vector<std::vector<EnergySumTemplate> >&);
203 
205  inline const AlgorithmMap& gtAlgorithmMap() const {
206  return m_algorithmMap;
207  }
208 
209  void setGtAlgorithmMap(const AlgorithmMap&);
210 
212  inline const AlgorithmMap& gtAlgorithmAliasMap() const {
213  return m_algorithmAliasMap;
214  }
215 
217 
218 
219 public:
220 
221 
222  void parseCondFormats(const L1TUtmTriggerMenu* utmMenu);
223 
224 
225  std::map<std::string, unsigned int> getExternalSignals(const L1TUtmTriggerMenu* utmMenu);
226 
227 public:
228 
230  inline const std::string& gtTriggerMenuInterfaceDate() const {
232  }
233 
235 
238  }
239 
241 
244  }
245 
247 
248  //
249 
250  inline const int gtTriggerMenuUUID() const {
251  return m_triggerMenuUUID;
252  }
253 
254  void setGtTriggerMenuUUID(const int);
255 
256  inline const std::string& gtTriggerMenuDate() const {
257  return m_triggerMenuDate;
258  }
259 
260  void setGtTriggerMenuDate(const std::string&);
261 
262  inline const std::string& gtTriggerMenuAuthor() const {
263  return m_triggerMenuAuthor;
264  }
265 
266  void setGtTriggerMenuAuthor(const std::string&);
267 
268  inline const std::string& gtTriggerMenuDescription() const {
270  }
271 
273 
274 
275  inline const std::string& gtAlgorithmImplementation() const {
277  }
278 
280 
281 
282 private:
283 
284  // methods for conditions and algorithms
285 
288  void clearMaps();
289 
292  bool insertConditionIntoMap(GlobalCondition& cond, const int chipNr);
293 
295  bool insertAlgorithmIntoMap(const GlobalAlgorithm& alg);
296 
297  template <typename T> std::string l1t2string( T );
298  int l1tstr2int( const std::string data );
299 
300 
302 /* bool parseScale(tmeventsetup::esScale scale); */
303 // bool parseScales( tmeventsetup::esScale scale);
304  bool parseScales(std::map<std::string, tmeventsetup::esScale> scaleMap);
305 
306 
308 /* bool parseMuon(XERCES_CPP_NAMESPACE::DOMNode* node, */
309 /* const std::string& name, unsigned int chipNr = 0, */
310 /* const bool corrFlag = false); */
311  bool parseMuon( tmeventsetup::esCondition condMu,
312  unsigned int chipNr = 0, const bool corrFlag = false);
313 
314  bool parseMuonCorr(const tmeventsetup::esObject* condMu,
315  unsigned int chipNr = 0);
316 
317 
319 /* bool parseCalo(XERCES_CPP_NAMESPACE::DOMNode* node, */
320 /* const std::string& name, unsigned int chipNr = 0, */
321 /* const bool corrFlag = false); */
322  bool parseCalo( tmeventsetup::esCondition condCalo,
323  unsigned int chipNr = 0, const bool corrFlag = false);
324 
325  bool parseCaloCorr(const tmeventsetup::esObject* corrCalo,
326  unsigned int chipNr = 0);
327 
329  /* bool parseEnergySum(XERCES_CPP_NAMESPACE::DOMNode* node, */
330  /* const std::string& name, unsigned int chipNr = 0, */
331  /* const bool corrFlag = false); */
332 
333  bool parseEnergySum( tmeventsetup::esCondition condEnergySums,
334  unsigned int chipNr = 0, const bool corrFlag = false);
335 
336 
337  bool parseEnergySumCorr(const tmeventsetup::esObject* corrESum,
338  unsigned int chipNr = 0);
339 
340 
341  bool parseExternal(tmeventsetup::esCondition condExt,
342  unsigned int chipNr = 0);
343 
344 
346  bool parseCorrelation(tmeventsetup::esCondition corrCond, unsigned int chipNr = 0);
347 
348 
350  //bool parseAlgorithms(XERCES_CPP_NAMESPACE::XercesDOMParser* parser);
351  bool parseAlgorithm( tmeventsetup::esAlgorithm algorithm,
352  unsigned int chipNr = 0 );
353 
354  // Parse LUT for Cal Mu Eta
355  void parseCalMuEta_LUTS(std::map<std::string, tmeventsetup::esScale> scaleMap,
356  std::string obj1, std::string obj2);
357 
358 
359  // Parse LUT for Cal Mu Phi
360  void parseCalMuPhi_LUTS(std::map<std::string, tmeventsetup::esScale> scaleMap,
361  std::string obj1, std::string obj2);
362 
363  // Parse LUT for Cal Mu Pt
364  void parsePt_LUTS(std::map<std::string, tmeventsetup::esScale> scaleMap,
365  std::string obj1, unsigned int prec);
366 
367  // Parse LUT for Delta Eta and Cosh
368  void parseDeltaEta_Cosh_LUTS(std::map<std::string, tmeventsetup::esScale> scaleMap,
369  std::string obj1, std::string obj2,
370  unsigned int prec1, unsigned int prec2) ;
371 
372  // Parse LUT for Delta Eta and Cosh
373  void parseDeltaPhi_Cos_LUTS(std::map<std::string, tmeventsetup::esScale> scaleMap,
374  std::string obj1, std::string obj2,
375  unsigned int prec1, unsigned int prec2) ;
376 
377 
378 private:
379 
380 
382 
385 
387  unsigned int m_pinsOnConditionChip;
388 
391  std::vector<int> m_orderConditionChip;
392 
394  unsigned int m_numberPhysTriggers;
395 
397  //unsigned int m_numberTechTriggers;
398 
399 
400 private:
401 
402 
406 
410 
412 
413 
414 private:
415 
417  std::vector<ConditionMap> m_conditionMap;
418 
419 private:
420 
425  unsigned long m_triggerMenuUUID;
426 
429 
432  std::vector<std::vector<MuonTemplate> > m_vecMuonTemplate;
433  std::vector<std::vector<CaloTemplate> > m_vecCaloTemplate;
434  std::vector<std::vector<EnergySumTemplate> > m_vecEnergySumTemplate;
435  std::vector<std::vector<ExternalTemplate> > m_vecExternalTemplate;
436 
437  std::vector<std::vector<CorrelationTemplate> > m_vecCorrelationTemplate;
438  std::vector<std::vector<MuonTemplate> > m_corMuonTemplate;
439  std::vector<std::vector<CaloTemplate> > m_corCaloTemplate;
440  std::vector<std::vector<EnergySumTemplate> > m_corEnergySumTemplate;
441 
444 
447 
448  // class containing the scales from the L1 Menu XML
450 
451 };
452 
453 }
454 #endif /*L1TGlobal_TriggerMenuParser_h*/
unsigned int m_numberPhysTriggers
number of physics trigger algorithms
void setGtTriggerMenuName(const std::string &)
const unsigned int gtPinsOnConditionChip() const
get / set the number of pins on the GTL condition chips
void setGtScaleDbKey(const std::string &)
const std::vector< std::vector< EnergySumTemplate > > & vecEnergySumTemplate() const
void parseCalMuEta_LUTS(std::map< std::string, tmeventsetup::esScale > scaleMap, std::string obj1, std::string obj2)
void parseCalMuPhi_LUTS(std::map< std::string, tmeventsetup::esScale > scaleMap, std::string obj1, std::string obj2)
void setGtOrderConditionChip(const std::vector< int > &)
const AlgorithmMap & gtAlgorithmAliasMap() const
get / set the algorithm map (by alias)
unsigned int m_numberConditionChips
hardware limits
std::vector< std::vector< CaloTemplate > > m_vecCaloTemplate
void setGtAlgorithmMap(const AlgorithmMap &)
const std::vector< std::vector< ExternalTemplate > > & vecExternalTemplate() const
void setVecCaloTemplate(const std::vector< std::vector< CaloTemplate > > &)
std::vector< std::vector< EnergySumTemplate > > m_corEnergySumTemplate
bool parseExternal(tmeventsetup::esCondition condExt, unsigned int chipNr=0)
std::vector< std::vector< CaloTemplate > > m_corCaloTemplate
virtual ~TriggerMenuParser()
destructor
std::map< std::string, unsigned int > getExternalSignals(const L1TUtmTriggerMenu *utmMenu)
const std::string & gtTriggerMenuDate() const
AlgorithmMap m_algorithmMap
map containing the physics algorithms (by name)
const std::string & gtTriggerMenuInterfaceAuthor() const
void setVecEnergySumTemplate(const std::vector< std::vector< EnergySumTemplate > > &)
void setVecCorrelationTemplate(const std::vector< std::vector< CorrelationTemplate > > &)
std::string m_triggerMenuInterface
menu names
void setVecMuonTemplate(const std::vector< std::vector< MuonTemplate > > &)
void setGtAlgorithmAliasMap(const AlgorithmMap &)
void setGtPinsOnConditionChip(const unsigned int &)
void setGtAlgorithmImplementation(const std::string &)
const std::vector< ConditionMap > & gtConditionMap() const
get / set / build the condition maps
std::string m_scaleDbKey
menu associated scale key
void parseCondFormats(const L1TUtmTriggerMenu *utmMenu)
void parseDeltaEta_Cosh_LUTS(std::map< std::string, tmeventsetup::esScale > scaleMap, std::string obj1, std::string obj2, unsigned int prec1, unsigned int prec2)
std::string m_triggerMenuInterfaceAuthor
std::vector< ConditionMap > m_conditionMap
map containing the conditions (per condition chip) - transient
std::vector< std::vector< MuonTemplate > > m_corMuonTemplate
void setGtTriggerMenuInterface(const std::string &)
std::string m_triggerMenuDescription
std::vector< int > gtOrderConditionChip() const
const std::string & gtTriggerMenuName() const
const std::vector< std::vector< CaloTemplate > > & corCaloTemplate() const
void setGtTriggerMenuAuthor(const std::string &)
std::string m_triggerMenuInterfaceDescription
const std::string & gtTriggerMenuInterfaceDescription() const
const std::vector< std::vector< MuonTemplate > > & corMuonTemplate() const
void setGtTriggerMenuInterfaceDescription(const std::string &)
std::string m_triggerMenuInterfaceDate
number of technical triggers
const std::vector< std::vector< MuonTemplate > > & vecMuonTemplate() const
get / set the vectors containing the conditions
std::vector< std::vector< CorrelationTemplate > > m_vecCorrelationTemplate
bool insertConditionIntoMap(GlobalCondition &cond, const int chipNr)
void parseDeltaPhi_Cos_LUTS(std::map< std::string, tmeventsetup::esScale > scaleMap, std::string obj1, std::string obj2, unsigned int prec1, unsigned int prec2)
const std::vector< std::vector< EnergySumTemplate > > & corEnergySumTemplate() const
void setGtTriggerMenuDate(const std::string &)
const std::string & gtTriggerMenuInterfaceDate() const
get / set the XML parser creation date, author, description for menu interface, menu ...
const std::vector< std::vector< CorrelationTemplate > > & vecCorrelationTemplate() const
bool parseScales(std::map< std::string, tmeventsetup::esScale > scaleMap)
parse scales
const unsigned int gtNumberConditionChips() const
get / set the number of condition chips in GTL
void setVecExternalTemplate(const std::vector< std::vector< ExternalTemplate > > &)
bool parseCaloCorr(const tmeventsetup::esObject *corrCalo, unsigned int chipNr=0)
bool parseEnergySum(tmeventsetup::esCondition condEnergySums, unsigned int chipNr=0, const bool corrFlag=false)
parse an &quot;energy sum&quot; condition
void setGtTriggerMenuDescription(const std::string &)
void setCorMuonTemplate(const std::vector< std::vector< MuonTemplate > > &)
unsigned int m_pinsOnConditionChip
number of pins on the GTL condition chips
void setCorEnergySumTemplate(const std::vector< std::vector< EnergySumTemplate > > &)
unsigned long m_triggerMenuUUID
const unsigned int gtNumberPhysTriggers() const
get / set the number of physics trigger algorithms
std::vector< std::vector< ExternalTemplate > > m_vecExternalTemplate
std::vector< int > m_orderConditionChip
const GlobalScales & gtScales() const
menu associated scales
bool parseMuon(tmeventsetup::esCondition condMu, unsigned int chipNr=0, const bool corrFlag=false)
parse a muon condition
const int gtTriggerMenuUUID() const
const AlgorithmMap & gtAlgorithmMap() const
get / set the algorithm map (by name)
void setGtNumberConditionChips(const unsigned int &)
void parsePt_LUTS(std::map< std::string, tmeventsetup::esScale > scaleMap, std::string obj1, unsigned int prec)
bool parseEnergySumCorr(const tmeventsetup::esObject *corrESum, unsigned int chipNr=0)
bool parseAlgorithm(tmeventsetup::esAlgorithm algorithm, unsigned int chipNr=0)
parse all algorithms
int l1tstr2int(const std::string data)
void setGtTriggerMenuUUID(const int)
unsigned long m_triggerMenuImplementation
std::string m_algorithmImplementation
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
void setCorCaloTemplate(const std::vector< std::vector< CaloTemplate > > &)
const std::string & gtAlgorithmImplementation() const
bool parseMuonCorr(const tmeventsetup::esObject *condMu, unsigned int chipNr=0)
void setGtTriggerMenuInterfaceDate(const std::string &)
AlgorithmMap m_algorithmAliasMap
map containing the physics algorithms (by alias)
void setGtTriggerMenuImplementation(const unsigned long &)
const std::vector< std::vector< CaloTemplate > > & vecCaloTemplate() const
const std::string & gtTriggerMenuInterface() const
get / set the trigger menu names
bool insertAlgorithmIntoMap(const GlobalAlgorithm &alg)
insert an algorithm into algorithm map
long double T
void setGtConditionMap(const std::vector< ConditionMap > &)
std::map< std::string, GlobalAlgorithm > AlgorithmMap
map containing the algorithms
const std::string & gtScaleDbKey() const
menu associated scale key
const unsigned long gtTriggerMenuImplementation() const
void setGtTriggerMenuInterfaceAuthor(const std::string &)
const std::string & gtTriggerMenuAuthor() const
std::vector< std::vector< MuonTemplate > > m_vecMuonTemplate
void setGtNumberPhysTriggers(const unsigned int &)
const std::string & gtTriggerMenuDescription() const