EventAnalysis
1.3.0
|
#include <RootPersistenceService.h>
Classes | |
struct | EvObjInfo |
struct | GlobObjInfo |
struct | ObjInfo |
Public Member Functions | |
RootPersistenceService (const std::string &name, const std::string &output) | |
bool | Connect () override |
bool | Disconnect () override |
bool | BookEventObject (const std::string &objName, const std::string &objStore) override |
Books an event object for persistence. More... | |
bool | BookPassObject (const std::string &objName, const std::string &objStore) override |
bool | BookGlobalObject (const std::string &objName, const std::string &objStore) override |
std::vector< BookedObject > | GetBookedEventObjects () override |
Gets the list of booked event objects. More... | |
std::vector< BookedObject > | GetBookedPassObjects () override |
Gets the list of booked pass objects. More... | |
std::vector< BookedObject > | GetBookedGlobalObjects () override |
Gets the list of booked global objects. More... | |
bool | BeginOfEvent () override |
bool | EndOfEvent () override |
Save event objects on persistence medium. More... | |
bool | BeginOfPass () override |
bool | EndOfPass () override |
bool | BeginOfProcessing () override |
bool | EndOfProcessing () override |
std::unique_ptr< PersistenceService > | Copy (const std::string &name, const std::string &output) override |
Copies the persistence service. More... | |
![]() | |
PersistenceService (const std::string &name, const std::string &output) | |
virtual | ~PersistenceService () |
const std::string & | GetOutput () |
![]() | |
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... | |
![]() | |
DataStoreUser () | |
virtual | ~DataStoreUser () |
Destructor. More... | |
virtual bool | SetDataStoreManager (observer_ptr< DataStoreManager > dsManager) |
Injector for dependency on DataStoreManager. More... | |
observer_ptr< DataStoreManager > | GetDataStoreManager () |
Getter for the Data store manager. More... | |
![]() | |
ObjectConsumer () | |
Constructor. More... | |
void | DeclareConsumedObject (std::string name, ObjectCategory category, std::string store, bool optional=false) |
Declare a consumed objects. More... | |
void | DeclareAlternative (const std::string &name, ObjectCategory category, std::string store, const std::string &alternativeName, ObjectCategory alternativeCategory, std::string alternativeStore) |
Declares two already declared objects as alternatives. More... | |
const ConsumedObjects & | GetConsumedObjects () const |
Getter method for consumed objects. More... | |
Protected Member Functions | |
observer_ptr< TFile > | GetOutputFile () |
Getter method for the output file. More... | |
observer_ptr< TTree > | GetEventTree () |
Getter method for the event tree. More... | |
![]() | |
Info (const std::shared_ptr< Representation > &impl) | |
std::shared_ptr< Representation > & | GetRepresentation () |
![]() | |
template<typename T > | |
bool | DefineParameter (const std::string &name, T &variable) |
Set a parameter. More... | |
Configurable (const std::shared_ptr< Representation > &impl) | |
std::shared_ptr< Representation > & | GetRepresentation () |
![]() | |
DataStoreUser (const std::shared_ptr< Representation > &impl) | |
std::shared_ptr< Representation > & | GetRepresentation () |
![]() | |
ObjectConsumer (const std::shared_ptr< Representation > &impl) | |
std::shared_ptr< Representation > & | GetRepresentation () |
Private Types | |
using | EvObjectsBook = std::unordered_map< std::string, EvObjInfo > |
using | GlobObjectsBook = std::unordered_map< std::string, GlobObjInfo > |
Private Member Functions | |
bool | BookEventObjectImpl (const std::string &objName, const std::string &objStore, EvObjectsBook &book) |
bool | BookGlobalObjectImpl (const std::string &objName, const std::string &objStore, GlobObjectsBook &book) |
template<typename T > | |
bool | _ResolveGlobAndBook (std::unordered_map< std::string, T > &objBook, ObjectCategory objCategory) |
bool | _EndOfEventForEventObject (const std::string &objName, EvObjInfo &objInfo) |
bool | _EndOfEventForGlobalObject (const std::string &objName, GlobObjInfo &objInfo) |
bool | _SaveGlobalObject (const std::string &objName, GlobObjInfo &objInfo) |
Private Attributes | |
EvObjectsBook | _eventBook |
EvObjectsBook | _newEventAliasesBook |
GlobObjectsBook | _globalBook |
GlobObjectsBook | _newGlobalAliasesBook |
TFile * | _outputFile |
TTree * | _eventTree |
Additional Inherited Members | |
![]() | |
using | ConsumedObjects = std::vector< ConsumedObject > |
Type for container of produced objects. More... | |
|
private |
|
private |
EA::RootPersistenceService::RootPersistenceService | ( | const std::string & | name, |
const std::string & | output | ||
) |
|
private |
|
private |
|
private |
|
private |
|
overridevirtual |
Reimplemented from EA::PersistenceService.
|
overridevirtual |
Reimplemented from EA::PersistenceService.
|
overridevirtual |
Reimplemented from EA::PersistenceService.
|
overridevirtual |
Books an event object for persistence.
The given object from the given event data store will be saved in the persistence medium at the end of each event. The object can be booked even if it or its data store do not exist yet. The actual check about the existence of the given object in the given store is done at the end of the event.
objName | The name of the object. |
objStore | The name of the event store containing the object. |
Reimplemented from EA::PersistenceService.
|
private |
|
overridevirtual |
Reimplemented from EA::PersistenceService.
|
private |
|
overridevirtual |
Reimplemented from EA::PersistenceService.
|
overridevirtual |
Reimplemented from EA::PersistenceService.
|
overridevirtual |
Copies the persistence service.
The copy will have the same booked objects as the original service.
Returns a pointer to a copy of the persistence service.
name | The name of the copied service. |
output | The output of the copied service. |
Reimplemented from EA::PersistenceService.
|
overridevirtual |
Reimplemented from EA::PersistenceService.
|
overridevirtual |
Save event objects on persistence medium.
This method transfers all the booked event objects to the persistence medium. It fails if an object does not exist in its data store, or if the data store supposed to contain such an object does not exist.
Reimplemented from EA::PersistenceService.
|
overridevirtual |
Reimplemented from EA::PersistenceService.
|
overridevirtual |
Reimplemented from EA::PersistenceService.
|
overridevirtual |
Gets the list of booked event objects.
Reimplemented from EA::PersistenceService.
|
overridevirtual |
Gets the list of booked global objects.
Reimplemented from EA::PersistenceService.
|
overridevirtual |
Gets the list of booked pass objects.
Reimplemented from EA::PersistenceService.
|
inlineprotected |
Getter method for the event tree.
Derived classes can use this method to get access to the output event tree.
|
inlineprotected |
Getter method for the output file.
Derived classes can use this method to get access to the output file.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |