Commit 71459059 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Modules: use const reference to clipboard also in run function

parent cc96d94f
Pipeline #1623797 passed with stages
in 21 minutes and 26 seconds
......@@ -114,7 +114,7 @@ namespace corryvreckan {
*
* Does nothing if not overloaded.
*/
virtual StatusCode run(std::shared_ptr<Clipboard>) { return StatusCode::Success; }
virtual StatusCode run(const std::shared_ptr<Clipboard>&) { return StatusCode::Success; }
/**
* @brief Finalise the module after the event sequence
......
......@@ -56,7 +56,7 @@ void AlignmentDUTResidual::initialize() {
profile_dX_Y = new TProfile("profile_dX_Y", title.c_str(), 1000, -500, 500);
}
StatusCode AlignmentDUTResidual::run(std::shared_ptr<Clipboard> clipboard) {
StatusCode AlignmentDUTResidual::run(const std::shared_ptr<Clipboard>& clipboard) {
// Get the tracks
auto tracks = clipboard->getData<Track>();
......
......@@ -41,7 +41,7 @@ namespace corryvreckan {
/**
* @brief [Run the function of this module]
*/
StatusCode run(std::shared_ptr<Clipboard> clipboard) override;
StatusCode run(const std::shared_ptr<Clipboard>& clipboard) override;
/**
* @brief [Finalise module]
......
......@@ -76,7 +76,7 @@ void AlignmentMillepede::initialize() {
}
// During run, just pick up tracks and save them till the end
StatusCode AlignmentMillepede::run(std::shared_ptr<Clipboard> clipboard) {
StatusCode AlignmentMillepede::run(const std::shared_ptr<Clipboard>& clipboard) {
// Get the tracks
auto tracks = clipboard->getData<Track>();
......
......@@ -32,7 +32,7 @@ namespace corryvreckan {
void initialize() override;
void finalize(const std::shared_ptr<ReadonlyClipboard>& clipboard) override;
StatusCode run(std::shared_ptr<Clipboard> clipboard) override;
StatusCode run(const std::shared_ptr<Clipboard>& clipboard) override;
virtual void updateGeometry();
......
......@@ -40,7 +40,7 @@ AlignmentTrackChi2::AlignmentTrackChi2(Configuration config, std::vector<std::sh
}
// During run, just pick up tracks and save them till the end
StatusCode AlignmentTrackChi2::run(std::shared_ptr<Clipboard> clipboard) {
StatusCode AlignmentTrackChi2::run(const std::shared_ptr<Clipboard>& clipboard) {
// Get the tracks
auto tracks = clipboard->getData<Track>();
......
......@@ -35,7 +35,7 @@ namespace corryvreckan {
~AlignmentTrackChi2() {}
// Functions
StatusCode run(std::shared_ptr<Clipboard> clipboard) override;
StatusCode run(const std::shared_ptr<Clipboard>& clipboard) override;
void finalize(const std::shared_ptr<ReadonlyClipboard>& clipboard) override;
private:
......
......@@ -310,7 +310,7 @@ void AnalysisDUT::initialize() {
10);
}
StatusCode AnalysisDUT::run(std::shared_ptr<Clipboard> clipboard) {
StatusCode AnalysisDUT::run(const std::shared_ptr<Clipboard>& clipboard) {
// Get the telescope tracks from the clipboard
auto tracks = clipboard->getData<Track>();
......
......@@ -30,7 +30,7 @@ namespace corryvreckan {
// Functions
void initialize() override;
StatusCode run(std::shared_ptr<Clipboard> clipboard) override;
StatusCode run(const std::shared_ptr<Clipboard>& clipboard) override;
void finalize(const std::shared_ptr<ReadonlyClipboard>& clipboard) override;
private:
......
......@@ -176,7 +176,7 @@ void AnalysisEfficiency::initialize() {
prev_hit_ts.assign(nCols, v_row); // use vector v_row to construct matrix
}
StatusCode AnalysisEfficiency::run(std::shared_ptr<Clipboard> clipboard) {
StatusCode AnalysisEfficiency::run(const std::shared_ptr<Clipboard>& clipboard) {
// Get the telescope tracks from the clipboard
auto tracks = clipboard->getData<Track>();
......
......@@ -37,7 +37,7 @@ namespace corryvreckan {
*/
AnalysisEfficiency(Configuration config, std::shared_ptr<Detector> detector);
void initialize() override;
StatusCode run(std::shared_ptr<Clipboard> clipboard) override;
StatusCode run(const std::shared_ptr<Clipboard>& clipboard) override;
void finalize(const std::shared_ptr<ReadonlyClipboard>& clipboard) override;
private:
......
......@@ -52,7 +52,7 @@ void AnalysisPowerPulsing::initialize() {
v_minTime.clear();
}
StatusCode AnalysisPowerPulsing::run(std::shared_ptr<Clipboard> clipboard) {
StatusCode AnalysisPowerPulsing::run(const std::shared_ptr<Clipboard>& clipboard) {
LOG(TRACE) << "Power on time: " << static_cast<double>(m_powerOnTime) / (4096. * 40000000.);
LOG(TRACE) << "Power off time: " << static_cast<double>(m_powerOffTime) / (4096. * 40000000.);
......
......@@ -34,7 +34,7 @@ namespace corryvreckan {
// Functions
void initialize() override;
StatusCode run(std::shared_ptr<Clipboard> clipboard) override;
StatusCode run(const std::shared_ptr<Clipboard>& clipboard) override;
private:
std::shared_ptr<Detector> m_detector;
......
......@@ -81,7 +81,7 @@ ROOT::Math::XYZPoint AnalysisTelescope::closestApproach(ROOT::Math::XYZPoint pos
return particlePosition;
}
StatusCode AnalysisTelescope::run(std::shared_ptr<Clipboard> clipboard) {
StatusCode AnalysisTelescope::run(const std::shared_ptr<Clipboard>& clipboard) {
// Get the tracks from the clipboard
auto tracks = clipboard->getData<Track>();
......
......@@ -28,7 +28,7 @@ namespace corryvreckan {
// Functions
void initialize() override;
StatusCode run(std::shared_ptr<Clipboard> clipboard) override;
StatusCode run(const std::shared_ptr<Clipboard>& clipboard) override;
private:
ROOT::Math::XYZPoint closestApproach(ROOT::Math::XYZPoint position, const MCParticleVector& particles);
......
......@@ -515,7 +515,7 @@ void AnalysisTimingATLASpix::initialize() {
}
}
StatusCode AnalysisTimingATLASpix::run(std::shared_ptr<Clipboard> clipboard) {
StatusCode AnalysisTimingATLASpix::run(const std::shared_ptr<Clipboard>& clipboard) {
// Get the telescope tracks from the clipboard
auto tracks = clipboard->getData<Track>();
......
......@@ -33,7 +33,7 @@ namespace corryvreckan {
*/
AnalysisTimingATLASpix(Configuration config, std::shared_ptr<Detector> detector);
void initialize() override;
StatusCode run(std::shared_ptr<Clipboard> clipboard) override;
StatusCode run(const std::shared_ptr<Clipboard>& clipboard) override;
void finalize(const std::shared_ptr<ReadonlyClipboard>& clipboard) override;
private:
......
......@@ -92,7 +92,7 @@ bool Clustering4D::sortByTime(const std::shared_ptr<Pixel>& pixel1, const std::s
return (pixel1->timestamp() < pixel2->timestamp());
}
StatusCode Clustering4D::run(std::shared_ptr<Clipboard> clipboard) {
StatusCode Clustering4D::run(const std::shared_ptr<Clipboard>& clipboard) {
// Get the pixels
auto pixels = clipboard->getData<Pixel>(m_detector->getName());
......
......@@ -31,7 +31,7 @@ namespace corryvreckan {
// Functions
void initialize() override;
StatusCode run(std::shared_ptr<Clipboard> clipboard) override;
StatusCode run(const std::shared_ptr<Clipboard>& clipboard) override;
private:
std::shared_ptr<Detector> m_detector;
......
......@@ -58,7 +58,7 @@ void ClusteringSpatial::initialize() {
clusterTimes = new TH1F("clusterTimes", title.c_str(), 3e6, 0, 3e9);
}
StatusCode ClusteringSpatial::run(std::shared_ptr<Clipboard> clipboard) {
StatusCode ClusteringSpatial::run(const std::shared_ptr<Clipboard>& clipboard) {
// Get the pixels
auto pixels = clipboard->getData<Pixel>(m_detector->getName());
......
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