Gaudi Framework, version v23r3

Home   Generated: Thu Jun 28 2012
Namespaces | Classes | Typedefs | Functions

Gaudi::Parsers Namespace Reference

Namespaces

namespace  Utils

Classes

class  Catalog
class  SkipperGrammar
 Skipping spaces and comments. More...
class  StringGrammar
 The valid represenation of string values are: More...
struct  IdentifierGrammar
class  BoolGrammar
 The valid represenation of boolean values are: More...
class  RealGrammar
 The valid represenation of real values are: More...
struct  UnitsGrammar
struct  FileGrammar
class  IncludedFiles
class  Messages
class  Node
class  NodeOperations
class  Position
class  PragmaOptions
class  Property
class  PropertyName
class  PropertyValue
class  PropertyValueException
class  PositionalPropertyValueException
class  Units
struct  ClosureGrammar
 Grammar or grammar rule which derive from this struct will have attribute of type T and name val More...
struct  AttributesClosureGrammar
 Grammar or grammar rule which derive from this struct will have two attributes: type T1 and name val, type T2 and name attrs More...
class  CharGrammar
 The valid represenation of char values are: More...
class  IntGrammar
 The valid representation of integers values are: More...
class  PairGrammar
 The valid represenation of pairs are: ("abc",123) or ("abc","def") Inner types of pair depends on KeyGrammarT and ValueGrammarT grammars. More...
class  VectorGrammar
 The valid represenation of vector are:

  • {"abc","defj","i"} or {1,2,3,4,5}
  • ["abc","defj","i"] or [1,2,3,4,5] Inner type depends on GrammarT grammar.
More...
class  MapGrammar
 The valid represenation of map are:

  • {"file1":"path1","something":"nothing"}
  • {"file1"="path1","something"="nothing"}
  • ["file1":10,"something":20]
  • ["file1"=30,"something"=40] Inner key type depends on KeyGrammarT grammar Inner value type depends on ValueGrammarT grammar.
More...
struct  Grammar_
struct  Grammar_< Iterator, T, Skipper, typename boost::enable_if< boost::is_integral< T > >::type >
struct  Grammar_< Iterator, T, Skipper, typename boost::enable_if< boost::is_floating_point< T > >::type >
struct  Grammar_< Iterator, std::vector< InnerT, AllocatorT >, Skipper >
struct  Grammar_< Iterator, std::list< InnerT, AllocatorT >, Skipper >
struct  Grammar_< Iterator, std::set< InnerT, CompareT, AllocatorT >, Skipper >
struct  Grammar_< Iterator, std::pair< KeyT, ValueT >, Skipper >
struct  Grammar_< Iterator, std::map< KeyT, ValueT, KeyCompareT, AllocatorT >, Skipper >
struct  Grammar_< Iterator, GaudiUtils::VectorMap< KeyT, ValueT, KeyCompareT, AllocatorT >, Skipper >
struct  Pnt3DGrammar
struct  Grammar_< Iterator, ROOT::Math::PositionVector3D< T1, T2 >, Skipper >
struct  Grammar_< Iterator, ROOT::Math::DisplacementVector3D< T1, T2 >, Skipper >
struct  Pnt4DGrammar
struct  Grammar_< Iterator, ROOT::Math::LorentzVector< T1 >, Skipper >
struct  Histo1DGrammar
struct  KeyValueGrammar
class  EdgeGrammar
class  H1Grammar
class  H2Grammar

Typedefs

typedef std::string::const_iterator DefaultIterator
typedef enc::space_type DefaultSkipper
typedef
boost::spirit::position_iterator
< string::const_iterator
IteratorT
 the actual type of position iterator
typedef SkipperGrammar< IteratorTSkipper

Functions

template<typename K , typename V >
StatusCode parse (GaudiUtils::HashMap< K, V > &result, const std::string &input)
 Basic parser for the types of HashMap used in DODBasicMapper.
bool ReadOptions (const std::string &filename, const std::string &search_path, Messages *messages, Catalog *catalog, Units *units, PragmaOptions *pragma, Node *root)
 Parse and analyze filename, save all messages and properties.
std::ostreamoperator<< (std::ostream &o, const Catalog &c)
 printout operator
bool Parse (const std::string &filename, const std::string &search_path, IncludedFiles *included, Messages *messages, Node *root)
bool Parse (const Position &from, const std::string &filename, const std::string &search_path, IncludedFiles *included, Messages *messages, Node *root)
bool ParseUnits (const Position &from, const std::string &filename, const std::string &search_path, IncludedFiles *included, Messages *messages, Node *root)
template<class TYPE , std::size_t N>
StatusCode parse (boost::array< TYPE, N > &result, const std::string &input)
 parse class boost::array from the string
 REGISTER_GRAMMAR (std::string, StringGrammar)
 REGISTER_GRAMMAR (Gaudi::StringKey, StringGrammar)
 REGISTER_GRAMMAR (char, CharGrammar)
 REGISTER_GRAMMAR (bool, BoolGrammar)
 REGISTER_GRAMMAR (Gaudi::Histo1DDef, Histo1DGrammar)
GAUDI_API StatusCode parse (std::vector< std::pair< double, double > > &result, const std::string &input)
 parse the bool value
GAUDI_API StatusCode parse (std::vector< std::pair< int, int > > &result, const std::string &input)
 parse the std::vector<std::pair<int,int> > value
GAUDI_API StatusCode parse (std::vector< std::vector< std::string > > &result, const std::string &input)
 parse the std::vector<std::vector<std::string> > value
GAUDI_API StatusCode parse (std::vector< std::vector< double > > &result, const std::string &input)
 parse the std::vector<std::vector<double> > value
GAUDI_API StatusCode parse (std::map< int, int > &result, const std::string &input)
 parse the std::map<int , int> value
GAUDI_API StatusCode parse (std::map< int, double > &result, const std::string &input)
 parse the std::map<int , double> value
GAUDI_API StatusCode parse (std::map< std::string, std::string > &result, const std::string &input)
 parse the std::map<std::string , std::string> value
GAUDI_API StatusCode parse (std::map< std::string, int > &result, const std::string &input)
 parse the std::map<std::string , int> value
GAUDI_API StatusCode parse (std::map< std::string, double > &result, const std::string &input)
 parse the std::map<std::string , double> value
GAUDI_API StatusCode parse (std::map< std::string, std::vector< std::string > > &result, const std::string &input)
 parse the std::map<std::string , std::vector<std::string> > value
GAUDI_API StatusCode parse (std::map< std::string, std::vector< int > > &result, const std::string &input)
 parse the std::map<std::string , std::vector<int> > value
GAUDI_API StatusCode parse (std::map< std::string, std::vector< double > > &result, const std::string &input)
 parse the std::map<std::string , std::vector<double> > value
GAUDI_API StatusCode parse (std::map< int, std::string > &result, const std::string &input)
 parse the std::map<int,std::string> > objects
GAUDI_API StatusCode parse (std::map< unsigned int, std::string > &result, const std::string &input)
 parse the std::map<unsigned int,std::string> > objects
GAUDI_API StatusCode parse (std::map< std::string, unsigned int > &result, const std::string &input)
 parse the std::map<unsigned int,std::string> > objects
GAUDI_API StatusCode parse (std::string &name, std::string &value, const std::string &input)
 parse the pair expression (map-component) " 'name' :value"
GAUDI_API StatusCode parse (Gaudi::Histo1DDef &histo, const std::string &input)
 helper function, needed for implementation of "Histogram Property"
GAUDI_API StatusCode parse (std::map< std::string, Gaudi::Histo1DDef > &histos, const std::string &input)
 helper function, needed for implementation of "Histogram Property"
GAUDI_API StatusCode parse (std::map< std::string, std::pair< double, double > > &params, const std::string &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
template<class T , unsigned int N>
StatusCode parse (T(&result)[N], const std::string &input)
 parser function for C-arrays
template<unsigned int N>
StatusCode parse (char(&result)[N], const std::string &input)
 parser function for C-strings
IteratorT createIterator (const std::string &input)
 create the position iterator from the input
template<typename IntegerT >
StatusCode parse_integer (IntegerT &result, const string &input)
 helper function to "merge" the implementation of all parsers for integer-like quantities into one templated grammar
template<typename IntegerT >
StatusCode parse_integer_vector (std::vector< IntegerT > &result, const string &input)
 helper function to "merge" the implementation of all parsers for vector of integer-like quantities into the combination of templated grammars
template<typename CharT >
StatusCode parse_char (CharT &result, const string &input)
 helper function to "merge" the implementation of all parsers for "char-like" quantities into one templated grammar
template<typename CharT >
StatusCode parse_char_vector (std::vector< CharT > &result, const string &input)
 helper function to "merge" the implementation of all parsers for vector of 'char-like' quantities into the combination of templated grammars
template<typename RealT >
StatusCode parse_real (RealT &result, const string &input)
 helper function to "merge" the implementation of all parsers for "float-like" quantities into one templated grammar
template<typename RealT >
StatusCode parse_real_vector (std::vector< RealT > &result, const string &input)
 helper function to "merge" the implementation of all parsers for vector of 'char-like' quantities into the combination of templated grammars
template<typename ResultT >
StatusCode parse_ (ResultT &result, const std::string &input)
template<>
StatusCode parse_ (std::string &result, const std::string &input)
GAUDI_API StatusCode parse (Gaudi::StringKey &result, const std::string &input)
 parse the key from the string
GAUDI_API StatusCode parse (std::vector< Gaudi::StringKey > &result, const std::string &input)
 parse the vector of keys from the string
template<class SCALAR , unsigned int N>
StatusCode parse (ROOT::Math::SVector< SCALAR, N > &result, const std::string &input)
 parse SVector
GAUDI_API StatusCode parse (GaudiUtils::VectorMap< std::string, double > &result, const std::string &input)
 parse the key from the string
GAUDI_API StatusCode parse (GaudiUtils::VectorMap< Gaudi::StringKey, double > &result, const std::string &input)
 parse the vector of keys from the string
GAUDI_API StatusCode parse (Gaudi::XYZPoint &result, const std::string &input)
 parse 3D-point
GAUDI_API StatusCode parse (Gaudi::XYZVector &result, const std::string &input)
 parse 3D-vector
GAUDI_API StatusCode parse (Gaudi::LorentzVector &result, const std::string &input)
 parse LorentzVector
GAUDI_API StatusCode parse (std::vector< Gaudi::XYZPoint > &result, const std::string &input)
 parse the vector of points
GAUDI_API StatusCode parse (std::vector< Gaudi::XYZVector > &result, const std::string &input)
 parse the vector of vectors
GAUDI_API StatusCode parse (std::vector< Gaudi::LorentzVector > &result, const std::string &input)
 parse the vector of vectors
template<typename T1 , typename T2 >
StatusCode parse_ (ROOT::Math::PositionVector3D< T1, T2 > &result, const std::string &input)
GAUDI_API StatusCode parse (TH1D &result, const std::string &input)
 parse ROOT histogram from text representation
GAUDI_API StatusCode parse (TH2D &result, const std::string &input)
 parse ROOT histogram from text representation
GAUDI_API StatusCode parse (TH1F &result, const std::string &input)
 parse ROOT histogram from text representation
GAUDI_API StatusCode parse (TH2F &result, const std::string &input)
 parse ROOT histogram from text representation
GAUDI_API StatusCode parse (AIDA::IHistogram1D &result, const std::string &input)
 parse AIDA histogram from text representation
GAUDI_API StatusCode parse (AIDA::IHistogram2D &result, const std::string &input)
 parse AIDA histogram from text representation
GAUDI_API StatusCode parse (TH1D *&result, const std::string &input)
 parse ROOT histogram from text representation
GAUDI_API StatusCode parse (TH2D *&result, const std::string &input)
 parse ROOT histogram from text representation
 REGISTER_GRAMMAR (Edges, EdgeGrammar)
 REGISTER_GRAMMAR (H1, H1Grammar)
 REGISTER_GRAMMAR (H2, H2Grammar)

Typedef Documentation

Definition at line 53 of file GrammarsV2.h.

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

Definition at line 54 of file GrammarsV2.h.

the actual type of position iterator

Definition at line 64 of file Parsers.icpp.

Definition at line 28 of file ParsersFactory.h.


Function Documentation

IteratorT Gaudi::Parsers::createIterator ( const std::string input ) [inline]

create the position iterator from the input

Definition at line 67 of file Parsers.icpp.

    { return IteratorT ( input.begin(), input.end() ) ; }
std::ostream& Gaudi::Parsers::operator<< ( std::ostream o,
const Catalog &  c 
) [inline]

printout operator

Definition at line 57 of file Catalog.h.

                                                                {
   return c.fillStream(o);
 }
bool Gaudi::Parsers::Parse ( const std::string filename,
const std::string search_path,
IncludedFiles *  included,
Messages *  messages,
Node *  root 
)

Definition at line 104 of file Parser.cpp.

                                        {
    return Parse(Position(),  filename, search_path, included, messages,
            root);
}
StatusCode Gaudi::Parsers::parse ( std::vector< std::vector< double > > &  result,
const std::string 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 Alexander.Mazurov@gmail.com
Vanya BELYAEV ibelyaev@physics.syr.edu
Date:
2006-05-14

Definition at line 3 of file ParsersStandardMisc2.cpp.

                                                                                            {
    return Gaudi::Parsers::parse_(result, input);
}
StatusCode Gaudi::Parsers::parse ( TH2D *&  result,
const std::string 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.

{
  if ( 0 != result ) { return parse ( *result , input ) ; } // RETURN

  // 1) check the parsing
  std::string name ;
  std::auto_ptr<TH2D> h2 = _parse_2D<TH2D>  ( input , name ) ;
  if ( 0 != h2.get() )
  {
    result = h2.release() ;
    result->SetName ( name.c_str() ) ;
    return StatusCode::SUCCESS ;                           // RETURN
  }
  //
  // XML-like text?
  if ( std::string::npos != input.find('<') )
  { return Gaudi::Utils::Histos::fromXml ( result , input ) ; }
  //
  return StatusCode::FAILURE ;
}
StatusCode Gaudi::Parsers::parse ( TH1D *&  result,
const std::string 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 454 of file HistoParsers.cpp.

{
  if ( 0 != result ) { return parse ( *result , input ) ; } // RETURN

  // 1) check the parsing
  std::string name ;
  std::auto_ptr<TH1D> h1 = _parse_1D<TH1D>  ( input , name ) ;
  if ( 0 != h1.get() )
  {
    result = h1.release() ;
    result->SetName ( name.c_str() ) ;
    return StatusCode::SUCCESS ;                           // RETURN
  }
  //
  // XML-like text?
  if ( std::string::npos != input.find('<') )
  { return Gaudi::Utils::Histos::fromXml ( result , input ) ; }
  //
  return StatusCode::FAILURE ;
}
StatusCode Gaudi::Parsers::parse ( AIDA::IHistogram2D &  result,
const std::string 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 526 of file HistoParsers.cpp.

{
  // 1) convert to ROOT
  TH2D* root = Gaudi::Utils::Aida2ROOT::aida2root ( &result ) ;
  if ( 0 == root ) { return StatusCode::FAILURE ; }
  // 2) read ROOT histogram
  return parse ( *root , input ) ;
}
StatusCode Gaudi::Parsers::parse ( AIDA::IHistogram1D &  result,
const std::string 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 510 of file HistoParsers.cpp.

{
  // 1) convert to ROOT
  TH1D* root = Gaudi::Utils::Aida2ROOT::aida2root ( &result ) ;
  if ( 0 == root ) { return StatusCode::FAILURE ; }
  // 2) read ROOT histogram
  return parse ( *root , input ) ;
}
StatusCode Gaudi::Parsers::parse ( TH2F &  result,
const std::string 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 427 of file HistoParsers.cpp.

{
  // 1) check the parsing
  std::string name ;
  std::auto_ptr<TH2F> h2 = _parse_2D<TH2F> ( input , name ) ;
  if ( 0 != h2.get() )
  {
    result.Reset() ;
    h2->Copy ( result )  ;                            // ASSIGN
    result.SetName ( name.c_str () ) ;
    return StatusCode::SUCCESS ;                           // RETURN
  }
  //
  // XML-like text?
  if ( std::string::npos != input.find('<') )
  { return Gaudi::Utils::Histos::fromXml ( result , input ) ; }
  //
  return StatusCode::FAILURE ;
}
StatusCode Gaudi::Parsers::parse ( TH1F &  result,
const std::string 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 372 of file HistoParsers.cpp.

{
  // 1) check the parsing
  std::string name ;
  //
  std::auto_ptr<TH1F> h1 = _parse_1D<TH1F> ( input , name ) ;
  if ( 0 != h1.get() )
  {
    result.Reset() ;
    h1->Copy ( result )  ;                            // ASSIGN
    result.SetName ( name.c_str () ) ;
    return StatusCode::SUCCESS ;                           // RETURN
  }
  //
  // XML-like text?
  if ( std::string::npos != input.find('<') )
  { return Gaudi::Utils::Histos::fromXml ( result , input ) ; }
  //
  return StatusCode::FAILURE ;
}
StatusCode Gaudi::Parsers::parse ( TH2D &  result,
const std::string 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 400 of file HistoParsers.cpp.

{
  // 1) check the parsing
  std::string name ;
  std::auto_ptr<TH2D> h2 = _parse_2D<TH2D> ( input , name ) ;
  if ( 0 != h2.get() )
  {
    result.Reset() ;
    h2->Copy ( result )  ;                            // ASSIGN
    result.SetName ( name.c_str () ) ;
    return StatusCode::SUCCESS ;                           // RETURN
  }
  //
  // XML-like text?
  if ( std::string::npos != input.find('<') )
  { return Gaudi::Utils::Histos::fromXml ( result , input ) ; }
  //
  return StatusCode::FAILURE ;
}
StatusCode Gaudi::Parsers::parse ( TH1D &  result,
const std::string 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 344 of file HistoParsers.cpp.

{
  // 1) check the parsing
  std::string name ;
  //
  std::auto_ptr<TH1D> h1 = _parse_1D<TH1D> ( input , name ) ;
  if ( 0 != h1.get() )
  {
    result.Reset() ;
    h1->Copy ( result )  ;                            // ASSIGN
    result.SetName ( name.c_str () ) ;
    return StatusCode::SUCCESS ;                           // RETURN
  }
  //
  // XML-like text?
  if ( std::string::npos != input.find('<') )
  { return Gaudi::Utils::Histos::fromXml ( result , input ) ; }
  //
  return StatusCode::FAILURE ;
}
template<class T , unsigned int N>
StatusCode Gaudi::Parsers::parse ( T(&)  result[N],
const std::string input 
)

parser function for C-arrays

Parameters:
paramsC-array
inputthe string to be parsed
Returns:
status code
Author:
Vanya BELYAEV Ivan.Belyaev@nikhef.nl
Date:
2009-09-15

Definition at line 525 of file Parsers.h.

    {
      typedef std::vector<T> _Vct ;
      // create the temporary vector
      _Vct tmp ;
      StatusCode sc = parse ( tmp , input ) ;
      if ( sc.isFailure()  ) { return sc                  ; }  //  RETURN
      if ( N != tmp.size() ) { return StatusCode::FAILURE ; }  //  RETURN
      //
      std::copy ( tmp.begin() , tmp.end() , result ) ;
      //
      return StatusCode::SUCCESS ;                            //  RETURN
    }
StatusCode Gaudi::Parsers::parse ( std::vector< Gaudi::LorentzVector > &  result,
const std::string input 
)

parse the vector of vectors

Parameters:
resut(OUTPUT) the parser vector
input(INPIUT) the string to be parsed
Author:
Vanya BELYAEV Ivan.Belyaev@nikhef.nl
Date:
2009-09-05

Definition at line 120 of file ParsersVct.cpp.

  {
    return parse_(result, input);
  }
template<unsigned int N>
StatusCode Gaudi::Parsers::parse ( char(&)  result[N],
const std::string input 
)

parser function for C-strings

Parameters:
paramsC-string
inputthe string to be parsed
Returns:
status code
Author:
Vanya BELYAEV Ivan.Belyaev@nikhef.nl
Date:
2009-09-15

Definition at line 547 of file Parsers.h.

    {
      // clear the string
      std::fill_n ( result , N , ' ' ) ;
      // create the temporary string
      std::string tmp ;
      StatusCode sc = parse ( tmp , input ) ;
      if ( sc.isFailure()  ) { return sc                 ; }  //  RETURN
      if       ( N     == tmp.size() )
      { std::copy ( tmp.begin() , tmp.end() , result ) ; }
      else if  ( N + 2    == tmp.size()                 &&
                 ( '\''   == tmp[0] || '\"' == tmp[0] ) &&
                 ( tmp[0] == tmp[tmp.size()-1]          ))
      { std::copy ( tmp.begin() + 1 , tmp.end() -1 , result ) ; }
      else { return StatusCode::FAILURE ; }
      //
      return StatusCode::SUCCESS ;                            //  RETURN
    }
StatusCode Gaudi::Parsers::parse ( std::vector< Gaudi::XYZPoint > &  result,
const std::string input 
)

parse the vector of points

Parameters:
resut(OUTPUT) the parser vector
input(INPIUT) the string to be parsed
Author:
Vanya BELYAEV Ivan.Belyaev@nikhef.nl
Date:
2009-09-05

Definition at line 88 of file ParsersVct.cpp.

  {
    result.clear() ;
    return parse_(result, input);
  }
StatusCode Gaudi::Parsers::parse ( Gaudi::LorentzVector result,
const std::string 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.Belyaev@nikhef.nl
Date:
2009-09-05

Definition at line 75 of file ParsersVct.cpp.

                                                                       {
    return parse_(result, input);
  }
StatusCode Gaudi::Parsers::parse ( Gaudi::XYZVector result,
const std::string 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.Belyaev@nikhef.nl
Date:
2009-09-05

Definition at line 64 of file ParsersVct.cpp.

  {

    Gaudi::XYZPoint point ;
    StatusCode sc = parse ( point , input ) ;
    if ( sc.isFailure() ){ return sc ; }                               // RETURN
    result = point ;
    return StatusCode::SUCCESS ;                                       // RETURN
  }
StatusCode Gaudi::Parsers::parse ( std::map< int, int > &  result,
const std::string 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 Alexander.Mazurov@gmail.com
Vanya BELYAEV ibelyaev@physics.syr.edu
Date:
2006-05-14

Definition at line 7 of file ParsersStandardMisc2.cpp.

                                                                               {
    return Gaudi::Parsers::parse_(result, input);
}
StatusCode Gaudi::Parsers::parse ( GaudiUtils::VectorMap< Gaudi::StringKey, double > &  result,
const std::string 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 17 of file ParsersCollections.cpp.

                                        {
    return Gaudi::Parsers::parse_(result, input);
}
StatusCode Gaudi::Parsers::parse ( GaudiUtils::VectorMap< std::string, double > &  result,
const std::string 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 11 of file ParsersCollections.cpp.

                                        {
    return Gaudi::Parsers::parse_(result, input);
}
template<class SCALAR , unsigned int N>
StatusCode Gaudi::Parsers::parse ( ROOT::Math::SVector< SCALAR, N > &  result,
const std::string input 
)

parse SVector

Parameters:
result(output) the parsed vector
input(input) the input string
Returns:
status code
Author:
Vanya BELYAEV Ivan.Belyaev@nikhef.nl
Date:
2009-09-05

Definition at line 47 of file SVectorAsProperty.h.

    {
      std::vector<double> tmp ;
      StatusCode sc = parse ( tmp , input ) ;
      if ( sc.isFailure()  ) { return sc                  ; } // RETURN
      if ( N != tmp.size() ) { return StatusCode::FAILURE ; } // RETURN
#ifdef WIN32
// Disable warning
//    C4996: 'std::copy': Function call with parameters that may be unsafe
// The parameters are checked
#pragma warning(push)
#pragma warning(disable:4996)
#endif
      std::copy ( tmp.begin() , tmp.end() , result.begin() ) ;
#ifdef WIN32
#pragma warning(pop)
#endif
      return StatusCode::SUCCESS ;
    }
StatusCode Gaudi::Parsers::parse ( std::map< int, double > &  result,
const std::string 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 Alexander.Mazurov@gmail.com
Vanya BELYAEV ibelyaev@physics.syr.edu
Date:
2006-05-14

Definition at line 11 of file ParsersStandardMisc2.cpp.

                                                                                  {
    return Gaudi::Parsers::parse_(result, input);
}
StatusCode Gaudi::Parsers::parse ( Gaudi::StringKey &  result,
const std::string 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 79 of file StringKey.cpp.

{
  std::string _result ;
  StatusCode sc = parse ( _result , input ) ;
  result = Gaudi::StringKey ( _result ) ;
  return sc ;
}
StatusCode Gaudi::Parsers::parse ( std::map< std::string, std::string > &  result,
const std::string 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 Alexander.Mazurov@gmail.com
Vanya BELYAEV ibelyaev@physics.syr.edu
Date:
2006-05-14

Definition at line 15 of file ParsersStandardMisc2.cpp.

                                                                                           {
    return Gaudi::Parsers::parse_(result, input);
}
bool Gaudi::Parsers::Parse ( const Position &  from,
const std::string filename,
const std::string search_path,
IncludedFiles *  included,
Messages *  messages,
Node *  root 
)

Definition at line 111 of file Parser.cpp.

                                        {
    typedef FileGrammar<Iterator,SkipperGrammar<Iterator> > Grammar;
    return ParseFile<Grammar>(from, filename, search_path, included,
            messages, root);
}
StatusCode Gaudi::Parsers::parse ( std::map< std::string, int > &  result,
const std::string 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 Alexander.Mazurov@gmail.com
Vanya BELYAEV ibelyaev@physics.syr.edu
Date:
2006-05-14

Definition at line 3 of file ParsersStandardMisc3.cpp.

                                                                                     {
    return Gaudi::Parsers::parse_(result, input);
}
StatusCode Gaudi::Parsers::parse ( std::map< std::string, double > &  result,
const std::string 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 Alexander.Mazurov@gmail.com
Vanya BELYAEV ibelyaev@physics.syr.edu
Date:
2006-05-14

Definition at line 11 of file ParsersStandardMisc3.cpp.

                                                                                        {
    return Gaudi::Parsers::parse_(result, input);
}
StatusCode Gaudi::Parsers::parse ( std::map< std::string, std::vector< std::string > > &  result,
const std::string 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 Alexander.Mazurov@gmail.com
Vanya BELYAEV ibelyaev@physics.syr.edu
Date:
2006-05-14

Definition at line 15 of file ParsersStandardMisc3.cpp.

                                                                                                       {
    return Gaudi::Parsers::parse_(result, input);
}
StatusCode Gaudi::Parsers::parse ( std::vector< Gaudi::StringKey > &  result,
const std::string 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 99 of file StringKey.cpp.

{
  result.clear() ;
  typedef std::vector<std::string> Strings ;
  Strings _result ;
  StatusCode sc = parse ( _result , input ) ;
  if ( sc.isFailure() ) { return sc ; }                              // RETURN 
  result.reserve ( _result.size() ) ;
  //
  std::copy ( _result.begin() , 
              _result.end  () , std::back_inserter ( result ) ) ;
  //
  return StatusCode::SUCCESS ;
}
StatusCode Gaudi::Parsers::parse ( std::map< std::string, std::vector< int > > &  result,
const std::string 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 Alexander.Mazurov@gmail.com
Vanya BELYAEV ibelyaev@physics.syr.edu
Date:
2006-05-14

Definition at line 3 of file ParsersStandardMisc4.cpp.

                                                                                                 {
    return Gaudi::Parsers::parse_(result, input);
}
template<typename K , typename V >
StatusCode Gaudi::Parsers::parse ( GaudiUtils::HashMap< K, V > &  result,
const std::string input 
)

Basic parser for the types of HashMap used in DODBasicMapper.

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

Definition at line 11 of file DODBasicMapper.cpp.

                                                                              {
      std::map<std::string, std::string> tmp;
      StatusCode sc = parse(tmp, input);
      if (sc.isSuccess()) {
        result.clear();
        result.insert(tmp.begin(), tmp.end());
      }
      return sc;
    }
StatusCode Gaudi::Parsers::parse ( std::vector< std::pair< double, double > > &  result,
const std::string 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 Alexander.Mazurov@gmail.com
Vanya BELYAEV ibelyaev@physics.syr.edu
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 Alexander.Mazurov@gmail.com
Vanya BELYAEV ibelyaev@physics.syr.edu
Date:
2006-05-12
See also:
Gaudi::Parsers::parser(char&,std::string&)
Gaudi::Parsers::parser(char&,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 Alexander.Mazurov@gmail.com
Vanya BELYAEV ibelyaev@physics.syr.edu
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 Alexander.Mazurov@gmail.com
Vanya BELYAEV ibelyaev@physics.syr.edu
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 Alexander.Mazurov@gmail.com
Vanya BELYAEV ibelyaev@physics.syr.edu
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 Alexander.Mazurov@gmail.com
Vanya BELYAEV ibelyaev@physics.syr.edu
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 Alexander.Mazurov@gmail.com
Vanya BELYAEV ibelyaev@physics.syr.edu
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 Alexander.Mazurov@gmail.com
Vanya BELYAEV ibelyaev@physics.syr.edu
Date:
2006-05-14

Definition at line 11 of file ParsersStandardMisc1.cpp.

                                                                                                  {
    return Gaudi::Parsers::parse_(result, input);
}
StatusCode Gaudi::Parsers::parse ( std::map< std::string, std::vector< double > > &  result,
const std::string 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 Alexander.Mazurov@gmail.com
Vanya BELYAEV ibelyaev@physics.syr.edu
Date:
2006-05-14

Definition at line 7 of file ParsersStandardMisc4.cpp.

                                                                                                    {
    return Gaudi::Parsers::parse_(result, input);
}
StatusCode Gaudi::Parsers::parse ( Gaudi::XYZPoint result,
const std::string 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.Belyaev@nikhef.nl
Date:
2009-09-05

Definition at line 50 of file ParsersVct.cpp.

                                             {
    return parse_(result, input);
  }
StatusCode Gaudi::Parsers::parse ( std::map< std::string, std::pair< double, double > > &  params,
const std::string 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.Belyaev@nikhef.nl
Alexander MAZUROV Alexander.Mazurov@gmail.com
Date:
2009-05-19

Definition at line 22 of file ParsersStandardMisc5.cpp.

                                                                                                          {
    return Gaudi::Parsers::parse_(result, input);
}
StatusCode Gaudi::Parsers::parse ( std::map< std::string, Gaudi::Histo1DDef > &  histos,
const std::string 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 ibelyaev@physics.syr.edu
Alexander MAZUROV Alexander.Mazurov@gmail.com
Date:
2007-09-17

Definition at line 14 of file ParsersHistograms.cpp.

                                        {
    return Gaudi::Parsers::parse_(result, input);
}
StatusCode Gaudi::Parsers::parse ( Gaudi::Histo1DDef &  histo,
const std::string 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 ibelyaev@physics.syr.edu
Alexander MAZUROV Alexander.Mazurov@gmail.com
Date:
2007-09-17

Definition at line 9 of file ParsersHistograms.cpp.

                                        {
    return Gaudi::Parsers::parse_(result, input);
}
StatusCode Gaudi::Parsers::parse ( std::string name,
std::string value,
const std::string 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 Alexander.Mazurov@gmail.com
Vanya BELYAEV ibelyaev@physics.syr.edu
Date:
2006-05-12

Definition at line 7 of file ParsersStandardMisc5.cpp.

                             {
  Skipper skipper;
  KeyValueGrammar<IteratorT, Skipper> g;
  KeyValueGrammar<IteratorT, Skipper>::ResultT result;
  std::string::const_iterator iter = input.begin();
  bool parse_result = qi::phrase_parse(iter, input.end(), g, skipper,
      result) && (iter==input.end());
  if (parse_result) {
    name = result.first;
    value = result.second;
  }
  return parse_result;
}
StatusCode Gaudi::Parsers::parse ( std::map< std::string, unsigned int > &  result,
const std::string input 
)

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

See also:
Gaudi::Parsers::MapGrammar

Definition at line 7 of file ParsersStandardMisc3.cpp.

                                                                                              {
    return Gaudi::Parsers::parse_(result, input);
}
StatusCode Gaudi::Parsers::parse ( std::map< int, std::string > &  result,
const std::string input 
)

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

See also:
Gaudi::Parsers::MapGrammar
Author:
Vanya BELYAEV ibelyaev@physics.syr.edu
Alexander MAZUROV Alexander.Mazurov@gmail.com
Date:
2007-12-06

Definition at line 11 of file ParsersStandardMisc4.cpp.

                                                                                     {
    return Gaudi::Parsers::parse_(result, input);
}
StatusCode Gaudi::Parsers::parse ( std::map< unsigned int, std::string > &  result,
const std::string input 
)

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

See also:
Gaudi::Parsers::MapGrammar
Author:
Vanya BELYAEV ibelyaev@physics.syr.edu
Alexander MAZUROV Alexander.Mazurov@gmail.com
Date:
2007-12-06

Definition at line 3 of file ParsersStandardMisc5.cpp.

                                                                                              {
    return Gaudi::Parsers::parse_(result, input);
}
StatusCode Gaudi::Parsers::parse ( std::vector< Gaudi::XYZVector > &  result,
const std::string input 
)

parse the vector of vectors

Parameters:
resut(OUTPUT) the parser vector
input(INPIUT) the string to be parsed
Author:
Vanya BELYAEV Ivan.Belyaev@nikhef.nl
Date:
2009-09-05

Definition at line 103 of file ParsersVct.cpp.

  {
    result.clear() ;
    return parse_(result, input);
  }
template<class TYPE , std::size_t N>
StatusCode Gaudi::Parsers::parse ( boost::array< TYPE, N > &  result,
const std::string 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.Belyaev@nikhef.nl
Date:
2009-09-16

Definition at line 84 of file BoostArrayAsProperty.h.

    {
      typedef std::vector<TYPE> _Vct ;
      // create the temporaty vector
      _Vct tmp ; 
      // parse the string 
      StatusCode sc = parse ( tmp , input ) ; 
      if ( sc.isFailure () ) { return sc ; }                         // RETURN 
      if ( N != tmp.size() ) 
      { return StatusCode ( StatusCode::FAILURE , true ) ; }         // RETURN   
      // copy vector into array 
      std::copy ( tmp.begin() , tmp.end() , result.begin() ) ;
      //
      return StatusCode::SUCCESS ;
    }
StatusCode Gaudi::Parsers::parse ( std::vector< std::pair< int, int > > &  result,
const std::string 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 Alexander.Mazurov@gmail.com
Vanya BELYAEV ibelyaev@physics.syr.edu
Date:
2006-05-14

Definition at line 15 of file ParsersStandardMisc1.cpp.

                                                                                            {
    return Gaudi::Parsers::parse_(result, input);
}
StatusCode Gaudi::Parsers::parse ( std::vector< std::vector< std::string > > &  result,
const std::string 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 Alexander.Mazurov@gmail.com
Vanya BELYAEV ibelyaev@physics.syr.edu
Date:
2006-05-14

Definition at line 19 of file ParsersStandardMisc1.cpp.

                                                                                               {
    return Gaudi::Parsers::parse_(result, input);
}
template<typename T1 , typename T2 >
StatusCode Gaudi::Parsers::parse_ ( ROOT::Math::PositionVector3D< T1, T2 > &  result,
const std::string input 
) [inline]

Definition at line 38 of file ParsersVct.cpp.

                                                                         {
    Skipper skipper;
    typename Grammar_<IteratorT, ROOT::Math::PositionVector3D<T1,T2>, Skipper >::Grammar g;
    IteratorT iter = input.begin(), end = input.end();
    if (qi::phrase_parse( iter, end, g, skipper, result)){
      return StatusCode::SUCCESS;
    }
    //@attention always
    return true;
  }
template<typename ResultT >
StatusCode Gaudi::Parsers::parse_ ( ResultT &  result,
const std::string input 
) [inline]

Definition at line 31 of file ParsersFactory.h.

                                                   {
      Skipper skipper;
      typename Grammar_<IteratorT, ResultT, Skipper>::Grammar g;
      IteratorT iter = input.begin(), end = input.end();
      return qi::phrase_parse( iter, end, g, skipper , result) && (iter==end);
    }
template<>
StatusCode Gaudi::Parsers::parse_ ( std::string result,
const std::string input 
) [inline]

Definition at line 39 of file ParsersFactory.h.

                                                     {
      Skipper skipper;
      Grammar_<IteratorT, std::string, Skipper>::Grammar g;
      IteratorT iter = input.begin(), end = input.end();
      if (!(qi::phrase_parse( iter, end, g, skipper, result) && (iter==end))){
        result = input;
      }
      //@attention always
      return true;
    }
template<typename CharT >
StatusCode Gaudi::Parsers::parse_char ( CharT &  result,
const string input 
) [inline]

helper function to "merge" the implementation of all parsers for "char-like" quantities into one templated grammar

See also:
Gaudi::Parsers::CharGrammar
Parameters:
result(output) parsing result
input(input) string to be parsed
Returns:
status code
Author:
Alexander MAZUROV Alexander.Mazurov@gmail.com
Vanya BELYAEV ibelyaev@physics.syr.edu
Date:
2006-05-12

Definition at line 138 of file Parsers.icpp.

    {
      CharGrammar<CharT> g;
      return parse
        ( createIterator(input),
          IteratorT(),
          g[var(result)=arg1]).full;
    }
template<typename CharT >
StatusCode Gaudi::Parsers::parse_char_vector ( std::vector< CharT > &  result,
const string input 
) [inline]

helper function to "merge" the implementation of all parsers for vector of 'char-like' quantities into the combination of templated grammars

See also:
Gaudi::Parsers::VectorGrammar
Gaudi::Parsers::CharGrammar
Gaudi::Parsers::SkipperGrammar
Parameters:
result(output) parsing result
input(input) string to be parsed
Returns:
status code
Author:
Alexander MAZUROV Alexander.Mazurov@gmail.com
Vanya BELYAEV ibelyaev@physics.syr.edu
Date:
2006-05-12

Definition at line 165 of file Parsers.icpp.

    {
      VectorGrammar<CharGrammar<CharT> > g;
      return parse
        ( createIterator(input),
          IteratorT(),
          g[var(result)=arg1],
          SkipperGrammar()).full;
    }
template<typename IntegerT >
StatusCode Gaudi::Parsers::parse_integer ( IntegerT &  result,
const string input 
) [inline]

helper function to "merge" the implementation of all parsers for integer-like quantities into one templated grammar

See also:
Gaudi::Parsers::IntGrammar
Parameters:
result(output) parsing result
input(input) string to be parsed
Returns:
status code
Author:
Alexander MAZUROV Alexander.Mazurov@gmail.com
Vanya BELYAEV ibelyaev@physics.syr.edu
Date:
2006-05-12

Definition at line 86 of file Parsers.icpp.

    {
      IntGrammar<IntegerT> g;
      return parse
        ( createIterator(input),
          IteratorT(),
          g[var(result)=arg1]).full;
    }
template<typename IntegerT >
StatusCode Gaudi::Parsers::parse_integer_vector ( std::vector< IntegerT > &  result,
const string input 
) [inline]

helper function to "merge" the implementation of all parsers for vector of integer-like quantities into the combination of templated grammars

See also:
Gaudi::Parsers::VectorGrammar
Gaudi::Parsers::IntGrammar
Gaudi::Parsers::SkipperGrammar
Parameters:
result(output) parsing result
input(input) string to be parsed
Returns:
status code
Author:
Alexander MAZUROV Alexander.Mazurov@gmail.com
Vanya BELYAEV ibelyaev@physics.syr.edu
Date:
2006-05-12

Definition at line 113 of file Parsers.icpp.

    {
      VectorGrammar<IntGrammar<IntegerT> > g;
      return parse
        ( createIterator(input),
          IteratorT(),
          g[var(result)=arg1],
          SkipperGrammar()).full;
    }
template<typename RealT >
StatusCode Gaudi::Parsers::parse_real ( RealT &  result,
const string input 
) [inline]

helper function to "merge" the implementation of all parsers for "float-like" quantities into one templated grammar

See also:
Gaudi::Parsers::RealGrammar
Parameters:
result(output) parsing result
input(input) string to be parsed
Returns:
status code
Author:
Alexander MAZUROV Alexander.Mazurov@gmail.com
Vanya BELYAEV ibelyaev@physics.syr.edu
Date:
2006-05-12

Definition at line 189 of file Parsers.icpp.

    {
      RealGrammar<RealT> g;
      return parse
        ( createIterator(input),
          IteratorT(),
          g[var(result)=arg1],
          SkipperGrammar()).full;
    }
template<typename RealT >
StatusCode Gaudi::Parsers::parse_real_vector ( std::vector< RealT > &  result,
const string input 
)

helper function to "merge" the implementation of all parsers for vector of 'char-like' quantities into the combination of templated grammars

See also:
Gaudi::Parsers::VectorGrammar
Gaudi::Parsers::RealGrammar
Gaudi::Parsers::SkipperGrammar
Parameters:
result(output) parsing result
input(input) string to be parsed
Returns:
status code
Author:
Alexander MAZUROV Alexander.Mazurov@gmail.com
Vanya BELYAEV ibelyaev@physics.syr.edu
Date:
2006-05-12

Definition at line 217 of file Parsers.icpp.

    {
      VectorGrammar< RealGrammar<RealT> > g;
      return parse
        ( createIterator(input),
          IteratorT(),
          g[var(result)=arg1],
          SkipperGrammar()).full;
    }
bool Gaudi::Parsers::ParseUnits ( const Position &  from,
const std::string filename,
const std::string search_path,
IncludedFiles *  included,
Messages *  messages,
Node *  root 
)

Definition at line 121 of file Parser.cpp.

                                        {
    typedef UnitsGrammar<Iterator,SkipperGrammar<Iterator> > Grammar;
    return ParseFile<Grammar>(from, filename, search_path, included,
            messages, root);
}
bool Gaudi::Parsers::ReadOptions ( const std::string filename,
const std::string 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 439 of file Analyzer.cpp.

                                                         {
  // Extract Path
  IncludedFiles included;
  bool result = Parse(filename, search_path, &included, messages, root);
  if (!result) return false;

  bool result1 = Analyze(root, search_path, &included, messages, catalog, units,
      pragma);
  bool result2 = Unreference(*catalog, messages);
  return result1 && result2;
}
Gaudi::Parsers::REGISTER_GRAMMAR ( H1  ,
H1Grammar   
)
Gaudi::Parsers::REGISTER_GRAMMAR ( char  ,
CharGrammar   
)
Gaudi::Parsers::REGISTER_GRAMMAR ( Gaudi::Histo1DDef  ,
Histo1DGrammar   
)
Gaudi::Parsers::REGISTER_GRAMMAR ( bool  ,
BoolGrammar   
)
Gaudi::Parsers::REGISTER_GRAMMAR ( std::string  ,
StringGrammar   
)
Gaudi::Parsers::REGISTER_GRAMMAR ( H2  ,
H2Grammar   
)
Gaudi::Parsers::REGISTER_GRAMMAR ( Gaudi::StringKey  ,
StringGrammar   
)
Gaudi::Parsers::REGISTER_GRAMMAR ( Edges  ,
EdgeGrammar   
)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated at Thu Jun 28 2012 12:30:21 for Gaudi Framework, version v23r3 by Doxygen version 1.7.2 written by Dimitri van Heesch, © 1997-2004