Commit 1059c657 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Allow printing of Event objects

parent 5505198e
Pipeline #1056556 passed with stages
in 17 minutes and 41 seconds
......@@ -54,6 +54,7 @@ ADD_LIBRARY(CorryvreckanObjects SHARED
Cluster.cpp
Track.cpp
KDTree.cpp
Event.cpp
${CMAKE_CURRENT_BINARY_DIR}/CorryvreckanObjectsDictionary.cxx.o
)
......
#include "Event.hpp"
using namespace corryvreckan;
void Event::print(std::ostream& out) const {
out << "Start: " << start() << std::endl;
out << "End: " << end();
if(!trigger_list_.empty()) {
out << std::endl << "Trigger list: ";
for(auto& trg : trigger_list_) {
out << std::endl << trg.first << ": " << trg.second;
}
}
}
......@@ -43,12 +43,18 @@ namespace corryvreckan {
std::map<uint32_t, double> triggerList() const { return trigger_list_; }
/**
* @brief Print an ASCII representation of Pixel to the given stream
* @param out Stream to print to
*/
void print(std::ostream& out) const override;
protected:
double end_;
std::map<uint32_t, double> trigger_list_{};
// ROOT I/O class definition - update version number when you change this class!
ClassDef(Event, 3)
ClassDefOverride(Event, 4)
};
} // namespace corryvreckan
......
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