11#include <framework/core/Module.h>
12#include <framework/datastore/DataStore.h>
48 void event()
override;
std::map< std::string, StoreEntry > StoreEntryMap
Map for StoreEntries.
void initialize() override
Prepare regex checks.
bool m_cacheValid
Whether the caches above have already been filled for this run.
void event() override
Prune datastore.
std::vector< std::string > m_keepEntriesImplicit
Branches to always keep because the are required by the framework to properly work with the datastore...
std::vector< const std::string * > m_entriesToKeep
Names of the DataStore entries which are kept, only used for debug output.
std::vector< std::regex > m_compiled_regex_implicit
Caching the regex expression for the keep check.
bool m_keepMatchedEntries
If true, all entries matched by the RegEx expression are kept.
PruneDataStoreModule()
Constructor.
virtual ~PruneDataStoreModule()=default
Virtual Constructor to prevent memory leaks.
std::vector< std::regex > m_compiled_regex
Caching the regex expression for the keep check.
std::vector< std::string > m_matchEntries
Storing the option of branches to keep.
void updateCache(DataStore::StoreEntryMap &storemap)
Evaluate the regular expressions for all entries of the given DataStore map and fill the m_entriesToP...
std::regex compileAndCatch(std::string ®exString) const
Compile a regex expression and catch the exception if the regex string is not valid.
std::vector< DataStore::StoreEntry * > m_entriesToPrune
DataStore entries which have to be pruned.
Abstract base class for different kinds of events.