ATLAS Offline Software
Loading...
Searching...
No Matches
JsonPlotsDefReadTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef INDETTRACKPERFMON_JSONPLOTSDEFREADTOOL_T
6#define INDETTRACKPERFMON_JSONPLOTSDEFREADTOOL_T
7
14
16#include "AsgTools/AsgTool.h"
17
19#include "IPlotsDefReadTool.h"
20
21
22namespace IDTPM {
23
25 public virtual IPlotsDefReadTool,
26 public asg::AsgTool {
27
28 public:
29
31
33 JsonPlotsDefReadTool( const std::string& name ) :
34 asg::AsgTool( name ) { }
35
37 virtual ~JsonPlotsDefReadTool() = default;
38
40 virtual StatusCode initialize() override;
41
44 virtual std::vector< SinglePlotDefinition > getPlotsDefinitions() const override;
45
46 private:
47
49 float getFloat(
50 const std::string& s,
51 float defaultNum = std::numeric_limits<float>::quiet_NaN() ) const;
52
53 unsigned int getInt( const std::string& s, unsigned int defaultNum = 0 ) const;
54
56 StringArrayProperty m_plotsDefs{ this, "PlotsDefs", {}, "Vector of plots definition strings" };
57
58 }; // class JsonPlotsDefReadTool
59
60} // namespace IDTPM
61
62#endif // > !INDETTRACKPERFMON_JSONPLOTSDEFREADTOOL_T
Interface for plots definition reading tools in this package.
float getFloat(const std::string &s, float defaultNum=std::numeric_limits< float >::quiet_NaN()) const
Utility functions to perform string->number conversion.
unsigned int getInt(const std::string &s, unsigned int defaultNum=0) const
StringArrayProperty m_plotsDefs
Tool properties.
JsonPlotsDefReadTool(const std::string &name)
Constructor.
virtual ~JsonPlotsDefReadTool()=default
Destructor.
ASG_TOOL_CLASS(JsonPlotsDefReadTool, IPlotsDefReadTool)
virtual StatusCode initialize() override
Initialize.
virtual std::vector< SinglePlotDefinition > getPlotsDefinitions() const override
Parse input pltos defnitions and returns vector of SinglePlotDefinition.
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition AsgTool.cxx:58
Athena include(s).