star-travex
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PrgOptionProcessor Class Reference

Processes and controls user options provided in the command line. More...

#include <PrgOptionProcessor.h>

Inheritance diagram for PrgOptionProcessor:
StiHifyPrgOptions StiScanPrgOptions

Public Member Functions

 PrgOptionProcessor ()
 
 PrgOptionProcessor (int argc, char **argv, const std::string &stiTreeName="t")
 
 ~PrgOptionProcessor ()
 
std::string PathToStiTreeFile () const
 
std::string PathToGeometryFile () const
 
const std::set< std::string > & GetVolumeList () const
 
TChain * GetStiTChain ()
 
void ProcessOptions ()
 Takes the standard command line arguments and parses them with the boost program_options utility. More...
 
bool MatchedVolName (const std::string &volName) const
 Note that the function returns true when the internal list of regex'es formed by the user specified options is empty. More...
 

Protected Member Functions

void BuildInputChains ()
 
virtual void VerifyOptions ()
 
virtual void AddToInputChains (std::string stiTreeRootFileName)
 This private method takes a path to a valid ROOT file as input. More...
 

Protected Attributes

std::string fGeomFilePath
 Full path to a ROOT file with TGeo geometry. More...
 
std::string fVolumeListFile
 Full path to a text file with Sti/TGeo volume names. More...
 
std::string fVolumePattern
 Regex pattern provided by the user in the command line. More...
 
std::set< std::string > fVolumeList
 A list of volume names to consider. More...
 
TChain * fStiTChain
 A (chained) TTree from the input file. More...
 

Detailed Description

Processes and controls user options provided in the command line.

Definition at line 24 of file PrgOptionProcessor.h.

Constructor & Destructor Documentation

PrgOptionProcessor::PrgOptionProcessor ( )

Definition at line 13 of file PrgOptionProcessor.cxx.

PrgOptionProcessor::PrgOptionProcessor ( int  argc,
char **  argv,
const std::string &  stiTreeName = "t" 
)

Definition at line 16 of file PrgOptionProcessor.cxx.

PrgOptionProcessor::~PrgOptionProcessor ( )

Definition at line 39 of file PrgOptionProcessor.cxx.

Member Function Documentation

void PrgOptionProcessor::AddToInputChains ( std::string  stiTreeRootFileName)
protectedvirtual

This private method takes a path to a valid ROOT file as input.

No check is done to make sure the input chains exist.

XXX: Need to add a check to validate the tree in the file.

Reimplemented in StiScanPrgOptions.

Definition at line 195 of file PrgOptionProcessor.cxx.

void PrgOptionProcessor::BuildInputChains ( )
protected

Definition at line 163 of file PrgOptionProcessor.cxx.

TChain* PrgOptionProcessor::GetStiTChain ( )
inline

Definition at line 35 of file PrgOptionProcessor.h.

const std::set<std::string>& PrgOptionProcessor::GetVolumeList ( ) const
inline

Definition at line 34 of file PrgOptionProcessor.h.

bool PrgOptionProcessor::MatchedVolName ( const std::string &  volName) const

Note that the function returns true when the internal list of regex'es formed by the user specified options is empty.

Definition at line 144 of file PrgOptionProcessor.cxx.

std::string PrgOptionProcessor::PathToGeometryFile ( ) const
inline

Definition at line 33 of file PrgOptionProcessor.h.

std::string PrgOptionProcessor::PathToStiTreeFile ( ) const
inline

Definition at line 32 of file PrgOptionProcessor.h.

void PrgOptionProcessor::ProcessOptions ( )

Takes the standard command line arguments and parses them with the boost program_options utility.

Additional checks are implemented to verify the validity of the supplied arguments.

Definition at line 50 of file PrgOptionProcessor.cxx.

void PrgOptionProcessor::VerifyOptions ( )
protectedvirtual

Reimplemented in StiScanPrgOptions.

Definition at line 62 of file PrgOptionProcessor.cxx.

Member Data Documentation

std::string PrgOptionProcessor::fGeomFilePath
protected

Full path to a ROOT file with TGeo geometry.

Definition at line 47 of file PrgOptionProcessor.h.

TChain* PrgOptionProcessor::fStiTChain
protected

A (chained) TTree from the input file.

Definition at line 59 of file PrgOptionProcessor.h.

std::set<std::string> PrgOptionProcessor::fVolumeList
protected

A list of volume names to consider.

Definition at line 56 of file PrgOptionProcessor.h.

std::string PrgOptionProcessor::fVolumeListFile
protected

Full path to a text file with Sti/TGeo volume names.

Definition at line 50 of file PrgOptionProcessor.h.

std::string PrgOptionProcessor::fVolumePattern
protected

Regex pattern provided by the user in the command line.

Definition at line 53 of file PrgOptionProcessor.h.


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