![]() |
ATLAS Offline Software
|
#include <DrawCanvasObject.h>
Public Types | |
| using | PrimitivePtr_t = IRootVisualizationService::PrimitivePtr_t |
| using | PrimitiveVec_t = std::vector< std::pair< PrimitivePtr_t, std::string > > |
| using | Range_t = std::array< double, 2 > |
| using | Range2D_t = std::array< Range_t, 2 > |
| enum | AxisRanges : std::uint8_t { AxisRanges::xLow, AxisRanges::xHigh, AxisRanges::yLow, AxisRanges::yHigh } |
| Enum to select the corner coordinates shown by the plot. More... | |
Public Member Functions | |
| DrawCanvasObject (const std::string &canvasName, const std::size_t evtNumber) | |
| virtual | ~DrawCanvasObject ()=default |
| virtual void | expandPad (const double x, const double y) override final |
| Expands the axes of the pad such that the coordinates are guaranteed to appear at least at the Canvas edges. More... | |
| virtual void | add (PrimitivePtr_t &&drawMe, const std::string &drawOpt="") override final |
| Add a TObject to the ICanvasObject for later drawing onto a TCanvas. More... | |
| virtual void | add (std::vector< PrimitivePtr_t > &&drawMe) override final |
| virtual double | corner (const AxisRanges r) const override final |
| Retrieves a corner coordinate of the drawn canvas. More... | |
| virtual void | setRangeScale (const double s, bool quadCan) override final |
| To ensure that the drawn objects are not cut by the axis limits, a flat scale-factor on the drawn axis intervals can be applied. More... | |
| virtual void | trash () override final |
| If no object has been drawn mark the plot as junk. More... | |
| const PrimitiveVec_t & | primitives () const |
| PrimitiveVec_t & | primitives () |
| virtual void | setAxisTitles (const std::string &xTitle, const std::string &yTitle, const std::string &zTitle) override final |
| Define the titles of the Canvas axes. More... | |
| const std::string & | xTitle () const |
| Returns the title of the x-axis. More... | |
| const std::string & | yTitle () const |
| Returns the title of the y-axis. More... | |
| const std::string & | zTitle () const |
| Returns the title of the z-axis. More... | |
| std::size_t | event () const |
| Event number in which the canvas has been created. More... | |
| const std::string & | name () const |
| Name of the canvas. More... | |
| bool | trashed () const |
| Returns whether the canvas has been trashed. More... | |
| virtual void | add (PrimitiveVec_t &&drawMe)=0 |
| Add a vector of TObjects to the ICanvasObject for later drawing onto a TCanvas. More... | |
Private Attributes | |
| Range2D_t | m_axisRanges {Acts::filledArray<Range_t, 2>(Range_t{s_dblMax, -s_dblMax})} |
| double | m_axisScale {1.} |
| PrimitiveVec_t | m_primitives {} |
| std::string | m_name {} |
| std::size_t | m_evt {} |
| std::string | m_xTitle {} |
| std::string | m_yTitle {} |
| std::string | m_zTitle {} |
| bool | m_quadCan {false} |
| std::atomic< bool > | m_isTrashed {false} |
Static Private Attributes | |
| static constexpr double | s_dblMax = std::numeric_limits<double>::max() |
Definition at line 14 of file DrawCanvasObject.h.
| using MuonValR4::detail::DrawCanvasObject::PrimitivePtr_t = IRootVisualizationService::PrimitivePtr_t |
Definition at line 16 of file DrawCanvasObject.h.
| using MuonValR4::detail::DrawCanvasObject::PrimitiveVec_t = std::vector<std::pair<PrimitivePtr_t, std::string> > |
Definition at line 17 of file DrawCanvasObject.h.
| using MuonValR4::detail::DrawCanvasObject::Range2D_t = std::array<Range_t, 2> |
Definition at line 19 of file DrawCanvasObject.h.
| using MuonValR4::detail::DrawCanvasObject::Range_t = std::array<double, 2> |
Definition at line 18 of file DrawCanvasObject.h.
|
stronginherited |
Enum to select the corner coordinates shown by the plot.
| Enumerator | |
|---|---|
| xLow | |
| xHigh | |
| yLow | |
| yHigh | |
Definition at line 66 of file IRootVisualizationService.h.
| MuonValR4::detail::DrawCanvasObject::DrawCanvasObject | ( | const std::string & | canvasName, |
| const std::size_t | evtNumber | ||
| ) |
Definition at line 21 of file DrawCanvasObject.cxx.
|
virtualdefault |
|
finaloverridevirtual |
Add a TObject to the ICanvasObject for later drawing onto a TCanvas.
| drawMe | Unique_ptr to the object to be drawn |
| drawOpt | Option to be parsed to the draw command later (e.g. HIST) |
Implements MuonValR4::IRootVisualizationService::ICanvasObject.
Definition at line 60 of file DrawCanvasObject.cxx.
|
pure virtualinherited |
Add a vector of TObjects to the ICanvasObject for later drawing onto a TCanvas.
| drawMe | List of unique TObject pointers |
|
finaloverridevirtual |
Definition at line 63 of file DrawCanvasObject.cxx.
|
finaloverridevirtual |
Retrieves a corner coordinate of the drawn canvas.
| r | Coordinate to return |
Implements MuonValR4::IRootVisualizationService::ICanvasObject.
Definition at line 26 of file DrawCanvasObject.cxx.
| std::size_t MuonValR4::detail::DrawCanvasObject::event | ( | ) | const |
Event number in which the canvas has been created.
Definition at line 50 of file DrawCanvasObject.cxx.
|
finaloverridevirtual |
Expands the axes of the pad such that the coordinates are guaranteed to appear at least at the Canvas edges.
| x | Expansion in the width of the canvas |
| y | Expansion in the height of the canvas |
Implements MuonValR4::IRootVisualizationService::ICanvasObject.
Definition at line 56 of file DrawCanvasObject.cxx.
| const std::string & MuonValR4::detail::DrawCanvasObject::name | ( | ) | const |
| PrimitiveVec_t & MuonValR4::detail::DrawCanvasObject::primitives | ( | ) |
Definition at line 55 of file DrawCanvasObject.cxx.
| const PrimitiveVec_t & MuonValR4::detail::DrawCanvasObject::primitives | ( | ) | const |
Definition at line 54 of file DrawCanvasObject.cxx.
|
finaloverridevirtual |
Define the titles of the Canvas axes.
| xTitle | Title pf the x-axis |
| yTitle | Title pf the y-axis |
| zTitle | Title pf the z-axis |
Implements MuonValR4::IRootVisualizationService::ICanvasObject.
Definition at line 68 of file DrawCanvasObject.cxx.
|
finaloverridevirtual |
To ensure that the drawn objects are not cut by the axis limits, a flat scale-factor on the drawn axis intervals can be applied.
| s | scale-factor >1. |
| quadCan | Switch toggling whether the drawn intervals have an equal size |
Implements MuonValR4::IRootVisualizationService::ICanvasObject.
Definition at line 43 of file DrawCanvasObject.cxx.
|
finaloverridevirtual |
If no object has been drawn mark the plot as junk.
Implements MuonValR4::IRootVisualizationService::ICanvasObject.
Definition at line 47 of file DrawCanvasObject.cxx.
| bool MuonValR4::detail::DrawCanvasObject::trashed | ( | ) | const |
| const std::string & MuonValR4::detail::DrawCanvasObject::xTitle | ( | ) | const |
| const std::string & MuonValR4::detail::DrawCanvasObject::yTitle | ( | ) | const |
| const std::string & MuonValR4::detail::DrawCanvasObject::zTitle | ( | ) | const |
|
private |
Definition at line 57 of file DrawCanvasObject.h.
|
private |
Definition at line 58 of file DrawCanvasObject.h.
|
private |
Definition at line 62 of file DrawCanvasObject.h.
|
private |
Definition at line 69 of file DrawCanvasObject.h.
|
private |
Definition at line 61 of file DrawCanvasObject.h.
|
private |
Definition at line 59 of file DrawCanvasObject.h.
|
private |
Definition at line 68 of file DrawCanvasObject.h.
|
private |
Definition at line 64 of file DrawCanvasObject.h.
|
private |
Definition at line 65 of file DrawCanvasObject.h.
|
private |
Definition at line 66 of file DrawCanvasObject.h.
|
staticconstexprprivate |
Definition at line 56 of file DrawCanvasObject.h.
1.8.18