The Gaudi Framework  master (e68eea06)
Loading...
Searching...
No Matches
Gaudi::Parsers::Pnt4DGrammar< Iterator, PointT, Skipper > Struct Template Reference

#include </builds/gaudi/Gaudi/GaudiKernel/include/Gaudi/Parsers/Grammars.h>

Inheritance diagram for Gaudi::Parsers::Pnt4DGrammar< Iterator, PointT, Skipper >:
Collaboration diagram for Gaudi::Parsers::Pnt4DGrammar< Iterator, PointT, Skipper >:

Public Types

using ResultT = PointT
 
using ScalarT = typename PointT::Scalar
 

Public Member Functions

 Pnt4DGrammar ()
 

Public Attributes

qi::rule< Iterator, ResultT(), Skipperpoint3d
 
qi::rule< Iterator, ResultT(), Skipperpoint4d
 
qi::rule< Iterator, ResultT(), Skipperlist3d
 
qi::rule< Iterator, ResultT(), Skipperlist4d
 
qi::rule< Iterator, ScalarT(), Skippere
 
Grammar_< Iterator, ScalarT, Skipper >::Grammar scalar
 

Detailed Description

template<typename Iterator, typename PointT, typename Skipper>
struct Gaudi::Parsers::Pnt4DGrammar< Iterator, PointT, Skipper >

Definition at line 303 of file Grammars.h.

Member Typedef Documentation

◆ ResultT

template<typename Iterator, typename PointT, typename Skipper>
using Gaudi::Parsers::Pnt4DGrammar< Iterator, PointT, Skipper >::ResultT = PointT

Definition at line 304 of file Grammars.h.

◆ ScalarT

template<typename Iterator, typename PointT, typename Skipper>
using Gaudi::Parsers::Pnt4DGrammar< Iterator, PointT, Skipper >::ScalarT = typename PointT::Scalar

Definition at line 305 of file Grammars.h.

Constructor & Destructor Documentation

◆ Pnt4DGrammar()

template<typename Iterator, typename PointT, typename Skipper>
Gaudi::Parsers::Pnt4DGrammar< Iterator, PointT, Skipper >::Pnt4DGrammar ( )
inline

Definition at line 311 of file Grammars.h.

312 auto const setPx = ph::bind( &ResultT::SetPx, qi::_val, qi::_1 );
313 auto const setPy = ph::bind( &ResultT::SetPy, qi::_val, qi::_1 );
314 auto const setPz = ph::bind( &ResultT::SetPz, qi::_val, qi::_1 );
315 auto const setE = ph::bind( &ResultT::SetE, qi::_val, qi::_1 );
316 auto const setXYZ = ph::bind(
317 +[]( ResultT& out, ResultT const& in ) {
318 out.SetPx( in.Px() );
319 out.SetPy( in.Py() );
320 out.SetPz( in.Pz() );
321 },
322 qi::_val, qi::_1 );
323
324 // energy: optional 't' or 'e' label + scalar, with explicit assignment
325 e = -( enc::no_case[enc::char_( "te" )] >> ':' ) >> scalar[qi::_val = qi::_1];
326
327 // 3D list: x,y,z with optional labels and aliases
328 list3d = -( enc::no_case[qi::lit( "x" ) | qi::lit( "px" )] >> ':' ) >> scalar[setPx] >> ',' >>
329 -( enc::no_case[qi::lit( "y" ) | qi::lit( "py" )] >> ':' ) >> scalar[setPy] >> ',' >>
330 -( enc::no_case[qi::lit( "z" ) | qi::lit( "pz" )] >> ':' ) >> scalar[setPz];
331
332 // 3D point: bare, or wrapped in () or []
333 point3d = list3d | rep::confix( '(', ')' )[list3d] | rep::confix( '[', ']' )[list3d];
334
335 // 4D list: either (3D ; E) or (E ; 3D), ; or , as separator
336 list4d =
337 ( point3d[setXYZ] >> enc::char_( ";," ) >> e[setE] ) | ( e[setE] >> enc::char_( ";," ) >> point3d[setXYZ] );
338
339 // 4D point: bare, or wrapped in () or []
340 point4d = list4d | rep::confix( '(', ')' )[list4d] | rep::confix( '[', ']' )[list4d];
341 }
qi::rule< Iterator, ResultT(), Skipper > list4d
Definition Grammars.h:307
qi::rule< Iterator, ResultT(), Skipper > list3d
Definition Grammars.h:307
qi::rule< Iterator, ResultT(), Skipper > point4d
Definition Grammars.h:307
qi::rule< Iterator, ResultT(), Skipper > point3d
Definition Grammars.h:307
Grammar_< Iterator, ScalarT, Skipper >::Grammar scalar
Definition Grammars.h:309
qi::rule< Iterator, ScalarT(), Skipper > e
Definition Grammars.h:308

Member Data Documentation

◆ e

template<typename Iterator, typename PointT, typename Skipper>
qi::rule<Iterator, ScalarT(), Skipper> Gaudi::Parsers::Pnt4DGrammar< Iterator, PointT, Skipper >::e

Definition at line 308 of file Grammars.h.

◆ list3d

template<typename Iterator, typename PointT, typename Skipper>
qi::rule<Iterator, ResultT(), Skipper> Gaudi::Parsers::Pnt4DGrammar< Iterator, PointT, Skipper >::list3d

Definition at line 307 of file Grammars.h.

◆ list4d

template<typename Iterator, typename PointT, typename Skipper>
qi::rule<Iterator, ResultT(), Skipper> Gaudi::Parsers::Pnt4DGrammar< Iterator, PointT, Skipper >::list4d

Definition at line 307 of file Grammars.h.

◆ point3d

template<typename Iterator, typename PointT, typename Skipper>
qi::rule<Iterator, ResultT(), Skipper> Gaudi::Parsers::Pnt4DGrammar< Iterator, PointT, Skipper >::point3d

Definition at line 307 of file Grammars.h.

◆ point4d

template<typename Iterator, typename PointT, typename Skipper>
qi::rule<Iterator, ResultT(), Skipper> Gaudi::Parsers::Pnt4DGrammar< Iterator, PointT, Skipper >::point4d

Definition at line 307 of file Grammars.h.

◆ scalar

template<typename Iterator, typename PointT, typename Skipper>
Grammar_<Iterator,ScalarT,Skipper>::Grammar Gaudi::Parsers::Pnt4DGrammar< Iterator, PointT, Skipper >::scalar

Definition at line 309 of file Grammars.h.


The documentation for this struct was generated from the following file: