Commit b241d9d8 authored by Jens Kroeger's avatar Jens Kroeger
Browse files

EventLoaderEUDAQ2: recovering the const on get_pixel_data() and moving the m_hits counter elsewhere

parent d94dd516
......@@ -305,7 +305,8 @@ Event::Position EventLoaderEUDAQ2::is_within_event(std::shared_ptr<Clipboard> cl
return position;
}
std::shared_ptr<PixelVector> EventLoaderEUDAQ2::get_pixel_data(std::shared_ptr<eudaq::StandardEvent> evt, int plane_id) {
std::shared_ptr<PixelVector> EventLoaderEUDAQ2::get_pixel_data(std::shared_ptr<eudaq::StandardEvent> evt,
int plane_id) const {
auto pixels = std::make_shared<PixelVector>();
......@@ -352,7 +353,6 @@ std::shared_ptr<PixelVector> EventLoaderEUDAQ2::get_pixel_data(std::shared_ptr<e
hPixelRawValues->Fill(raw);
pixels->push_back(pixel);
m_hits++;
}
hPixelMultiplicity->Fill(static_cast<int>(pixels->size()));
LOG(DEBUG) << m_detector->name() << ": Plane contains " << pixels->size() << " pixels";
......@@ -443,6 +443,7 @@ StatusCode EventLoaderEUDAQ2::run(std::shared_ptr<Clipboard> clipboard) {
LOG(DEBUG) << "Is within current Corryvreckan event, storing data";
// Store data on the clipboard
auto new_pixels = get_pixel_data(event_, plane_id);
m_hits += new_pixels->size();
pixels->insert(pixels->end(), new_pixels->begin(), new_pixels->end());
}
......
......@@ -91,7 +91,7 @@ namespace corryvreckan {
* @param plane_id ID of the EUDAQ2 StandardEvent plane to be read and stored
* @return Vector of pointers to pixels read from this event
*/
std::shared_ptr<PixelVector> get_pixel_data(std::shared_ptr<eudaq::StandardEvent> evt, int plane_id);
std::shared_ptr<PixelVector> get_pixel_data(std::shared_ptr<eudaq::StandardEvent> evt, int plane_id) const;
/**
* @brief Filter the incoming EUDAQ2 events for the correct detector and detector type
......@@ -111,7 +111,7 @@ namespace corryvreckan {
Matrix<std::string> m_adjust_event_times;
int m_buffer_depth;
int m_hits = 0;
size_t m_hits = 0;
// EUDAQ file reader instance to retrieve data from
eudaq::FileReaderUP reader_;
......
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