The Gaudi Framework  master (ff829712)
Loading...
Searching...
No Matches
Gaudi::Parsers Namespace Reference

Namespaces

namespace  Utils
 

Classes

struct  AxisGrammar
 
struct  BoolGrammar
 
class  Catalog
 
struct  CharGrammar
 
struct  DataObjIDGrammar
 
class  EdgeGrammar
 
struct  FileGrammar
 
struct  Grammar_
 
struct  Grammar_< Iterator, Gaudi::Accumulators::Axis< Arithmetic >, Skipper >
 
struct  Grammar_< Iterator, GaudiUtils::VectorMap< KeyT, ValueT, KeyCompareT, AllocatorT >, Skipper >
 
struct  Grammar_< Iterator, MyCustomType, Skipper >
 
struct  Grammar_< Iterator, ROOT::Math::DisplacementVector3D< T1, T2 >, Skipper >
 
struct  Grammar_< Iterator, ROOT::Math::LorentzVector< T1 >, Skipper >
 
struct  Grammar_< Iterator, ROOT::Math::PositionVector3D< T1, T2 >, Skipper >
 
struct  Grammar_< Iterator, std::list< InnerT, AllocatorT >, Skipper >
 
struct  Grammar_< Iterator, std::map< KeyT, ValueT, KeyCompareT, AllocatorT >, Skipper >
 
struct  Grammar_< Iterator, std::pair< KeyT, ValueT >, Skipper >
 
struct  Grammar_< Iterator, std::set< InnerT, CompareT, AllocatorT >, Skipper >
 
struct  Grammar_< Iterator, std::tuple< Args... >, Skipper >
 
struct  Grammar_< Iterator, std::unordered_map< KeyT, ValueT, HashT, KeyCompareT, AllocatorT >, Skipper >
 
struct  Grammar_< Iterator, std::unordered_set< InnerT, HashT, CompareT, AllocatorT >, Skipper >
 
struct  Grammar_< Iterator, std::vector< InnerT, AllocatorT >, Skipper >
 
struct  Grammar_< Iterator, T, Skipper >
 
class  H1Grammar
 
class  H2Grammar
 
class  H3Grammar
 
struct  Histo1DGrammar
 
struct  IdentifierGrammar
 
class  IncludedFiles
 
struct  InputData
 Helper class to enable ADL for parsers. More...
 
struct  IntGrammar
 
struct  KeyValueGrammar
 
struct  MapGrammar
 
class  Messages
 
struct  Node
 
struct  NodeOperations
 
struct  PairGrammar
 
struct  Pnt3DGrammar
 
struct  Pnt4DGrammar
 
class  Position
 
class  PositionalPropertyValueException
 
class  PragmaOptions
 
class  Property
 
class  PropertyName
 
class  PropertyValue
 
class  PropertyValueException
 
struct  RealGrammar
 
struct  SetGrammar
 
struct  SkipperGrammar
 
struct  StringGrammar
 
struct  tuple_get_first_type
 
struct  tuple_get_first_type< std::tuple< T, Ts... > >
 
struct  tuple_remove_first_type
 
struct  tuple_remove_first_type< std::tuple< T, Ts... > >
 
struct  TupleGrammar
 
struct  TupleInnerGrammar
 
struct  TupleInnerGrammar< Iterator, TupleT, 1, Skipper >
 
class  Units
 
struct  UnitsGrammar
 
struct  VectorGrammar
 

Typedefs

typedef std::string_view::const_iterator IteratorT
 
typedef SkipperGrammar< IteratorTSkipper
 
typedef std::string::const_iterator DefaultIterator
 
typedef enc::space_type DefaultSkipper
 

Functions

template<typename K, typename V>
StatusCode parse (GaudiUtils::HashMap< K, V > &result, std::string_view input)
 Basic parser for the types of HashMap used in DODBasicMapper.
 
bool ReadOptions (std::string_view filename, std::string_view search_path, Messages *messages, Catalog *catalog, Units *units, PragmaOptions *pragma, Node *root)
 Parse and analyze filename, save all messages and properties.
 
std::ostream & operator<< (std::ostream &o, const Catalog &c)
 printout operator
 
bool Parse (std::string_view filename, std::string_view search_path, IncludedFiles *included, Messages *messages, Node *root)
 
bool Parse (const Position &from, std::string_view filename, std::string_view search_path, IncludedFiles *included, Messages *messages, Node *root)
 
bool ParseUnits (const Position &from, std::string_view filename, std::string_view search_path, IncludedFiles *included, Messages *messages, Node *root)
 
template<typename Arithmetic>
StatusCode parse (Gaudi::Accumulators::Axis< Arithmetic > &result, const std::string &input)
 
GAUDI_API StatusCode parse (std::vector< std::pair< double, double > > &result, std::string_view input)
 parse the bool value
 
GAUDI_API StatusCode parse (std::vector< std::pair< int, int > > &result, std::string_view input)
 parse the std::vector<std::pair<int,int> > value
 
GAUDI_API StatusCode parse (std::vector< std::vector< std::string > > &result, std::string_view input)
 parse the std::vector<std::vector<std::string> > value
 
GAUDI_API StatusCode parse (std::vector< std::vector< double > > &result, std::string_view input)
 parse the std::vector<std::vector<double> > value
 
GAUDI_API StatusCode parse (std::vector< std::vector< int > > &result, std::string_view input)
 parse the std::vector<std::vector<int> > value
 
GAUDI_API StatusCode parse (std::map< int, int > &result, std::string_view input)
 parse the std::map<int , int> value
 
GAUDI_API StatusCode parse (std::map< int, double > &result, std::string_view input)
 parse the std::map<int , double> value
 
GAUDI_API StatusCode parse (std::map< std::string, std::string > &result, std::string_view input)
 parse the std::map<std::string , std::string> value
 
GAUDI_API StatusCode parse (std::map< std::string, std::string, std::less<> > &result, std::string_view input)
 
GAUDI_API StatusCode parse (std::map< std::string, int > &result, std::string_view input)
 parse the std::map<std::string , int> value
 
GAUDI_API StatusCode parse (std::map< std::string, double > &result, std::string_view input)
 parse the std::map<std::string , double> value
 
GAUDI_API StatusCode parse (std::map< std::string, std::vector< std::string > > &result, std::string_view input)
 parse the std::map<std::string , std::vector<std::string> > value
 
GAUDI_API StatusCode parse (std::map< std::string, std::vector< int > > &result, std::string_view input)
 parse the std::map<std::string , std::vector<int> > value
 
GAUDI_API StatusCode parse (std::map< std::string, std::vector< double > > &result, std::string_view input)
 parse the std::map<std::string , std::vector<double> > value
 
GAUDI_API StatusCode parse (std::map< int, std::string > &result, std::string_view input)
 parse the std::map<int,std::string> > objects
 
GAUDI_API StatusCode parse (std::map< unsigned int, std::string > &result, std::string_view input)
 parse the std::map<unsigned int,std::string> > objects
 
GAUDI_API StatusCode parse (std::map< std::string, unsigned int > &result, std::string_view input)
 parse the std::map<unsigned int,std::string> > objects
 
template<typename K, typename V, typename M>
GAUDI_API StatusCode parse (GaudiUtils::Map< K, V, M > &result, std::string_view input)
 parse the GaudiUtils::Map<K, V, M> objects
 
GAUDI_API StatusCode parse (std::string &name, std::string &value, std::string_view input)
 parse the pair expression (map-component) " 'name' :value"
 
GAUDI_API StatusCode parse (Gaudi::Histo1DDef &histo, std::string_view input)
 helper function, needed for implementation of "Histogram Property"
 
GAUDI_API StatusCode parse (std::map< std::string, Gaudi::Histo1DDef > &histos, std::string_view input)
 helper function, needed for implementation of "Histogram Property"
 
GAUDI_API StatusCode parse (std::map< std::string, std::pair< double, double > > &params, std::string_view input)
 helper function, needed for implementation of map of pairs
 
GAUDI_API StatusCode parse (std::map< std::string, std::pair< int, int > > &params, std::string_view input)
 helper function, needed for implementation of map of pairs
 
template<class T, unsigned int N>
StatusCode parse (T(&result)[N], std::string_view input)
 parser function for C-arrays
 
template<unsigned int N>
StatusCode parse (char(&result)[N], std::string_view input)
 parser function for C-strings
 
template<typename ResultT>
StatusCode parse_ (ResultT &result, std::string_view input)
 
template<>
StatusCode parse_ (std::string &result, std::string_view input)
 
template<typename ResultT>
StatusCode parse (ResultT &result, std::string_view input)
 
 REGISTER_GRAMMAR (std::string, StringGrammar)
 
 REGISTER_GRAMMAR (Gaudi::StringKey, StringGrammar)
 
 REGISTER_GRAMMAR (char, CharGrammar)
 
 REGISTER_GRAMMAR (bool, BoolGrammar)
 
 REGISTER_GRAMMAR (Gaudi::Histo1DDef, Histo1DGrammar)
 
template<class TYPE, std::size_t N>
StatusCode parse (boost::array< TYPE, N > &result, std::string_view input)
 parse class boost::array from the string
 
StatusCode parse (DataHandle &, std::string_view)
 
template<class TYPE, std::size_t N>
StatusCode parse (std::array< TYPE, N > &result, std::string_view input)
 parse class std::array from the string
 
GAUDI_API StatusCode parse (Gaudi::StringKey &result, std::string_view input)
 parse the key from the string
 
GAUDI_API StatusCode parse (std::vector< Gaudi::StringKey > &result, std::string_view input)
 parse the vector of keys from the string
 
template<class SCALAR, unsigned int N>
StatusCode parse (ROOT::Math::SVector< SCALAR, N > &result, std::string_view input)
 parse SVector
 
GAUDI_API StatusCode parse (GaudiUtils::VectorMap< std::string, double > &result, std::string_view input)
 parse the key from the string
 
GAUDI_API StatusCode parse (GaudiUtils::VectorMap< Gaudi::StringKey, double > &result, std::string_view input)
 parse the vector of keys from the string
 
GAUDI_API StatusCode parse (Gaudi::XYZPoint &result, std::string_view input)
 parse 3D-point
 
GAUDI_API StatusCode parse (Gaudi::XYZVector &result, std::string_view input)
 parse 3D-vector
 
GAUDI_API StatusCode parse (Gaudi::LorentzVector &result, std::string_view input)
 parse LorentzVector
 
GAUDI_API StatusCode parse (std::vector< Gaudi::XYZPoint > &result, std::string_view input)
 parse the vector of points
 
GAUDI_API StatusCode parse (std::vector< Gaudi::XYZVector > &result, std::string_view input)
 parse the vector of vectors
 
GAUDI_API StatusCode parse (std::vector< Gaudi::LorentzVector > &result, std::string_view input)
 parse the vector of vectors
 
 REGISTER_GRAMMAR (DataObjID, DataObjIDGrammar)
 
template<typename T1, typename T2>
StatusCode parse_ (ROOT::Math::PositionVector3D< T1, T2 > &result, std::string_view input)
 
StatusCode parse (MyCustomType &result, std::string_view input)
 
GAUDI_API StatusCode parse (TH1D &result, std::string_view input)
 parse ROOT histogram from text representation
 
GAUDI_API StatusCode parse (TH2D &result, std::string_view input)
 parse ROOT histogram from text representation
 
GAUDI_API StatusCode parse (TH3D &result, std::string_view input)
 parse ROOT histogram from text representation
 
GAUDI_API StatusCode parse (TH1F &result, std::string_view input)
 parse ROOT histogram from text representation
 
GAUDI_API StatusCode parse (TH2F &result, std::string_view input)
 parse ROOT histogram from text representation
 
GAUDI_API StatusCode parse (TH3F &result, std::string_view input)
 parse AIDA histogram from text representation
 
GAUDI_API StatusCode parse (AIDA::IHistogram1D &result, std::string_view input)
 parse AIDA histogram from text representation
 
GAUDI_API StatusCode parse (AIDA::IHistogram2D &result, std::string_view input)
 parse AIDA histogram from text representation
 
GAUDI_API StatusCode parse (AIDA::IHistogram3D &result, std::string_view input)
 parse AIDA histogram from text representation
 
GAUDI_API StatusCode parse (TH1D *&result, std::string_view input)
 parse ROOT histogram from text representation
 
GAUDI_API StatusCode parse (TH2D *&result, std::string_view input)
 parse ROOT histogram from text representation
 
GAUDI_API StatusCode parse (TH3D *&result, std::string_view input)
 parse ROOT histogram from text representation
 
 REGISTER_GRAMMAR (Edges, EdgeGrammar)
 
 REGISTER_GRAMMAR (H1, H1Grammar)
 
 REGISTER_GRAMMAR (H2, H2Grammar)
 
 REGISTER_GRAMMAR (H3, H3Grammar)
 

Typedef Documentation

◆ DefaultIterator

typedef std::string::const_iterator Gaudi::Parsers::DefaultIterator

Definition at line 57 of file Grammars.h.

◆ DefaultSkipper

typedef enc::space_type Gaudi::Parsers::DefaultSkipper

Definition at line 58 of file Grammars.h.

◆ IteratorT

typedef std::string_view::const_iterator Gaudi::Parsers::IteratorT

Definition at line 23 of file Factory.h.

◆ Skipper

Definition at line 24 of file Factory.h.

Function Documentation

◆ operator<<()

std::ostream & Gaudi::Parsers::operator<< ( std::ostream & o,
const Catalog & c )
inline

printout operator

Definition at line 49 of file Catalog.h.

49{ return c.fillStream( o ); }

◆ Parse() [1/2]

bool Gaudi::Parsers::Parse ( const Position & from,
std::string_view filename,
std::string_view search_path,
IncludedFiles * included,
Messages * messages,
Node * root )

Definition at line 110 of file Parser.cpp.

111 {
113 return ParseFile<Grammar>( from, filename, search_path, included, messages, root );
114}

◆ Parse() [2/2]

bool Gaudi::Parsers::Parse ( std::string_view filename,
std::string_view search_path,
IncludedFiles * included,
Messages * messages,
Node * root )

Definition at line 105 of file Parser.cpp.

106 {
107 return Parse( Position(), filename, search_path, included, messages, root );
108}
bool Parse(std::string_view filename, std::string_view search_path, IncludedFiles *included, Messages *messages, Node *root)
Definition Parser.cpp:105

◆ parse() [1/55]

StatusCode Gaudi::Parsers::parse ( AIDA::IHistogram1D & result,
std::string_view input )

parse AIDA histogram from text representation

Parameters
result(OUTPUT) the histogram
input(INPUT) the input to be parsed
Returns
status code

Definition at line 596 of file HistoParsers.cpp.

596 {
597 // 1) convert to ROOT
598 auto root = Gaudi::Utils::Aida2ROOT::aida2root( &result );
599 // 2) read ROOT histogram
600 return root ? parse( *root, input ) : StatusCode::FAILURE;
601}
static TH1D * aida2root(AIDA::IHistogram1D *aida)
get the underlying pointer for 1D-histogram
Definition Aida2ROOT.cpp:60
This class is used for returning status codes from appropriate routines.
Definition StatusCode.h:64
StatusCode parse(GaudiUtils::HashMap< K, V > &result, std::string_view input)
Basic parser for the types of HashMap used in DODBasicMapper.

◆ parse() [2/55]

StatusCode Gaudi::Parsers::parse ( AIDA::IHistogram2D & result,
std::string_view input )

parse AIDA histogram from text representation

Parameters
result(OUTPUT) the histogram
input(INPUT) the input to be parsed
Returns
status code

Definition at line 609 of file HistoParsers.cpp.

609 {
610 // 1) convert to ROOT
611 auto root = Gaudi::Utils::Aida2ROOT::aida2root( &result );
612 // 2) read ROOT histogram
613 return root ? parse( *root, input ) : StatusCode::FAILURE;
614}

◆ parse() [3/55]

StatusCode Gaudi::Parsers::parse ( AIDA::IHistogram3D & result,
std::string_view input )

parse AIDA histogram from text representation

Parameters
result(OUTPUT) the histogram
input(INPUT) the input to be parsed
Returns
status code

Definition at line 622 of file HistoParsers.cpp.

622 {
623 // 1) convert to ROOT
624 auto root = Gaudi::Utils::Aida2ROOT::aida2root( &result );
625 // 2) read ROOT histogram
626 return root ? parse( *root, input ) : StatusCode::FAILURE;
627}

◆ parse() [4/55]

template<class TYPE, std::size_t N>
StatusCode Gaudi::Parsers::parse ( boost::array< TYPE, N > & result,
std::string_view input )

parse class boost::array from the string

Parameters
result(OUTPUT) the actual result
input(INPUT) the input string
Returns
status code
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-16

Definition at line 65 of file BoostArrayAsProperty.h.

65 {
66 typedef std::vector<TYPE> _Vct;
67 // create the temporaty vector
68 _Vct tmp;
69 // parse the string
70 StatusCode sc = parse( tmp, input );
71 if ( sc.isFailure() ) { return sc; }
72 if ( N != tmp.size() ) { return StatusCode::FAILURE; }
73 // copy vector into array
74 std::copy( tmp.begin(), tmp.end(), result.begin() );
75 //
77 }
bool isFailure() const
Definition StatusCode.h:129
constexpr static const auto SUCCESS
Definition StatusCode.h:99
constexpr static const auto FAILURE
Definition StatusCode.h:100

◆ parse() [5/55]

template<unsigned int N>
StatusCode Gaudi::Parsers::parse ( char(&) result[N],
std::string_view input )

parser function for C-strings

Parameters
paramsC-string
inputthe string to be parsed
Returns
status code
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-15

Definition at line 522 of file CommonParsers.h.

522 {
523 // clear the string
524 std::fill_n( result, N, ' ' );
525 // create the temporary string
526 std::string tmp;
527 StatusCode sc = parse( tmp, input );
528 if ( sc.isFailure() ) { return sc; }
529 if ( N == tmp.size() ) {
530 std::copy( tmp.begin(), tmp.end(), result );
531 } else if ( N + 2 == tmp.size() && ( '\'' == tmp[0] || '\"' == tmp[0] ) && ( tmp[0] == tmp[tmp.size() - 1] ) ) {
532 std::copy( tmp.begin() + 1, tmp.end() - 1, result );
533 } else {
534 return StatusCode::FAILURE;
535 }
536 //
537 return StatusCode::SUCCESS;
538 }

◆ parse() [6/55]

StatusCode Gaudi::Parsers::parse ( DataHandle & v,
std::string_view s )

Definition at line 21 of file DataHandleProperty.cpp.

21 {
22 DataObjID id;
23 auto sc = parse( id, s );
24 if ( sc ) v.setKey( std::move( id ) );
25 return sc;
26 }

◆ parse() [7/55]

template<typename Arithmetic>
StatusCode Gaudi::Parsers::parse ( Gaudi::Accumulators::Axis< Arithmetic > & result,
const std::string & input )

Definition at line 82 of file AxisAsProperty.h.

82 {
83 return parse_( result, input );
84 }
StatusCode parse_(ResultT &result, std::string_view input)
Definition Factory.h:26

◆ parse() [8/55]

StatusCode Gaudi::Parsers::parse ( Gaudi::Histo1DDef & histo,
std::string_view input )

helper function, needed for implementation of "Histogram Property"

Parameters
histothe histogram description (output)
inputthe string to be parsed
Returns
status code
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Date
2007-09-17

Definition at line 14 of file ParsersHistograms.cpp.

14 {
15 return Gaudi::Parsers::parse_( result, input );
16}

◆ parse() [9/55]

StatusCode Gaudi::Parsers::parse ( Gaudi::LorentzVector & result,
std::string_view input )

parse LorentzVector

Valid representations of Lorenzt vector

- a'la python tuple with 4 elements ("canonical")
- a'la python list with 4 elements
- python/list with inner representation of 3D-point/vector
- tuple or list with named ordered fields
" (1,2,3,4) "
" (1,2,3;4) "
" [1,2,3,4] "
" [1,2,3;4] "
" [ x:1 ,2,3; e= 4] "
" [ pX : 1 , PY : 2, 3 , T= 4] "
" [ ( pX : 1 , PY : 2, 3 ) , 4] "
" [ ( pX : 1 , PY : 2, 3 ) ; 4] "
" [ 4 , ( pX : 1 , PY : 2, 3 ) ] "
" [ 4 ; ( pX : 1 , PY : 2, 3 ) ] "
" [ [ pX : 1 , PY : 2, 3 ] , 4] "
" [ [ pX : 1 , PY : 2, 3 ] ; 4] "
" [ 4 , [ pX : 1 , PY : 2, 3 ] ] "
" [ 4 ; [ pX : 1 , PY : 2, 3 ] ] "
" ( ( pX : 1 , PY : 2, 3 ) , 4 )"
" ( ( pX : 1 , PY : 2, 3 ) ; 4 )"
" ( 4 , ( pX : 1 , PY : 2, 3 ) )"
" ( 4 ; ( pX : 1 , PY : 2, 3 ) )"
" ( [ pX : 1 , PY : 2, 3 ] , 4 )"
" ( [ pX : 1 , PY : 2, 3 ] ; 4 )"
" ( 4 , [ pX : 1 , PY : 2, 3 ] )"
" ( 4 ; [ pX : 1 , PY : 2, 3 ] )"

Note that "eenrgy" element can be separated with semicolumn.

Valid keys for names fields:

"x", "X" , "pX" , "Px" , "PX "
"y", "Y" , "pY" , "Py" , "PY "
"z", "Z" , "pZ" , "Pz" , "PZ "
"t", "T" , "e" , "E"
Attention
Named fields must be ordered (x,y,z)
Parameters
result(output) the parsed lorentz vector
input(input) the input string
Returns
status code
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-05

Definition at line 57 of file ParsersVct.cpp.

57{ return parse_( result, input ); }

◆ parse() [10/55]

StatusCode Gaudi::Parsers::parse ( Gaudi::StringKey & result,
std::string_view input )

parse the key from the string

See also
Gaudi::Parsers
Gaudi::Parsers::parse
Gaudi::StringKey
Attention
: this function is needed to use it as property
Parameters
result(OUTPUT) the parsing result
inputthe input string
Returns
status code

Definition at line 32 of file StringKey.cpp.

32 {
33 std::string _result;
34 StatusCode sc = parse( _result, input );
35 result = Gaudi::StringKey( _result );
36 return sc;
37}
Helper class for efficient "key" access for strings.
Definition StringKey.h:66

◆ parse() [11/55]

StatusCode Gaudi::Parsers::parse ( Gaudi::XYZPoint & result,
std::string_view input )

parse 3D-point

Valid representations of 3D-point:

- a'la python tuple with 3 elements ("canonical")
- a'la python list with 3 elements
- tuple or list with named ordered fields
" (1,2,3) "
" [1,2,3] "
" [ x : 1, 2, Z:3 ] "
" [ pX : 1 , PY : 2, 3] "

Valid keys for names fields:

"x", "X" , "pX" , "Px" , "PX "
"y", "Y" , "pY" , "Py" , "PY "
"z", "Z" , "pZ" , "Pz" , "PZ "
Attention
Named fields must be ordered (x,y,z)
Parameters
result(output) the parsed point
input(input) the input string
Returns
status code
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-05

Definition at line 39 of file ParsersVct.cpp.

39{ return parse_( result, input ); }

◆ parse() [12/55]

StatusCode Gaudi::Parsers::parse ( Gaudi::XYZVector & result,
std::string_view input )

parse 3D-vector

Valid representations of 3D-vector:

- a'la python tuple with 3 elements ("canonical")
- a'la python list with 3 elements
- tuple or list with named ordered fields
" (1,2,3) "
" [1,2,3] "
" [ x : 1, 2, Z:3 ] "
" [ pX : 1 , PY : 2, 3] "

Valid keys for names fields:

"x", "X" , "pX" , "Px" , "PX "
"y", "Y" , "pY" , "Py" , "PY "
"z", "Z" , "pZ" , "Pz" , "PZ "
Attention
Named fields must be ordered (x,y,z)
Parameters
result(output) the parsed vector
input(input) the input string
Returns
status code
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-05

Definition at line 48 of file ParsersVct.cpp.

48 {
49
50 Gaudi::XYZPoint point;
51 StatusCode sc = parse( point, input );
52 if ( sc.isFailure() ) { return sc; }
53 result = point;
55 }

◆ parse() [13/55]

template<typename K, typename V>
StatusCode Gaudi::Parsers::parse ( GaudiUtils::HashMap< K, V > & result,
std::string_view input )

Basic parser for the types of HashMap used in DODBasicMapper.

Delegates to the parser of map<string,string>.

Definition at line 21 of file DODBasicMapper.cpp.

21 {
22 std::map<std::string, std::string> tmp;
23 StatusCode sc = parse( tmp, input );
24 if ( sc.isSuccess() ) {
25 result.clear();
26 result.insert( tmp.begin(), tmp.end() );
27 }
28 return sc;
29 }
bool isSuccess() const
Definition StatusCode.h:314

◆ parse() [14/55]

template<typename K, typename V, typename M>
GAUDI_API StatusCode Gaudi::Parsers::parse ( GaudiUtils::Map< K, V, M > & result,
std::string_view input )

parse the GaudiUtils::Map<K, V, M> objects

See also
Gaudi::Parsers::MapGrammar

Definition at line 427 of file CommonParsers.h.

427 {
428 return parse( (M&)result, input );
429 }

◆ parse() [15/55]

StatusCode Gaudi::Parsers::parse ( GaudiUtils::VectorMap< Gaudi::StringKey, double > & result,
std::string_view input )

parse the vector of keys from the string

See also
Gaudi::Parsers
Gaudi::Parsers::parse
Gaudi::VectorMap
Gaudi::StringKey
Attention
: this function is needed to use it as property
Parameters
result(OUTPUT) the parsing result
inputthe input string
Returns
status code

Definition at line 18 of file ParsersCollections.cpp.

18 {
19 return Gaudi::Parsers::parse_( result, input );
20}

◆ parse() [16/55]

StatusCode Gaudi::Parsers::parse ( GaudiUtils::VectorMap< std::string, double > & result,
std::string_view input )

parse the key from the string

See also
Gaudi::Parsers
Gaudi::Parsers::parse
Gaudi::VectorMap
Attention
: this function is needed to use it as property
Parameters
result(OUTPUT) the parsing result
inputthe input string
Returns
status code

Definition at line 14 of file ParsersCollections.cpp.

14 {
15 return Gaudi::Parsers::parse_( result, input );
16}

◆ parse() [17/55]

StatusCode Gaudi::Parsers::parse ( MyCustomType & result,
std::string_view input )

Definition at line 37 of file CustomPropertiesAlg.cpp.

37{ return parse_( result, input ); }

◆ parse() [18/55]

template<typename ResultT>
StatusCode Gaudi::Parsers::parse ( ResultT & result,
std::string_view input )
inline

Definition at line 43 of file Factory.h.

43 {
44 return parse_( result, input );
45 }

◆ parse() [19/55]

template<class SCALAR, unsigned int N>
StatusCode Gaudi::Parsers::parse ( ROOT::Math::SVector< SCALAR, N > & result,
std::string_view input )

parse SVector

Parameters
result(output) the parsed vector
input(input) the input string
Returns
status code
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-05

Definition at line 38 of file SVectorAsProperty.h.

38 {
39 std::vector<double> tmp;
40 StatusCode sc = parse( tmp, input );
41 if ( sc.isFailure() ) { return sc; }
42 if ( N != tmp.size() ) { return StatusCode::FAILURE; }
43 std::copy( tmp.begin(), tmp.end(), result.begin() );
45 }

◆ parse() [20/55]

template<class TYPE, std::size_t N>
StatusCode Gaudi::Parsers::parse ( std::array< TYPE, N > & result,
std::string_view input )

parse class std::array from the string

Parameters
result(OUTPUT) the actual result
input(INPUT) the input string
Returns
status code
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-16

Definition at line 39 of file StdArrayAsProperty.h.

39 {
40 std::vector<TYPE> tmp;
41 StatusCode sc = parse( tmp, input );
42 if ( sc.isFailure() ) return sc;
43 if ( N != tmp.size() ) return StatusCode::FAILURE;
44 std::copy( tmp.begin(), tmp.end(), result.begin() );
46 }

◆ parse() [21/55]

StatusCode Gaudi::Parsers::parse ( std::map< int, double > & result,
std::string_view input )

parse the std::map<int , double> value

See also
Gaudi::Parsers::MapGrammar
Gaudi::Parsers::IntGrammar
Gaudi::Parsers::RealGrammar
Parameters
result(output) map with integer key and double value
input(input) the string to be parsed
Returns
status code
Author
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-05-14

Definition at line 25 of file ParsersStandardMisc2.cpp.

25 {
26 return Gaudi::Parsers::parse_( result, input );
27}

◆ parse() [22/55]

StatusCode Gaudi::Parsers::parse ( std::map< int, int > & result,
std::string_view input )

parse the std::map<int , int> value

See also
Gaudi::Parsers::MapGrammar
Gaudi::Parsers::IntGrammar
Parameters
result(output) map with integer key and double value
input(input) the string to be parsed
Returns
status code
Author
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-05-14

Definition at line 21 of file ParsersStandardMisc2.cpp.

21 {
22 return Gaudi::Parsers::parse_( result, input );
23}

◆ parse() [23/55]

StatusCode Gaudi::Parsers::parse ( std::map< int, std::string > & result,
std::string_view input )

parse the std::map<int,std::string> > objects

See also
Gaudi::Parsers::MapGrammar
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Date
2007-12-06

Definition at line 21 of file ParsersStandardMisc4.cpp.

21 {
22 return Gaudi::Parsers::parse_( result, input );
23}

◆ parse() [24/55]

StatusCode Gaudi::Parsers::parse ( std::map< std::string, double > & result,
std::string_view input )

parse the std::map<std::string , double> value

See also
Gaudi::Parsers::MapGrammar
Gaudi::Parsers::StringGrammar
Gaudi::Parsers::RealGrammar
Parameters
result(output) map with string key and integer value
input(input) the string to be parsed
Returns
status code
Author
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-05-14

Definition at line 21 of file ParsersStandardMisc3.cpp.

21 {
22 return Gaudi::Parsers::parse_( result, input );
23}

◆ parse() [25/55]

StatusCode Gaudi::Parsers::parse ( std::map< std::string, Gaudi::Histo1DDef > & histos,
std::string_view input )

helper function, needed for implementation of "Histogram Property"

Parameters
histosthe map of the histogram descriptions (output)
inputthe string to be parsed
Returns
status code
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Date
2007-09-17

Definition at line 17 of file ParsersHistograms.cpp.

17 {
18 return Gaudi::Parsers::parse_( result, input );
19}

◆ parse() [26/55]

StatusCode Gaudi::Parsers::parse ( std::map< std::string, int > & result,
std::string_view input )

parse the std::map<std::string , int> value

See also
Gaudi::Parsers::MapGrammar
Gaudi::Parsers::StringGrammar
Gaudi::Parsers::IntGrammar
Parameters
result(output) map with string key and integer value
input(input) the string to be parsed
Returns
status code
Author
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-05-14

Definition at line 13 of file ParsersStandardMisc3.cpp.

13 {
14 return Gaudi::Parsers::parse_( result, input );
15}

◆ parse() [27/55]

StatusCode Gaudi::Parsers::parse ( std::map< std::string, std::pair< double, double > > & params,
std::string_view input )

helper function, needed for implementation of map of pairs

Parameters
paramsthe map of pair
inputthe string to be parsed
Returns
status code
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Date
2009-05-19

Definition at line 31 of file ParsersStandardMisc5.cpp.

31 {
32 return Gaudi::Parsers::parse_( result, input );
33}

◆ parse() [28/55]

StatusCode Gaudi::Parsers::parse ( std::map< std::string, std::pair< int, int > > & params,
std::string_view input )

helper function, needed for implementation of map of pairs

Parameters
paramsthe map of pair
inputthe string to be parsed
Returns
status code
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
David BACHER david.nosp@m..bac.nosp@m.her@p.nosp@m.hysi.nosp@m.cs.ox.nosp@m..ac..nosp@m.uk
Date
2024-11-06

Definition at line 35 of file ParsersStandardMisc5.cpp.

35 {
36 return Gaudi::Parsers::parse_( result, input );
37}

◆ parse() [29/55]

StatusCode Gaudi::Parsers::parse ( std::map< std::string, std::string > & result,
std::string_view input )

parse the std::map<std::string , std::string> value

See also
Gaudi::Parsers::MapGrammar
Gaudi::Parsers::StringGrammar
Parameters
result(output) map with string key and value
input(input) the string to be parsed
Returns
status code
Author
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-05-14

Definition at line 29 of file ParsersStandardMisc2.cpp.

29 {
30 return Gaudi::Parsers::parse_( result, input );
31}

◆ parse() [30/55]

StatusCode Gaudi::Parsers::parse ( std::map< std::string, std::string, std::less<> > & result,
std::string_view input )

Definition at line 33 of file ParsersStandardMisc2.cpp.

33 {
34 return Gaudi::Parsers::parse_( result, input );
35}

◆ parse() [31/55]

StatusCode Gaudi::Parsers::parse ( std::map< std::string, std::vector< double > > & result,
std::string_view input )

parse the std::map<std::string , std::vector<double> > value

See also
Gaudi::Parsers::MapGrammar
Gaudi::Parsers::StringGrammar
Gaudi::Parsers::VectorGrammar
Gaudi::Parsers::RealGrammar
Parameters
result(output) map with string value and vector of doubles as value
input(input) the string to be parsed
Returns
status code
Author
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-05-14

Definition at line 17 of file ParsersStandardMisc4.cpp.

17 {
18 return Gaudi::Parsers::parse_( result, input );
19}

◆ parse() [32/55]

StatusCode Gaudi::Parsers::parse ( std::map< std::string, std::vector< int > > & result,
std::string_view input )

parse the std::map<std::string , std::vector<int> > value

See also
Gaudi::Parsers::MapGrammar
Gaudi::Parsers::StringGrammar
Gaudi::Parsers::VectorGrammar
Gaudi::Parsers::IntGrammar
Parameters
result(output) map with string value and vector of integers as value
input(input) the string to be parsed
Returns
status code
Author
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-05-14

Definition at line 13 of file ParsersStandardMisc4.cpp.

13 {
14 return Gaudi::Parsers::parse_( result, input );
15}

◆ parse() [33/55]

StatusCode Gaudi::Parsers::parse ( std::map< std::string, std::vector< std::string > > & result,
std::string_view input )

parse the std::map<std::string , std::vector<std::string> > value

See also
Gaudi::Parsers::MapGrammar
Gaudi::Parsers::StringGrammar
Gaudi::Parsers::VectorGrammar
Parameters
result(output) map with string value and vector of strings as value
input(input) the string to be parsed
Returns
status code
Author
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-05-14

Definition at line 25 of file ParsersStandardMisc3.cpp.

25 {
26 return Gaudi::Parsers::parse_( result, input );
27}

◆ parse() [34/55]

StatusCode Gaudi::Parsers::parse ( std::map< std::string, unsigned int > & result,
std::string_view input )

parse the std::map<unsigned int,std::string> > objects

See also
Gaudi::Parsers::MapGrammar

Definition at line 17 of file ParsersStandardMisc3.cpp.

17 {
18 return Gaudi::Parsers::parse_( result, input );
19}

◆ parse() [35/55]

StatusCode Gaudi::Parsers::parse ( std::map< unsigned int, std::string > & result,
std::string_view input )

parse the std::map<unsigned int,std::string> > objects

See also
Gaudi::Parsers::MapGrammar
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Date
2007-12-06

Definition at line 13 of file ParsersStandardMisc5.cpp.

13 {
14 return Gaudi::Parsers::parse_( result, input );
15}

◆ parse() [36/55]

StatusCode Gaudi::Parsers::parse ( std::string & name,
std::string & value,
std::string_view input )

parse the pair expression (map-component) " 'name' :value"

const std::string input = "'PackageName':GaudiKernel" ;
std::string name ;
std::string value ;
StatusCode sc = Gaudi::Parsers::parse ( name , value , input ) ;
if ( sc.isFailure() ) { ... }
std::cout << "\tParsed name is " << name
<< "\tParsed value is " << value << std::endl
Parameters
name(output) the parsed name of the component, defined as 'name' or "name" before the column symbol ":", the leading and trailing blans are omitted
value(output) the parsed value of the component, defined as everything after the column symbol ":" till the end of the string
input(input) string to be parsed
Returns
status code
Author
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-05-12

Definition at line 17 of file ParsersStandardMisc5.cpp.

17 {
18 Skipper skipper;
21 auto iter = input.begin();
22 bool parse_result = qi::phrase_parse( iter, input.end(), g, skipper, result ) && ( iter == input.end() );
23 if ( parse_result ) {
24 name = result.first;
25 value = result.second;
27 }
29}
SkipperGrammar< IteratorT > Skipper
Definition Factory.h:24
std::pair< std::string, std::string > ResultT
Definition Grammars.h:515

◆ parse() [37/55]

StatusCode Gaudi::Parsers::parse ( std::vector< Gaudi::LorentzVector > & result,
std::string_view input )

parse the vector of vectors

Parameters
resut(OUTPUT) the parser vector
input(INPIUT) the string to be parsed
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-05

Definition at line 86 of file ParsersVct.cpp.

86 {
87 return parse_( result, input );
88 }

◆ parse() [38/55]

StatusCode Gaudi::Parsers::parse ( std::vector< Gaudi::StringKey > & result,
std::string_view input )

parse the vector of keys from the string

See also
Gaudi::Parsers
Gaudi::Parsers::parse
Gaudi::StringKey
Attention
: this function is needed to use it as property
Parameters
result(OUTPUT) the parsing result
inputthe input string
Returns
status code

Definition at line 38 of file StringKey.cpp.

38 {
39 result.clear();
40 typedef std::vector<std::string> Strings;
41 Strings _result;
42 StatusCode sc = parse( _result, input );
43 if ( sc.isFailure() ) { return sc; }
44 result.reserve( _result.size() );
45
46 std::copy( _result.begin(), _result.end(), std::back_inserter( result ) );
47
49}

◆ parse() [39/55]

StatusCode Gaudi::Parsers::parse ( std::vector< Gaudi::XYZPoint > & result,
std::string_view input )

parse the vector of points

Parameters
resut(OUTPUT) the parser vector
input(INPIUT) the string to be parsed
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-05

Definition at line 65 of file ParsersVct.cpp.

65 {
66 result.clear();
67 return parse_( result, input );
68 }

◆ parse() [40/55]

StatusCode Gaudi::Parsers::parse ( std::vector< Gaudi::XYZVector > & result,
std::string_view input )

parse the vector of vectors

Parameters
resut(OUTPUT) the parser vector
input(INPIUT) the string to be parsed
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-05

Definition at line 75 of file ParsersVct.cpp.

75 {
76 result.clear();
77 return parse_( result, input );
78 }

◆ parse() [41/55]

StatusCode Gaudi::Parsers::parse ( std::vector< std::pair< double, double > > & result,
std::string_view input )

parse the bool value

See also
Gaudi::Parsers::BoolGrammar
Parameters
result(output) boolean result
input(input) the string to be parsed
Returns
status code
Author
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-05-12 parse the char value
See also
Gaudi::Parsers::CharGrammar
Parameters
result(output) boolean result
input(input) the string to be parsed
Returns
status code
Author
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-05-12
See also
Gaudi::Parsers::parser( char&, const std::string& )
Gaudi::Parsers::parser( char&, const std::string& ) parse the int value
Gaudi::Parsers::IntGrammar
Parameters
result(output) integer result
input(input) the string to be parsed
Returns
status code
Author
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-05-14
See also
Gaudi::Parsers::parser( int&, const std::string& )
Gaudi::Parsers::parser( int&, const std::string& )
Gaudi::Parsers::parser( int&, const std::string& )
Gaudi::Parsers::parser( int&, const std::string& )
Gaudi::Parsers::parser( int&, const std::string& )
Gaudi::Parsers::parser( int&, const std::string& )
Gaudi::Parsers::parser( int&, const std::string& ) parse the double value
Gaudi::Parsers::RealGrammar
Parameters
result(output) double result
input(input) the string to be parsed
Returns
status code
Author
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-05-14
See also
Gaudi::Parsers::parser( double&, const std::string& )
Gaudi::Parsers::parser( double&, const std::string& ) parse the std::string value
Gaudi::Parsers::StringGrammar
Parameters
result(output) string result
input(input) the string to be parsed
Returns
status code
Author
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-05-14 parse the std::pair<double,double> value
See also
Gaudi::Parsers::PairGrammar
Gaudi::Parsers::RealGrammar
Parameters
result(output) pair of doubles
input(input) the string to be parsed
Returns
status code
Author
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-05-14 parse the std::pair<int,int> value
See also
Gaudi::Parsers::PairGrammar
Gaudi::Parsers::IntGrammar
Parameters
result(output) pair of integers
input(input) the string to be parsed
Returns
status code
Author
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-05-14 parse the std::vector<std::pair<double,double> > value
See also
Gaudi::Parsers::VectorGrammar
Gaudi::Parsers::PairGrammar
Gaudi::Parsers::RealGrammar
Parameters
result(output) vector with pairs of doubles
input(input) the string to be parsed
Returns
status code
Author
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-05-14

Definition at line 21 of file ParsersStandardMisc1.cpp.

21 {
22 return Gaudi::Parsers::parse_( result, input );
23}

◆ parse() [42/55]

StatusCode Gaudi::Parsers::parse ( std::vector< std::pair< int, int > > & result,
std::string_view input )

parse the std::vector<std::pair<int,int> > value

See also
Gaudi::Parsers::VectorGrammar
Gaudi::Parsers::PairGrammar
Gaudi::Parsers::IntGrammar
Parameters
result(output) vector with pairs of int
input(input) the string to be parsed
Returns
status code
Author
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-05-14

Definition at line 25 of file ParsersStandardMisc1.cpp.

25 {
26 return Gaudi::Parsers::parse_( result, input );
27}

◆ parse() [43/55]

StatusCode Gaudi::Parsers::parse ( std::vector< std::vector< double > > & result,
std::string_view input )

parse the std::vector<std::vector<double> > value

See also
Gaudi::Parsers::VectorGrammar
Gaudi::Parsers::RealGrammar
Parameters
result(output) vector with vectors of doubles
input(input) the string to be parsed
Returns
status code
Author
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-05-14

Definition at line 13 of file ParsersStandardMisc2.cpp.

13 {
14 return Gaudi::Parsers::parse_( result, input );
15}

◆ parse() [44/55]

StatusCode Gaudi::Parsers::parse ( std::vector< std::vector< int > > & result,
std::string_view input )

parse the std::vector<std::vector<int> > value

See also
Gaudi::Parsers::VectorGrammar
Gaudi::Parsers::IntGrammar
Parameters
result(output) vector with vectors of ints
input(input) the string to be parsed
Returns
status code

Definition at line 17 of file ParsersStandardMisc2.cpp.

17 {
18 return Gaudi::Parsers::parse_( result, input );
19}

◆ parse() [45/55]

StatusCode Gaudi::Parsers::parse ( std::vector< std::vector< std::string > > & result,
std::string_view input )

parse the std::vector<std::vector<std::string> > value

See also
Gaudi::Parsers::VectorGrammar
Gaudi::Parsers::StringGrammar
Parameters
result(output) vector with vectors of strings
input(input) the string to be parsed
Returns
status code
Author
Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2006-05-14

Definition at line 29 of file ParsersStandardMisc1.cpp.

29 {
30 return Gaudi::Parsers::parse_( result, input );
31}

◆ parse() [46/55]

template<class T, unsigned int N>
StatusCode Gaudi::Parsers::parse ( T(&) result[N],
std::string_view input )

parser function for C-arrays

Parameters
paramsC-array
inputthe string to be parsed
Returns
status code
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-09-15

Definition at line 502 of file CommonParsers.h.

502 {
503 typedef std::vector<T> _Vct;
504 // create the temporary vector
505 _Vct tmp;
506 StatusCode sc = parse( tmp, input );
507 if ( sc.isFailure() ) { return sc; }
508 if ( N != tmp.size() ) { return StatusCode::FAILURE; }
509 //
510 std::copy( tmp.begin(), tmp.end(), result );
511 //
512 return StatusCode::SUCCESS;
513 }

◆ parse() [47/55]

StatusCode Gaudi::Parsers::parse ( TH1D & result,
std::string_view input )

parse ROOT histogram from text representation

Parameters
result(OUTPUT) the histogram
input(INPUT) the input to be parsed
Returns
status code

Definition at line 391 of file HistoParsers.cpp.

391 {
392 // 1) check the parsing
393 std::string name;
394 //
395 auto h1 = _parse_1D<TH1D>( input, name );
396 if ( h1 ) {
397 result.Reset();
398 h1->Copy( result ); // ASSIGN
399 result.SetName( name.c_str() );
400 return StatusCode::SUCCESS; // RETURN
401 }
402 //
403 // XML-like text?
404 return ( std::string::npos != input.find( '<' ) ) ? Gaudi::Utils::Histos::fromXml( result, input )
405 : StatusCode::FAILURE;
406}
GAUDI_API StatusCode fromXml(TH1D &result, std::string_view input)
parse the histogram from standard ROOT XML
Definition HistoXML.cpp:199

◆ parse() [48/55]

StatusCode Gaudi::Parsers::parse ( TH1D *& result,
std::string_view input )

parse ROOT histogram from text representation

Parameters
result(OUTPUT) the histogram
input(INPUT) the input to be parsed
Returns
status code

Definition at line 527 of file HistoParsers.cpp.

527 {
528 if ( result ) { return parse( *result, input ); } // RETURN
529
530 // 1) check the parsing
531 std::string name;
532 auto h1 = _parse_1D<TH1D>( input, name );
533 if ( h1 ) {
534 result = h1.release();
535 result->SetName( name.c_str() );
536 return StatusCode::SUCCESS; // RETURN
537 }
538 //
539 // XML-like text?
540 return ( std::string::npos != input.find( '<' ) ) ? Gaudi::Utils::Histos::fromXml( result, input )
541 : StatusCode::FAILURE;
542}

◆ parse() [49/55]

StatusCode Gaudi::Parsers::parse ( TH1F & result,
std::string_view input )

parse ROOT histogram from text representation

Parameters
result(OUTPUT) the histogram
input(INPUT) the input to be parsed
Returns
status code

Definition at line 414 of file HistoParsers.cpp.

414 {
415 // 1) check the parsing
416 std::string name;
417 //
418 auto h1 = _parse_1D<TH1F>( input, name );
419 if ( h1 ) {
420 result.Reset();
421 h1->Copy( result ); // ASSIGN
422 result.SetName( name.c_str() );
423 return StatusCode::SUCCESS; // RETURN
424 }
425 //
426 // XML-like text?
427 return ( std::string::npos != input.find( '<' ) ) ? Gaudi::Utils::Histos::fromXml( result, input )
428 : StatusCode::FAILURE;
429}

◆ parse() [50/55]

StatusCode Gaudi::Parsers::parse ( TH2D & result,
std::string_view input )

parse ROOT histogram from text representation

Parameters
result(OUTPUT) the histogram
input(INPUT) the input to be parsed
Returns
status code

Definition at line 437 of file HistoParsers.cpp.

437 {
438 // 1) check the parsing
439 std::string name;
440 auto h2 = _parse_2D<TH2D>( input, name );
441 if ( h2 ) {
442 result.Reset();
443 h2->Copy( result ); // ASSIGN
444 result.SetName( name.c_str() );
445 return StatusCode::SUCCESS; // RETURN
446 }
447 //
448 // XML-like text?
449 return ( std::string::npos != input.find( '<' ) ) ? Gaudi::Utils::Histos::fromXml( result, input )
450 : StatusCode::FAILURE;
451}

◆ parse() [51/55]

StatusCode Gaudi::Parsers::parse ( TH2D *& result,
std::string_view input )

parse ROOT histogram from text representation

Parameters
result(OUTPUT) the histogram
input(INPUT) the input to be parsed
Returns
status code

Definition at line 550 of file HistoParsers.cpp.

550 {
551 if ( result ) { return parse( *result, input ); } // RETURN
552
553 // 1) check the parsing
554 std::string name;
555 auto h2 = _parse_2D<TH2D>( input, name );
556 if ( h2 ) {
557 result = h2.release();
558 result->SetName( name.c_str() );
559 return StatusCode::SUCCESS; // RETURN
560 }
561 //
562 // XML-like text?
563 return ( std::string::npos != input.find( '<' ) ) ? Gaudi::Utils::Histos::fromXml( result, input )
564 : StatusCode::FAILURE;
565}

◆ parse() [52/55]

StatusCode Gaudi::Parsers::parse ( TH2F & result,
std::string_view input )

parse ROOT histogram from text representation

Parameters
result(OUTPUT) the histogram
input(INPUT) the input to be parsed
Returns
status code

Definition at line 459 of file HistoParsers.cpp.

459 {
460 // 1) check the parsing
461 std::string name;
462 auto h2 = _parse_2D<TH2F>( input, name );
463 if ( h2 ) {
464 result.Reset();
465 h2->Copy( result ); // ASSIGN
466 result.SetName( name.c_str() );
467 return StatusCode::SUCCESS; // RETURN
468 }
469 //
470 // XML-like text?
471 if ( std::string::npos != input.find( '<' ) ) { return Gaudi::Utils::Histos::fromXml( result, input ); }
472 //
473 return StatusCode::FAILURE;
474}

◆ parse() [53/55]

StatusCode Gaudi::Parsers::parse ( TH3D & result,
std::string_view input )

parse ROOT histogram from text representation

Parameters
result(OUTPUT) the histogram
input(INPUT) the input to be parsed
Returns
status code

Definition at line 482 of file HistoParsers.cpp.

482 {
483 // 1) check the parsing
484 std::string name;
485 auto h3 = _parse_3D<TH3D>( input, name );
486 if ( h3 ) {
487 result.Reset();
488 h3->Copy( result ); // ASSIGN
489 result.SetName( name.c_str() );
490 return StatusCode::SUCCESS; // RETURN
491 }
492 //
493 // XML-like text?
494 return ( std::string::npos != input.find( '<' ) ) ? Gaudi::Utils::Histos::fromXml( result, input )
495 : StatusCode::FAILURE;
496}

◆ parse() [54/55]

StatusCode Gaudi::Parsers::parse ( TH3D *& result,
std::string_view input )

parse ROOT histogram from text representation

Parameters
result(OUTPUT) the histogram
input(INPUT) the input to be parsed
Returns
status code

Definition at line 573 of file HistoParsers.cpp.

573 {
574 if ( result ) { return parse( *result, input ); } // RETURN
575
576 // 1) check the parsing
577 std::string name;
578 auto h3 = _parse_3D<TH3D>( input, name );
579 if ( h3 ) {
580 result = h3.release();
581 result->SetName( name.c_str() );
582 return StatusCode::SUCCESS; // RETURN
583 }
584 //
585 // XML-like text?
586 return ( std::string::npos != input.find( '<' ) ) ? Gaudi::Utils::Histos::fromXml( result, input )
587 : StatusCode::FAILURE;
588}

◆ parse() [55/55]

StatusCode Gaudi::Parsers::parse ( TH3F & result,
std::string_view input )

parse AIDA histogram from text representation

Parameters
result(OUTPUT) the histogram
input(INPUT) the input to be parsed
Returns
status code

Definition at line 504 of file HistoParsers.cpp.

504 {
505 // 1) check the parsing
506 std::string name;
507 auto h3 = _parse_3D<TH3F>( input, name );
508 if ( h3 ) {
509 result.Reset();
510 h3->Copy( result ); // ASSIGN
511 result.SetName( name.c_str() );
512 return StatusCode::SUCCESS; // RETURN
513 }
514 //
515 // XML-like text?
516 if ( std::string::npos != input.find( '<' ) ) { return Gaudi::Utils::Histos::fromXml( result, input ); }
517 //
518 return StatusCode::FAILURE;
519}

◆ parse_() [1/3]

template<typename ResultT>
StatusCode Gaudi::Parsers::parse_ ( ResultT & result,
std::string_view input )
inline

Definition at line 26 of file Factory.h.

26 {
27 Skipper skipper;
29 IteratorT iter = input.begin(), end = input.end();
30 return ( qi::phrase_parse( iter, end, g, skipper, result ) && ( iter == end ) ? StatusCode::SUCCESS
32 }
std::string_view::const_iterator IteratorT
Definition Factory.h:23

◆ parse_() [2/3]

template<typename T1, typename T2>
StatusCode Gaudi::Parsers::parse_ ( ROOT::Math::PositionVector3D< T1, T2 > & result,
std::string_view input )
inline

Definition at line 30 of file ParsersVct.cpp.

30 {
31 Skipper skipper;
33 IteratorT iter = input.begin(), end = input.end();
34 if ( qi::phrase_parse( iter, end, g, skipper, result ) ) { return StatusCode::SUCCESS; }
35 //@attention always
37 }

◆ parse_() [3/3]

template<>
StatusCode Gaudi::Parsers::parse_ ( std::string & result,
std::string_view input )
inline

Definition at line 34 of file Factory.h.

34 {
35 Skipper skipper;
37 IteratorT iter = input.begin(), end = input.end();
38 if ( !( qi::phrase_parse( iter, end, g, skipper, result ) && ( iter == end ) ) ) { result = input; }
39 //@attention always
41 }

◆ ParseUnits()

bool Gaudi::Parsers::ParseUnits ( const Position & from,
std::string_view filename,
std::string_view search_path,
IncludedFiles * included,
Messages * messages,
Node * root )

Definition at line 116 of file Parser.cpp.

117 {
119 return ParseFile<Grammar>( from, filename, search_path, included, messages, root );
120}

◆ ReadOptions()

bool Gaudi::Parsers::ReadOptions ( std::string_view filename,
std::string_view search_path,
Messages * messages,
Catalog * catalog,
Units * units,
PragmaOptions * pragma,
Node * root )

Parse and analyze filename, save all messages and properties.

Also output AST tree (http://en.wikipedia.org/wiki/Abstract_syntax_tree). Returns true if there were no errors during analysis.

Definition at line 365 of file Analyzer.cpp.

366 {
367 // Extract Path
368 IncludedFiles included;
369 bool result = Parse( filename, search_path, &included, messages, root );
370 if ( !result ) return false;
371
372 bool result1 = Analyze( root, search_path, &included, messages, catalog, units, pragma );
373 bool result2 = Unreference( *catalog, messages );
374 return result1 && result2;
375}
bool Unreference(gp::Catalog &catalog, gp::Messages *messages)
Definition Analyzer.cpp:345

◆ REGISTER_GRAMMAR() [1/10]

Gaudi::Parsers::REGISTER_GRAMMAR ( bool ,
BoolGrammar  )

◆ REGISTER_GRAMMAR() [2/10]

Gaudi::Parsers::REGISTER_GRAMMAR ( char ,
CharGrammar  )

◆ REGISTER_GRAMMAR() [3/10]

Gaudi::Parsers::REGISTER_GRAMMAR ( DataObjID ,
DataObjIDGrammar  )

◆ REGISTER_GRAMMAR() [4/10]

Gaudi::Parsers::REGISTER_GRAMMAR ( Edges ,
EdgeGrammar  )

◆ REGISTER_GRAMMAR() [5/10]

Gaudi::Parsers::REGISTER_GRAMMAR ( Gaudi::Histo1DDef ,
Histo1DGrammar  )

◆ REGISTER_GRAMMAR() [6/10]

Gaudi::Parsers::REGISTER_GRAMMAR ( Gaudi::StringKey ,
StringGrammar  )

◆ REGISTER_GRAMMAR() [7/10]

Gaudi::Parsers::REGISTER_GRAMMAR ( H1 ,
H1Grammar  )

◆ REGISTER_GRAMMAR() [8/10]

Gaudi::Parsers::REGISTER_GRAMMAR ( H2 ,
H2Grammar  )

◆ REGISTER_GRAMMAR() [9/10]

Gaudi::Parsers::REGISTER_GRAMMAR ( H3 ,
H3Grammar  )

◆ REGISTER_GRAMMAR() [10/10]

Gaudi::Parsers::REGISTER_GRAMMAR ( std::string ,
StringGrammar  )