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

Merge branch 'onlinemon' into 'master'

Update OnlineMon with current Plot Paths

See merge request !177
parents 283449ca 486601f8
Pipeline #1112210 passed with stages
in 23 minutes and 11 seconds
...@@ -60,7 +60,7 @@ void EventLoaderEUDAQ2::initialise() { ...@@ -60,7 +60,7 @@ void EventLoaderEUDAQ2::initialise() {
hPixelTimes_long = new TH1F("hPixelTimes_long", title.c_str(), 3e6, 0, 3e3); hPixelTimes_long = new TH1F("hPixelTimes_long", title.c_str(), 3e6, 0, 3e3);
title = ";pixel raw values;# events"; title = ";pixel raw values;# events";
hPixelRawValues = new TH1F("hPixelRawValues;", title.c_str(), 1024, 0, 1024); hPixelRawValues = new TH1F("hPixelRawValues", title.c_str(), 1024, 0, 1024);
title = "Pixel Multiplicity per Corry Event;# pixels;# events"; title = "Pixel Multiplicity per Corry Event;# pixels;# events";
hPixelMultiplicity = new TH1F("pixelMultiplicity", title.c_str(), 1000, 0, 1000); hPixelMultiplicity = new TH1F("pixelMultiplicity", title.c_str(), 1000, 0, 1000);
...@@ -220,7 +220,7 @@ Event::Position EventLoaderEUDAQ2::is_within_event(std::shared_ptr<Clipboard> cl ...@@ -220,7 +220,7 @@ Event::Position EventLoaderEUDAQ2::is_within_event(std::shared_ptr<Clipboard> cl
std::shared_ptr<eudaq::StandardEvent> evt) const { std::shared_ptr<eudaq::StandardEvent> evt) const {
// Check if this event has timestamps available: // Check if this event has timestamps available:
if(evt->GetTimeBegin() == 0) { if(evt->GetTimeBegin() == 0 && evt->GetTimeEnd() == 0) {
LOG(DEBUG) << evt->GetDescription() << ": Event has no timestamp, comparing trigger IDs"; LOG(DEBUG) << evt->GetDescription() << ": Event has no timestamp, comparing trigger IDs";
// If there is no event defined yet, there is little we can do: // If there is no event defined yet, there is little we can do:
......
...@@ -10,6 +10,7 @@ OnlineMonitor::OnlineMonitor(Configuration config, std::vector<std::shared_ptr<D ...@@ -10,6 +10,7 @@ OnlineMonitor::OnlineMonitor(Configuration config, std::vector<std::shared_ptr<D
: Module(std::move(config), std::move(detectors)) { : Module(std::move(config), std::move(detectors)) {
canvasTitle = m_config.get<std::string>("canvas_title", "Corryvreckan Testbeam Monitor"); canvasTitle = m_config.get<std::string>("canvas_title", "Corryvreckan Testbeam Monitor");
updateNumber = m_config.get<int>("update", 200); updateNumber = m_config.get<int>("update", 200);
ignoreAux = m_config.get<bool>("ignore_aux", true);
// Set up overview plots: // Set up overview plots:
canvas_overview = m_config.getMatrix<std::string>("overview", canvas_overview = m_config.getMatrix<std::string>("overview",
...@@ -20,14 +21,12 @@ OnlineMonitor::OnlineMonitor(Configuration config, std::vector<std::shared_ptr<D ...@@ -20,14 +21,12 @@ OnlineMonitor::OnlineMonitor(Configuration config, std::vector<std::shared_ptr<D
// Set up individual plots for the DUT // Set up individual plots for the DUT
canvas_dutplots = m_config.getMatrix<std::string>("dut_plots", canvas_dutplots = m_config.getMatrix<std::string>("dut_plots",
{{"EventLoaderCLICpix2/%DUT%/hitMap", "colz"}, {{"EventLoaderEUDAQ2/%DUT%/hitmap", "colz"},
{"EventLoaderCLICpix2/%DUT%/hitMapDiscarded", "colz"}, {"EventLoaderEUDAQ2/%DUT%/hPixelTimes"},
{"EventLoaderCLICpix2/%DUT%/pixelToT"}, {"EventLoaderEUDAQ2/%DUT%/hPixelRawValues"},
{"EventLoaderCLICpix2/%DUT%/pixelToA"}, {"EventLoaderEUDAQ2/%DUT%/pixelMultiplicity", "log"},
{"EventLoaderCLICpix2/%DUT%/pixelCnt", "log"}, {"AnalysisDUT/%DUT%/clusterChargeAssociated"},
{"EventLoaderCLICpix2/%DUT%/pixelMultiplicity", "log"}, {"AnalysisDUT/%DUT%/associatedTracksVersusTime"}});
{"AnalysisDUT/clusterChargeAssociated"},
{"AnalysisDUT/associatedTracksVersusTime"}});
canvas_tracking = m_config.getMatrix<std::string>("tracking", canvas_tracking = m_config.getMatrix<std::string>("tracking",
{{"Tracking4D/trackChi2"}, {{"Tracking4D/trackChi2"},
{"Tracking4D/trackAngleX"}, {"Tracking4D/trackAngleX"},
...@@ -220,6 +219,11 @@ void OnlineMonitor::AddPlots(std::string canvas_name, Matrix<std::string> canvas ...@@ -220,6 +219,11 @@ void OnlineMonitor::AddPlots(std::string canvas_name, Matrix<std::string> canvas
} else { } else {
LOG(DEBUG) << "Adding plot " << name << " for all detectors."; LOG(DEBUG) << "Adding plot " << name << " for all detectors.";
for(auto& detector : get_detectors()) { for(auto& detector : get_detectors()) {
// Ignore AUX detectors
if(ignoreAux && detector->isAuxiliary()) {
continue;
}
AddHisto(canvas_name, AddHisto(canvas_name,
std::regex_replace(name, std::regex("%DETECTOR%"), detector->name()), std::regex_replace(name, std::regex("%DETECTOR%"), detector->name()),
plot.back(), plot.back(),
......
...@@ -51,6 +51,7 @@ namespace corryvreckan { ...@@ -51,6 +51,7 @@ namespace corryvreckan {
// Member variables // Member variables
int eventNumber; int eventNumber;
int updateNumber; int updateNumber;
bool ignoreAux;
std::string canvasTitle; std::string canvasTitle;
......
...@@ -13,8 +13,8 @@ The displayed plots and their source can be configured via the framework configu ...@@ -13,8 +13,8 @@ The displayed plots and their source can be configured via the framework configu
Here, each canvas is configured via a matrix containing the path of the plot and its plotting options in each row, e.g. Here, each canvas is configured via a matrix containing the path of the plot and its plotting options in each row, e.g.
```toml ```toml
DUTPlots = [["Clicpix2EventLoader/hitMap", "colz"], DUTPlots = [["EventLoaderEUDAQ2/%DUT%/hitmap", "colz"],
["Clicpix2EventLoader/pixelCnt", "log"]] ["EventLoaderEUDAQ2/%DUT%/hPixelRawValues", "log"]]
``` ```
The allowed plotting options comprise all drawing options offered by ROOT. The allowed plotting options comprise all drawing options offered by ROOT.
...@@ -26,24 +26,25 @@ Several keywords can be used in the plot path, which are parsed and interpreted ...@@ -26,24 +26,25 @@ Several keywords can be used in the plot path, which are parsed and interpreted
* `%DUT%`: This keyword is replaced by the vale of the `DUT` configuration key of the framework. * `%DUT%`: This keyword is replaced by the vale of the `DUT` configuration key of the framework.
* `%REFERENCE%`: This keyword is replaced by the vale of the `reference` configuration key of the framework. * `%REFERENCE%`: This keyword is replaced by the vale of the `reference` configuration key of the framework.
The "corryvreckan" namespace i not required to be added to the plot path. The "corryvreckan" namespace is not required to be added to the plot path.
### Parameters ### Parameters
* `update`: Number of events after which to update, defaults to `500`. * `update`: Number of events after which to update, defaults to `500`.
* `canvas_title`: Title of the GUI window to be shown, defaults to `Corryvreckan Testbeam Monitor`. This parameter can be used to e.g. display the current run number in the window title. * `canvas_title`: Title of the GUI window to be shown, defaults to `Corryvreckan Testbeam Monitor`. This parameter can be used to e.g. display the current run number in the window title.
* `ignore_aux`: With this boolean variable set, detectors with `auxiliary` roles are ignored and none of their histograms are added to the UI. Defaults to `true`.
* `overview`: List of plots to be placed on the "Overview" canvas of the online monitor. The list of plots created in the default configuration is listed below. * `overview`: List of plots to be placed on the "Overview" canvas of the online monitor. The list of plots created in the default configuration is listed below.
* `dut_plots`: List of plots to be placed on the "DUTPlots" canvas of the online monitor. By default, this canvas is empty and should be customized for the respective DUT. * `dut_plots`: List of plots to be placed on the "DUTPlots" canvas of the online monitor. By default, this canvas contains plots collected from the `EventLoaderEUDAQ2` as well as the `AnalysisDUT` modules for the each configured DUT. This canvas should be customized for the respective DUT.
* `hitmaps`: List of plots to be placed on the "HitMaps" canvas of the online monitor. By default, this canvas displays `TestAlgorithm/hitmap_%DETECTOR%` for all detectors. * `hitmaps`: List of plots to be placed on the "HitMaps" canvas of the online monitor. By default, this canvas displays `TestAlgorithm/%DETECTOR%/hitmap` for all detectors.
* `tracking`: List of plots to be placed on the "Tracking" canvas of the online monitor. The list of plots created in the default configuration is listed below. * `tracking`: List of plots to be placed on the "Tracking" canvas of the online monitor. The list of plots created in the default configuration is listed below.
* `residuals`: List of plots to be placed on the "Residuals" canvas of the online monitor. By default, this canvas displays `BasicTracking/residualsX_%DETECTOR%` for all detectors. * `residuals`: List of plots to be placed on the "Residuals" canvas of the online monitor. By default, this canvas displays `Tracking4D/%DETECTOR%/residualsX` for all detectors.
* `correlation_x`: List of plots to be placed on the "CorrelationX" canvas of the online monitor. By default, this canvas displays `TestAlgorithm/correlationX_%DETECTOR%` for all detectors. * `correlation_x`: List of plots to be placed on the "CorrelationX" canvas of the online monitor. By default, this canvas displays `TestAlgorithm/%DETECTOR%/correlationX` for all detectors.
* `correlation_y`: List of plots to be placed on the "CorrelationY" canvas of the online monitor. By default, this canvas displays `TestAlgorithm/correlationY_%DETECTOR%` for all detectors. * `correlation_y`: List of plots to be placed on the "CorrelationY" canvas of the online monitor. By default, this canvas displays `TestAlgorithm/%DETECTOR%/correlationY` for all detectors.
* `correlation_x2d`: List of plots to be placed on the "CorrelationX2D" canvas of the online monitor. By default, this canvas displays `TestAlgorithm/correlationX_2Dlocal_%DETECTOR%` for all detectors. * `correlation_x2d`: List of plots to be placed on the "CorrelationX2D" canvas of the online monitor. By default, this canvas displays `TestAlgorithm/%DETECTOR%/correlationX_2Dlocal` for all detectors.
* `correlation_y2d`: List of plots to be placed on the "CorrelationY2D" canvas of the online monitor. By default, this canvas displays `TestAlgorithm/correlationY_2Dlocal_%DETECTOR%` for all detectors. * `correlation_y2d`: List of plots to be placed on the "CorrelationY2D" canvas of the online monitor. By default, this canvas displays `TestAlgorithm/%DETECTOR%/correlationY_2Dlocal` for all detectors.
* `charge_distributions`: List of plots to be placed on the "ChargeDistributions" canvas of the online monitor. By default, this canvas displays `Timepix3Clustering/clusterTot_%DETECTOR%` for all detectors. * `charge_distributions`: List of plots to be placed on the "ChargeDistributions" canvas of the online monitor. By default, this canvas displays `Clustering4D/%DETECTOR%/clusterCharge` for all detectors.
* `event_times`: List of plots to be placed on the "EventTimes" canvas of the online monitor. By default, this canvas displays `TestAlgorithm/eventTimes_%DETECTOR%` for all detectors. * `event_times`: List of plots to be placed on the "EventTimes" canvas of the online monitor. By default, this canvas displays `TestAlgorithm/%DETECTOR%/eventTimes` for all detectors.
### Plots produced ### Plots produced
Overview canvas: Overview canvas:
...@@ -61,12 +62,10 @@ Tracking canvas: ...@@ -61,12 +62,10 @@ Tracking canvas:
```toml ```toml
[OnlineMonitor] [OnlineMonitor]
update = 200 update = 200
dut_plots = [["Clicpix2EventLoader/hitMap", "colz"], dut_plots = [["EventLoaderEUDAQ2/%DUT%/hitmap", "colz"],
[Clicpix2EventLoader/hitMapDiscarded", "colz"], ["EventLoaderEUDAQ2/%DUT%/hPixelTimes"],
[Clicpix2EventLoader/pixelToT"], ["EventLoaderEUDAQ2/%DUT%/hPixelRawValues"],
[Clicpix2EventLoader/pixelToA"], ["EventLoaderEUDAQ2/%DUT%/pixelMultiplicity", "log"],
[Clicpix2EventLoader/pixelCnt", "log"], ["AnalysisDUT/clusterChargeAssociated"],
[Clicpix2EventLoader/pixelMultiplicity", "log"], ["AnalysisDUT/associatedTracksVersusTime"]]
[DUTAnalysis/clusterTotAssociated"],
[DUTAnalysis/associatedTracksVersusTime"]]
``` ```
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