6 #ifndef H_POTTU_LOGICAL_EVENT_SORTER
7 #define H_POTTU_LOGICAL_EVENT_SORTER
12 #include "SharedResourcePool.hpp"
37 template <
class Ev,
class Tr,
class D>
58 LogicalEventSorter(
const std::string &name,
int triggerDeadTime,
int eventDelay,
int maxEventLength )
60 _eventCollector( static_cast<D &>(*this), _triggerer, triggerDeadTime, eventDelay, maxEventLength )
68 void process( std::vector<DetectorEvent> &data ) noexcept {
71 auto proci =
_ctxh->processInstance();
77 _eventCollector.
feed( data );
104 return _logicalEventPool.get();
Handle to context used by specific class.
Definition: ContextBase.hpp:188
void feed(const Cont &data) noexcept
Use this to feed detector event to this machine.
Definition: LogicalEventCollector.hpp:70
Convenience base class for user sort classes.
Definition: LogicalEventSorter.hpp:38
LogicalEventSorter(const std::string &name, int triggerDeadTime, int eventDelay, int maxEventLength)
Constructor.
Definition: LogicalEventSorter.hpp:58
ContextHandle * context() noexcept
Returns pointer to the ContextHandle.
Definition: LogicalEventSorter.hpp:114
int64_t getEventDelay() const
Returns the event delay.
Definition: LogicalEventSorter.hpp:89
logical_event_handle_t getNewEvent() noexcept
Returns new logical event.
Definition: LogicalEventSorter.hpp:103
int64_t getTriggerDeadtime() const
Returns the trigger dead time.
Definition: LogicalEventSorter.hpp:95
int64_t getEventMaxLength() const
Returns the maximum event length.
Definition: LogicalEventSorter.hpp:83
void process(std::vector< DetectorEvent > &data) noexcept
Feeds data to object buffers. Tests for triggers.
Definition: LogicalEventSorter.hpp:68
ContextHandle * _ctxh
Handle for the context.
Definition: LogicalEventSorter.hpp:117
Handle for a resource derived from SharedResource.
Definition: memory.hpp:43
Pool for SharedResource derived objects.
Definition: SharedResourcePool.hpp:37
Abstract baseclass for all stages which uses or modifies detector events.
Definition: StageDetectorEvent.hpp:20
Definition: mainpage.dox:6
Default context for printing and collecting statistics.
Definition: ContextBase.hpp:41