| The Gaudi Framework v27r1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

GrammarsV2.h
Go to the documentation of this file.
1 // ============================================================================
2 #ifndef GAUDIKERNEL_GRAMMARSV2_H
3 #define GAUDIKERNEL_GRAMMARSV2_H 1
4 #ifdef __GNUC__
5 #pragma GCC system_header
6 #endif
7 // ============================================================================
8 // Include files
9 // ============================================================================
10 // STD:
11 //==============================================================================
12 #include <string>
13 #include <vector>
14 #include <list>
15 #include <set>
16 #include <map>
17 #include <tuple>
18 //==============================================================================
19 // Boost:
20 //==============================================================================
21 #include <boost/spirit/include/qi.hpp>
22 #include <boost/fusion/include/unused.hpp>
23 #include <boost/fusion/include/std_pair.hpp>
24
25 #include <boost/spirit/include/phoenix_core.hpp>
26 #include <boost/spirit/include/phoenix_operator.hpp>
27
28 #include <boost/utility/enable_if.hpp>
29 #include <boost/type_traits.hpp>
30
31 #include <boost/spirit/repository/include/qi_confix.hpp>
32 //==============================================================================
33 // Gaudi:
34 //==============================================================================
35 #include "GaudiKernel/VectorMap.h"
36 #include "GaudiKernel/HashMap.h"
37 #include "GaudiKernel/StringKey.h"
38 #include "GaudiKernel/Point3DTypes.h"
39 #include "GaudiKernel/Point4DTypes.h"
40 #include "GaudiKernel/HistoDef.h"
41 //==============================================================================
42 namespace Gaudi { namespace Parsers {
43 //==============================================================================
44 // Namespace aliases:
45 //==============================================================================
46 namespace sp = boost::spirit;
47 namespace ph = boost::phoenix;
48 namespace qi = sp::qi;
49 namespace enc = sp::ascii;
50 namespace rep = sp::repository;
51 //==============================================================================
52 // Grammars
53 //==============================================================================
54 typedef std::string::const_iterator DefaultIterator;
55 typedef enc::space_type DefaultSkipper;
56 //==============================================================================
57 template <typename Iterator, typename T, typename Skipper,
58 class Enable = void>
59 struct Grammar_ {
60 /* READ THIS IF YOUR COMPILE BREAKS ON THE FOLLOWING LINE
61 *
62 * To users: You have to ask developers to implement parser for your type T
63 * To developer: You have to implement and register Grammar for type T
64 *
65 */
66 BOOST_MPL_ASSERT_MSG(false, GRAMMAR_FOR_TYPE_DOES_NOT_EXISTS, (T));
67 };
68
69 #define REGISTER_GRAMMAR(ResultType, GrammarName) \
70 template <typename Iterator, typename Skipper>\
71 struct Grammar_<Iterator, ResultType, Skipper> \
72 { \
73 typedef GrammarName<Iterator, Skipper> Grammar;\
74 }
75 //==============================================================================
76 template< typename Iterator>
77 struct SkipperGrammar : qi::grammar<Iterator>
78 {
79 SkipperGrammar() : SkipperGrammar::base_type(comments) {
80 comments = enc::space | rep::confix("/*", "*/")[*(qi::char_ - "*/")]
81 |
82 rep::confix("//", (sp::eol | sp::eoi))[*(qi::char_ - (sp::eol|sp::eoi))];
83 }
84 qi::rule<Iterator> comments;
85 };
86 //==============================================================================
87 template< typename Iterator, typename Skipper>
88 struct StringGrammar : qi::grammar<Iterator, std::string(), qi::locals<char>,
89 Skipper>
90 {
91 //------------------------------------------------------------------------------
92 typedef std::string ResultT;
93 //------------------------------------------------------------------------------
94 StringGrammar() : StringGrammar::base_type( str ) {
95 begin_quote = enc::char_("\"'");
96 quote = enc::char_(qi::_r1);
97
98 str = qi::lexeme[begin_quote[qi::_a = qi::_1]
99 > *( (enc::char_('\\') >> quote(qi::_a))[qi::_val += qi::_a]
100 | (enc::char_[qi::_val += qi::_1] - quote(qi::_a))) >
101 quote(qi::_a)]
102 ;
103 }
104 //------------------------------------------------------------------------------
105 qi::rule<Iterator, std::string(), qi::locals<char>, Skipper> str;
106 qi::rule<Iterator, char()> begin_quote;
107 qi::rule<Iterator, void(char)> quote;
108 //------------------------------------------------------------------------------
109 };
110 REGISTER_GRAMMAR(std::string, StringGrammar);
111 REGISTER_GRAMMAR(Gaudi::StringKey, StringGrammar);
112 //==============================================================================
113 template< typename Iterator, typename Skipper>
114 struct CharGrammar : qi::grammar<Iterator, char(), Skipper>
115 {
116 typedef char ResultT;
117 CharGrammar() : CharGrammar::base_type( ch ) {
118 ch = qi::int_parser<char>()
119 |
120 '\'' >> (qi::char_-'\'') >> '\'';
121 }
122 qi::rule<Iterator, char(), Skipper> ch;
123 };
124 REGISTER_GRAMMAR(char, CharGrammar);
125 //==============================================================================
126 template< typename Iterator, typename Skipper>
127 struct BoolGrammar : qi::grammar<Iterator, bool(), Skipper>
128 {
129 typedef bool ResultT;
130 BoolGrammar() : BoolGrammar::base_type( boolean_literal ) {
131 boolean_literal =
132 (qi::lit("true") | "True" | "TRUE" | "1")[qi::_val=true]
133 |
134 (qi::lit("false") | "False" | "FALSE" | "0")[qi::_val=false];
135 }
136 qi::rule<Iterator, bool(), Skipper> boolean_literal;
137 };
138 REGISTER_GRAMMAR(bool, BoolGrammar);
139 //==============================================================================
140 template< typename Iterator, typename RT , typename Skipper>
141 struct IntGrammar : qi::grammar<Iterator, RT(), Skipper>
142 {
143 typedef RT ResultT;
144 IntGrammar() : IntGrammar::base_type( integer ) {
145 integer = qi::int_parser<RT>()[qi::_val = qi::_1]
146 >> -qi::no_case[qi::char_('L')];
147 }
148 qi::rule<Iterator, RT(), Skipper> integer;
149 };
150 // ----------------------------------------------------------------------------
151 // Register IntGrammar:
152 // ----------------------------------------------------------------------------
153 template <typename Iterator, typename T, typename Skipper>
154 struct Grammar_<Iterator, T, Skipper,
155 typename boost::enable_if<boost::is_integral<T> >::type>
156 {
157 typedef IntGrammar<Iterator, T, Skipper> Grammar;
158 };
159 //==============================================================================
160 template< typename Iterator, typename RT, typename Skipper>
161 struct RealGrammar : qi::grammar<Iterator, RT(), Skipper>
162 {
163 typedef RT ResultT;
164 RealGrammar() : RealGrammar::base_type(real) {
165 real = qi::real_parser<RT>();
166 }
167 qi::rule<Iterator, RT(), Skipper> real;
168 };
169 // ----------------------------------------------------------------------------
170 // Register RealGrammar:
171 // ----------------------------------------------------------------------------
172 template <typename Iterator, typename T, typename Skipper >
173 struct Grammar_<Iterator, T, Skipper,
174 typename boost::enable_if<boost::is_floating_point<T> >::type >
175 {
176 typedef RealGrammar<Iterator, T, Skipper> Grammar;
177 };
178 //==============================================================================
179 // Grammar for std::tuples
180 //==============================================================================
181 template<typename T>
182 struct tuple_remove_first_type
183 {
184 };
185
186 template<typename T>
187 struct tuple_get_first_type
188 {
189 };
190
191 template<typename T, typename... Ts>
192 struct tuple_remove_first_type<std::tuple<T, Ts...>>
193 {
194 typedef std::tuple<Ts...> type;
195 };
196
197 template<typename T, typename... Ts>
198 struct tuple_get_first_type<std::tuple<T, Ts...>>
199 {
200 typedef T type;
201 };
202
203 // ----------------------------------------------------------------------------
204
205 template< typename Iterator, typename TupleT, std::size_t N, typename Skipper>
206 struct TupleInnerGrammar : qi::grammar<Iterator,
207 TupleT(), qi::locals<typename tuple_get_first_type<TupleT>::type>, Skipper>
208 {
209 //---------------------------------------------------------------------------
210 typedef TupleT ResultT;
211 typedef typename tuple_remove_first_type<TupleT>::type TailT;
212 typedef typename tuple_get_first_type<TupleT>::type HeadT;
213 //---------------------------------------------------------------------------
214 struct Operations
215 {
216 template <typename A, typename B = boost::fusion::unused_type,
217 typename C = boost::fusion::unused_type,
218 typename D = boost::fusion::unused_type>
219 struct result { typedef void type; };
220 //----------------------------------------------------------------------
221
222 void operator()(ResultT& res, HeadT& head, TailT& tail) const {
223 res = std::tuple_cat(std::tuple<HeadT>(head), tail);
224 }
225 //----------------------------------------------------------------------
226 };
227 //---------------------------------------------------------------------------
228 TupleInnerGrammar(): TupleInnerGrammar::base_type(tup) {
229 tup = grHead[qi::_a = qi::_1] >> ',' >> grLast[op(qi::_val, qi::_a, qi::_1)];
230 }
231
232 TupleInnerGrammar<Iterator, TailT, N-1, Skipper> grLast;
233 typename
234 Grammar_<Iterator, HeadT, Skipper>::Grammar grHead;
235
236 qi::rule<Iterator, ResultT(), qi::locals<HeadT>, Skipper> tup;
237 ph::function<Operations> op;
238 };
239
240 template< typename Iterator, typename TupleT, typename Skipper>
241 struct TupleInnerGrammar<Iterator, TupleT, 1, Skipper>: qi::grammar<Iterator,
242 TupleT(), Skipper>
243 {
244 //---------------------------------------------------------------------------
245 typedef TupleT ResultT;
246 //typedef typename ResultT::value_type Tuple1T;
247 //---------------------------------------------------------------------------
248 struct Operations
249 {
250 template <typename A, typename B = boost::fusion::unused_type,
251 typename C = boost::fusion::unused_type,
252 typename D = boost::fusion::unused_type>
253 struct result { typedef void type; };
254 //---------------------------------------------------------------------
255 void operator()(ResultT& res,
256 const typename std::tuple_element<0, ResultT>::type& val) const {
257 res = ResultT();
258 std::get<0>(res) = val;
259 }
260 //----------------------------------------------------------------------
261 };
262 //---------------------------------------------------------------------------
263 TupleInnerGrammar(): TupleInnerGrammar::base_type(tup) {
264 tup = grFirst[op(qi::_val, qi::_1)];
265 }
266
267 typename
268 Grammar_<Iterator, typename std::tuple_element<0, ResultT>::type,
269 Skipper>::Grammar grFirst;
270
271 qi::rule<Iterator, ResultT(), Skipper> tup;
272 ph::function<Operations> op;
273 };
274
275 // ----------------------------------------------------------------------------
276 template< typename Iterator, typename TupleT, std::size_t N, typename Skipper>
277 struct TupleGrammar : qi::grammar<Iterator, TupleT(), qi::locals<char>, Skipper>
278 {
279 typedef TupleT ResultT;
280 TupleGrammar(): TupleGrammar::base_type(tup) {
281 begin = enc::char_('[')[qi::_val=']'] | enc::char_('(')[qi::_val=')'];
282 end = enc::char_(qi::_r1);
283
284 tup = begin[qi::_a = qi::_1] >> grTuple[qi::_val = qi::_1] >> end(qi::_a);
285 }
286
287 qi::rule<Iterator, char()> begin;
288 qi::rule<Iterator, void(char)> end;
289 qi::rule<Iterator, ResultT(), qi::locals<char>, Skipper> tup;
290 TupleInnerGrammar<Iterator, TupleT, N, Skipper> grTuple;
291 };
292
293 // -----------------------------------------------------------------------------
294 // Register TupleGrammar for std::tuple:
295 // ----------------------------------------------------------------------------
296 template <typename Iterator, typename Skipper, typename... Args>
297 struct Grammar_<Iterator, std::tuple<Args...>, Skipper>
298 {
299 typedef
300 TupleGrammar<Iterator, std::tuple<Args...>, sizeof...(Args ),
301 Skipper> Grammar;
302 };
303 //==============================================================================
304 template< typename Iterator, typename VectorT, typename Skipper>
305 struct VectorGrammar : qi::grammar<Iterator,
306 VectorT(), qi::locals<char>,Skipper>
307 {
308 //------------------------------------------------------------------------------
309 typedef VectorT ResultT;
310 //------------------------------------------------------------------------------
311 VectorGrammar() : VectorGrammar::base_type(vec) {
312 begin = enc::char_('[')[qi::_val=']'] | enc::char_('{')[qi::_val='}']
313 | enc::char_('(')[qi::_val=')'];
314 end = enc::char_(qi::_r1);
315 list = elementGrammar % ',';
316 vec = begin[qi::_a = qi::_1] >> -list[qi::_val=qi::_1] >> end(qi::_a);
317 }
318 // ----------------------------------------------------------------------------
319 typename
320 Grammar_<Iterator, typename VectorT::value_type, Skipper>::Grammar
321 elementGrammar;
322 qi::rule<Iterator, char()> begin;
323 qi::rule<Iterator, void(char)> end;
324
325 qi::rule<Iterator, ResultT(), qi::locals<char>,Skipper> vec;
326 qi::rule<Iterator, ResultT(), Skipper> list;
327 // ----------------------------------------------------------------------------
328 };
329 // ----------------------------------------------------------------------------
330 // Register VectorGrammar for std::vector:
331 // ----------------------------------------------------------------------------
332 template <typename Iterator, typename InnerT, typename AllocatorT,
333 typename Skipper>
334 struct Grammar_<Iterator, std::vector<InnerT, AllocatorT>, Skipper >
335 {
336 typedef
337 VectorGrammar<Iterator, std::vector<InnerT, AllocatorT>,Skipper>
338 Grammar;
339 };
340 // ----------------------------------------------------------------------------
341 // Register VectorGrammar for std::list:
342 // ----------------------------------------------------------------------------
343 template <typename Iterator, typename InnerT, typename AllocatorT,
344 typename Skipper>
345 struct Grammar_<Iterator, std::list<InnerT, AllocatorT>, Skipper >
346 {
347 typedef
348 VectorGrammar<Iterator, std::list<InnerT, AllocatorT>,Skipper>
349 Grammar;
350 };
351 // ----------------------------------------------------------------------------
352 // Register VectorGrammar for std::set:
353 // ----------------------------------------------------------------------------
354 template <typename Iterator, typename InnerT, typename CompareT,
355 typename AllocatorT, typename Skipper>
356 struct Grammar_<Iterator, std::set<InnerT, CompareT, AllocatorT>, Skipper >
357 {
358 typedef
359 VectorGrammar<Iterator, std::set<InnerT, CompareT, AllocatorT>,Skipper>
360 Grammar;
361 };
362
363 //==============================================================================
364 template< typename Iterator, typename PairT, typename Skipper>
365 struct PairGrammar :
366 qi::grammar<Iterator,PairT(), qi::locals<char>, Skipper> {
367 //------------------------------------------------------------------------------
368 typedef PairT ResultT;
369 typedef typename PairT::first_type first_type;
370 typedef typename PairT::second_type second_type;
371 //------------------------------------------------------------------------------
372 PairGrammar() : PairGrammar::base_type(pair) {
373 init(",");
374 }
375
376 PairGrammar(const std::string& delimeter) : PairGrammar::base_type(pair) {
377 init(delimeter);
378 }
379 //------------------------------------------------------------------------------
380 struct first {};
381 struct second {};
382 void init(const std::string& delimeter) {
383 begin = enc::char_('(')[qi::_val=')']
384 |
385 enc::char_('[')[qi::_val=']'];
386 end = qi::char_(qi::_r1);
387 pair = begin[qi::_a = qi::_1] >> pair_in[qi::_val = qi::_1] >> end(qi::_a);
388 pair_in = key >> qi::lit(delimeter) >> value;
389 }
390 // ----------------------------------------------------------------------------
391 typename
392 Grammar_<Iterator, typename PairT::first_type, Skipper>::Grammar key;
393 typename
394 Grammar_<Iterator, typename PairT::second_type, Skipper>::Grammar
395 value;
396 qi::rule<Iterator, char()> begin;
397 qi::rule<Iterator, void(char)> end;
398 qi::rule<Iterator, ResultT(), qi::locals<char>, Skipper> pair;
399 qi::rule<Iterator, ResultT(), Skipper> pair_in;
400 //ph::function<Operations> op;
401 // ----------------------------------------------------------------------------
402 }; // END PairGrammar
403 // ----------------------------------------------------------------------------
404 // Register PairGrammar:
405 // ----------------------------------------------------------------------------
406 template <typename Iterator, typename KeyT, typename ValueT,
407 typename Skipper>
408 struct Grammar_<Iterator, std::pair<KeyT, ValueT>, Skipper >
409 {
410 typedef PairGrammar<Iterator, std::pair<KeyT, ValueT>, Skipper> Grammar;
411 };
412 // ============================================================================
413 template< typename Iterator, typename MapT, typename Skipper>
414 struct MapGrammar : qi::grammar<Iterator,MapT(), Skipper>
415 {
416 //------------------------------------------------------------------------------
417 typedef MapT ResultT;
418 typedef typename MapT::key_type KeyT;
419 typedef typename MapT::mapped_type MappedT;
420 typedef std::pair<KeyT, MappedT> PairT;
421
422 typedef std::vector<PairT> VectorPairT;
423 //------------------------------------------------------------------------------
424 struct tag_key{};
425 struct tag_mapped{};
426 struct Operations
427 {
428 template <typename A, typename B = boost::fusion::unused_type,
429 typename C = boost::fusion::unused_type,
430 typename D = boost::fusion::unused_type>
431 struct result { typedef void type; };
432 //----------------------------------------------------------------------
433 void operator()(ResultT& res, const VectorPairT& vec) const{
434 for(auto cur = vec.begin(); cur != vec.end(); ++cur){
435 res.insert(*cur);
436 }
437 }
438 void operator()(PairT& res, const KeyT& key, tag_key) const{
439 res.first = key;
440 }
441 void operator()(PairT& res, const MappedT& value, tag_mapped) const{
442 res.second = value;
443 }
444 //----------------------------------------------------------------------
445 };
446 //------------------------------------------------------------------------------
447 MapGrammar() : MapGrammar::base_type(map) {
448 pair = key[op(qi::_val,qi::_1, tag_key())] > (qi::lit(':') | '=') >
449 value[op(qi::_val,qi::_1, tag_mapped())];
450 list = -(pair % enc::char_(','));
451 map = (('[' >> list >> ']')
452 | ('{' >> list >> '}'))[op(qi::_val,qi::_1)];
453 }
454 // ----------------------------------------------------------------------------
455 typename
456 Grammar_<Iterator, typename MapT::key_type, Skipper>::Grammar key;
457 typename
458 Grammar_<Iterator, typename MapT::mapped_type, Skipper>::Grammar value;
459 qi::rule<Iterator, PairT(), Skipper> pair;
460 qi::rule<Iterator, VectorPairT(), Skipper> list;
461 qi::rule<Iterator, ResultT(), Skipper> map;
462 ph::function<Operations> op;
463 // ----------------------------------------------------------------------------
464 };
465 // ----------------------------------------------------------------------------
466 // Register MapGrammar for std::map:
467 // ----------------------------------------------------------------------------
468 template <typename Iterator, typename KeyT, typename ValueT,
469 typename KeyCompareT, typename AllocatorT, typename Skipper>
470 struct Grammar_<Iterator, std::map<KeyT, ValueT, KeyCompareT, AllocatorT>,
471 Skipper > {
472 typedef MapGrammar<Iterator,
473 std::map<KeyT, ValueT, KeyCompareT, AllocatorT>, Skipper> Grammar;
474 };
475 // ----------------------------------------------------------------------------
476 // Register MapGrammar for GaudiUtils::VectorMap:
477 // ----------------------------------------------------------------------------
478 template <typename Iterator, typename KeyT, typename ValueT,
479 typename KeyCompareT, typename AllocatorT, typename Skipper>
480 struct Grammar_<Iterator, GaudiUtils::VectorMap<KeyT, ValueT,
481 KeyCompareT, AllocatorT>, Skipper>
482 {
483 typedef MapGrammar<Iterator,
484 GaudiUtils::VectorMap<KeyT, ValueT, KeyCompareT, AllocatorT>,
485 Skipper> Grammar;
486 };
487 // ============================================================================
488 template< typename Iterator, typename PointT, typename Skipper>
489 struct Pnt3DGrammar : qi::grammar<Iterator, PointT(), Skipper> {
490 typedef PointT ResultT;
491 typedef typename PointT::Scalar Scalar;
492 // ----------------------------------------------------------------------------
493 struct Operations {
494 template <typename A, typename B = boost::fusion::unused_type,
495 typename C = boost::fusion::unused_type,
496 typename D = boost::fusion::unused_type>
497 struct result { typedef void type; };
498 void operator()(ResultT& res, const Scalar& scalar,
499 const char xyz) const{
500 switch(xyz){
501 case 'x': res.SetX(scalar); break;
502 case 'y': res.SetY(scalar); break;
503 case 'z': res.SetZ(scalar); break;
504 default: break;
505 }
506 }
507 }; // Operations
508 // ----------------------------------------------------------------------------
509 Pnt3DGrammar() : Pnt3DGrammar::base_type(point) {
510 point = list | ('(' >> list >> ')') | ('[' >> list >> ']');
511 list = -(enc::no_case[qi::lit("x") | qi::lit("px")] >> ':')
512 >> scalar[op(qi::_val,qi::_1,'x')] >>
513 ',' >> -(enc::no_case[qi::lit("y") | qi::lit("py")] >> ':')
514 >> scalar[op(qi::_val,qi::_1,'y')] >>
515 ',' >> -(enc::no_case[qi::lit("z") | qi::lit("pz")] >> ':')
516 >> scalar[op(qi::_val,qi::_1,'z')];
517 }
518 // ----------------------------------------------------------------------------
519 qi::rule<Iterator, ResultT(), Skipper> point, list;
520 typename Grammar_<Iterator, Scalar, Skipper>::Grammar scalar;
521 ph::function<Operations> op;
522 // ----------------------------------------------------------------------------
523 }; // Pnt3DGrammar
524 // ----------------------------------------------------------------------------
525 // Register Pnt3DGrammar for ROOT::Math::PositionVector3D:
526 // ----------------------------------------------------------------------------
527 template <typename Iterator, typename T1, typename T2, typename Skipper>
528 struct Grammar_<Iterator, ROOT::Math::PositionVector3D<T1,T2>, Skipper>{
529 typedef
530 Pnt3DGrammar<Iterator, ROOT::Math::PositionVector3D<T1,T2>, Skipper>
531 Grammar;
532 };
533 // ----------------------------------------------------------------------------
534 // Register Pnt3DGrammar for ROOT::Math::DisplacementVector3D:
535 // ----------------------------------------------------------------------------
536 template <typename Iterator, typename T1, typename T2, typename Skipper>
537 struct Grammar_<Iterator, ROOT::Math::DisplacementVector3D<T1,T2>, Skipper>{
538 typedef
539 Pnt3DGrammar<Iterator,
540 ROOT::Math::DisplacementVector3D<T1,T2>, Skipper> Grammar;
541 };
542 // ============================================================================
543 template< typename Iterator, typename PointT, typename Skipper>
544 struct Pnt4DGrammar : qi::grammar<Iterator, PointT(), Skipper>
545 {
546 typedef PointT ResultT;
547 typedef typename PointT::Scalar ScalarT;
548 //-----------------------------------------------------------------------------
549 struct Operations {
550 template <typename A, typename B = boost::fusion::unused_type,
551 typename C = boost::fusion::unused_type,
552 typename D = boost::fusion::unused_type>
553 struct result { typedef void type; };
554
555 void operator()(ResultT& res, const ScalarT& scalar,
556 const char xyz) const{
557 switch(xyz){
558 case 'x': res.SetPx(scalar); break;
559 case 'y': res.SetPy(scalar); break;
560 case 'z': res.SetPz(scalar); break;
561 case 'e': res.SetE(scalar); break;
562 default: break;
563 }
564 }
565 void operator()(ResultT& res, const ResultT& xyz) const{
566 res.SetPx(xyz.Px());
567 res.SetPy(xyz.Py());
568 res.SetPz(xyz.Pz());
569 }
570 }; // Operations
571 // ----------------------------------------------------------------------------
572 Pnt4DGrammar() : Pnt4DGrammar::base_type(point4d) {
573 point4d = list4d | ('(' >> list4d >> ')') | ('[' >> list4d >> ']');
574 list4d = (point3d[op(qi::_val,qi::_1)] >> enc::char_(";,")
575 >> e[op(qi::_val, qi::_1, 'e')])
576 |
577 (e[op(qi::_val,qi::_1, 'e')] >> enc::char_(";,")
578 >> point3d[op(qi::_val, qi::_1)]);
579 e = -(enc::no_case[enc::char_("te")] >> ':')
580 >> scalar[qi::_val = qi::_1];
581
582 point3d = list3d | ('(' >> list3d >> ')') | ('[' >> list3d >> ']');
583 list3d = -(enc::no_case[qi::lit("x") | qi::lit("px")] >> ':')
584 >> scalar[op(qi::_val, qi::_1,'x')] >>
585 ',' >> -(enc::no_case[qi::lit("y") | qi::lit("py")] >> ':')
586 >> scalar[op(qi::_val, qi::_1,'y')] >>
587 ',' >> -(enc::no_case[qi::lit("z") | qi::lit("pz")] >> ':')
588 >> scalar[op(qi::_val, qi::_1,'z')];
589 }
590 // ----------------------------------------------------------------------------
591 qi::rule<Iterator, ResultT(), Skipper> point3d, point4d, list3d,
592 list4d;
593 qi::rule<Iterator, ScalarT(), Skipper> e;
594 typename Grammar_<Iterator, ScalarT, Skipper>::Grammar scalar;
595 ph::function<Operations> op;
596 // ----------------------------------------------------------------------------
597 }; // Pnt4DGrammar
598 // ----------------------------------------------------------------------------
599 // Register Pnt4DGrammar for ROOT::Math::LorentzVector:
600 // ----------------------------------------------------------------------------
601 template <typename Iterator, typename T1, typename Skipper>
602 struct Grammar_<Iterator, ROOT::Math::LorentzVector<T1>, Skipper >
603 {
604 typedef Pnt4DGrammar<Iterator, ROOT::Math::LorentzVector<T1>, Skipper>
605 Grammar;
606 };
607 // ============================================================================
608 template< typename Iterator, typename Skipper>
609 struct Histo1DGrammar : qi::grammar<Iterator, Gaudi::Histo1DDef(),
610 qi::locals<char>, Skipper>
611 {
612 typedef Gaudi::Histo1DDef ResultT;
613 // ----------------------------------------------------------------------------
614 struct Operations {
615 template <typename A, typename B = boost::fusion::unused_type,
616 typename C = boost::fusion::unused_type,
617 typename D = boost::fusion::unused_type>
618 struct result { typedef void type; };
619 void operator()(ResultT& res, const std::string& title) const{
620 res.setTitle(title);
621 }
622 void operator()(ResultT& res, const double& val, const char lh) const{
623 switch (lh) {
624 case 'l': res.setLowEdge(val); break;
625 case 'h': res.setHighEdge(val); break;
626 default: break;
627 }
628 }
629 void operator()(ResultT& res, int val) const{
630 res.setBins(val);
631 }
632 void operator()(ResultT& res) const{}
633 }; // Operations
634 // ----------------------------------------------------------------------------
635 Histo1DGrammar() : Histo1DGrammar::base_type(hist) {
636 val1 = title[op(qi::_val, qi::_1)] >> ','
637 >> qi::double_[op(qi::_val, qi::_1, 'l')] >> ','
638 >> qi::double_[op(qi::_val, qi::_1, 'h')]
639 >> -(',' >> qi::int_[op(qi::_val, qi::_1)]);
640 val2 = qi::double_[op(qi::_val, qi::_1, 'l')] >> ','
641 >> qi::double_[op(qi::_val, qi::_1, 'h')] >> ','
642 >> title[op(qi::_val, qi::_1)] >> -(','
643 >> qi::int_[op(qi::_val, qi::_1)]);
644 val3 = qi::double_[op(qi::_val, qi::_1, 'l')] >> ','
645 >> qi::double_[op(qi::_val, qi::_1, 'h')]
646 >> -(',' >> title[op(qi::_val, qi::_1)])
647 >> -(',' >> qi::int_[op(qi::_val, qi::_1)]);
648 begin = enc::char_('[')[qi::_val=']'] | enc::char_('(')[qi::_val=')'];
649 end = enc::char_(qi::_r1);
650 hist = begin[qi::_a = qi::_1] >> (val1 | val2 | val3)[qi::_val=qi::_1]
651 >> end(qi::_a);
652 }
653 // ----------------------------------------------------------------------------
654 qi::rule<Iterator, ResultT(), qi::locals<char>, Skipper> hist;
655 qi::rule<Iterator, ResultT(), Skipper> val1, val2, val3;
656 qi::rule<Iterator, char()> begin;
657 qi::rule<Iterator, void(char)> end;
658 StringGrammar<Iterator, Skipper> title;
659 ph::function<Operations> op;
660 // ----------------------------------------------------------------------------
661 }; // Histo1DGrammar
662 // ----------------------------------------------------------------------------
663 REGISTER_GRAMMAR(Gaudi::Histo1DDef, Histo1DGrammar);
664 // ============================================================================
665 template< typename Iterator, typename Skipper>
666 struct KeyValueGrammar :
667 qi::grammar<Iterator, std::pair<std::string, std::string>(), Skipper> {
668 //------------------------------------------------------------------------------
669 typedef std::pair<std::string, std::string> ResultT;
670 //------------------------------------------------------------------------------
671 struct first {};
672 struct second {};
673
674 KeyValueGrammar() : KeyValueGrammar::base_type(pair) {
675 //------------------------------------------------------------------------------
676 pair = gstring >> ":" >> +enc::char_;
677 }
678 // ----------------------------------------------------------------------------
679 StringGrammar<Iterator, Skipper> gstring;
680 qi::rule<Iterator, ResultT(), Skipper> pair;
681 // ----------------------------------------------------------------------------
682 }; // END KeyValueGrammar
683 // We don't register KeyalueGrammar because it's a special parser
684 // ============================================================================
685 }} // Gaudi::Parsers
686 //============================================================================
687 #endif
Gaudi::Parsers::PairGrammar::begin
qi::rule< Iterator, char()> begin
Definition: GrammarsV2.h:396
Gaudi::Parsers::CharGrammar::ResultT
char ResultT
Definition: GrammarsV2.h:116
Gaudi::Parsers::Pnt3DGrammar::Pnt3DGrammar
Pnt3DGrammar()
Definition: GrammarsV2.h:509
Gaudi::Parsers::KeyValueGrammar::pair
qi::rule< Iterator, ResultT(), Skipper > pair
Definition: GrammarsV2.h:680
Gaudi::Parsers::tuple_get_first_type< std::tuple< T, Ts...> >::type
T type
Definition: GrammarsV2.h:200
Gaudi::Parsers::BoolGrammar
Definition: Grammar.h:95
Gaudi::Parsers::Histo1DGrammar::val3
qi::rule< Iterator, ResultT(), Skipper > val3
Definition: GrammarsV2.h:655
Gaudi::Parsers::MapGrammar::MapGrammar
MapGrammar()
Definition: GrammarsV2.h:447
GaudiUtils::VectorMap
A bit modified version of 'Loki::AssocVector' associative vector from Loki library by Andrei Alexandr...
Definition: VectorMap.h:108
Gaudi::Parsers::PairGrammar::first
Definition: GrammarsV2.h:380
Gaudi::Parsers::MapGrammar::list
qi::rule< Iterator, VectorPairT(), Skipper > list
Definition: GrammarsV2.h:460
Gaudi::Parsers::IntGrammar::IntGrammar
IntGrammar()
Definition: GrammarsV2.h:144
Gaudi::Parsers::KeyValueGrammar::gstring
StringGrammar< Iterator, Skipper > gstring
Definition: GrammarsV2.h:679
Gaudi::Parsers::PairGrammar::init
void init(const std::string &delimeter)
Definition: GrammarsV2.h:382
Gaudi::Parsers::Grammar_< Iterator, std::map< KeyT, ValueT, KeyCompareT, AllocatorT >, Skipper >::Grammar
MapGrammar< Iterator, std::map< KeyT, ValueT, KeyCompareT, AllocatorT >, Skipper > Grammar
Definition: GrammarsV2.h:473
Gaudi::Parsers::Pnt4DGrammar::Operations::operator()
void operator()(ResultT &res, const ScalarT &scalar, const char xyz) const
Definition: GrammarsV2.h:555
Gaudi::Parsers::TupleGrammar::ResultT
TupleT ResultT
Definition: GrammarsV2.h:279
Gaudi::Parsers::Pnt3DGrammar
Definition: GrammarsV2.h:489
Gaudi::Parsers::Histo1DGrammar::Operations::operator()
void operator()(ResultT &res, const std::string &title) const
Definition: GrammarsV2.h:619
Gaudi::Parsers::Pnt4DGrammar::scalar
Grammar_< Iterator, ScalarT, Skipper >::Grammar scalar
Definition: GrammarsV2.h:594
Gaudi::Parsers::BoolGrammar::ResultT
bool ResultT
Definition: GrammarsV2.h:129
Gaudi::Parsers::Pnt3DGrammar::ResultT
PointT ResultT
Definition: GrammarsV2.h:490
Gaudi::Parsers::PairGrammar::second_type
PairT::second_type second_type
Definition: GrammarsV2.h:370
boost
The namespace threadpool contains a thread pool and related utility classes.
Definition: iter_pos.hpp:13
Gaudi::Parsers::Pnt4DGrammar::Operations::result::type
void type
Definition: GrammarsV2.h:553
Gaudi::Parsers::RealGrammar
Definition: Grammar.h:111
Gaudi::Parsers::StringGrammar::ResultT
std::string ResultT
Definition: GrammarsV2.h:92
Gaudi::Parsers::REGISTER_GRAMMAR
REGISTER_GRAMMAR(std::string, StringGrammar)
ROOT
Definition: IMagneticFieldSvc.h:11
Gaudi::Parsers::SkipperGrammar::comments
qi::rule< Iterator > comments
Definition: Grammar.h:51
Gaudi::Parsers::PairGrammar::key
Grammar_< Iterator, typename PairT::first_type, Skipper >::Grammar key
Definition: GrammarsV2.h:392
Gaudi::Parsers::Pnt3DGrammar::point
qi::rule< Iterator, ResultT(), Skipper > point
Definition: GrammarsV2.h:519
Gaudi::Parsers::Pnt3DGrammar::Operations
Definition: GrammarsV2.h:493
Gaudi::Parsers::Grammar_< Iterator, T, Skipper, typename boost::enable_if< boost::is_floating_point< T > >::type >::Grammar
RealGrammar< Iterator, T, Skipper > Grammar
Definition: GrammarsV2.h:176
Gaudi::Parsers::PairGrammar::pair
qi::rule< Iterator, ResultT(), qi::locals< char >, Skipper > pair
Definition: GrammarsV2.h:398
Gaudi::Parsers::tuple_get_first_type
Definition: GrammarsV2.h:187
Gaudi::Parsers::RealGrammar::ResultT
RT ResultT
Definition: GrammarsV2.h:163
Gaudi::Parsers::VectorGrammar::ResultT
VectorT ResultT
Definition: GrammarsV2.h:309
Gaudi::Parsers::TupleGrammar::tup
qi::rule< Iterator, ResultT(), qi::locals< char >, Skipper > tup
Definition: GrammarsV2.h:289
Gaudi::Parsers::Histo1DGrammar::Operations::result::type
void type
Definition: GrammarsV2.h:618
Gaudi::Parsers::IntGrammar
Definition: GrammarsV2.h:141
Gaudi::Parsers::SkipperGrammar::SkipperGrammar
SkipperGrammar()
Definition: GrammarsV2.h:79
Containers::vector
struct GAUDI_API vector
Parametrisation class for vector-like implementation.
Definition: KeyedObjectManager.h:29
Gaudi::Parsers::TupleInnerGrammar< Iterator, TupleT, 1, Skipper >::Operations::operator()
void operator()(ResultT &res, const typename std::tuple_element< 0, ResultT >::type &val) const
Definition: GrammarsV2.h:255
Gaudi::Parsers::Skipper
SkipperGrammar< IteratorT > Skipper
Definition: ParsersFactory.h:28
Gaudi::Parsers::TupleInnerGrammar::tup
qi::rule< Iterator, ResultT(), qi::locals< HeadT >, Skipper > tup
Definition: GrammarsV2.h:236
Gaudi::Parsers::Pnt3DGrammar::op
ph::function< Operations > op
Definition: GrammarsV2.h:521
std
STL namespace.
Gaudi::Parsers::KeyValueGrammar::second
Definition: GrammarsV2.h:672
Gaudi::Parsers::MapGrammar::MappedT
MapT::mapped_type MappedT
Definition: GrammarsV2.h:419
Gaudi::Parsers::Pnt4DGrammar::Operations::result
Definition: GrammarsV2.h:553
std::vector::end
T end(T...args)
Gaudi::Parsers::Histo1DGrammar::title
StringGrammar< Iterator, Skipper > title
Definition: GrammarsV2.h:658
Gaudi::Parsers::Pnt4DGrammar::ResultT
PointT ResultT
Definition: GrammarsV2.h:546
Gaudi::Parsers::MapGrammar::map
qi::rule< Iterator, ResultT(), Skipper > map
Definition: GrammarsV2.h:461
HashMap.h
boost::spirit
Definition: iter_pos.hpp:13
Gaudi::Parsers::StringGrammar
Definition: Grammar.h:55
Gaudi::Parsers::Histo1DGrammar::Operations::operator()
void operator()(ResultT &res) const
Definition: GrammarsV2.h:632
Gaudi::Parsers::Grammar_::BOOST_MPL_ASSERT_MSG
BOOST_MPL_ASSERT_MSG(false, GRAMMAR_FOR_TYPE_DOES_NOT_EXISTS,(T))
std::map
STL class.
Gaudi::Parsers::Histo1DGrammar::Operations::result
Definition: GrammarsV2.h:618
Gaudi::StringKey
The helper class to represent the efficient "key" for access.
Definition: StringKey.h:35
Gaudi::Parsers::StringGrammar::quote
qi::rule< Iterator, void(char)> quote
Definition: Grammar.h:72
Gaudi::Parsers::MapGrammar::tag_key
Definition: GrammarsV2.h:424
Gaudi::Parsers::Pnt4DGrammar::e
qi::rule< Iterator, ScalarT(), Skipper > e
Definition: GrammarsV2.h:593
Gaudi::Parsers::Pnt4DGrammar::list3d
qi::rule< Iterator, ResultT(), Skipper > list3d
Definition: GrammarsV2.h:591
Gaudi::Parsers::IntGrammar::ResultT
RT ResultT
Definition: GrammarsV2.h:143
Gaudi::Parsers::PairGrammar::PairGrammar
PairGrammar(const std::string &delimeter)
Definition: GrammarsV2.h:376
std::string
STL class.
Gaudi::Parsers::KeyValueGrammar::first
Definition: GrammarsV2.h:671
Gaudi::Parsers::VectorGrammar::elementGrammar
Grammar_< Iterator, typename VectorT::value_type, Skipper >::Grammar elementGrammar
Definition: GrammarsV2.h:321
Gaudi::Parsers::TupleInnerGrammar::grHead
Grammar_< Iterator, HeadT, Skipper >::Grammar grHead
Definition: GrammarsV2.h:234
Gaudi::Parsers::BoolGrammar::BoolGrammar
BoolGrammar()
Definition: GrammarsV2.h:130
Gaudi::Parsers::TupleInnerGrammar
Definition: GrammarsV2.h:206
IOTest.N
int N
Definition: IOTest.py:90
Gaudi::Parsers::Histo1DGrammar::Operations::operator()
void operator()(ResultT &res, const double &val, const char lh) const
Definition: GrammarsV2.h:622
Gaudi::Parsers::Histo1DGrammar::begin
qi::rule< Iterator, char()> begin
Definition: GrammarsV2.h:656
Point3DTypes.h
3D point typedefs
gaudirun.type
string type
Definition: gaudirun.py:151
Containers::map
struct GAUDI_API map
Parametrisation class for map-like implementation.
Definition: KeyedObjectManager.h:25
Gaudi::Parsers::Pnt4DGrammar::point3d
qi::rule< Iterator, ResultT(), Skipper > point3d
Definition: GrammarsV2.h:591
Gaudi::Parsers::RealGrammar::real
qi::rule< Iterator, Node(), Skipper > real
Definition: Grammar.h:122
VectorMap.h
Gaudi::Parsers::Histo1DGrammar::Operations
Definition: GrammarsV2.h:614
Gaudi::Parsers::Histo1DGrammar
Definition: GrammarsV2.h:609
Gaudi::Parsers::TupleGrammar
Definition: GrammarsV2.h:277
Gaudi::Parsers::TupleInnerGrammar< Iterator, TupleT, 1, Skipper >::ResultT
TupleT ResultT
Definition: GrammarsV2.h:245
Gaudi::Parsers::VectorGrammar::VectorGrammar
VectorGrammar()
Definition: GrammarsV2.h:311
Gaudi::Parsers::Pnt4DGrammar
Definition: GrammarsV2.h:544
Gaudi::Parsers::MapGrammar::PairT
std::pair< KeyT, MappedT > PairT
Definition: GrammarsV2.h:420
Gaudi::Parsers::TupleInnerGrammar::op
ph::function< Operations > op
Definition: GrammarsV2.h:237
Gaudi::Parsers::Histo1DGrammar::val1
qi::rule< Iterator, ResultT(), Skipper > val1
Definition: GrammarsV2.h:655
Gaudi::Parsers::PairGrammar::value
Grammar_< Iterator, typename PairT::second_type, Skipper >::Grammar value
Definition: GrammarsV2.h:395
Gaudi::Parsers::KeyValueGrammar::KeyValueGrammar
KeyValueGrammar()
Definition: GrammarsV2.h:674
Gaudi::Parsers::Pnt3DGrammar::Operations::operator()
void operator()(ResultT &res, const Scalar &scalar, const char xyz) const
Definition: GrammarsV2.h:498
Gaudi::Parsers::Grammar_< Iterator, std::list< InnerT, AllocatorT >, Skipper >::Grammar
VectorGrammar< Iterator, std::list< InnerT, AllocatorT >, Skipper > Grammar
Definition: GrammarsV2.h:349
Gaudi::Histo1DDef
Simple helper class for description of 1D-histogram The class is targeted to act as the primary "hist...
Definition: HistoDef.h:30
Gaudi::Parsers::Pnt4DGrammar::Operations
Definition: GrammarsV2.h:549
Gaudi::Parsers::Histo1DGrammar::hist
qi::rule< Iterator, ResultT(), qi::locals< char >, Skipper > hist
Definition: GrammarsV2.h:654
Gaudi::Parsers::tuple_remove_first_type
Definition: GrammarsV2.h:182
Gaudi::Parsers::Grammar_< Iterator, std::set< InnerT, CompareT, AllocatorT >, Skipper >::Grammar
VectorGrammar< Iterator, std::set< InnerT, CompareT, AllocatorT >, Skipper > Grammar
Definition: GrammarsV2.h:360
Gaudi::Parsers::MapGrammar::KeyT
MapT::key_type KeyT
Definition: GrammarsV2.h:418
Gaudi::Parsers::PairGrammar::pair_in
qi::rule< Iterator, ResultT(), Skipper > pair_in
Definition: GrammarsV2.h:399
Gaudi::Parsers::PairGrammar::first_type
PairT::first_type first_type
Definition: GrammarsV2.h:369
Gaudi::Parsers::TupleInnerGrammar::HeadT
tuple_get_first_type< TupleT >::type HeadT
Definition: GrammarsV2.h:212
Gaudi::Parsers::Pnt4DGrammar::point4d
qi::rule< Iterator, ResultT(), Skipper > point4d
Definition: GrammarsV2.h:591
Gaudi::Parsers::Grammar_
Definition: GrammarsV2.h:59
Gaudi::Parsers::TupleInnerGrammar< Iterator, TupleT, 1, Skipper >::TupleInnerGrammar
TupleInnerGrammar()
Definition: GrammarsV2.h:263
Gaudi::Parsers::MapGrammar::pair
qi::rule< Iterator, PairT(), Skipper > pair
Definition: GrammarsV2.h:459
Gaudi::Parsers::Histo1DGrammar::Histo1DGrammar
Histo1DGrammar()
Definition: GrammarsV2.h:635
Gaudi::Parsers::TupleInnerGrammar::Operations::result::type
void type
Definition: GrammarsV2.h:219
StringKey.h
Gaudi::Parsers::MapGrammar::tag_mapped
Definition: GrammarsV2.h:425
Gaudi::Parsers::Grammar_< Iterator, GaudiUtils::VectorMap< KeyT, ValueT, KeyCompareT, AllocatorT >, Skipper >::Grammar
MapGrammar< Iterator, GaudiUtils::VectorMap< KeyT, ValueT, KeyCompareT, AllocatorT >, Skipper > Grammar
Definition: GrammarsV2.h:485
Gaudi::Parsers::TupleInnerGrammar::grLast
TupleInnerGrammar< Iterator, TailT, N-1, Skipper > grLast
Definition: GrammarsV2.h:232
Gaudi::Parsers::VectorGrammar::list
qi::rule< Iterator, ResultT(), Skipper > list
Definition: GrammarsV2.h:326
Gaudi::Parsers::Pnt4DGrammar::Pnt4DGrammar
Pnt4DGrammar()
Definition: GrammarsV2.h:572
Gaudi::Parsers::MapGrammar
Definition: GrammarsV2.h:414
Gaudi::Parsers::TupleGrammar::TupleGrammar
TupleGrammar()
Definition: GrammarsV2.h:280
Gaudi::Parsers::DefaultIterator
std::string::const_iterator DefaultIterator
Definition: GrammarsV2.h:54
Gaudi::Parsers::Grammar_< Iterator, T, Skipper, typename boost::enable_if< boost::is_integral< T > >::type >::Grammar
IntGrammar< Iterator, T, Skipper > Grammar
Definition: GrammarsV2.h:157
Gaudi::Parsers::MapGrammar::Operations::operator()
void operator()(PairT &res, const KeyT &key, tag_key) const
Definition: GrammarsV2.h:438
Gaudi::Parsers::PairGrammar::ResultT
PairT ResultT
Definition: GrammarsV2.h:368
Gaudi::Parsers::MapGrammar::Operations::result::type
void type
Definition: GrammarsV2.h:431
Gaudi::Parsers::Grammar_< Iterator, ROOT::Math::LorentzVector< T1 >, Skipper >::Grammar
Pnt4DGrammar< Iterator, ROOT::Math::LorentzVector< T1 >, Skipper > Grammar
Definition: GrammarsV2.h:605
Gaudi::Parsers::SkipperGrammar
Definition: Grammar.h:45
Gaudi::Parsers::MapGrammar::key
Grammar_< Iterator, typename MapT::key_type, Skipper >::Grammar key
Definition: GrammarsV2.h:456
Gaudi::Parsers::Histo1DGrammar::Operations::operator()
void operator()(ResultT &res, int val) const
Definition: GrammarsV2.h:629
ROOT::Math::DisplacementVector3D
Definition: IMagneticFieldSvc.h:18
Gaudi::Parsers::MapGrammar::ResultT
MapT ResultT
Definition: GrammarsV2.h:417
Gaudi::Parsers::Grammar_< Iterator, ROOT::Math::PositionVector3D< T1, T2 >, Skipper >::Grammar
Pnt3DGrammar< Iterator, ROOT::Math::PositionVector3D< T1, T2 >, Skipper > Grammar
Definition: GrammarsV2.h:531
Gaudi::Parsers::DefaultSkipper
enc::space_type DefaultSkipper
Definition: GrammarsV2.h:55
Gaudi::Parsers::StringGrammar::StringGrammar
StringGrammar()
Definition: GrammarsV2.h:94
std::tuple
std::pair
Gaudi::Parsers::TupleInnerGrammar::Operations::result
Definition: GrammarsV2.h:219
Gaudi::Parsers::TupleInnerGrammar::ResultT
TupleT ResultT
Definition: GrammarsV2.h:210
Gaudi::Parsers::MapGrammar::VectorPairT
std::vector< PairT > VectorPairT
Definition: GrammarsV2.h:422
Gaudi::Parsers::CharGrammar::CharGrammar
CharGrammar()
Definition: GrammarsV2.h:117
Gaudi::Parsers::Pnt3DGrammar::Scalar
PointT::Scalar Scalar
Definition: GrammarsV2.h:491
std::tuple_cat
T tuple_cat(T...args)
Gaudi::Parsers::TupleInnerGrammar::Operations
Definition: GrammarsV2.h:214
Gaudi::Parsers::BoolGrammar::boolean_literal
qi::rule< Iterator, bool(), Skipper > boolean_literal
Definition: GrammarsV2.h:136
std::vector
STL class.
Gaudi::Parsers::VectorGrammar::vec
qi::rule< Iterator, ResultT(), qi::locals< char >, Skipper > vec
Definition: GrammarsV2.h:325
Gaudi::Parsers::RealGrammar::RealGrammar
RealGrammar()
Definition: GrammarsV2.h:164
Gaudi::Parsers::MapGrammar::Operations
Definition: GrammarsV2.h:426
Gaudi::Parsers::Pnt3DGrammar::Operations::result::type
void type
Definition: GrammarsV2.h:497
Iterator
boost::spirit::classic::position_iterator2< ForwardIterator > Iterator
Definition: Iterator.h:18
Gaudi::Parsers::Grammar_< Iterator, std::pair< KeyT, ValueT >, Skipper >::Grammar
PairGrammar< Iterator, std::pair< KeyT, ValueT >, Skipper > Grammar
Definition: GrammarsV2.h:410
std::vector::begin
T begin(T...args)
Gaudi::Parsers::MapGrammar::Operations::operator()
void operator()(ResultT &res, const VectorPairT &vec) const
Definition: GrammarsV2.h:433
Gaudi::Parsers::TupleInnerGrammar< Iterator, TupleT, 1, Skipper >::op
ph::function< Operations > op
Definition: GrammarsV2.h:272
Gaudi::Parsers::Pnt4DGrammar::Operations::operator()
void operator()(ResultT &res, const ResultT &xyz) const
Definition: GrammarsV2.h:565
Gaudi::Parsers::Grammar_< Iterator, ROOT::Math::DisplacementVector3D< T1, T2 >, Skipper >::Grammar
Pnt3DGrammar< Iterator, ROOT::Math::DisplacementVector3D< T1, T2 >, Skipper > Grammar
Definition: GrammarsV2.h:540
GaudiUtils
Forward declarations for the functions in SerializeSTL.h.
Definition: GaudiHistoID.h:139
Gaudi::Parsers::StringGrammar::str
qi::rule< Iterator, std::string(), qi::locals< char >, Skipper > str
Definition: Grammar.h:70
Gaudi::Parsers::TupleInnerGrammar::TailT
tuple_remove_first_type< TupleT >::type TailT
Definition: GrammarsV2.h:211
Gaudi::Parsers::CharGrammar::ch
qi::rule< Iterator, char(), Skipper > ch
Definition: GrammarsV2.h:122
Gaudi::Parsers::MapGrammar::Operations::result
Definition: GrammarsV2.h:431
Gaudi::Parsers::TupleGrammar::grTuple
TupleInnerGrammar< Iterator, TupleT, N, Skipper > grTuple
Definition: GrammarsV2.h:290
Gaudi::Parsers::PairGrammar::PairGrammar
PairGrammar()
Definition: GrammarsV2.h:372
Gaudi::Parsers::TupleInnerGrammar::TupleInnerGrammar
TupleInnerGrammar()
Definition: GrammarsV2.h:228
Gaudi::Parsers::PairGrammar
Definition: GrammarsV2.h:365
Gaudi::Parsers::TupleInnerGrammar< Iterator, TupleT, 1, Skipper >::Operations::result::type
void type
Definition: GrammarsV2.h:253
Gaudi::Parsers::Pnt3DGrammar::Operations::result
Definition: GrammarsV2.h:497
Gaudi::Parsers::TupleInnerGrammar< Iterator, TupleT, 1, Skipper >::grFirst
Grammar_< Iterator, typename std::tuple_element< 0, ResultT >::type, Skipper >::Grammar grFirst
Definition: GrammarsV2.h:269
Gaudi::Parsers::Pnt4DGrammar::list4d
qi::rule< Iterator, ResultT(), Skipper > list4d
Definition: GrammarsV2.h:591
Gaudi::Parsers::VectorGrammar::begin
qi::rule< Iterator, char()> begin
Definition: GrammarsV2.h:322
Gaudi::Parsers::MapGrammar::op
ph::function< Operations > op
Definition: GrammarsV2.h:462
Gaudi::Parsers::TupleGrammar::end
qi::rule< Iterator, void(char)> end
Definition: GrammarsV2.h:288
Gaudi::Parsers::VectorGrammar::end
qi::rule< Iterator, void(char)> end
Definition: GrammarsV2.h:323
Gaudi::Parsers::PairGrammar::second
Definition: GrammarsV2.h:381
Gaudi::Parsers::Grammar_< Iterator, std::vector< InnerT, AllocatorT >, Skipper >::Grammar
VectorGrammar< Iterator, std::vector< InnerT, AllocatorT >, Skipper > Grammar
Definition: GrammarsV2.h:338
Gaudi::Parsers::Histo1DGrammar::end
qi::rule< Iterator, void(char)> end
Definition: GrammarsV2.h:657
Point4DTypes.h
4D point typedefs
Gaudi::Parsers::MapGrammar::value
Grammar_< Iterator, typename MapT::mapped_type, Skipper >::Grammar value
Definition: GrammarsV2.h:458
Gaudi::Parsers::RealGrammar::real
qi::rule< Iterator, RT(), Skipper > real
Definition: GrammarsV2.h:167
Gaudi::Parsers::tuple_remove_first_type< std::tuple< T, Ts...> >::type
std::tuple< Ts...> type
Definition: GrammarsV2.h:194
Gaudi::Parsers::IntGrammar::integer
qi::rule< Iterator, RT(), Skipper > integer
Definition: GrammarsV2.h:148
Gaudi::Parsers::TupleInnerGrammar::Operations::operator()
void operator()(ResultT &res, HeadT &head, TailT &tail) const
Definition: GrammarsV2.h:222
Gaudi::Parsers::CharGrammar
Definition: GrammarsV2.h:114
Gaudi::Parsers::TupleGrammar::begin
qi::rule< Iterator, char()> begin
Definition: GrammarsV2.h:287
Gaudi::Parsers::Histo1DGrammar::val2
qi::rule< Iterator, ResultT(), Skipper > val2
Definition: GrammarsV2.h:655
Gaudi::Parsers::KeyValueGrammar
Definition: GrammarsV2.h:666
Gaudi::Parsers::PairGrammar::end
qi::rule< Iterator, void(char)> end
Definition: GrammarsV2.h:397
Gaudi::Parsers::MapGrammar::Operations::operator()
void operator()(PairT &res, const MappedT &value, tag_mapped) const
Definition: GrammarsV2.h:441
Gaudi
Helper functions to set/get the application return code.
Definition: __init__.py:1
Gaudi::Parsers::Histo1DGrammar::ResultT
Gaudi::Histo1DDef ResultT
Definition: GrammarsV2.h:612
Gaudi::Parsers::StringGrammar::begin_quote
qi::rule< Iterator, char()> begin_quote
Definition: Grammar.h:71
Gaudi::Parsers::KeyValueGrammar::ResultT
std::pair< std::string, std::string > ResultT
Definition: GrammarsV2.h:669
Gaudi::Parsers::Pnt4DGrammar::op
ph::function< Operations > op
Definition: GrammarsV2.h:595
Gaudi::Parsers::TupleInnerGrammar< Iterator, TupleT, 1, Skipper >::tup
qi::rule< Iterator, ResultT(), Skipper > tup
Definition: GrammarsV2.h:271
Gaudi::Parsers::VectorGrammar
Definition: GrammarsV2.h:305
Gaudi::Parsers::Pnt3DGrammar::list
qi::rule< Iterator, ResultT(), Skipper > list
Definition: GrammarsV2.h:519
Gaudi::Parsers::Pnt4DGrammar::ScalarT
PointT::Scalar ScalarT
Definition: GrammarsV2.h:547
Gaudi::Parsers::Pnt3DGrammar::scalar
Grammar_< Iterator, Scalar, Skipper >::Grammar scalar
Definition: GrammarsV2.h:520
HistoDef.h
Gaudi::Parsers::Histo1DGrammar::op
ph::function< Operations > op
Definition: GrammarsV2.h:659