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 
27 
33 
35 
36 #include "L1Trigger/L1TGlobal/src/L1TMenuEditor/L1TriggerMenu.hxx"
38 
39 #include "tmEventSetup/esTriggerMenu.hh"
40 #include "tmEventSetup/esAlgorithm.hh"
41 #include "tmEventSetup/esCondition.hh"
42 #include "tmEventSetup/esObject.hh"
43 #include "tmEventSetup/esCut.hh"
44 #include "tmEventSetup/esScale.hh"
45 //#include "tmGrammar/Algorithm.hh"
46 
47 // forward declarations
48 class GtCondition;
49 class L1GtAlgorithm;
50 
51 namespace l1t {
52 
53 // class declaration
55 {
56 
57 public:
58 
62 
64  virtual ~TriggerMenuParser();
65 
66 public:
67 
69  inline const unsigned int gtNumberConditionChips() const {
71  }
72 
73  void setGtNumberConditionChips(const unsigned int&);
74 
76  inline const unsigned int gtPinsOnConditionChip() const {
77  return m_pinsOnConditionChip;
78  }
79 
80  void setGtPinsOnConditionChip(const unsigned int&);
81 
84  inline std::vector<int> gtOrderConditionChip() const {
85  return m_orderConditionChip;
86  }
87 
88  void setGtOrderConditionChip(const std::vector<int>&);
89 
91  inline const unsigned int gtNumberPhysTriggers() const {
92  return m_numberPhysTriggers;
93  }
94 
95  void setGtNumberPhysTriggers(const unsigned int&);
96 
97 
98 
99 public:
100 
102  inline const std::vector<ConditionMap>& gtConditionMap() const {
103  return m_conditionMap;
104  }
105 
106  void setGtConditionMap(const std::vector<ConditionMap>&);
107 
109  inline const std::string& gtTriggerMenuInterface() const {
110  return m_triggerMenuInterface;
111  }
112 
114 
115  //
116  inline const std::string& gtTriggerMenuName() const {
117  return m_triggerMenuName;
118  }
119 
120  void setGtTriggerMenuName(const std::string&);
121 
122  //
123  inline const std::string& gtTriggerMenuImplementation() const {
125  }
126 
128 
130  inline const std::string& gtScaleDbKey() const {
131  return m_scaleDbKey;
132  }
133 
135  inline const L1TGlobalScales& gtScales() const {
136  return m_gtScales;
137  }
138 
139  void setGtScaleDbKey(const std::string&);
140 
142  inline const std::vector<std::vector<MuonTemplate> >& vecMuonTemplate() const {
143  return m_vecMuonTemplate;
144  }
145  void setVecMuonTemplate(const std::vector<std::vector<MuonTemplate> >&);
146 
147  //
148  inline const std::vector<std::vector<CaloTemplate> >& vecCaloTemplate() const {
149  return m_vecCaloTemplate;
150  }
151 
152  void setVecCaloTemplate(const std::vector<std::vector<CaloTemplate> >&);
153 
154  //
155  inline const std::vector<std::vector<EnergySumTemplate> >& vecEnergySumTemplate() const {
156 
157  return m_vecEnergySumTemplate;
158  }
159 
161  const std::vector<std::vector<EnergySumTemplate> >&);
162 
163  //
164 
165  inline const std::vector<std::vector<ExternalTemplate> >&
167 
168  return m_vecExternalTemplate;
169  }
170 
172  const std::vector<std::vector<ExternalTemplate> >&);
173 
174  //
175  inline const std::vector<std::vector<CorrelationTemplate> >& vecCorrelationTemplate() const {
176 
178  }
179 
181  const std::vector<std::vector<CorrelationTemplate> >&);
182 
183  // get / set the vectors containing the conditions for correlation templates
184  //
185  inline const std::vector<std::vector<MuonTemplate> >& corMuonTemplate() const {
186  return m_corMuonTemplate;
187  }
188 
189  void setCorMuonTemplate(const std::vector<std::vector<MuonTemplate> >&);
190 
191  //
192  inline const std::vector<std::vector<CaloTemplate> >& corCaloTemplate() const {
193  return m_corCaloTemplate;
194  }
195 
196  void setCorCaloTemplate(const std::vector<std::vector<CaloTemplate> >&);
197 
198  //
199  inline const std::vector<std::vector<EnergySumTemplate> >& corEnergySumTemplate() const {
200 
201  return m_corEnergySumTemplate;
202  }
203 
205  const std::vector<std::vector<EnergySumTemplate> >&);
206 
208  inline const AlgorithmMap& gtAlgorithmMap() const {
209  return m_algorithmMap;
210  }
211 
212  void setGtAlgorithmMap(const AlgorithmMap&);
213 
215  inline const AlgorithmMap& gtAlgorithmAliasMap() const {
216  return m_algorithmAliasMap;
217  }
218 
220 
221 
222 public:
223 
224 
225  void parseCondFormats(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 std::string& gtTriggerMenuDate() const {
251  return m_triggerMenuDate;
252  }
253 
254  void setGtTriggerMenuDate(const std::string&);
255 
256  inline const std::string& gtTriggerMenuAuthor() const {
257  return m_triggerMenuAuthor;
258  }
259 
260  void setGtTriggerMenuAuthor(const std::string&);
261 
262  inline const std::string& gtTriggerMenuDescription() const {
264  }
265 
267 
268 
269  inline const std::string& gtAlgorithmImplementation() const {
271  }
272 
274 
275 
276 private:
277 
278  // methods for conditions and algorithms
279 
282  void clearMaps();
283 
286  bool insertConditionIntoMap(GtCondition& cond, const int chipNr);
287 
289  bool insertAlgorithmIntoMap(const L1GtAlgorithm& alg);
290 
291  template <typename T> std::string l1t2string( T );
292  std::string l1tDateTime2string( l1t::DateTime );
293  int l1t2int( l1t::RelativeBx );
294  int l1tstr2int( const std::string data );
295 
296 
298 /* bool parseScale(tmeventsetup::esScale scale); */
299 // bool parseScales( tmeventsetup::esScale scale);
300  bool parseScales(std::map<std::string, tmeventsetup::esScale> scaleMap);
301 
302 
304 /* bool parseMuon(XERCES_CPP_NAMESPACE::DOMNode* node, */
305 /* const std::string& name, unsigned int chipNr = 0, */
306 /* const bool corrFlag = false); */
307  bool parseMuon( tmeventsetup::esCondition condMu,
308  unsigned int chipNr = 0, const bool corrFlag = false);
309 
310  bool parseMuonCorr(const tmeventsetup::esObject* condMu,
311  unsigned int chipNr = 0);
312 
313 
315 /* bool parseCalo(XERCES_CPP_NAMESPACE::DOMNode* node, */
316 /* const std::string& name, unsigned int chipNr = 0, */
317 /* const bool corrFlag = false); */
318  bool parseCalo( tmeventsetup::esCondition condCalo,
319  unsigned int chipNr = 0, const bool corrFlag = false);
320 
321  bool parseCaloCorr(const tmeventsetup::esObject* corrCalo,
322  unsigned int chipNr = 0);
323 
325  /* bool parseEnergySum(XERCES_CPP_NAMESPACE::DOMNode* node, */
326  /* const std::string& name, unsigned int chipNr = 0, */
327  /* const bool corrFlag = false); */
328 
329  bool parseEnergySum( tmeventsetup::esCondition condEnergySums,
330  unsigned int chipNr = 0, const bool corrFlag = false);
331 
332 
333  bool parseEnergySumCorr(const tmeventsetup::esObject* corrESum,
334  unsigned int chipNr = 0);
335 
336 
337  bool parseExternal(tmeventsetup::esCondition condExt,
338  unsigned int chipNr = 0);
339 
340 
342  bool parseCorrelation(tmeventsetup::esCondition corrCond, unsigned int chipNr = 0);
343 
344 
346  //bool parseAlgorithms(XERCES_CPP_NAMESPACE::XercesDOMParser* parser);
347  bool parseAlgorithm( tmeventsetup::esAlgorithm algorithm,
348  unsigned int chipNr = 0 );
349 
350 
351 private:
352 
353 
355 
358 
360  unsigned int m_pinsOnConditionChip;
361 
364  std::vector<int> m_orderConditionChip;
365 
367  unsigned int m_numberPhysTriggers;
368 
370  //unsigned int m_numberTechTriggers;
371 
372 
373 private:
374 
375 
379 
383 
385 
386 
387 private:
388 
390  std::vector<ConditionMap> m_conditionMap;
391 
392 private:
393 
398 
401 
404  std::vector<std::vector<MuonTemplate> > m_vecMuonTemplate;
405  std::vector<std::vector<CaloTemplate> > m_vecCaloTemplate;
406  std::vector<std::vector<EnergySumTemplate> > m_vecEnergySumTemplate;
407  std::vector<std::vector<ExternalTemplate> > m_vecExternalTemplate;
408 
409  std::vector<std::vector<CorrelationTemplate> > m_vecCorrelationTemplate;
410  std::vector<std::vector<MuonTemplate> > m_corMuonTemplate;
411  std::vector<std::vector<CaloTemplate> > m_corCaloTemplate;
412  std::vector<std::vector<EnergySumTemplate> > m_corEnergySumTemplate;
413 
416 
419 
420  // class containing the scales from the L1 Menu XML
422 
423 };
424 
425 }
426 #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 setGtOrderConditionChip(const std::vector< int > &)
std::string l1tDateTime2string(l1t::DateTime)
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
bool insertConditionIntoMap(GtCondition &cond, const int chipNr)
std::string m_triggerMenuImplementation
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 > > &)
const L1TGlobalScales & gtScales() const
menu associated scales
std::string m_triggerMenuInterface
menu names
void setVecMuonTemplate(const std::vector< std::vector< MuonTemplate > > &)
const std::string & gtTriggerMenuImplementation() const
void setGtAlgorithmAliasMap(const AlgorithmMap &)
L1TGlobalScales m_gtScales
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)
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
const std::vector< std::vector< EnergySumTemplate > > & corEnergySumTemplate() const
std::map< std::string, L1GtAlgorithm > AlgorithmMap
map containing the algorithms
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 > > &)
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
bool parseMuon(tmeventsetup::esCondition condMu, unsigned int chipNr=0, const bool corrFlag=false)
parse a muon condition
int l1t2int(l1t::RelativeBx)
const AlgorithmMap & gtAlgorithmMap() const
get / set the algorithm map (by name)
void setGtNumberConditionChips(const unsigned int &)
void setGtTriggerMenuImplementation(const std::string &)
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)
bool insertAlgorithmIntoMap(const L1GtAlgorithm &alg)
insert an algorithm into algorithm map
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
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)
const std::vector< std::vector< CaloTemplate > > & vecCaloTemplate() const
const std::string & gtTriggerMenuInterface() const
get / set the trigger menu names
long double T
void setGtConditionMap(const std::vector< ConditionMap > &)
const std::string & gtScaleDbKey() const
menu associated scale key
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