8 #ifndef ROOTPERSISTENCESERVICE_H_ 9 #define ROOTPERSISTENCESERVICE_H_ 21 #include <unordered_map> 32 bool BookEventObject(
const std::string &objName,
const std::string &objStore)
override;
33 bool BookPassObject(
const std::string &objName,
const std::string &objStore)
override;
34 bool BookGlobalObject(
const std::string &objName,
const std::string &objStore)
override;
70 std::unique_ptr<PersistenceService>
Copy(
const std::string &name,
const std::string &output)
override;
103 : dataStoreName(storeName), dataStore(nullptr), outputBranch(nullptr), flag(true), object(nullptr),
104 defaultObject(nullptr), objClass(nullptr), prevObject(nullptr) {}
122 : dataStoreName(storeName), dataStore(nullptr), isGlob(false), isAlias(false), aliasToBeChecked(true),
123 nameForEvBranch(nullptr), saved(false) {}
bool BookEventObject(const std::string &objName, const std::string &objStore) override
Books an event object for persistence.
Definition: RootPersistenceService.cpp:52
bool aliasToBeChecked
Definition: RootPersistenceService.h:115
std::set< std::string > actualNames
Definition: RootPersistenceService.h:118
bool _EndOfEventForEventObject(const std::string &objName, EvObjInfo &objInfo)
Definition: RootPersistenceService.cpp:164
bool _SaveGlobalObject(const std::string &objName, GlobObjInfo &objInfo)
Definition: RootPersistenceService.cpp:332
bool BookPassObject(const std::string &objName, const std::string &objStore) override
Definition: RootPersistenceService.cpp:65
Definition: RootPersistenceService.h:110
std::vector< BookedObject > GetBookedGlobalObjects() override
Gets the list of booked global objects.
Definition: RootPersistenceService.cpp:91
Definition: PersistenceService.h:20
void * prevObject
Definition: RootPersistenceService.h:99
A smart pointer not owning the wrapped object.
Definition: ObserverPtr.h:28
observer_ptr< TTree > GetEventTree()
Getter method for the event tree.
Definition: RootPersistenceService.h:87
Base struct for Root output.
Definition: RootOutputStruct.h:24
std::string dataStoreName
Definition: RootPersistenceService.h:111
bool EndOfProcessing() override
Definition: RootPersistenceService.cpp:256
bool Connect() override
Definition: RootPersistenceService.cpp:27
observer_ptr< TFile > GetOutputFile()
Getter method for the output file.
Definition: RootPersistenceService.h:79
IncludeFileExc.h IncludeFileExc class declaration.
Definition: Algorithm.h:21
TBranch * nameForEvBranch
Definition: RootPersistenceService.h:116
TBranch * outputBranch
Definition: RootPersistenceService.h:95
EvObjectsBook _eventBook
Definition: RootPersistenceService.h:107
bool EndOfEvent() override
Save event objects on persistence medium.
Definition: RootPersistenceService.cpp:102
StorePtr dataStore
Definition: RootPersistenceService.h:94
bool BookGlobalObject(const std::string &objName, const std::string &objStore) override
Definition: RootPersistenceService.cpp:67
void * object
Definition: RootPersistenceService.h:96
bool isGlob
Definition: RootPersistenceService.h:113
std::string nameForThisEv
Definition: RootPersistenceService.h:117
std::string dataStoreName
Definition: RootPersistenceService.h:93
std::vector< BookedObject > GetBookedPassObjects() override
Gets the list of booked pass objects.
Definition: RootPersistenceService.cpp:89
bool BeginOfProcessing() override
Definition: RootPersistenceService.cpp:255
std::unique_ptr< PersistenceService > Copy(const std::string &name, const std::string &output) override
Copies the persistence service.
Definition: RootPersistenceService.cpp:370
bool BeginOfPass() override
Definition: RootPersistenceService.cpp:253
void * defaultObject
Definition: RootPersistenceService.h:97
TTree * _eventTree
Definition: RootPersistenceService.h:130
GlobObjInfo(const std::string &storeName)
Definition: RootPersistenceService.h:121
StorePtr dataStore
Definition: RootPersistenceService.h:112
bool flag
Definition: RootPersistenceService.h:100
EvObjInfo(const std::string &storeName)
Definition: RootPersistenceService.h:102
bool saved
Definition: RootPersistenceService.h:119
GlobObjectsBook _globalBook
Definition: RootPersistenceService.h:126
bool EndOfPass() override
Definition: RootPersistenceService.cpp:254
Definition: RootPersistenceService.h:92
bool _EndOfEventForGlobalObject(const std::string &objName, GlobObjInfo &objInfo)
Definition: RootPersistenceService.cpp:235
TClass * objClass
Definition: RootPersistenceService.h:98
TFile * _outputFile
Definition: RootPersistenceService.h:129
std::vector< BookedObject > GetBookedEventObjects() override
Gets the list of booked event objects.
Definition: RootPersistenceService.cpp:80
bool isAlias
Definition: RootPersistenceService.h:114
bool BeginOfEvent() override
Definition: RootPersistenceService.cpp:100
RootPersistenceService(const std::string &name, const std::string &output)
Definition: RootPersistenceService.cpp:24
bool Disconnect() override
Definition: RootPersistenceService.cpp:44
std::unordered_map< std::string, GlobObjInfo > GlobObjectsBook
Definition: RootPersistenceService.h:125
Definition: RootPersistenceService.h:25
std::unordered_map< std::string, EvObjInfo > EvObjectsBook
Definition: RootPersistenceService.h:106