Abstract interface to load general data. More...
#include <IDataLoader.hh>
Classes | |
class | Creator |
class | ICreator |
Public Member Functions | |
virtual | ~IDataLoader () |
Default destructor. | |
template<class T > | |
T * | retrieve (const string &objectName) throw (NoFileException) |
virtual bool | open (const string &file)=0 throw (NoFileException) |
virtual bool | close ()=0 |
Finalise and close the file connected to this IDataLoader. | |
Static Public Member Functions | |
static DataLoaderPtr | create () |
Abstract interface to load general data.
This class provides an interface to load data. The intended use case is to load efficiency and correction histograms from a ROOT file, but there is not dependence in the interface upon ROOT. The reason this is useful is that in Athena one reads ROOT files using the THistSvc, whereas running standalone ROOT files are read in the usual way by creating a TFile object. It is also possible that this class could be used to read a completely different type of file.
There is a static create() method that returns an instance of the first complete implentation that was registered in the s_creators vector. If no implementation exists then it throws.
Definition at line 51 of file IDataLoader.hh.
virtual ForIA::IDataLoader::~IDataLoader | ( | ) | [inline, virtual] |
Default destructor.
Definition at line 56 of file IDataLoader.hh.
virtual bool ForIA::IDataLoader::close | ( | ) | [pure virtual] |
Finalise and close the file connected to this IDataLoader.
Implemented in ForIA::D3PDDataLoader.
DataLoaderPtr ForIA::IDataLoader::create | ( | ) | [static] |
Create a concrete implementation of an IDataLoader without knowing what that implementation is. This requires that an implementation has been loaded at runtime, otherwise it throws.
Definition at line 5 of file IDataLoader.cxx.
virtual bool ForIA::IDataLoader::open | ( | const string & | file ) | throw (NoFileException) [pure virtual] |
Open a file with a given name
file | The file name to open |
Implemented in ForIA::D3PDDataLoader.
T* ForIA::IDataLoader::retrieve | ( | const string & | objectName ) | throw (NoFileException) [inline] |
Retrieve a named object of type T from the data source that this IDataLoader is connected to
objectName | name of the object to retrieve |
Definition at line 71 of file IDataLoader.hh.