cepgen is hosted by Hepforge, IPPP Durham
CepGen 1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches

Boost tree configuration cards reader/writer. More...

+ Inheritance diagram for BoostTreeHandler:
+ Collaboration diagram for BoostTreeHandler:

Public Member Functions

 BoostTreeHandler (const ParametersList &params)
 Boost tree parser from a configuration card.
 
BoostTreeHandlerparseFile (const std::string &) override
 Read configuration from steering card.
 
BoostTreeHandlersetRunParameters (const RunParameters *params) override
 Specify runtime parameters.
 
virtual HandlerparseCommands (const std::vector< std::string > &)
 Read configuration from command strings.
 
virtual void write (const std::string &) const
 Write steering card from configuration.
 
const RunParametersrunParameters () const
 Parsed runtime parameters.
 
std::unique_ptr< RunParameters > & runParameters ()
 Parsed runtime parameters.
 
const std::string & name () const
 Module unique indexing name.
 
bool operator== (const SteeredObject &oth) const
 Equality operator.
 
bool operator!= (const SteeredObject &oth) const
 Inequality operator.
 
const ParametersListparameters () const override
 Module user-defined parameters.
 
virtual void setParameters (const ParametersList &params) override
 Set module parameters.
 
void setDescribedParameters (const ParametersList &params_orig)
 Set (documented) module parameters.
 

Static Public Member Functions

static ParametersDescription description ()
 

Protected Member Functions

virtual void read (const std::string &)=0
 Read and cast a file into the property tree.
 
template<typename T >
steer (const std::string &key) const
 Retrieve a parameters as previously steered.
 
template<typename T , typename U >
U steerAs (const std::string &key) const
 Retrieve a recasted parameters as previously steered.
 
std::string steerName () const
 Retrieve module name from parameters.
 
std::string steerPath (const std::string &key) const
 Retrieve a path from common search paths.
 

Protected Attributes

pt::ptree tree_
 The BOOST property tree translated by this configuration.
 
const std::string filename_
 Input filename.
 
const std::string name_
 Module unique indexing name.
 
ParametersList params_
 Module parameters.
 

Detailed Description

Definition at line 45 of file BoostTreeHandler.cpp.

Constructor & Destructor Documentation

◆ BoostTreeHandler()

BoostTreeHandler ( const ParametersList params)
explicit

Definition at line 48 of file BoostTreeHandler.cpp.

Member Function Documentation

◆ description()

static ParametersDescription description ( )
static

Definition at line 50 of file BoostTreeHandler.cpp.

◆ name()

const std::string & name ( ) const
inherited

Definition at line 42 of file NamedModule.h.

◆ operator!=()

template<typename T >
bool operator!= ( const SteeredObject< T > &  oth) const
inherited

Definition at line 51 of file SteeredObject.h.

◆ operator==()

template<typename T >
bool operator== ( const SteeredObject< T > &  oth) const
inherited

Definition at line 49 of file SteeredObject.h.

◆ parameters()

template<typename T >
const ParametersList & parameters ( ) const
overridevirtualinherited

Reimplemented from Steerable.

Definition at line 54 of file SteeredObject.h.

◆ parseCommands()

virtual Handler & parseCommands ( const std::vector< std::string > &  )
virtualinherited

Reimplemented in CommandLineHandler, LpairHandler, and CardHandler.

Definition at line 39 of file Handler.h.

◆ parseFile()

BoostTreeHandler & parseFile ( const std::string &  )
overridevirtual

Reimplemented from Handler.

Definition at line 81 of file BoostTreeHandler.cpp.

◆ read()

virtual void read ( const std::string &  )
protectedpure virtual

◆ runParameters() [1/2]

std::unique_ptr< RunParameters > & runParameters ( )
inherited

Definition at line 46 of file Handler.h.

◆ runParameters() [2/2]

const RunParameters * runParameters ( ) const
inherited

Definition at line 45 of file Handler.h.

◆ setDescribedParameters()

template<typename T >
void setDescribedParameters ( const ParametersList params_orig)
inherited

Definition at line 73 of file SteeredObject.h.

◆ setParameters()

template<typename T >
virtual void setParameters ( const ParametersList params)
overridevirtualinherited

Reimplemented from Steerable.

Reimplemented in Initial, Remnants, CutsList, IncomingBeams, and Kinematics.

Definition at line 62 of file SteeredObject.h.

◆ setRunParameters()

BoostTreeHandler & setRunParameters ( const RunParameters params)
overridevirtual

Reimplemented from Handler.

Definition at line 137 of file BoostTreeHandler.cpp.

◆ steer()

template<typename T >
T steer ( const std::string &  key) const
protectedinherited

Definition at line 39 of file Steerable.h.

◆ steerAs()

template<typename T , typename U >
U steerAs ( const std::string &  key) const
protectedinherited

Definition at line 44 of file Steerable.h.

◆ steerName()

std::string steerName ( ) const
protectedinherited

Definition at line 48 of file Steerable.h.

◆ steerPath()

std::string steerPath ( const std::string &  key) const
protectedinherited

Definition at line 30 of file Steerable.cpp.

◆ write()

virtual void write ( const std::string &  ) const
virtualinherited

Reimplemented in LpairHandler.

Definition at line 42 of file Handler.h.

Member Data Documentation

◆ filename_

const std::string filename_
protectedinherited

Definition at line 49 of file Handler.h.

◆ name_

const std::string name_
protectedinherited

Definition at line 45 of file NamedModule.h.

◆ params_

ParametersList params_
mutableprotectedinherited

Definition at line 50 of file Steerable.h.

◆ tree_

pt::ptree tree_
protected

Definition at line 64 of file BoostTreeHandler.cpp.