Commit bb6dfb4b authored by Morag Jean Williams's avatar Morag Jean Williams
Browse files

Dealing with no set DUT parameter in modules CLICpix2Analysis,...

Dealing with no set DUT parameter in modules CLICpix2Analysis, Clicpic2Correlator, and Clicpix2EventLoader
parent 1960f070
......@@ -8,7 +8,10 @@ using namespace corryvreckan;
CLICpix2Analysis::CLICpix2Analysis(Configuration config, std::vector<Detector*> detectors)
: Module(std::move(config), std::move(detectors)) {
if(!m_config.has("DUT")) {
LOG(ERROR) << "No DUT parameter set. Set the CLICpix2 device as the DUT.";
return;
}
m_DUT = m_config.get<std::string>("DUT");
m_timeCutFrameEdge = m_config.get<double>("timeCutFrameEdge", Units::convert(20, "ns"));
......
......@@ -9,6 +9,7 @@ Analysis module for CLICpix2 prototypes. This module is still work in progress,
* `timeCutFrameEdge`: Parameter to discard telescope tracks at the frame edges (start and end of the current CLICpix2 frame). Defaults to `20ns`.
* `spatialCut`: Spatial cut for associating a track with a DUT cluster, defaults to `50um`.
* `chi2ndofCut`: Acceptance criterion for telescope tracks, defaults to a value of `3`.
* `DUT`: Name of the DUT plane. The CLICpix2 device is assumed to be the DUT.
#### Plots produced
* 2D Map of associated cluster positions
......
......@@ -7,6 +7,10 @@ Clicpix2Correlator::Clicpix2Correlator(Configuration config, std::vector<Detecto
: Module(std::move(config), std::move(detectors)) {}
void Clicpix2Correlator::initialise() {
if(!m_config.has("DUT")) {
LOG(ERROR) << "No DUT parameter set. Set the CLICpix2 device as the DUT.";
return;
}
// Get the DUT ID
dutID = m_config.get<std::string>("DUT");
......
......@@ -16,6 +16,10 @@ Clicpix2EventLoader::Clicpix2EventLoader(Configuration config, std::vector<Detec
}
void Clicpix2EventLoader::initialise() {
if(!m_config.has("DUT")) {
LOG(ERROR) << "No DUT parameter set. Set the CLICpix2 device as the DUT.";
return;
}
auto det = get_detector(m_config.get<std::string>("DUT"));
if(det->type() != "CLICpix2") {
......
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