|
| RootDataProviderV0 (const std::string &name, const std::string &dataSource) |
| Constructor. More...
|
|
bool | Connect () override |
| Connects to the input file(s). More...
|
|
bool | Disconnect () override |
| Closes the input file(s). More...
|
|
RetrievalResult | GetObject (const std::string &name, ObjectCategory category, ObjectWrapper &wrapper, std::string &actualName) override |
| Get the requested data object for current event. More...
|
|
bool | SetCurrentEvent (unsigned int event, std::vector< std::string > ¬ValidGlobalObjects) override |
| Set the current event. More...
|
|
bool | IsEventAvailable (unsigned int event) |
| Checks if the data provider can provide the given event. More...
|
|
virtual std::vector< std::string > | FreeObjects (const std::vector< std::string > &objs, Memory::Status memStatus) override |
| Free the memory for given objects. More...
|
|
| DataProvider (const std::string &name, const std::string &dataSource) |
| Constructor. More...
|
|
virtual | ~DataProvider ()=default |
| Destructor. More...
|
|
const std::string & | GetDataSource () |
| Getter for data source string. More...
|
|
bool | IsDisabled () |
| Check if the data provider is disabled. More...
|
|
bool | SetDisabled (bool disabled=true) |
| Disables/enables the data provider. More...
|
|
RetrievalResult | RetrieveObject (const std::string &name, ObjectCategory category, ObjectWrapper &wrapper, std::string &actualName) |
| Retrieve the requested data object for current event. More...
|
|
bool | ConnectSource () |
| Opens the connection to the data source. More...
|
|
bool | DisconnectSource () |
| Closes the connection to the data source. More...
|
|
bool | SetEvent (unsigned int event, std::vector< std::string > ¬ValidGlobalObjects) |
| Set the current event. More...
|
|
bool | SetPass (unsigned int pass, unsigned int iteration) |
| Set the current processing pass. More...
|
|
| Info (const std::string &name) |
| Constructor. More...
|
|
virtual | ~Info () |
| Destructor. More...
|
|
virtual const std::string | GetType () const |
|
virtual const std::string | GetName () const |
| The type (i.e. class) of the object. More...
|
|
virtual const std::string | GetVersion () const |
| The name of the object. More...
|
|
| Configurable () |
| Constructor. More...
|
|
template<typename T > |
bool | SetParameter (const std::string &name, const T &value) |
| Set the value of a parameter. More...
|
|
bool | SetParameter (const std::string &name, const char *value) |
| Set the value of a string parameter using a string literal. More...
|
|
std::vector< std::string > | GetParameters () |
| Get the names of the parameters. More...
|
|
| ObjectProducer () |
| Constructor. More...
|
|
virtual | ~ObjectProducer () |
| Destructor. More...
|
|
template<typename C > |
void | DeclareProducedObject (std::string name, ObjectCategory category, C aliases, std::string store) |
| Declare a produced objects. More...
|
|
const ProducedObjects & | GetProducedObjects () const |
| Getter method for produced objects. More...
|
|
bool | SetDisabled (bool disabled=true) |
| Disables/enables the producer. More...
|
|
template<> |
void | DeclareProducedObject (std::string name, ObjectCategory category, const char *alias, std::string store) |
|
Data provider for Root file written by legacy RootPersistenceService.
This data provider reads event, pass and global objects from a Root file produced by the legacy RootPersistenceService found in EventAnalysis versions up to 1.1.
The code for this class is a copy-paste of the RootDataProvider class as found in commit 776c601e (version 1.1.0) and renamed to RootDataProviderV0 for coexisting with the current version of RootDataProvider.
Get the requested data object for current event.
Overrides of this method implements the actual retrieval of a data object from the provider's data source.
The possible return values are:
In case of RetrievalResult::SUCCESS, the requested object must be returned to the caller by means of the wrapper
parameter; if the implementation recognizes the name
of the requested parameter as an alias then it must return the actual object name by setting the actualName
parameter. In any other case wrapper
must be set equal to nullptr and actualName
to "".
- Parameters
-
name | The name of the object. |
category | The category of the object to be retrieved (ObjectCategory::EVENT, ObjectCategory::PASS or ObjectCategory::GLOBAL). |
wrapper | Return wrapper for the desired object (wraps nothing if the object is non-existent or not available for the current event). |
actualName | the actual object name, in case name has been recognized as an alias. |
- Returns
- the outcome of the retrieve operation.
Reimplemented from EA::DataProvider.
bool EA::RootDataProviderV0::SetCurrentEvent |
( |
unsigned int |
event, |
|
|
std::vector< std::string > & |
notValidGlobalObjects |
|
) |
| |
|
overridevirtual |
Set the current event.
Overrides of this method implements the setting of the current event.
This method will be called to communicate to the data provider the number of the current event. Subsequent calls to the GetObject method must load the data objects for the given event. In case the requested event is not available (e.g. there are less events than required) then the returned value must be false.
A list of global objects that were already provided by the provider in previous events, and that will need to be provided again for the current event, must be returned to the caller by filling the notValidGlobalObjects
vector parameter.
- Parameters
-
event | The number of the current event. |
notValidGlobalObjects | A list of global objects which are no longer valid and will need to be re-provided for the current event. |
- Returns
- true if the requested event is available, false otherwise.
Reimplemented from EA::DataProvider.