Commit 7e1b3aab authored by Simon Spannagel's avatar Simon Spannagel
Browse files

ELEUDAQ2: also include data from main event

parent a68d5883
Pipeline #780360 passed with stages
in 11 minutes and 55 seconds
...@@ -43,14 +43,12 @@ std::shared_ptr<eudaq::StandardEvent> EventLoaderEUDAQ2::get_next_event() { ...@@ -43,14 +43,12 @@ std::shared_ptr<eudaq::StandardEvent> EventLoaderEUDAQ2::get_next_event() {
LOG(DEBUG) << "Reached EOF"; LOG(DEBUG) << "Reached EOF";
throw EndOfFile(); throw EndOfFile();
} }
// Build buffer from all sub-events:
events_ = new_event->GetSubEvents(); events_ = new_event->GetSubEvents();
// If there are no sub-events just add the one event we have to the list: // The main event might also contain data, so add it to the buffer:
if(events_.empty()) { events_.push_back(new_event);
events_.push_back(new_event);
}
// FIXME get TLu before Ni - sort by name, reversed // FIXME get TLU events with trigger IDs before Ni - sort by name, reversed
sort(events_.begin(), events_.end(), [](const eudaq::EventSPC& a, const eudaq::EventSPC& b) -> bool { sort(events_.begin(), events_.end(), [](const eudaq::EventSPC& a, const eudaq::EventSPC& b) -> bool {
return a->GetDescription() > b->GetDescription(); return a->GetDescription() > b->GetDescription();
}); });
...@@ -70,7 +68,7 @@ std::shared_ptr<eudaq::StandardEvent> EventLoaderEUDAQ2::get_next_event() { ...@@ -70,7 +68,7 @@ std::shared_ptr<eudaq::StandardEvent> EventLoaderEUDAQ2::get_next_event() {
EventLoaderEUDAQ2::EventPosition EventLoaderEUDAQ2::is_within_event(std::shared_ptr<Clipboard> clipboard, EventLoaderEUDAQ2::EventPosition EventLoaderEUDAQ2::is_within_event(std::shared_ptr<Clipboard> clipboard,
std::shared_ptr<eudaq::StandardEvent> evt) { std::shared_ptr<eudaq::StandardEvent> evt) {
// FIXME for checking if timestamp is availale // Check if this event has timestamps available:
if(evt->GetTimeBegin() == 0) { if(evt->GetTimeBegin() == 0) {
LOG(DEBUG) << "Event " << evt->GetDescription() << " has no timestamp, comparing trigger number"; LOG(DEBUG) << "Event " << evt->GetDescription() << " has no timestamp, comparing trigger number";
......
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