GWOLLUM  4.2.0
Tools for gravitational-wave analyses
GwollumOptions Class Reference

Interface to manage options. More...

#include <GwollumOptions.h>

Inheritance diagram for GwollumOptions:

Public Member Functions

void Add (const string aTag, const string aKey, const double aDefaultValue, const unsigned int aSize=0)
 Adds an option to the list (double). More...
 
void Add (const string aTag, const string aKey, const int aDefaultValue, const unsigned int aSize=0)
 Adds an option to the list (int). More...
 
void Add (const string aTag, const string aKey, const string aDefaultValue, const unsigned int aSize=0)
 Adds an option to the list (string). More...
 
void Add (const string aTag, const string aKey, const unsigned int aDefaultValue, const unsigned int aSize=0)
 Adds an option to the list (unsigned int). More...
 
void AddOptionValue (const string aTag, const string aKey, const double aValue)
 Appends a value to a variable-size option (double). More...
 
void AddOptionValue (const string aTag, const string aKey, const int aValue)
 Appends a value to a variable-size option (int). More...
 
void AddOptionValue (const string aTag, const string aKey, const string aValue)
 Appends a value to a variable-size option (string). More...
 
void AddOptionValue (const string aTag, const string aKey, const unsigned int aValue)
 Appends a value to a variable-size option (unsigned int). More...
 
void Copy (GwollumOptions *aG)
 Copies an external GwollumOptions object into this. More...
 
void FillTree (void)
 Saves options in a TTree. More...
 
double GetOptionDefaultD (const unsigned int aOptionIndex)
 Returns an option default value. More...
 
int GetOptionDefaultI (const unsigned int aOptionIndex)
 Returns an option default value. More...
 
string GetOptionDefaultS (const unsigned int aOptionIndex)
 Returns an option default value. More...
 
unsigned int GetOptionDefaultU (const unsigned int aOptionIndex)
 Returns an option default value. More...
 
unsigned int GetOptionIndex (const string aTag, const string aKey)
 Returns the option index. More...
 
string GetOptionKey (const unsigned int aOptionIndex)
 Returns an option key. More...
 
unsigned int GetOptionNumberOfValues (const string aTag, const string aKey)
 Returns the option number of values. More...
 
unsigned int GetOptionSize (const string aTag, const string aKey)
 Returns the option size. More...
 
unsigned int GetOptionSize (const unsigned int aOptionIndex)
 Returns an option size. More...
 
unsigned int GetOptionsN (void)
 Returns the number of options. More...
 
string GetOptionTag (const unsigned int aOptionIndex)
 Returns an option tag. More...
 
char GetOptionType (const string aTag, const string aKey)
 Returns the option type. More...
 
char GetOptionType (const unsigned int aOptionIndex)
 Returns an option type. More...
 
double GetOptionValueD (const string aTag, const string aKey, const unsigned int aValIndex)
 Returns an option value (double). More...
 
bool GetOptionValueD (double &aValue, const string aTag, const string aKey, const unsigned int aValIndex)
 Returns an option value (double). More...
 
int GetOptionValueI (const string aTag, const string aKey, const unsigned int aValIndex)
 Returns an option value (int). More...
 
bool GetOptionValueI (int &aValue, const string aTag, const string aKey, const unsigned int aValIndex)
 Returns an option value (int). More...
 
string GetOptionValueS (const string aTag, const string aKey, const unsigned int aValIndex)
 Returns an option value (string). More...
 
bool GetOptionValueS (string &aValue, const string aTag, const string aKey, const unsigned int aValIndex)
 Returns an option value (string). More...
 
vector< double > GetOptionValuesD (const string aTag, const string aKey)
 Returns the list of option values (double). More...
 
vector< int > GetOptionValuesI (const string aTag, const string aKey)
 Returns the list of option values (int). More...
 
vector< string > GetOptionValuesS (const string aTag, const string aKey)
 Returns the list of option values (string). More...
 
vector< unsigned int > GetOptionValuesU (const string aTag, const string aKey)
 Returns the list of option values (unsigned int). More...
 
unsigned int GetOptionValueU (const string aTag, const string aKey, const unsigned int aValIndex)
 Returns an option value (unsigned int). More...
 
bool GetOptionValueU (unsigned int &aValue, const string aTag, const string aKey, const unsigned int aValIndex)
 Returns an option value (unsigned int). More...
 
bool Is (const string aTag, const string aKey)
 Checks whether an option exists. More...
 
bool IsProvided (const string aTag, const string aKey)
 Checks whether an option was provided. More...
 
bool IsTheSame (GwollumOptions *aG)
 Checks whether two GwollumOptions objects are identical. More...
 
bool ReadChain (bool &aIsUniform, TChain *aChain)
 Reads options from a TChain. More...
 
unsigned int ReadTextFile (const string aOptionFile)
 Reads an option file and extract the list of options. More...
 
bool ReadTree (const string aRootFileName, const string aTreeName)
 Reads options from a TTree in a ROOT file. More...
 
bool ReadTree (TTree *aTree)
 Reads options from a TTree. More...
 
void RemoveOption (const string aTag, const string aKey)
 Removes an option. More...
 
void Reset (void)
 Resets the list of options. More...
 
void ResetOption (const string aTag, const string aKey)
 Resets the list of option values. More...
 
void SetDefault (const string aTag, const string aKey)
 Sets an option to default value. More...
 
void SetOptionValue (const string aTag, const string aKey, const unsigned int aValIndex, const double aValue)
 Sets a value of an option (double). More...
 
void SetOptionValue (const string aTag, const string aKey, const unsigned int aValIndex, const int aValue)
 Sets a value of an option (int). More...
 
void SetOptionValue (const string aTag, const string aKey, const unsigned int aValIndex, const string aValue)
 Sets a value of an option (string). More...
 
void SetOptionValue (const string aTag, const string aKey, const unsigned int aValIndex, const unsigned int aValue)
 Sets a value of an option (unsigned int). More...
 
void WriteH5 (H5::H5File *aFile, H5::DataSpace &aDataSpace)
 Writes the options as attributes in a hdf5 file. More...
 
void WriteTextFile (const string aFileName)
 Writes all options in a text file. More...
 
void WriteTree (const string aTreeName)
 Writes the option TTree in a TFile. More...
 
void WriteTree (const string aTreeName, const string aRootFileName, const string aSubDirectory="")
 Writes the option TTree in a TFile. More...
 
Constructors and destructors
 GwollumOptions (void)
 Constructor of the GwollumOptions class. More...
 
virtual ~GwollumOptions (void)
 Destructor of the GwollumOptions class. More...
 

Private Attributes

vector< GwollumOptionoptions
 List of options. More...
 
TTree * OptTree
 Option TTree. More...
 
double t_ddef
 Option TTree: default (double). More...
 
double t_dval
 Option TTree: value (double). More...
 
int t_idef
 Option TTree: default (int). More...
 
int t_ival
 Option TTree: value (int). More...
 
string t_key
 Option TTree: key. More...
 
string t_sdef
 Option TTree: default (string). More...
 
unsigned int t_size
 Option TTree: size. More...
 
string t_sval
 Option TTree: value (string). More...
 
string t_tag
 Option TTree: tag. More...
 
char t_type
 Option TTree: type. More...
 
unsigned int t_udef
 Option TTree: default (unsigned int). More...
 
unsigned int t_uval
 Option TTree: value (unsigned int). More...
 

Detailed Description

Interface to manage options.

This class offers a single interface to manage a list of options. A single option is described by the GwollumOption class.

A set of options can be created "manually" by calling the Add() functions. Then, it is possible to parse a text file to get the values for the options with ReadTextFile().

Another possibility is to call the ReadTree() or ReadChain() functions which downloads the option value from a TTree. In this case, the list of options is completely determined by the content of the TTree.

A set of options can then be saved:

Author
Florent Robinet

Constructor & Destructor Documentation

◆ GwollumOptions()

GwollumOptions::GwollumOptions ( void  )

Constructor of the GwollumOptions class.

◆ ~GwollumOptions()

GwollumOptions::~GwollumOptions ( void  )
virtual

Destructor of the GwollumOptions class.

Member Function Documentation

◆ Add() [1/4]

void GwollumOptions::Add ( const string  aTag,
const string  aKey,
const double  aDefaultValue,
const unsigned int  aSize = 0 
)

Adds an option to the list (double).

Parameters
[in]aTagOption tag.
[in]aKeyOption aKey.
[in]aDefaultValueDefault value.
[in]aSizeNumber of values for this option. Use 0 for no limits on the size.

◆ Add() [2/4]

void GwollumOptions::Add ( const string  aTag,
const string  aKey,
const int  aDefaultValue,
const unsigned int  aSize = 0 
)

Adds an option to the list (int).

Parameters
[in]aTagOption tag.
[in]aKeyOption aKey.
[in]aDefaultValueDefault value.
[in]aSizeNumber of values for this option. Use 0 for no limits on the size.

◆ Add() [3/4]

void GwollumOptions::Add ( const string  aTag,
const string  aKey,
const string  aDefaultValue,
const unsigned int  aSize = 0 
)

Adds an option to the list (string).

Parameters
[in]aTagOption tag.
[in]aKeyOption aKey.
[in]aDefaultValueDefault value.
[in]aSizeNumber of values for this option. Use 0 for no limits on the size.

◆ Add() [4/4]

void GwollumOptions::Add ( const string  aTag,
const string  aKey,
const unsigned int  aDefaultValue,
const unsigned int  aSize = 0 
)

Adds an option to the list (unsigned int).

Parameters
[in]aTagOption tag.
[in]aKeyOption aKey.
[in]aDefaultValueDefault value.
[in]aSizeNumber of values for this option. Use 0 for no limits on the size.

◆ AddOptionValue() [1/4]

void GwollumOptions::AddOptionValue ( const string  aTag,
const string  aKey,
const double  aValue 
)

Appends a value to a variable-size option (double).

Parameters
[in]aTagOption tag.
[in]aKeyOption aKey.
[in]aValueNew value to append.

◆ AddOptionValue() [2/4]

void GwollumOptions::AddOptionValue ( const string  aTag,
const string  aKey,
const int  aValue 
)

Appends a value to a variable-size option (int).

Parameters
[in]aTagOption tag.
[in]aKeyOption aKey.
[in]aValueNew value to append.

◆ AddOptionValue() [3/4]

void GwollumOptions::AddOptionValue ( const string  aTag,
const string  aKey,
const string  aValue 
)

Appends a value to a variable-size option (string).

Parameters
[in]aTagOption tag.
[in]aKeyOption aKey.
[in]aValueNew value to append.

◆ AddOptionValue() [4/4]

void GwollumOptions::AddOptionValue ( const string  aTag,
const string  aKey,
const unsigned int  aValue 
)

Appends a value to a variable-size option (unsigned int).

Parameters
[in]aTagOption tag.
[in]aKeyOption aKey.
[in]aValueNew value to append.

◆ Copy()

void GwollumOptions::Copy ( GwollumOptions aG)

Copies an external GwollumOptions object into this.

Previous options are reset (as well as the TTree). New options are imported.

Parameters
[in]aGGwollumOptions object to copy.

◆ FillTree()

void GwollumOptions::FillTree ( void  )

Saves options in a TTree.

The options are saved in a TTree. Call this function when all options have been set. Then, the option TTree can be saved in a ROOT file by calling WriteTree().

Note
Call this function only once, after all options are set.
Warning
If a variable-size option is empty, it will not be saved in the TTree. You need to have at least one option value. You can also call SetDefault() to fill the option with a single default value.

◆ GetOptionDefaultD()

double GwollumOptions::GetOptionDefaultD ( const unsigned int  aOptionIndex)
inline

Returns an option default value.

Parameters
[in]aOptionIndexOption index.
Precondition
The option index must be valid.

◆ GetOptionDefaultI()

int GwollumOptions::GetOptionDefaultI ( const unsigned int  aOptionIndex)
inline

Returns an option default value.

Parameters
[in]aOptionIndexOption index.
Precondition
The option index must be valid.

◆ GetOptionDefaultS()

string GwollumOptions::GetOptionDefaultS ( const unsigned int  aOptionIndex)
inline

Returns an option default value.

Parameters
[in]aOptionIndexOption index.
Precondition
The option index must be valid.

◆ GetOptionDefaultU()

unsigned int GwollumOptions::GetOptionDefaultU ( const unsigned int  aOptionIndex)
inline

Returns an option default value.

Parameters
[in]aOptionIndexOption index.
Precondition
The option index must be valid.

◆ GetOptionIndex()

unsigned int GwollumOptions::GetOptionIndex ( const string  aTag,
const string  aKey 
)
inline

Returns the option index.

Parameters
[in]aTagOption tag.
[in]aKeyOption aKey.
Returns
The option index if found, the number of options otherwise.

◆ GetOptionKey()

string GwollumOptions::GetOptionKey ( const unsigned int  aOptionIndex)
inline

Returns an option key.

Returns
"" if the option index is out of range.
Parameters
[in]aOptionIndexOption index.

◆ GetOptionNumberOfValues()

unsigned int GwollumOptions::GetOptionNumberOfValues ( const string  aTag,
const string  aKey 
)

Returns the option number of values.

Returns
0 if the TAG/KEY does not exist.
Parameters
[in]aTagOption tag.
[in]aKeyOption aKey.

◆ GetOptionSize() [1/2]

unsigned int GwollumOptions::GetOptionSize ( const string  aTag,
const string  aKey 
)

Returns the option size.

Returns
0 if the TAG/KEY does not exist (note that this can be confused with a variable-size option!).
Parameters
[in]aTagOption tag.
[in]aKeyOption aKey.

◆ GetOptionSize() [2/2]

unsigned int GwollumOptions::GetOptionSize ( const unsigned int  aOptionIndex)
inline

Returns an option size.

Parameters
[in]aOptionIndexOption index.
Precondition
The option index must be valid.

◆ GetOptionsN()

unsigned int GwollumOptions::GetOptionsN ( void  )
inline

Returns the number of options.

◆ GetOptionTag()

string GwollumOptions::GetOptionTag ( const unsigned int  aOptionIndex)
inline

Returns an option tag.

Returns
"" if the option index is out of range.
Parameters
[in]aOptionIndexOption index.

◆ GetOptionType() [1/2]

char GwollumOptions::GetOptionType ( const string  aTag,
const string  aKey 
)

Returns the option type.

Returns
'0' if the TAG/KEY does not exist.
Parameters
[in]aTagOption tag.
[in]aKeyOption aKey.

◆ GetOptionType() [2/2]

char GwollumOptions::GetOptionType ( const unsigned int  aOptionIndex)
inline

Returns an option type.

Returns
'0' if the option index is out of range.
Parameters
[in]aOptionIndexOption index.

◆ GetOptionValueD() [1/2]

double GwollumOptions::GetOptionValueD ( const string  aTag,
const string  aKey,
const unsigned int  aValIndex 
)

Returns an option value (double).

The option is identified by its tag and key words. For this option, the value index must be provided.

Warning
If the option TAG/KEY does not exist, 0 is returned. If the value index does not exist, the default value for this option is returned.
Parameters
[in]aTagOption tag.
[in]aKeyOption aKey.
[in]aValIndexValue index.

◆ GetOptionValueD() [2/2]

bool GwollumOptions::GetOptionValueD ( double &  aValue,
const string  aTag,
const string  aKey,
const unsigned int  aValIndex 
)

Returns an option value (double).

The option is identified by its tag and key words. For this option, the value index must be provided.

Warning
If the option TAG/KEY does not exist, false is returned. If the value index does not exist, false is returned.
Parameters
[out]aValueReturned option value.
[in]aTagOption tag.
[in]aKeyOption aKey.
[in]aValIndexValue index.

◆ GetOptionValueI() [1/2]

int GwollumOptions::GetOptionValueI ( const string  aTag,
const string  aKey,
const unsigned int  aValIndex 
)

Returns an option value (int).

The option is identified by its tag and key words. For this option, the value index must be provided.

Warning
If the option TAG/KEY does not exist, 0 is returned. If the value index does not exist, the default value for this option is returned.
Parameters
[in]aTagOption tag.
[in]aKeyOption aKey.
[in]aValIndexValue index.

◆ GetOptionValueI() [2/2]

bool GwollumOptions::GetOptionValueI ( int &  aValue,
const string  aTag,
const string  aKey,
const unsigned int  aValIndex 
)

Returns an option value (int).

The option is identified by its tag and key words. For this option, the value index must be provided.

Warning
If the option TAG/KEY does not exist, false is returned. If the value index does not exist, false is returned.
Parameters
[out]aValueReturned option value.
[in]aTagOption tag.
[in]aKeyOption aKey.
[in]aValIndexValue index.

◆ GetOptionValueS() [1/2]

string GwollumOptions::GetOptionValueS ( const string  aTag,
const string  aKey,
const unsigned int  aValIndex 
)

Returns an option value (string).

The option is identified by its tag and key words. For this option, the value index must be provided.

Warning
If the option TAG/KEY does not exist, an empty string is returned. If the value index does not exist, the default value for this option is returned.
Parameters
[in]aTagOption tag.
[in]aKeyOption aKey.
[in]aValIndexValue index.

◆ GetOptionValueS() [2/2]

bool GwollumOptions::GetOptionValueS ( string &  aValue,
const string  aTag,
const string  aKey,
const unsigned int  aValIndex 
)

Returns an option value (string).

The option is identified by its tag and key words. For this option, the value index must be provided.

Warning
If the option TAG/KEY does not exist, false is returned. If the value index does not exist, false is returned.
Parameters
[out]aValueReturned option value.
[in]aTagOption tag.
[in]aKeyOption aKey.
[in]aValIndexValue index.

◆ GetOptionValuesD()

vector< double > GwollumOptions::GetOptionValuesD ( const string  aTag,
const string  aKey 
)

Returns the list of option values (double).

The option is identified by its tag and key words.

Warning
If the option TAG/KEY does not exist, an empty vector is returned.
Parameters
[in]aTagOption tag.
[in]aKeyOption aKey.

◆ GetOptionValuesI()

vector< int > GwollumOptions::GetOptionValuesI ( const string  aTag,
const string  aKey 
)

Returns the list of option values (int).

The option is identified by its tag and key words.

Warning
If the option TAG/KEY does not exist, an empty vector is returned.
Parameters
[in]aTagOption tag.
[in]aKeyOption aKey.

◆ GetOptionValuesS()

vector< string > GwollumOptions::GetOptionValuesS ( const string  aTag,
const string  aKey 
)

Returns the list of option values (string).

The option is identified by its tag and key words.

Warning
If the option TAG/KEY does not exist, an empty vector is returned.
Parameters
[in]aTagOption tag.
[in]aKeyOption aKey.

◆ GetOptionValuesU()

vector< unsigned int > GwollumOptions::GetOptionValuesU ( const string  aTag,
const string  aKey 
)

Returns the list of option values (unsigned int).

The option is identified by its tag and key words.

Warning
If the option TAG/KEY does not exist, an empty vector is returned.
Parameters
[in]aTagOption tag.
[in]aKeyOption aKey.

◆ GetOptionValueU() [1/2]

unsigned int GwollumOptions::GetOptionValueU ( const string  aTag,
const string  aKey,
const unsigned int  aValIndex 
)

Returns an option value (unsigned int).

The option is identified by its tag and key words. For this option, the value index must be provided.

Warning
If the option TAG/KEY does not exist, 0 is returned. If the value index does not exist, the default value for this option is returned.
Parameters
[in]aTagOption tag.
[in]aKeyOption aKey.
[in]aValIndexValue index.

◆ GetOptionValueU() [2/2]

bool GwollumOptions::GetOptionValueU ( unsigned int &  aValue,
const string  aTag,
const string  aKey,
const unsigned int  aValIndex 
)

Returns an option value (unsigned int).

The option is identified by its tag and key words. For this option, the value index must be provided.

Warning
If the option TAG/KEY does not exist, false is returned. If the value index does not exist, false is returned.
Parameters
[out]aValueReturned option value.
[in]aTagOption tag.
[in]aKeyOption aKey.
[in]aValIndexValue index.

◆ Is()

bool GwollumOptions::Is ( const string  aTag,
const string  aKey 
)
inline

Checks whether an option exists.

Returns
true if this combination of TAG/KEY exists.
Parameters
[in]aTagOption tag.
[in]aKeyOption aKey.

◆ IsProvided()

bool GwollumOptions::IsProvided ( const string  aTag,
const string  aKey 
)

Checks whether an option was provided.

Returns
true if this the case.
See also
GwollumOption::IsProvided().
Parameters
[in]aTagOption tag.
[in]aKeyOption aKey.

◆ IsTheSame()

bool GwollumOptions::IsTheSame ( GwollumOptions aG)

Checks whether two GwollumOptions objects are identical.

They are said to be identical if:

  • The number of options is the same.
  • The options are defined with the same TAG/KEY/Type/Size.
  • The options have the same number of values.
Note
The actual option values are not checked! They can differ.
Parameters
[in]aGGwollumOptions object to test.
Returns
true if the two GwollumOptions objects are identical.

◆ ReadChain()

bool GwollumOptions::ReadChain ( bool &  aIsUniform,
TChain *  aChain 
)

Reads options from a TChain.

The first tree in the TChain is used to define the option set. Then, the next trees in the TChain are scanned and tested against the option set with IsTheSame(). If the list of options (not the values!) are consistent across the TChain, the option set is said to be uniform. The result of this check is returned.

Returns
true if the option set was successfully extracted from the first tree in the chain.
Parameters
[out]aIsUniformFlag set to true if the list of options (not the values!) are uniform across the TChain.
[in]aChainPointer to the option TChain.

◆ ReadTextFile()

unsigned int GwollumOptions::ReadTextFile ( const string  aOptionFile)

Reads an option file and extract the list of options.

The input text file is scanned with the IO class. All the key/tag options defined until now are extracted:

  • vector of parameters are downloaded according to the defined type.
  • if an option is not given in the option file, the default value is used.
Note
If the input option file does not exist, this function returns immediately.
Parameters
[in]aOptionFilePath to the option file.
Returns
The number of options.

◆ ReadTree() [1/2]

bool GwollumOptions::ReadTree ( const string  aRootFileName,
const string  aTreeName 
)

Reads options from a TTree in a ROOT file.

Returns
true if the tree was correctly parsed and options were extracted.
Parameters
[in]aRootFileNamePath to the ROOT file.
[in]aTreeNameOption TTree name.

◆ ReadTree() [2/2]

bool GwollumOptions::ReadTree ( TTree *  aTree)

Reads options from a TTree.

Parameters
[in]aTreePointer to the option TTree.

◆ RemoveOption()

void GwollumOptions::RemoveOption ( const string  aTag,
const string  aKey 
)

Removes an option.

The option matching the input tag and key is removed from the list.

Parameters
[in]aTagOption tag.
[in]aKeyOption aKey.

◆ Reset()

void GwollumOptions::Reset ( void  )
inline

Resets the list of options.

◆ ResetOption()

void GwollumOptions::ResetOption ( const string  aTag,
const string  aKey 
)

Resets the list of option values.

All the option values are removed. Fixed-size option values are set to default. Variable-size options are simply empty.

Parameters
[in]aTagOption tag.
[in]aKeyOption aKey.

◆ SetDefault()

void GwollumOptions::SetDefault ( const string  aTag,
const string  aKey 
)

Sets an option to default value.

See also
GwollumOption::SetDefault().
Parameters
[in]aTagOption tag.
[in]aKeyOption aKey.

◆ SetOptionValue() [1/4]

void GwollumOptions::SetOptionValue ( const string  aTag,
const string  aKey,
const unsigned int  aValIndex,
const double  aValue 
)

Sets a value of an option (double).

This function can only be used to update an existing option value.

Parameters
[in]aTagOption tag.
[in]aKeyOption aKey.
[in]aValIndexValue index.
[in]aValueNew value.

◆ SetOptionValue() [2/4]

void GwollumOptions::SetOptionValue ( const string  aTag,
const string  aKey,
const unsigned int  aValIndex,
const int  aValue 
)

Sets a value of an option (int).

This function can only be used to update an existing option value.

Parameters
[in]aTagOption tag.
[in]aKeyOption aKey.
[in]aValIndexValue index.
[in]aValueNew value.

◆ SetOptionValue() [3/4]

void GwollumOptions::SetOptionValue ( const string  aTag,
const string  aKey,
const unsigned int  aValIndex,
const string  aValue 
)

Sets a value of an option (string).

This function can only be used to update an existing option value.

Parameters
[in]aTagOption tag.
[in]aKeyOption aKey.
[in]aValIndexValue index.
[in]aValueNew value.

◆ SetOptionValue() [4/4]

void GwollumOptions::SetOptionValue ( const string  aTag,
const string  aKey,
const unsigned int  aValIndex,
const unsigned int  aValue 
)

Sets a value of an option (unsigned int).

This function can only be used to update an existing option value.

Parameters
[in]aTagOption tag.
[in]aKeyOption aKey.
[in]aValIndexValue index.
[in]aValueNew value.

◆ WriteH5()

void GwollumOptions::WriteH5 ( H5::H5File *  aFile,
H5::DataSpace &  aDataSpace 
)

Writes the options as attributes in a hdf5 file.

Parameters
[in]aFilePointer to an open Hdf5 file.
[in]aDataSpaceData space for the attributes.

◆ WriteTextFile()

void GwollumOptions::WriteTextFile ( const string  aFileName)

Writes all options in a text file.

Parameters
[in]aFileNamePath to the output text file.

◆ WriteTree() [1/2]

void GwollumOptions::WriteTree ( const string  aTreeName)
inline

Writes the option TTree in a TFile.

Note
The FillTree() must be called first to fill the TTree with options.
Parameters
[in]aTreeNameTTree name.
Precondition
A TFile must be open before calling this function. The TTree::Write() function is called here.

◆ WriteTree() [2/2]

void GwollumOptions::WriteTree ( const string  aTreeName,
const string  aRootFileName,
const string  aSubDirectory = "" 
)

Writes the option TTree in a TFile.

Note
The FillTree() must be called first to fill the TTree with options.
Parameters
[in]aTreeNameTTree name.
[in]aRootFileNamePath to the ROOT file.
[in]aSubDirectorySub-directory name.

Member Data Documentation

◆ options

vector<GwollumOption> GwollumOptions::options
private

List of options.

◆ OptTree

TTree* GwollumOptions::OptTree
private

Option TTree.

◆ t_ddef

double GwollumOptions::t_ddef
private

Option TTree: default (double).

◆ t_dval

double GwollumOptions::t_dval
private

Option TTree: value (double).

◆ t_idef

int GwollumOptions::t_idef
private

Option TTree: default (int).

◆ t_ival

int GwollumOptions::t_ival
private

Option TTree: value (int).

◆ t_key

string GwollumOptions::t_key
private

Option TTree: key.

◆ t_sdef

string GwollumOptions::t_sdef
private

Option TTree: default (string).

◆ t_size

unsigned int GwollumOptions::t_size
private

Option TTree: size.

◆ t_sval

string GwollumOptions::t_sval
private

Option TTree: value (string).

◆ t_tag

string GwollumOptions::t_tag
private

Option TTree: tag.

◆ t_type

char GwollumOptions::t_type
private

Option TTree: type.

◆ t_udef

unsigned int GwollumOptions::t_udef
private

Option TTree: default (unsigned int).

◆ t_uval

unsigned int GwollumOptions::t_uval
private

Option TTree: value (unsigned int).


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