Commit 2db57520 authored by Lennart Huth's avatar Lennart Huth
Browse files

converting skip_time only once to ps

parent ac0a2290
......@@ -31,8 +31,7 @@ EventDefinitionM26::EventDefinitionM26(Configuration& config, std::vector<std::s
timeshift_ = config_.get<double>("time_shift");
shift_triggers_ = config_.get<int>("shift_triggers");
skip_time_ = config_.get<double>("skip_time");
config_.setDefault<std::string>("eudaq_loglevel", "ERROR");
skip_time_ps_ = Units::convert(skip_time_, "ps") config_.setDefault<std::string>("eudaq_loglevel", "ERROR");
// Set EUDAQ log level to desired value:
EUDAQ_LOG_LEVEL(config_.get<std::string>("eudaq_loglevel"));
......@@ -129,7 +128,7 @@ unsigned EventDefinitionM26::get_next_event_with_det(const eudaq::FileReaderUP&
LOG(DEBUG) << "Pivot magic, begin: " << Units::display(begin, {"ns", "us", "ms"})
<< ", end: " << Units::display(end, {"ns", "us", "ms"})
<< ", duration = " << Units::display(begin + end, {"ns", "us"});
} else if(det == "tlu" && begin < Units::convert(skip_time_, "ps")) {
} else if(det == "tlu" && begin < skip_time_ps_) {
LOG(TRACE) << "Event time below skip time: " << Units::display(begin, {"ns", "us", "ms", "s"}) << "vs. "
<< Units::display(skip_time_, {"ns", "us", "ms", "s"});
......
......@@ -53,7 +53,7 @@ namespace corryvreckan {
long double timeshift_{};
int shift_triggers_{};
double skip_time_{};
double skip_time_ps_{};
// EUDAQ2 readers for all required files
eudaq::FileReaderUP readerTime_;
eudaq::FileReaderUP readerDuration_;
......
Supports Markdown
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