SynAPSE  0.6.0
Synergistic Analysis of Phase Space Evolution
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
Globals Class Reference

Imports, stores and manages the global variables. More...

#include <Globals.hh>

Public Member Functions

const std::vector< std::string > & GetDataFiles () const
 Returns the list of data files. More...
 
const GeometryHandler & GetGeometryHandler () const
 Returns the geometry handelr. More...
 
const Global & operator() (const std::string &var) const
 Returns the requested global variable. More...
 
const Global & operator[] (const std::string &var) const
 Returns the requested global variable. More...
 
void Print (Pitch::errorLevel level=Pitch::info) const
 Print the list of datacards and their value. More...
 

Static Public Member Functions

static Globals & GetInstance (int argc=0, char **argv=NULL)
 Returns the single instance of the class, initialize if not yet done. More...
 

Private Member Functions

 Globals (int argc, char **argv)
 Command line construct, takes extra arguments from the command line. More...
 
 Globals (const Globals &globals)
 Copy constructor, not implemented for singleton. More...
 
Globals & operator= (const Globals &globals)
 Equality operator, not implemented for singleton. More...
 
 ~Globals ()
 Destructor. More...
 
void LoadFile (std::string filename)
 Loads the global constants from a datacards file. More...
 
void LoadCommandLine (int argc, char **argv)
 Load the extra arguments from the command line arguments. More...
 
void LoadGeometry ()
 Loads the geometry handler. More...
 
void SetDefaultStyle ()
 Sets the default style of the ROOT plots. More...
 

Private Attributes

std::map< std::string, Global > _globals
 Dictionary of global variables. More...
 
std::vector< std::string > _data_files
 List of runs (remaining arguments) More...
 
GeometryHandler _geoh
 Geometry handler. More...
 

Detailed Description

Imports, stores and manages the global variables.

It imports and stores the global reconstruction variables in a dictionary. The variables can then be exported as any type requested by the code.

This is a singleton class. It is intialized once the first time it is instentiated and is called by the other objects as is.

Constructor & Destructor Documentation

Globals::Globals ( int  argc,
char **  argv 
)
private

Command line construct, takes extra arguments from the command line.

Parameters
argcNumber of command line arguments
argvList of command line arguments
Globals::Globals ( const Globals &  globals)
private

Copy constructor, not implemented for singleton.

Globals::~Globals ( )
private

Destructor.

Member Function Documentation

const std::vector<std::string>& Globals::GetDataFiles ( ) const
inline

Returns the list of data files.

const GeometryHandler& Globals::GetGeometryHandler ( ) const
inline

Returns the geometry handelr.

Globals & Globals::GetInstance ( int  argc = 0,
char **  argv = NULL 
)
static

Returns the single instance of the class, initialize if not yet done.

Parameters
argcNumber of command line arguments
argvList of command line arguments
void Globals::LoadCommandLine ( int  argc,
char **  argv 
)
private

Load the extra arguments from the command line arguments.

Parameters
argcNumber of command line arguments
argvList of command line arguments
void Globals::LoadFile ( std::string  filename)
private

Loads the global constants from a datacards file.

void Globals::LoadGeometry ( )
private

Loads the geometry handler.

const Global & Globals::operator() ( const std::string &  var) const

Returns the requested global variable.

Globals& Globals::operator= ( const Globals &  globals)
private

Equality operator, not implemented for singleton.

const Global & Globals::operator[] ( const std::string &  var) const

Returns the requested global variable.

void Globals::Print ( Pitch::errorLevel  level = Pitch::info) const

Print the list of datacards and their value.

void Globals::SetDefaultStyle ( )
private

Sets the default style of the ROOT plots.

Field Documentation

std::vector<std::string> Globals::_data_files
private

List of runs (remaining arguments)

GeometryHandler Globals::_geoh
private

Geometry handler.

std::map<std::string, Global> Globals::_globals
private

Dictionary of global variables.


The documentation for this class was generated from the following files: