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

OnlineMon: make DUT plots configurable. This is part of #26

parent 6890bf4d
...@@ -8,7 +8,17 @@ OnlineMonitor::OnlineMonitor(Configuration config, std::vector<Detector*> detect ...@@ -8,7 +8,17 @@ OnlineMonitor::OnlineMonitor(Configuration config, std::vector<Detector*> detect
: Module(std::move(config), std::move(detectors)) { : Module(std::move(config), std::move(detectors)) {
canvasTitle = m_config.get<std::string>("canvasTitle", "Corryvreckan Testbeam Monitor"); canvasTitle = m_config.get<std::string>("canvasTitle", "Corryvreckan Testbeam Monitor");
updateNumber = m_config.get<int>("update", 500); updateNumber = m_config.get<int>("update", 500);
;
// Set up individual plots for the DUT
canvas_dutplots = m_config.getMatrix<std::string>("DUTPlots",
{{"Clicpix2EventLoader/hitMap", "colz"},
{"Clicpix2EventLoader/hitMapDiscarded", "colz"},
{"Clicpix2EventLoader/pixelToT", ""},
{"Clicpix2EventLoader/pixelToA", ""},
{"Clicpix2EventLoader/pixelCnt", "log"},
{"Clicpix2EventLoader/pixelsPerFrame", "log"},
{"DUTAnalysis/clusterTotAssociated", ""},
{"DUTAnalysis/associatedTracksVersusTime", ""}});
} }
void OnlineMonitor::initialise() { void OnlineMonitor::initialise() {
...@@ -92,15 +102,13 @@ void OnlineMonitor::initialise() { ...@@ -92,15 +102,13 @@ void OnlineMonitor::initialise() {
AddHisto("ResidualCanvas", residualHisto); AddHisto("ResidualCanvas", residualHisto);
} }
if(get_detector(m_config.get<std::string>("DUT"))->type() == "CLICpix2") { for(auto plot : canvas_dutplots) {
AddHisto("DUTCanvas", "/corryvreckan/Clicpix2EventLoader/hitMap", "colz"); if(plot.size() != 2) {
AddHisto("DUTCanvas", "/corryvreckan/Clicpix2EventLoader/hitMapDiscarded", "colz"); continue;
AddHisto("DUTCanvas", "/corryvreckan/Clicpix2EventLoader/pixelToT"); }
AddHisto("DUTCanvas", "/corryvreckan/Clicpix2EventLoader/pixelToA");
AddHisto("DUTCanvas", "/corryvreckan/Clicpix2EventLoader/pixelCnt", "", true); bool log_scale = (plot.back().find("log") != std::string::npos) ? true : false;
AddHisto("DUTCanvas", "/corryvreckan/Clicpix2EventLoader/pixelsPerFrame", "", true); AddHisto("DUTCanvas", "/corryvreckan/" + plot.front(), plot.back(), log_scale);
AddHisto("DUTCanvas", "/corryvreckan/DUTAnalysis/clusterTotAssociated", "");
AddHisto("DUTCanvas", "/corryvreckan/DUTAnalysis/associatedTracksVersusTime", "");
} }
// Set up the main frame before drawing // Set up the main frame before drawing
......
...@@ -47,7 +47,10 @@ namespace corryvreckan { ...@@ -47,7 +47,10 @@ namespace corryvreckan {
// Member variables // Member variables
int eventNumber; int eventNumber;
int updateNumber; int updateNumber;
private:
std::string canvasTitle; std::string canvasTitle;
Matrix<std::string> canvas_dutplots;
}; };
} // namespace corryvreckan } // namespace corryvreckan
#endif // OnlineMonitor_H #endif // OnlineMonitor_H
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