| The Gaudi Framework v29r0 (ff2e7097)

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