Diana Software
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
QInitFileHandler Class Reference

wrapper for global data IO More...

Public Member Functions

 QInitFileHandler ()
 
 QInitFileHandler (const std::string &owner, const std::string &filename)
 
QError GetBool (const std::string &name, Bool_t &val) const
 
QError GetInt (const std::string &name, Int_t &val) const
 
QError GetDouble (const std::string &name, Double_t &val) const
 
QError GetString (const std::string &name, std::string &val) const
 
QError WriteBool (const std::string &name, Bool_t val) const
 
QError WriteInt (const std::string &name, Int_t val) const
 
QError WriteDouble (const std::string &name, Double_t val) const
 
QError WriteString (const std::string &name, const std::string &val) const
 
void SetOwner (const std::string &owner)
 
void SetFileName (const std::string &fileName)
 
template<class T >
QError GetStdVector (const std::string &name, std::vector< T > &vec) const
 
template<class T >
QError WriteStdVector (const std::string &name, const std::vector< T > &vec) const
 
template<class T >
QError GetQObject (const std::string &name, T &obj) const
 
template<class T >
QError WriteQObject (const std::string &name, const T &obj) const
 

Static Public Member Functions

static std::string GetInitFileName (const std::string &baseName, const std::string &extension="txt")
 

Private Attributes

std::string fOwner
 
std::string fFileName
 

Detailed Description

wrapper for global data IO

Author
Sergio Di Domizio

Definition at line 17 of file QInitFileHandler.hh.

Constructor & Destructor Documentation

◆ QInitFileHandler() [1/2]

QInitFileHandler::QInitFileHandler ( )

Definition at line 8 of file QInitFileHandler.cc.

◆ QInitFileHandler() [2/2]

QInitFileHandler::QInitFileHandler ( const std::string &  owner,
const std::string &  filename 
)

Definition at line 15 of file QInitFileHandler.cc.

References SetFileName(), and SetOwner().

Member Function Documentation

◆ GetBool()

QError QInitFileHandler::GetBool ( const std::string &  name,
Bool_t &  val 
) const

◆ GetDouble()

QError QInitFileHandler::GetDouble ( const std::string &  name,
Double_t &  val 
) const

◆ GetInitFileName()

std::string QInitFileHandler::GetInitFileName ( const std::string &  baseName,
const std::string &  extension = "txt" 
)
static

utility function to build a file name with complete path starting from baseName. The filename is built as follows: $HOMEDIR + "/." + baseName + ".txt"

Definition at line 200 of file QInitFileHandler.cc.

◆ GetInt()

QError QInitFileHandler::GetInt ( const std::string &  name,
Int_t &  val 
) const

◆ GetQObject()

template<class T >
QError QInitFileHandler::GetQObject ( const std::string &  name,
T &  obj 
) const

◆ GetStdVector()

template<class T >
QError QInitFileHandler::GetStdVector ( const std::string &  name,
std::vector< T > &  vec 
) const

◆ GetString()

QError QInitFileHandler::GetString ( const std::string &  name,
std::string &  val 
) const

◆ SetFileName()

void QInitFileHandler::SetFileName ( const std::string &  fileName)
inline

Definition at line 34 of file QInitFileHandler.hh.

References fFileName.

Referenced by QInitFileHandler().

◆ SetOwner()

void QInitFileHandler::SetOwner ( const std::string &  owner)

Definition at line 212 of file QInitFileHandler.cc.

References fOwner.

Referenced by QInitFileHandler().

◆ WriteBool()

QError QInitFileHandler::WriteBool ( const std::string &  name,
Bool_t  val 
) const

◆ WriteDouble()

QError QInitFileHandler::WriteDouble ( const std::string &  name,
Double_t  val 
) const

◆ WriteInt()

QError QInitFileHandler::WriteInt ( const std::string &  name,
Int_t  val 
) const

◆ WriteQObject()

template<class T >
QError QInitFileHandler::WriteQObject ( const std::string &  name,
const T &  obj 
) const

◆ WriteStdVector()

template<class T >
QError QInitFileHandler::WriteStdVector ( const std::string &  name,
const std::vector< T > &  vec 
) const

◆ WriteString()

QError QInitFileHandler::WriteString ( const std::string &  name,
const std::string &  val 
) const

Member Data Documentation

◆ fFileName

std::string QInitFileHandler::fFileName
private

◆ fOwner

std::string QInitFileHandler::fOwner
private

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