Belle II Software light-2406-ragdoll
|
Encapsulates DataStoreContents, but allows transparently switching between different versions ('DataStore IDs'). More...
Public Member Functions | |
void | clear () |
same as calling reset() for all durabilities + all non-default datastore IDs are removed. | |
void | reset (EDurability durability) |
Frees memory occupied by data store items and removes all objects from the map. | |
void | invalidateData (EDurability durability) |
Clears all registered StoreEntry objects of a specified durability, invalidating all objects. | |
const StoreEntryMap & | operator[] (int durability) const |
Get StoreEntry map for given durability (and current DataStore ID). | |
StoreEntryMap & | operator[] (int durability) |
Get StoreEntry map for given durability (and current DataStore ID). | |
void | switchID (const std::string &id) |
switch to DataStore with given ID. | |
const std::string & | currentID () const |
returns ID of current DataStore. | |
void | copyEntriesTo (const std::string &id, const std::vector< std::string > &entrylist_event={}, bool mergeEntries=false) |
copy entries (not contents) of current DataStore to the DataStore with given ID. | |
void | copyContentsTo (const std::string &id, const std::vector< std::string > &entrylist_event={}) |
copy contents (actual array / object contents) of current DataStore to the DataStore with given ID. | |
void | mergeContentsTo (const std::string &id, const std::vector< std::string > &entrylist_event={}) |
merge contents (actual array / object contents) of current DataStore to the DataStore with given ID. | |
void | createNewDataStoreID (const std::string &id) |
creates new datastore with given id, copying the registered objects/arrays from the current one. | |
void | createEmptyDataStoreID (const std::string &id) |
creates empty datastore with given id. | |
Private Attributes | |
std::vector< DataStoreContents > | m_entries |
wrapped DataStoreContents. | |
std::map< std::string, int > | m_idToIndexMap |
Maps DataStore ID to index in m_entries. | |
std::string | m_currentID = "" |
currently active DataStore ID. | |
int | m_currentIdx = 0 |
index of currently active DataStore. | |
Encapsulates DataStoreContents, but allows transparently switching between different versions ('DataStore IDs').
Accessed only through operator[].
Definition at line 581 of file DataStore.h.
Definition at line 821 of file DataStore.cc.
void clear | ( | ) |
same as calling reset() for all durabilities + all non-default datastore IDs are removed.
Definition at line 1154 of file DataStore.cc.
void copyContentsTo | ( | const std::string & | id, |
const std::vector< std::string > & | entrylist_event = {} |
||
) |
copy contents (actual array / object contents) of current DataStore to the DataStore with given ID.
Definition at line 946 of file DataStore.cc.
void copyEntriesTo | ( | const std::string & | id, |
const std::vector< std::string > & | entrylist_event = {} , |
||
bool | mergeEntries = false |
||
) |
copy entries (not contents) of current DataStore to the DataStore with given ID.
Definition at line 850 of file DataStore.cc.
void createEmptyDataStoreID | ( | const std::string & | id | ) |
creates empty datastore with given id.
Definition at line 838 of file DataStore.cc.
void createNewDataStoreID | ( | const std::string & | id | ) |
creates new datastore with given id, copying the registered objects/arrays from the current one.
Definition at line 827 of file DataStore.cc.
|
inline |
void invalidateData | ( | EDurability | durability | ) |
Clears all registered StoreEntry objects of a specified durability, invalidating all objects.
Definition at line 1177 of file DataStore.cc.
void mergeContentsTo | ( | const std::string & | id, |
const std::vector< std::string > & | entrylist_event = {} |
||
) |
merge contents (actual array / object contents) of current DataStore to the DataStore with given ID.
Definition at line 987 of file DataStore.cc.
|
inline |
Get StoreEntry map for given durability (and current DataStore ID).
Definition at line 593 of file DataStore.h.
|
inline |
Get StoreEntry map for given durability (and current DataStore ID).
Definition at line 591 of file DataStore.h.
void reset | ( | EDurability | durability | ) |
Frees memory occupied by data store items and removes all objects from the map.
Definition at line 1167 of file DataStore.cc.
void switchID | ( | const std::string & | id | ) |
switch to DataStore with given ID.
Definition at line 1144 of file DataStore.cc.
|
private |
currently active DataStore ID.
Definition at line 617 of file DataStore.h.
|
private |
index of currently active DataStore.
Definition at line 618 of file DataStore.h.
|
private |
wrapped DataStoreContents.
Definition at line 615 of file DataStore.h.
|
private |
Maps DataStore ID to index in m_entries.
Definition at line 616 of file DataStore.h.