Chain ROOT trees in a list of files defined by a file pattern. More...
#include <Chain.h>
Public Member Functions | |
bool | AddFile (const string afilename) |
Adds a file to the chain. | |
string | GetFilePath (const int afilenumber) |
Returns the file path of ROOT file number 'afilenumber'. | |
string | GetInputFilePattern (void) |
Returns the input file pattern provided in the constructor. | |
int | GetNfiles (void) |
Returns the number of ROOT files where the designated tree was found. | |
Constructors and destructors | |
Chain (const char *chainname, const char *pattern, const bool verbose=false) | |
Constructor of the Chain class. | |
virtual | ~Chain (void) |
Destructor of the Segments class. |
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.
Chain::Chain | ( | const char * | chainname, | |
const char * | pattern, | |||
const bool | verbose = false | |||
) |
Constructor of the Chain class.
chainname | TTree name to be found in the ROOT files. | |
pattern | file pattern. Any unix-type patterns should be supported (list of files separated by spaces, *, ?) | |
verbose | activate the verbosity mode if true. |
Chain::~Chain | ( | void | ) | [virtual] |
Destructor of the Segments class.
bool Chain::AddFile | ( | const string | afilename | ) |
Adds a file to the chain.
The TTree named 'chainname' found in 'afilename' is added at the end of the chain.
true is returned if success.
afilename | single file path to be added to the chain. |
string Chain::GetFilePath | ( | const int | afilenumber | ) |
Returns the file path of ROOT file number 'afilenumber'.
"none" is returned if the file cannot be found.
afilenumber | file number in the chain. It must be an integer between 0 and GetNfiles() |
string Chain::GetInputFilePattern | ( | void | ) | [inline] |
Returns the input file pattern provided in the constructor.
int Chain::GetNfiles | ( | void | ) | [inline] |
Returns the number of ROOT files where the designated tree was found.