Commit d1bf2115 authored by Lennart Huth's avatar Lennart Huth
Browse files

defining frame length during init

parent 90d54d2a
......@@ -11,7 +11,6 @@
#include "EventDefinitionM26.h"
using namespace corryvreckan;
const double EventDefinitionM26::framelength_ = Units::get(115.2, "us");
EventDefinitionM26::EventDefinitionM26(Configuration& config, std::vector<std::shared_ptr<Detector>> detectors)
: Module(config, std::move(detectors)) {
......@@ -73,6 +72,9 @@ EventDefinitionM26::EventDefinitionM26(Configuration& config, std::vector<std::s
if(shift_triggers_ < 0) {
throw InvalidValueError(config_, "shift_triggers", "Trigger shift needs to be positive (or zero).");
}
// define the framelength once, since unit conversions are slow
framelength_ = Units::get(115.2, "us");
;
}
void EventDefinitionM26::initialize() {
......
......@@ -86,7 +86,7 @@ namespace corryvreckan {
unsigned triggerTLU_{}, triggerM26_{};
long double time_prev_{}, trig_prev_{}, time_trig_start_{}, time_trig_stop_{}, time_before_{}, time_after_{};
long double time_trig_stop_prev_{};
double framelength_{};
/**
* @brief get_next_event_with_det
* @param filereader: eudaq::FileReader
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment