Commit 83b18d06 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Add DUT plots to OnlineMonitoring

parent 2176a93a
Pipeline #355305 passed with stages
in 2 minutes and 15 seconds
......@@ -56,6 +56,7 @@ void OnlineMonitor::initialise() {
AddButton("CorrelationsX2D", "CorrelationX2DCanvas");
AddButton("CorrelationsY2D", "CorrelationY2DCanvas");
AddButton("ChargeDistributions", "ChargeDistributionCanvas");
AddButton("DUTPlots", "DUTCanvas");
// Per detector histograms
for(auto& detector : get_detectors()) {
......@@ -86,6 +87,15 @@ void OnlineMonitor::initialise() {
AddHisto("ResidualCanvas", residualHisto);
}
if(get_detector(m_config.get<std::string>("DUT"))->type() == "CLICpix2") {
AddHisto("DUTCanvas", "/corryvreckan/Clixpix2EventLoader/hitMap", "colz");
AddHisto("DUTCanvas", "/corryvreckan/Clixpix2EventLoader/hitMapDiscarded", "colz");
AddHisto("DUTCanvas", "/corryvreckan/Clixpix2EventLoader/pixelToT");
AddHisto("DUTCanvas", "/corryvreckan/Clixpix2EventLoader/pixelToA");
AddHisto("DUTCanvas", "/corryvreckan/Clixpix2EventLoader/pixelCnt", "", true);
AddHisto("DUTCanvas", "/corryvreckan/Clixpix2EventLoader/pixelsPerFrame", "", true);
}
// Set up the main frame before drawing
// Exit button
......@@ -141,12 +151,13 @@ void OnlineMonitor::finalise() {
LOG(DEBUG) << "Analysed " << eventNumber << " events";
}
void OnlineMonitor::AddHisto(string canvasName, string histoName, string style) {
void OnlineMonitor::AddHisto(string canvasName, string histoName, string style, bool logy) {
TH1* histogram = (TH1*)gDirectory->Get(histoName.c_str());
if(histogram) {
gui->histograms[canvasName].push_back((TH1*)gDirectory->Get(histoName.c_str()));
gui->styles[gui->histograms[canvasName].back()] = style;
gui->logarithmic[gui->histograms[canvasName].back()] = logy;
} else {
LOG(WARNING) << "Histogram " << histoName << " does not exist";
}
......
......@@ -41,7 +41,7 @@ namespace corryvreckan {
TApplication* app;
GuiDisplay* gui;
void AddHisto(std::string, std::string, std::string style = "");
void AddHisto(std::string, std::string, std::string style = "", bool logy = false);
void AddButton(std::string, std::string);
// Member variables
......
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