GWOLLUM  4.2.0
Tools for gravitational-wave analyses
Chain Class Reference

Chain ROOT trees in a list of files defined by a file pattern. More...

#include <Chain.h>

Inheritance diagram for Chain:
Collaboration diagram for Chain:

Public Member Functions

void AddFile (const string aPattern)
 Adds files to the chain. More...
 
string GetFilePath (const unsigned int aFileIndex)
 Returns the file path of a given ROOT file. More...
 
string GetInputFilePattern (void)
 Returns the input file pattern provided in the constructor. More...
 
unsigned int GetN (void)
 Returns the number of ROOT files where the designated tree was found. More...
 
Constructors and destructors
 Chain (const string aChainName, const string aPattern, const bool aVerbose=false)
 Constructor of the Chain class. More...
 
virtual ~Chain (void)
 Destructor of the Chain class. More...
 

Private Member Functions

void ChainPOSIX (const string aRootFilePattern)
 Constructor for POSIX files. More...
 
void ChainXROOTD (const vector< string > aRootFiles)
 Constructor for Xrootd files. More...
 

Private Attributes

string fchainname
 Tree name. More...
 
bool fverbose
 Verbosity flag. More...
 
vector< string > rootfilename
 Active root file names. More...
 
string spattern
 Input file pattern. More...
 

Detailed Description

Chain ROOT trees in a list of files defined by a file pattern.

This class inherits from the TChain class from ROOT. Only the constructor was modified and a few functions was added.

Author
Florent Robinet

Constructor & Destructor Documentation

◆ Chain()

Chain::Chain ( const string  aChainName,
const string  aPattern,
const bool  aVerbose = false 
)

Constructor of the Chain class.

Parameters
[in]aChainNameTTree name to be found in the ROOT files.
[in]aPatternFile pattern. Any unix-type patterns is supported (list of files separated by spaces, *, ?)
[in]aVerboseFlag to activate the verbosity.

◆ ~Chain()

Chain::~Chain ( void  )
virtual

Destructor of the Chain class.

Member Function Documentation

◆ AddFile()

void Chain::AddFile ( const string  aPattern)

Adds files to the chain.

The TTrees named 'aChainName' found in 'aPattern' are added at the end of the chain.

Parameters
[in]aPatternFile pattern. Any unix-type patterns is supported (list of files separated by spaces, *, ?)

◆ ChainPOSIX()

void Chain::ChainPOSIX ( const string  aRootFilePattern)
private

Constructor for POSIX files.

Parameters
[in]aRootFilePatternROOT files pattern.

◆ ChainXROOTD()

void Chain::ChainXROOTD ( const vector< string >  aRootFiles)
private

Constructor for Xrootd files.

Parameters
[in]aRootFilesList of root files

◆ GetFilePath()

string Chain::GetFilePath ( const unsigned int  aFileIndex)
inline

Returns the file path of a given ROOT file.

Parameters
[in]aFileIndexFile index.
Precondition
the file index must be valid
See also
GetN()

◆ GetInputFilePattern()

string Chain::GetInputFilePattern ( void  )
inline

Returns the input file pattern provided in the constructor.

◆ GetN()

unsigned int Chain::GetN ( void  )
inline

Returns the number of ROOT files where the designated tree was found.

Member Data Documentation

◆ fchainname

string Chain::fchainname
private

Tree name.

◆ fverbose

bool Chain::fverbose
private

Verbosity flag.

◆ rootfilename

vector<string> Chain::rootfilename
private

Active root file names.

◆ spattern

string Chain::spattern
private

Input file pattern.


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