Skip to content

Commit 9e4e30a

Browse files
authored
QC-1103 BigScreen Task: create the canvas, paves and labels in configure() (#2148)
mCanvas, mPaves and mLabels are now created just once, during configuration. Thus, we avoid any issues with republishing mCanvas and making sure it does not delete something already deleted while going 2nd time through initialize() (START STOP START)
1 parent debb03e commit 9e4e30a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Modules/Common/src/BigScreen.cxx

+8-8
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@
1717

1818
#include "Common/BigScreen.h"
1919
#include "QualityControl/QcInfoLogger.h"
20-
#include "QualityControl/MonitorObject.h"
2120
#include "QualityControl/DatabaseInterface.h"
22-
#include "QualityControl/ObjectMetadataKeys.h"
2321
#include "QualityControl/ActivityHelpers.h"
2422
#include <TDatime.h>
2523
#include <TPaveText.h>
@@ -35,12 +33,7 @@ namespace o2::quality_control_modules::common
3533
void BigScreen::configure(const boost::property_tree::ptree& config)
3634
{
3735
mConfig = BigScreenConfig(getID(), config);
38-
}
39-
40-
//_________________________________________________________________________________________
4136

42-
void BigScreen::initialize(quality_control::postprocessing::Trigger t, framework::ServiceRegistryRef services)
43-
{
4437
mColors[Quality::Null.getName()] = kViolet - 6;
4538
mColors[Quality::Bad.getName()] = kRed;
4639
mColors[Quality::Medium.getName()] = kOrange - 3;
@@ -94,11 +87,18 @@ void BigScreen::initialize(quality_control::postprocessing::Trigger t, framework
9487

9588
index += 1;
9689
}
97-
9890
mCanvas = std::make_unique<TCanvas>("BigScreen", "QC Big Screen", 800, 600);
9991
getObjectsManager()->startPublishing(mCanvas.get());
10092
}
10193

94+
//_________________________________________________________________________________________
95+
96+
void BigScreen::initialize(quality_control::postprocessing::Trigger t, framework::ServiceRegistryRef services)
97+
{
98+
mCanvas->Clear();
99+
mCanvas->cd();
100+
}
101+
102102
//_________________________________________________________________________________________
103103
// Helper function for retrieving a QualityObject from the QCDB, in the form of a std::pair<std::shared_ptr<QualityObject>, bool>
104104
// A non-null QO is returned in the first element of the pair if the QO is found in the QCDB

0 commit comments

Comments
 (0)