Chain Class Reference

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

#include <Chain.h>

Inheritance diagram for Chain:
Inheritance graph
[legend]

List of all members.

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.

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 ( const char *  chainname,
const char *  pattern,
const bool  verbose = false 
)

Constructor of the Chain class.

Parameters:
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.


Member Function Documentation

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.

Parameters:
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.

Parameters:
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.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Friends Defines

Generated on 29 Sep 2016 by  doxygen 1.6.1