Commit 8ebb80e8 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Change algorithm interface, do not pass clipboard but list of detectors

parent 247ad17a
......@@ -4,8 +4,8 @@
using namespace corryvreckan;
using namespace std;
ATLASpixEventLoader::ATLASpixEventLoader(Configuration config, Clipboard* clipboard)
: Algorithm(std::move(config), clipboard) {}
ATLASpixEventLoader::ATLASpixEventLoader(Configuration config, std::vector<Detector*> detectors)
: Algorithm(std::move(config), std::move(detectors)) {}
void ATLASpixEventLoader::initialise(Parameters* par) {
......
......@@ -20,12 +20,12 @@ namespace corryvreckan {
public:
// Constructors and destructors
ATLASpixEventLoader(Configuration config, Clipboard* clipboard);
ATLASpixEventLoader(Configuration config, std::vector<Detector*> detectors);
~ATLASpixEventLoader() {}
// Functions
void initialise(Parameters*);
StatusCode run(Clipboard*);
StatusCode run(Clipboard* clipboard);
void finalise();
// Histograms for several devices
......
......@@ -5,7 +5,8 @@
using namespace corryvreckan;
using namespace std;
Alignment::Alignment(Configuration config, Clipboard* clipboard) : Algorithm(std::move(config), clipboard) {
Alignment::Alignment(Configuration config, std::vector<Detector*> detectors)
: Algorithm(std::move(config), std::move(detectors)) {
m_numberOfTracksForAlignment = 20000;
nIterations = 3;
}
......
......@@ -15,12 +15,12 @@ namespace corryvreckan {
public:
// Constructors and destructors
Alignment(Configuration config, Clipboard* clipboard);
Alignment(Configuration config, std::vector<Detector*> detectors);
~Alignment() {}
// Functions
void initialise(Parameters*);
StatusCode run(Clipboard*);
StatusCode run(Clipboard* clipboard);
void finalise();
// Member variables
......
......@@ -5,7 +5,8 @@
using namespace corryvreckan;
using namespace std;
BasicTracking::BasicTracking(Configuration config, Clipboard* clipboard) : Algorithm(std::move(config), clipboard) {
BasicTracking::BasicTracking(Configuration config, std::vector<Detector*> detectors)
: Algorithm(std::move(config), std::move(detectors)) {
// Default values for cuts
timingCut = 200. / 1000000000.; // 200 ns
spatialCut = 0.2; // 200 um
......
......@@ -15,12 +15,12 @@ namespace corryvreckan {
public:
// Constructors and destructors
BasicTracking(Configuration config, Clipboard* clipboard);
BasicTracking(Configuration config, std::vector<Detector*> detectors);
~BasicTracking() {}
// Functions
void initialise(Parameters*);
StatusCode run(Clipboard*);
StatusCode run(Clipboard* clipboard);
void finalise();
// Cluster* getNearestCluster(Cluster*, map<Cluster*, bool>, Clusters*);
......
......@@ -3,8 +3,8 @@
using namespace corryvreckan;
using namespace std;
CLICpixEventLoader::CLICpixEventLoader(Configuration config, Clipboard* clipboard)
: Algorithm(std::move(config), clipboard) {
CLICpixEventLoader::CLICpixEventLoader(Configuration config, std::vector<Detector*> detectors)
: Algorithm(std::move(config), std::move(detectors)) {
m_filename = "";
}
......
......@@ -19,12 +19,12 @@ namespace corryvreckan {
public:
// Constructors and destructors
CLICpixEventLoader(Configuration config, Clipboard* clipboard);
CLICpixEventLoader(Configuration config, std::vector<Detector*> detectors);
~CLICpixEventLoader() {}
// Functions
void initialise(Parameters*);
StatusCode run(Clipboard*);
StatusCode run(Clipboard* clipboard);
void finalise();
// Member variables
......
......@@ -3,8 +3,8 @@
using namespace corryvreckan;
using namespace std;
Clicpix2Correlator::Clicpix2Correlator(Configuration config, Clipboard* clipboard)
: Algorithm(std::move(config), clipboard) {}
Clicpix2Correlator::Clicpix2Correlator(Configuration config, std::vector<Detector*> detectors)
: Algorithm(std::move(config), std::move(detectors)) {}
template <typename T> std::string makeString(T number) {
std::ostringstream ss;
......
......@@ -16,12 +16,12 @@ namespace corryvreckan {
public:
// Constructors and destructors
Clicpix2Correlator(Configuration config, Clipboard* clipboard);
Clicpix2Correlator(Configuration config, std::vector<Detector*> detectors);
~Clicpix2Correlator() {}
// Functions
void initialise(Parameters*);
StatusCode run(Clipboard*);
StatusCode run(Clipboard* clipboard);
void finalise();
// Member variables
......
......@@ -3,8 +3,8 @@
using namespace corryvreckan;
using namespace std;
Clicpix2EventLoader::Clicpix2EventLoader(Configuration config, Clipboard* clipboard)
: Algorithm(std::move(config), clipboard) {}
Clicpix2EventLoader::Clicpix2EventLoader(Configuration config, std::vector<Detector*> detectors)
: Algorithm(std::move(config), std::move(detectors)) {}
void Clicpix2EventLoader::initialise(Parameters* par) {
......
......@@ -20,12 +20,12 @@ namespace corryvreckan {
public:
// Constructors and destructors
Clicpix2EventLoader(Configuration config, Clipboard* clipboard);
Clicpix2EventLoader(Configuration config, std::vector<Detector*> detectors);
~Clicpix2EventLoader() {}
// Functions
void initialise(Parameters*);
StatusCode run(Clipboard*);
StatusCode run(Clipboard* clipboard);
void finalise();
// Histograms for several devices
......
......@@ -6,7 +6,8 @@
using namespace corryvreckan;
using namespace std;
ClicpixAnalysis::ClicpixAnalysis(Configuration config, Clipboard* clipboard) : Algorithm(std::move(config), clipboard) {
ClicpixAnalysis::ClicpixAnalysis(Configuration config, std::vector<Detector*> detectors)
: Algorithm(std::move(config), std::move(detectors)) {
m_associationCut = m_config.get<double>("associationCut", 0.05); // 100 um
m_proximityCut = m_config.get<double>("proximityCut", 0.0005); // 125 um
......
......@@ -13,12 +13,12 @@ namespace corryvreckan {
public:
// Constructors and destructors
ClicpixAnalysis(Configuration config, Clipboard* clipboard);
ClicpixAnalysis(Configuration config, std::vector<Detector*> detectors);
~ClicpixAnalysis() {}
// Functions
void initialise(Parameters*);
StatusCode run(Clipboard*);
StatusCode run(Clipboard* clipboard);
void finalise();
bool checkMasked(double, double);
void fillClusterHistos(Clusters*);
......
......@@ -6,7 +6,8 @@
using namespace corryvreckan;
DUTAnalysis::DUTAnalysis(Configuration config, Clipboard* clipboard) : Algorithm(std::move(config), clipboard) {
DUTAnalysis::DUTAnalysis(Configuration config, std::vector<Detector*> detectors)
: Algorithm(std::move(config), std::move(detectors)) {
m_digitalPowerPulsing = false;
}
......
......@@ -12,12 +12,12 @@ namespace corryvreckan {
public:
// Constructors and destructors
DUTAnalysis(Configuration config, Clipboard* clipboard);
DUTAnalysis(Configuration config, std::vector<Detector*> detectors);
~DUTAnalysis() {}
// Functions
void initialise(Parameters*);
StatusCode run(Clipboard*);
StatusCode run(Clipboard* clipboard);
void finalise();
// Histograms
......
......@@ -3,7 +3,8 @@
using namespace corryvreckan;
using namespace std;
DataDump::DataDump(Configuration config, Clipboard* clipboard) : Algorithm(std::move(config), clipboard) {
DataDump::DataDump(Configuration config, std::vector<Detector*> detectors)
: Algorithm(std::move(config), std::move(detectors)) {
m_detector = m_config.get<std::string>("detector", "DeviceToDumpData");
}
......
......@@ -19,12 +19,12 @@ namespace corryvreckan {
public:
// Constructors and destructors
DataDump(Configuration config, Clipboard* clipboard);
DataDump(Configuration config, std::vector<Detector*> detectors);
~DataDump() {}
// Functions
void initialise(Parameters*);
StatusCode run(Clipboard*);
StatusCode run(Clipboard* clipboard);
void finalise();
// Member variables
......
......@@ -3,7 +3,8 @@
using namespace corryvreckan;
using namespace std;
FileReader::FileReader(Configuration config, Clipboard* clipboard) : Algorithm(std::move(config), clipboard) {
FileReader::FileReader(Configuration config, std::vector<Detector*> detectors)
: Algorithm(std::move(config), std::move(detectors)) {
m_onlyDUT = false;
m_readPixels = true;
m_readClusters = false;
......
......@@ -11,12 +11,12 @@ namespace corryvreckan {
public:
// Constructors and destructors
FileReader(Configuration config, Clipboard* clipboard);
FileReader(Configuration config, std::vector<Detector*> detectors);
~FileReader() {}
// Functions
void initialise(Parameters*);
StatusCode run(Clipboard*);
StatusCode run(Clipboard* clipboard);
void finalise();
// Member variables
......
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