EventAnalysis  1.0.0
DataStoreManager.h
Go to the documentation of this file.
1 /*
2  * DataStoreManager.h
3  *
4  * Created on: 21 Mar 2017
5  * Author: Nicola Mori
6  */
7 
10 #ifndef DATASTOREMANAGER_H_
11 #define DATASTOREMANAGER_H_
12 
13 #include "core/ObserverPtr.h"
14 #include "data/DataStore.h"
15 
16 #include <list>
17 
18 namespace EA {
19 
20 // Smart pointer type used for return values
25 
32 
33 public:
43  bool CreateGlobalDataStore(const std::string &name);
44 
54  bool CreatePassDataStore(const std::string &name);
55 
65  bool CreateEventDataStore(const std::string &name);
66 
77  GlobalStorePtr GetGlobalDataStore(const std::string &name);
78 
89  PassStorePtr GetPassDataStore(const std::string &name);
90 
101  EventStorePtr GetEventDataStore(const std::string &name);
102 
104  using GlobalStores = std::list<GlobalDataStore>;
106  using PassStores = std::list<PassDataStore>;
108  using EventStores = std::list<EventDataStore>;
109 
115 
121 
127 
132  bool CleanPassDataStores();
133 
138  bool CleanEventDataStores();
139 
144  bool CleanGlobalAliases();
145 
153  void TrackRemovedObjects(bool track = true);
154 
165  bool FreeRemoved(Memory::Status memStatus);
166 
173  bool SetAlgoProducedObjects(const AlgoSequence &seq);
174 
175 private:
179 };
180 
181 } // namespace EA
182 
183 #endif /* DATASTOREMANAGER_H_ */
bool CleanEventDataStores()
Clean all the event data stores.
Definition: DataStoreManager.cpp:72
Manager class for data stores.
Definition: DataStoreManager.h:31
void TrackRemovedObjects(bool track=true)
Enables the tracking of removed objects.
Definition: DataStoreManager.cpp:88
bool FreeRemoved(Memory::Status memStatus)
Release the memory allocated for removed objects in all the event data stores.
Definition: DataStoreManager.cpp:94
observer_ptr< PassDataStore > PassStorePtr
Definition: DataStoreManager.h:23
Algorithm made by multiple basic algorithms.
Definition: AlgoSequence.h:37
PassStorePtr GetPassDataStore(const std::string &name)
Retrieves a pass data store.
Definition: DataStoreManager.cpp:48
IncludeFileExc.h IncludeFileExc class declaration.
Definition: Algorithm.h:21
GlobalStores _globalStores
Definition: DataStoreManager.h:176
bool CreatePassDataStore(const std::string &name)
Creates a pass data store.
Definition: DataStoreManager.cpp:22
observer_ptr< DataStore > StorePtr
Definition: DataStoreManager.h:21
std::list< EventDataStore > EventStores
Type of container for event stores.
Definition: DataStoreManager.h:108
std::list< GlobalDataStore > GlobalStores
Type of container for global stores.
Definition: DataStoreManager.h:104
PassStores _passStores
Definition: DataStoreManager.h:177
PassStores & GetPassDataStores()
Retrieves all the pass stores.
Definition: DataStoreManager.h:120
bool CreateEventDataStore(const std::string &name)
Creates an event data store.
Definition: DataStoreManager.cpp:31
EventStores & GetEventDataStores()
Retrieves all the event stores.
Definition: DataStoreManager.h:126
bool CleanGlobalAliases()
Removes the aliases on all the global stores.
Definition: DataStoreManager.cpp:80
bool CreateGlobalDataStore(const std::string &name)
Creates a global data store.
Definition: DataStoreManager.cpp:13
observer_ptr< EventDataStore > EventStorePtr
Definition: DataStoreManager.h:24
EventStores _eventStores
Definition: DataStoreManager.h:178
Status
Aliases for memory occupation levels.
Definition: Memory.h:23
GlobalStores & GetGlobalDataStores()
Retrieves all the global stores.
Definition: DataStoreManager.h:114
std::list< PassDataStore > PassStores
Type of container for pass stores.
Definition: DataStoreManager.h:106
bool CleanPassDataStores()
Clean all the pass data stores.
Definition: DataStoreManager.cpp:64
EventStorePtr GetEventDataStore(const std::string &name)
Retrieves an event data store.
Definition: DataStoreManager.cpp:56
GlobalStorePtr GetGlobalDataStore(const std::string &name)
Retrieves a global data store.
Definition: DataStoreManager.cpp:40
bool SetAlgoProducedObjects(const AlgoSequence &seq)
Sets the objects produced by the algorithms for all the data stores.
Definition: DataStoreManager.cpp:103
observer_ptr< GlobalDataStore > GlobalStorePtr
Definition: DataStoreManager.h:22