The Gaudi Framework  master (594c33fa)
Gaudi::Parsers Namespace Reference

Namespaces

 Utils
 

Classes

struct  BoolGrammar
 
class  Catalog
 
struct  CharGrammar
 
struct  DataObjIDGrammar
 
class  EdgeGrammar
 
struct  FileGrammar
 
struct  Grammar_
 
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, std::enable_if_t< std::is_floating_point_v< T > > >
 
struct  Grammar_< Iterator, T, Skipper, std::enable_if_t< std::is_integral_v< T > > >
 
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. More...
 
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. More...
 
std::ostreamoperator<< (std::ostream &o, const Catalog &c)
 printout operator More...
 
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)
 
GAUDI_API StatusCode parse (std::vector< std::pair< double, double >> &result, std::string_view input)
 parse the bool value More...
 
GAUDI_API StatusCode parse (std::vector< std::pair< int, int >> &result, std::string_view input)
 parse the std::vector<std::pair<int,int> > value More...
 
GAUDI_API StatusCode parse (std::vector< std::vector< std::string >> &result, std::string_view input)
 parse the std::vector<std::vector<std::string> > value More...
 
GAUDI_API StatusCode parse (std::vector< std::vector< double >> &result, std::string_view input)
 parse the std::vector<std::vector<double> > value More...
 
GAUDI_API StatusCode parse (std::map< int, int > &result, std::string_view input)
 parse the std::map<int , int> value More...
 
GAUDI_API StatusCode parse (std::map< int, double > &result, std::string_view input)
 parse the std::map<int , double> value More...
 
GAUDI_API StatusCode parse (std::map< std::string, std::string > &result, std::string_view input)
 parse the std::map<std::string , std::string> value More...
 
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 More...
 
GAUDI_API StatusCode parse (std::map< std::string, double > &result, std::string_view input)
 parse the std::map<std::string , double> value More...
 
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 More...
 
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 More...
 
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 More...
 
GAUDI_API StatusCode parse (std::map< int, std::string > &result, std::string_view input)
 parse the std::map<int,std::string> > objects More...
 
GAUDI_API StatusCode parse (std::map< unsigned int, std::string > &result, std::string_view input)
 parse the std::map<unsigned int,std::string> > objects More...
 
GAUDI_API StatusCode parse (std::map< std::string, unsigned int > &result, std::string_view input)
 parse the std::map<unsigned int,std::string> > objects More...
 
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 More...
 
GAUDI_API StatusCode parse (std::string &name, std::string &value, std::string_view input)
 parse the pair expression (map-component) " 'name' :value" More...
 
GAUDI_API StatusCode parse (Gaudi::Histo1DDef &histo, std::string_view input)
 helper function, needed for implementation of "Histogram Property" More...
 
GAUDI_API StatusCode parse (std::map< std::string, Gaudi::Histo1DDef > &histos, std::string_view input)
 helper function, needed for implementation of "Histogram Property" More...
 
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 It is very useful construction for monitoring to represent the value and error or the allowed range for some parameter More...
 
template<class T , unsigned int N>
StatusCode parse (T(&result)[N], std::string_view input)
 parser function for C-arrays More...
 
template<unsigned int N>
StatusCode parse (char(&result)[N], std::string_view input)
 parser function for C-strings More...
 
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 More...
 
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 More...
 
GAUDI_API StatusCode parse (Gaudi::StringKey &result, std::string_view input)
 parse the key from the string More...
 
GAUDI_API StatusCode parse (std::vector< Gaudi::StringKey > &result, std::string_view input)
 parse the vector of keys from the string More...
 
template<class SCALAR , unsigned int N>
StatusCode parse (ROOT::Math::SVector< SCALAR, N > &result, std::string_view input)
 parse SVector More...
 
GAUDI_API StatusCode parse (GaudiUtils::VectorMap< std::string, double > &result, std::string_view input)
 parse the key from the string More...
 
GAUDI_API StatusCode parse (GaudiUtils::VectorMap< Gaudi::StringKey, double > &result, std::string_view input)
 parse the vector of keys from the string More...
 
GAUDI_API StatusCode parse (Gaudi::XYZPoint &result, std::string_view input)
 parse 3D-point More...
 
GAUDI_API StatusCode parse (Gaudi::XYZVector &result, std::string_view input)
 parse 3D-vector More...
 
GAUDI_API StatusCode parse (Gaudi::LorentzVector &result, std::string_view input)
 parse LorentzVector More...
 
GAUDI_API StatusCode parse (std::vector< Gaudi::XYZPoint > &result, std::string_view input)
 parse the vector of points More...
 
GAUDI_API StatusCode parse (std::vector< Gaudi::XYZVector > &result, std::string_view input)
 parse the vector of vectors More...
 
GAUDI_API StatusCode parse (std::vector< Gaudi::LorentzVector > &result, std::string_view input)
 parse the vector of vectors More...
 
 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 More...
 
GAUDI_API StatusCode parse (TH2D &result, std::string_view input)
 parse ROOT histogram from text representation More...
 
GAUDI_API StatusCode parse (TH3D &result, std::string_view input)
 parse ROOT histogram from text representation More...
 
GAUDI_API StatusCode parse (TH1F &result, std::string_view input)
 parse ROOT histogram from text representation More...
 
GAUDI_API StatusCode parse (TH2F &result, std::string_view input)
 parse ROOT histogram from text representation More...
 
GAUDI_API StatusCode parse (TH3F &result, std::string_view input)
 parse AIDA histogram from text representation More...
 
GAUDI_API StatusCode parse (AIDA::IHistogram1D &result, std::string_view input)
 parse AIDA histogram from text representation More...
 
GAUDI_API StatusCode parse (AIDA::IHistogram2D &result, std::string_view input)
 parse AIDA histogram from text representation More...
 
GAUDI_API StatusCode parse (AIDA::IHistogram3D &result, std::string_view input)
 parse AIDA histogram from text representation More...
 
GAUDI_API StatusCode parse (TH1D *&result, std::string_view input)
 parse ROOT histogram from text representation More...
 
GAUDI_API StatusCode parse (TH2D *&result, std::string_view input)
 parse ROOT histogram from text representation More...
 
GAUDI_API StatusCode parse (TH3D *&result, std::string_view input)
 parse ROOT histogram from text representation More...
 
 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 64 of file Grammars.h.

◆ DefaultSkipper

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

Definition at line 65 of file Grammars.h.

◆ IteratorT

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

Definition at line 34 of file Factory.h.

◆ Skipper

Definition at line 36 of file Factory.h.

Function Documentation

◆ operator<<()

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

printout operator

Definition at line 68 of file Catalog.h.

68 { return c.fillStream( o ); }

◆ parse() [1/52]

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 }

◆ parse() [2/52]

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/52]

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/52]

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 83 of file BoostArrayAsProperty.h.

83  {
84  typedef std::vector<TYPE> _Vct;
85  // create the temporaty vector
86  _Vct tmp;
87  // parse the string
88  StatusCode sc = parse( tmp, input );
89  if ( sc.isFailure() ) { return sc; }
90  if ( N != tmp.size() ) { return StatusCode::FAILURE; }
91  // copy vector into array
92  std::copy( tmp.begin(), tmp.end(), result.begin() );
93  //
94  return StatusCode::SUCCESS;
95  }

◆ parse() [5/52]

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 521 of file CommonParsers.h.

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

◆ 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 115 of file Parser.cpp.

116  {
117  using Grammar = FileGrammar<Iterator, SkipperGrammar<Iterator>>;
118  return ParseFile<Grammar>( from, filename, search_path, included, messages, root );
119 }

◆ parse() [6/52]

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/52]

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 18 of file ParsersHistograms.cpp.

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

◆ parse() [8/52]

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 66 of file ParsersVct.cpp.

66 { return parse_( result, input ); }

◆ parse() [9/52]

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 77 of file StringKey.cpp.

77  {
78  std::string _result;
79  StatusCode sc = parse( _result, input );
80  result = Gaudi::StringKey( _result );
81  return sc;
82 }

◆ parse() [10/52]

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 47 of file ParsersVct.cpp.

47 { return parse_( result, input ); }

◆ parse() [11/52]

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 57 of file ParsersVct.cpp.

57  {
58 
59  Gaudi::XYZPoint point;
60  StatusCode sc = parse( point, input );
61  if ( sc.isFailure() ) { return sc; } // RETURN
62  result = point;
63  return StatusCode::SUCCESS; // RETURN
64  }

◆ parse() [12/52]

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  {
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  }

◆ parse() [13/52]

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() [14/52]

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 23 of file ParsersCollections.cpp.

23  {
24  return Gaudi::Parsers::parse_( result, input );
25 }

◆ parse() [15/52]

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 19 of file ParsersCollections.cpp.

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

◆ parse() [16/52]

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

Definition at line 37 of file CustomPropertiesAlg.cpp.

37 { return parse_( result, input ); }

◆ parse() [17/52]

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

Definition at line 58 of file Factory.h.

58  {
59  return parse_( result, input );
60  }

◆ parse() [18/52]

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 52 of file SVectorAsProperty.h.

52  {
54  StatusCode sc = parse( tmp, input );
55  if ( sc.isFailure() ) { return sc; } // RETURN
56  if ( N != tmp.size() ) { return StatusCode::FAILURE; } // RETURN
57 #ifdef WIN32
58 // Disable warning
59 // C4996: 'std::copy': Function call with parameters that may be unsafe
60 // The parameters are checked
61 # pragma warning( push )
62 # pragma warning( disable : 4996 )
63 #endif
64  std::copy( tmp.begin(), tmp.end(), result.begin() );
65 #ifdef WIN32
66 # pragma warning( pop )
67 #endif
68  return StatusCode::SUCCESS;
69  }

◆ parse() [19/52]

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 48 of file StdArrayAsProperty.h.

48  {
50  StatusCode sc = parse( tmp, input );
51  if ( sc.isFailure() ) return sc;
52  if ( N != tmp.size() ) return StatusCode::FAILURE;
53  std::copy( tmp.begin(), tmp.end(), result.begin() );
54  return StatusCode::SUCCESS;
55  }

◆ parse() [20/52]

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 21 of file ParsersStandardMisc2.cpp.

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

◆ parse() [21/52]

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 17 of file ParsersStandardMisc2.cpp.

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

◆ parse() [22/52]

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() [23/52]

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() [24/52]

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 22 of file ParsersHistograms.cpp.

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

◆ parse() [25/52]

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() [26/52]

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 It is very useful construction for monitoring to represent the value and error or the allowed range for some parameter

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() [27/52]

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 25 of file ParsersStandardMisc2.cpp.

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

◆ parse() [28/52]

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

Definition at line 29 of file ParsersStandardMisc2.cpp.

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

◆ parse() [29/52]

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() [30/52]

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() [31/52]

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() [32/52]

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() [33/52]

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() [34/52]

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 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;
19  KeyValueGrammar<IteratorT, Skipper> g;
20  KeyValueGrammar<IteratorT, Skipper>::ResultT result;
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;
26  return StatusCode::SUCCESS;
27  }
28  return StatusCode::FAILURE;
29 }

◆ 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 110 of file Parser.cpp.

111  {
112  return Parse( Position(), filename, search_path, included, messages, root );
113 }

◆ parse() [35/52]

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 102 of file ParsersVct.cpp.

102  {
103  return parse_( result, input );
104  }

◆ parse() [36/52]

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 94 of file StringKey.cpp.

94  {
95  result.clear();
97  Strings _result;
98  StatusCode sc = parse( _result, input );
99  if ( sc.isFailure() ) { return sc; } // RETURN
100  result.reserve( _result.size() );
101  //
102  std::copy( _result.begin(), _result.end(), std::back_inserter( result ) );
103  //
104  return StatusCode::SUCCESS;
105 }

◆ parse() [37/52]

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 76 of file ParsersVct.cpp.

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

◆ parse() [38/52]

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 88 of file ParsersVct.cpp.

88  {
89  result.clear();
90  return parse_( result, input );
91  }

◆ parse() [39/52]

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() [40/52]

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() [41/52]

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() [42/52]

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() [43/52]

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 500 of file CommonParsers.h.

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

◆ parse() [44/52]

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
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 }

◆ parse() [45/52]

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
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() [46/52]

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
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() [47/52]

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
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() [48/52]

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
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() [49/52]

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
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() [50/52]

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
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() [51/52]

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
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() [52/52]

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
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 39 of file Factory.h.

39  {
40  Skipper skipper;
41  typename Grammar_<IteratorT, ResultT, Skipper>::Grammar g;
42  IteratorT iter = input.begin(), end = input.end();
43  return ( qi::phrase_parse( iter, end, g, skipper, result ) && ( iter == end ) ? StatusCode::SUCCESS
45  }

◆ 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 37 of file ParsersVct.cpp.

37  {
38  Skipper skipper;
39  typename Grammar_<IteratorT, ROOT::Math::PositionVector3D<T1, T2>, Skipper>::Grammar g;
40  IteratorT iter = input.begin(), end = input.end();
41  if ( qi::phrase_parse( iter, end, g, skipper, result ) ) { return StatusCode::SUCCESS; }
42  //@attention always
43  return StatusCode::SUCCESS;
44  }

◆ parse_() [3/3]

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

Definition at line 48 of file Factory.h.

48  {
49  Skipper skipper;
50  Grammar_<IteratorT, std::string, Skipper>::Grammar g;
51  IteratorT iter = input.begin(), end = input.end();
52  if ( !( qi::phrase_parse( iter, end, g, skipper, result ) && ( iter == end ) ) ) { result = input; }
53  //@attention always
54  return StatusCode::SUCCESS;
55  }

◆ 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 122 of file Parser.cpp.

123  {
124  using Grammar = UnitsGrammar<Iterator, SkipperGrammar<Iterator>>;
125  return ParseFile<Grammar>( from, filename, search_path, included, messages, root );
126 }

◆ 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 387 of file Analyzer.cpp.

388  {
389  // Extract Path
390  IncludedFiles included;
391  bool result = Parse( filename, search_path, &included, messages, root );
392  if ( !result ) return false;
393 
394  bool result1 = Analyze( root, search_path, &included, messages, catalog, units, pragma );
395  bool result2 = Unreference( *catalog, messages );
396  return result1 && result2;
397 }

◆ 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   
)
GaudiPython.Bindings.FAILURE
FAILURE
Definition: Bindings.py:84
std::string
STL class.
Gaudi::Parsers::IteratorT
std::string_view::const_iterator IteratorT
Definition: Factory.h:34
IOTest.N
N
Definition: IOTest.py:112
std::move
T move(T... args)
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:314
std::vector::reserve
T reserve(T... args)
Gaudi::Parsers::parse
StatusCode parse(GaudiUtils::HashMap< K, V > &result, std::string_view input)
Basic parser for the types of HashMap used in DODBasicMapper.
Definition: DODBasicMapper.cpp:21
gaudirun.s
string s
Definition: gaudirun.py:346
std::vector
STL class.
std::string::size
T size(T... args)
std::back_inserter
T back_inserter(T... args)
Gaudi::Parsers::parse_
StatusCode parse_(ROOT::Math::PositionVector3D< T1, T2 > &result, std::string_view input)
Definition: ParsersVct.cpp:37
Gaudi::Parsers::parse_
StatusCode parse_(ResultT &result, std::string_view input)
Definition: Factory.h:39
gaudiComponentHelp.root
root
Definition: gaudiComponentHelp.py:42
gaudirun.c
c
Definition: gaudirun.py:525
GaudiPartProp.tests.id
id
Definition: tests.py:111
Gaudi::Utils::Aida2ROOT::aida2root
static TH1D * aida2root(AIDA::IHistogram1D *aida)
get the underlying pointer for 1D-histogram
Definition: Aida2ROOT.cpp:68
std::vector::clear
T clear(T... args)
Gaudi::StringKey
Definition: StringKey.h:44
GaudiUtils::Map< K, T, std::unordered_map< K, T, Hash< K > > >::clear
void clear()
Definition: Map.h:195
StatusCode
Definition: StatusCode.h:65
gaudirun.g
dictionary g
Definition: gaudirun.py:580
std::cout
Gaudi::Parsers::parse_
StatusCode parse_(std::string &result, std::string_view input)
Definition: Factory.h:48
Gaudi::Parsers::Parse
bool Parse(std::string_view filename, std::string_view search_path, IncludedFiles *included, Messages *messages, Node *root)
Definition: Parser.cpp:110
std::copy
T copy(T... args)
std::map< std::string, std::string >
DataObjID
Definition: DataObjID.h:47
BoostArrayProperties.Strings
Strings
Definition: BoostArrayProperties.py:36
StatusCode::isFailure
bool isFailure() const
Definition: StatusCode.h:129
Gaudi::Parsers::Skipper
SkipperGrammar< IteratorT > Skipper
Definition: Factory.h:36
ConditionsStallTest.name
name
Definition: ConditionsStallTest.py:77
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:100
std::endl
T endl(T... args)
parse
StatusCode parse(DataObjID &dest, std::string_view src)
Definition: DataObjID.cpp:57
std::string::begin
T begin(T... args)
Gaudi::Utils::Histos::fromXml
GAUDI_API StatusCode fromXml(TH1D &result, std::string_view input)
parse the histogram from standard ROOT XML
Definition: HistoXML.cpp:199
GaudiUtils::Map< K, T, std::unordered_map< K, T, Hash< K > > >::insert
std::pair< iterator, bool > insert(ValueType &&val)
Definition: Map.h:178
Properties.v
v
Definition: Properties.py:122
std::string::end
T end(T... args)
IOTest.end
end
Definition: IOTest.py:125
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:101
Unreference
bool Unreference(gp::Catalog &catalog, gp::Messages *messages)
Definition: Analyzer.cpp:366
std::fill_n
T fill_n(T... args)
graphanalysis.filename
filename
Definition: graphanalysis.py:130
Gaudi::XYZPoint
ROOT::Math::XYZPoint XYZPoint
3D cartesian point (double)
Definition: Point3DTypes.h:39