Convenience base class for user sort classes.
More...
#include <LogicalEventSorter.hpp>
template<class Ev, class Tr, class D>
class pottu::LogicalEventSorter< Ev, Tr, D >
Convenience base class for user sort classes.
- Deprecated:
- . Please use LogicalEventSorterBase instead.
This base class implements process() method which calls LogicalEventCollector which then calls the methods onTimeOrderError() and constructAndProcessLogicalEvent() of the user class.
- Template Parameters
-
| Ev | Logical event class. Must be derived from SharedResource and implement clear() method. The clear should initiate an instance so that it can be used again. |
| Tr | Trigger class. Should implement methods feed() and reset(). Trigger can have internal state. One instance of this class will be created by LogicalEventSorter. |
| D | The inherited user class. This type is required to call the beforementioned user class methods on time order error and on event creation. |
◆ LogicalEventSorter()
template<class Ev , class Tr , class D >
Constructor.
- Parameters
-
| name | Name for the instance handle to the context. This is used in prosessing stage statistics. |
| triggerDeadTime | Time [tics] after trigger a new trigger is not allowed. |
| eventDelay | Time [tics] after trigger the event will be started. Can be also negative to collect detector event before a trigger. |
| maxEventLength | Maximum length of the collected event [tics] from triggertime + eventDelay. |
◆ context()
template<class Ev , class Tr , class D >
Returns pointer to the ContextHandle.
Typically this is used to print some log messages by calling
context->logInfo(
"Something happened");
ContextHandle * context() noexcept
Returns pointer to the ContextHandle.
Definition: LogicalEventSorter.hpp:114
◆ getEventDelay()
template<class Ev , class Tr , class D >
Returns the event delay.
- Returns
- The event delay.
◆ getEventMaxLength()
template<class Ev , class Tr , class D >
Returns the maximum event length.
- Returns
- The maximum event length
◆ getNewEvent()
template<class Ev , class Tr , class D >
Returns new logical event.
The returned event is allocated or recycled and clear() has been called for it.
◆ getTriggerDeadtime()
template<class Ev , class Tr , class D >
Returns the trigger dead time.
- Returns
- The trigger dead time
◆ process()
template<class Ev , class Tr , class D >
Feeds data to object buffers. Tests for triggers.
- Parameters
-
| data | Detector events to be fed into the buffers. |
Implements pottu::StageDetectorEvent.
The documentation for this class was generated from the following file: