Classes | Public Member Functions | Static Public Member Functions

ForIA::IDataLoader Class Reference

Abstract interface to load general data. More...

#include <IDataLoader.hh>

Inheritance diagram for ForIA::IDataLoader:
ForIA::D3PDDataLoader

List of all members.

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 ()

Detailed Description

Abstract interface to load general data.

IDataLoader.hh

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.


Constructor & Destructor Documentation

virtual ForIA::IDataLoader::~IDataLoader (  ) [inline, virtual]

Default destructor.

Definition at line 56 of file IDataLoader.hh.


Member Function Documentation

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

Parameters:
fileThe file name to open

Implemented in ForIA::D3PDDataLoader.

template<class T >
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

Parameters:
objectNamename of the object to retrieve

Definition at line 71 of file IDataLoader.hh.


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