| The Gaudi Framework v32r1 (f65d50dc)

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