A Sample based on a simple file list. More...
#include <SampleLocal.h>
Public Member Functions | |
void | testInvariant () const |
test the invariant of this object | |
SampleLocal () | |
standard constructor | |
SampleLocal (const std::string &name) | |
standard constructor | |
void | add (const std::string &file) |
add a file to the list | |
Protected Member Functions | |
virtual std::size_t | getNumFiles () const |
virtual std::string | getFileName (std::size_t index) const |
virtual SamplePtr | doMakeLocal () const |
virtual std::vector< std::string > | doMakeFileList () const |
virtual void | doUpdateLocation (const std::string &from, const std::string &to) |
A Sample based on a simple file list.
This is the archetypical implementation of a sample, which is really just a list of file names that can directly be passed to TFile::Open().
While you can in principle create these samples yourself, you will probably do better if you rely on the various data discovery methods to create the samples for you.
SH::SampleLocal::SampleLocal | ( | ) |
standard constructor
SH::SampleLocal::SampleLocal | ( | const std::string & | name | ) |
standard constructor
void SH::SampleLocal::add | ( | const std::string & | file | ) |
add a file to the list
virtual std::vector<std::string> SH::SampleLocal::doMakeFileList | ( | ) | const [protected, virtual] |
make a list of all files, prestaging them if necessary
Implements SH::Sample.
virtual SamplePtr SH::SampleLocal::doMakeLocal | ( | ) | const [protected, virtual] |
Make this a local sample, i.e. one which can be directly opened with TFile::Open.
Implements SH::Sample.
virtual void SH::SampleLocal::doUpdateLocation | ( | const std::string & | from, | |
const std::string & | to | |||
) | [protected, virtual] |
update all file references starting with from to to
from | the original path to the data area | |
to | the new path to the data area |
Reimplemented from SH::Sample.
virtual std::string SH::SampleLocal::getFileName | ( | std::size_t | index | ) | const [protected, virtual] |
the name of the file with the given index
index | the index of the file |
Implements SH::Sample.
virtual std::size_t SH::SampleLocal::getNumFiles | ( | ) | const [protected, virtual] |
the number of files in the sample
Implements SH::Sample.
void SH::SampleLocal::testInvariant | ( | ) | const |