4#ifndef MUONVISUALIZATIONHELPERSR4_ROOVISUALIZATIONSERVICE_H
5#define MUONVISUALIZATIONHELPERSR4_ROOVISUALIZATIONSERVICE_H
7#include <GaudiKernel/EventContext.h>
20 using base_class::base_class;
23 virtual StatusCode
registerClient(
const ClientToken& token)
override final;
25 virtual std::shared_ptr<ICanvasObject>
26 prepareCanvas(
const EventContext& ctx,
const ClientToken& token,
27 const std::string& canvasName)
override final;
28 virtual StatusCode
finalize()
override final;
29 virtual StatusCode
initialize()
override final;
31 using PlotPtr_t = std::shared_ptr<detail::DrawCanvasObject>;
47 Gaudi::Property<std::string>
m_outDir{
this,
"outputDir" ,
"./Displays/"};
Implementation of the IRootVisualization service.
std::mutex m_storageMutex
Gaudi::Property< std::string > m_outDir
Directory into which all plots are written to.
Gaudi::Property< std::string > m_outRootFileName
Name of the ROOT file into which the output Canvases are written (needs root to be in the list of out...
std::unique_ptr< TFile > m_outFile
File into which all Canvases are saved if root is defined as extension.
virtual std::shared_ptr< ICanvasObject > prepareCanvas(const EventContext &ctx, const ClientToken &token, const std::string &canvasName) override final
void paintObjects(const ClientToken &token, PlotVec_t &&toDraw)
Gaudi::Property< unsigned > m_canvasHeight
Height of all drawn Canvases.
Gaudi::Property< bool > m_quadCanvas
Ensure that the canvas has the same interval sizes in x & y.
std::vector< PlotPtr_t > PlotVec_t
Gaudi::Property< unsigned > m_canvasWidth
Width of all drawn Canvases.
virtual StatusCode finalize() override final
Gaudi::Property< double > m_canvasExtraScale
Extra safety margin to zoom out from the Canvas.
virtual StatusCode initialize() override final
virtual StatusCode registerClient(const ClientToken &token) override final
std::shared_ptr< detail::DrawCanvasObject > PlotPtr_t
std::map< ClientToken, PlotsPerClient > StorageMap_t
Lightweight algorithm to read xAOD MDT sim hits and (fast-digitised) drift circles from SG and fill a...
Helper struct to group all plots that are belonging to a client of the service.
PlotVec_t toDraw
List of already registered Canvases.
bool elementsDrawn
Flag to indicate whether the plots were already dumped on disk.