7#ifndef FRAMEWORK_STORAGECONTROL_H_
8#define FRAMEWORK_STORAGECONTROL_H_
69 void addHint(
const std::string& processor_name,
Hint hint,
70 const std::string& purposeString);
81 void addRule(
const std::string& processor_pat,
82 const std::string& purpose_pat);
100 bool keepEvent(
bool event_completed)
const;
127 std::vector<std::pair<std::regex, std::regex>>
rules_;
134 StorageControl::Hint::ShouldKeep;
140 StorageControl::Hint::ShouldDrop;
Class which encapsulates storage control functionality, used by the Process class.
void setDefaultKeep(bool keep)
Set the default state.
void addHint(const std::string &processor_name, Hint hint, const std::string &purposeString)
Add a storage hint for a given processor.
std::vector< std::pair< std::regex, std::regex > > rules_
Collection of rules allowing certain processors or purposes to be considered ("listened to") during t...
bool keepEvent(bool event_completed) const
Determine if the current event should be kept, based on the defined rules.
std::vector< Hint > hints_
Collection of hints from the event processors.
void addRule(const std::string &processor_pat, const std::string &purpose_pat)
Add a listening rule.
bool defaultIsKeep_
Default state for storage control.
void resetEventState()
Reset the event-by-event state.
Hint
Hints that can be provided by processors to the storage controller.
All classes in the ldmx-sw project use this namespace.
constexpr StorageControl::Hint hint_shouldKeep
storage control hint alias for backwards compatibility
constexpr StorageControl::Hint hint_shouldDrop
storage control hint alias for backwards compatibility