Geant4-11
Public Types | Public Member Functions | Private Attributes
G4Plotter Class Reference

#include <G4Plotter.hh>

Public Types

using Parameter = std::pair< G4String, G4String >
 
using Region_h1 = std::pair< unsigned int, int >
 
using Region_h1d = std::pair< unsigned int, tools::histo::h1d * >
 
using Region_h2 = std::pair< unsigned int, int >
 
using Region_h2d = std::pair< unsigned int, tools::histo::h2d * >
 
using RegionParameter = std::pair< unsigned int, Parameter >
 
using RegionStyle = std::pair< unsigned int, G4String >
 

Public Member Functions

void AddRegionH1 (unsigned int region, int id)
 
void AddRegionH2 (unsigned int region, int id)
 
void AddRegionHistogram (unsigned int region, tools::histo::h1d *histo)
 
void AddRegionHistogram (unsigned int region, tools::histo::h2d *histo)
 
void AddRegionParameter (unsigned int region, const G4String &parameter, const G4String &value)
 
void AddRegionStyle (unsigned int region, const G4String &style)
 
void AddStyle (const G4String &style)
 
void Clear ()
 
void ClearRegion (unsigned int region)
 
 G4Plotter ()
 
 G4Plotter (const G4Plotter &)
 
unsigned int GetColumns () const
 
const std::vector< Region_h1d > & GetRegionH1Ds () const
 
const std::vector< Region_h1 > & GetRegionH1s () const
 
const std::vector< Region_h2d > & GetRegionH2Ds () const
 
const std::vector< Region_h2 > & GetRegionH2s () const
 
const std::vector< RegionParameter > & GetRegionParameters () const
 
const std::vector< RegionStyle > & GetRegionStyles () const
 
unsigned int GetRows () const
 
const std::vector< G4String > & GetStyles () const
 
G4Plotteroperator= (const G4Plotter &)
 
void Reset ()
 
void SetLayout (unsigned int colums, unsigned int rows)
 
virtual ~G4Plotter ()=default
 

Private Attributes

unsigned int fColumns
 
std::vector< Region_h1dfRegion_h1ds
 
std::vector< Region_h1fRegion_h1s
 
std::vector< Region_h2dfRegion_h2ds
 
std::vector< Region_h2fRegion_h2s
 
std::vector< RegionParameterfRegionParameters
 
std::vector< RegionStylefRegionStyles
 
unsigned int fRows
 
std::vector< G4StringfStyles
 

Detailed Description

Definition at line 40 of file G4Plotter.hh.

Member Typedef Documentation

◆ Parameter

Definition at line 43 of file G4Plotter.hh.

◆ Region_h1

using G4Plotter::Region_h1 = std::pair<unsigned int,int>

Definition at line 47 of file G4Plotter.hh.

◆ Region_h1d

using G4Plotter::Region_h1d = std::pair<unsigned int,tools::histo::h1d*>

Definition at line 45 of file G4Plotter.hh.

◆ Region_h2

using G4Plotter::Region_h2 = std::pair<unsigned int,int>

Definition at line 48 of file G4Plotter.hh.

◆ Region_h2d

using G4Plotter::Region_h2d = std::pair<unsigned int,tools::histo::h2d*>

Definition at line 46 of file G4Plotter.hh.

◆ RegionParameter

using G4Plotter::RegionParameter = std::pair<unsigned int,Parameter>

Definition at line 44 of file G4Plotter.hh.

◆ RegionStyle

using G4Plotter::RegionStyle = std::pair<unsigned int,G4String>

Definition at line 42 of file G4Plotter.hh.

Constructor & Destructor Documentation

◆ G4Plotter() [1/2]

G4Plotter::G4Plotter ( )

Definition at line 30 of file G4Plotter.cc.

30:fColumns(1),fRows(1) {}
unsigned int fRows
Definition: G4Plotter.hh:80
unsigned int fColumns
Definition: G4Plotter.hh:79

◆ ~G4Plotter()

virtual G4Plotter::~G4Plotter ( )
virtualdefault

◆ G4Plotter() [2/2]

G4Plotter::G4Plotter ( const G4Plotter a_from)

Definition at line 32 of file G4Plotter.cc.

33:fColumns(a_from.fColumns)
34,fRows(a_from.fRows)
35,fStyles(a_from.fStyles)
42{}
std::vector< Region_h2d > fRegion_h2ds
Definition: G4Plotter.hh:85
std::vector< RegionParameter > fRegionParameters
Definition: G4Plotter.hh:83
std::vector< RegionStyle > fRegionStyles
Definition: G4Plotter.hh:82
std::vector< Region_h1 > fRegion_h1s
Definition: G4Plotter.hh:86
std::vector< Region_h1d > fRegion_h1ds
Definition: G4Plotter.hh:84
std::vector< Region_h2 > fRegion_h2s
Definition: G4Plotter.hh:87
std::vector< G4String > fStyles
Definition: G4Plotter.hh:81

Member Function Documentation

◆ AddRegionH1()

void G4Plotter::AddRegionH1 ( unsigned int  region,
int  id 
)

Definition at line 77 of file G4Plotter.cc.

77 {
78 fRegion_h1s.push_back(Region_h1(a_region,a_id));
79}
std::pair< unsigned int, int > Region_h1
Definition: G4Plotter.hh:47

References fRegion_h1s.

◆ AddRegionH2()

void G4Plotter::AddRegionH2 ( unsigned int  region,
int  id 
)

Definition at line 80 of file G4Plotter.cc.

80 {
81 fRegion_h2s.push_back(Region_h2(a_region,a_id));
82}
std::pair< unsigned int, int > Region_h2
Definition: G4Plotter.hh:48

References fRegion_h2s.

◆ AddRegionHistogram() [1/2]

void G4Plotter::AddRegionHistogram ( unsigned int  region,
tools::histo::h1d *  histo 
)

Definition at line 71 of file G4Plotter.cc.

71 {
72 fRegion_h1ds.push_back(Region_h1d(a_region,a_h));
73}
std::pair< unsigned int, tools::histo::h1d * > Region_h1d
Definition: G4Plotter.hh:45

References fRegion_h1ds.

◆ AddRegionHistogram() [2/2]

void G4Plotter::AddRegionHistogram ( unsigned int  region,
tools::histo::h2d *  histo 
)

Definition at line 74 of file G4Plotter.cc.

74 {
75 fRegion_h2ds.push_back(Region_h2d(a_region,a_h));
76}
std::pair< unsigned int, tools::histo::h2d * > Region_h2d
Definition: G4Plotter.hh:46

References fRegion_h2ds.

◆ AddRegionParameter()

void G4Plotter::AddRegionParameter ( unsigned int  region,
const G4String parameter,
const G4String value 
)

Definition at line 67 of file G4Plotter.cc.

67 {
68 fRegionParameters.push_back(RegionParameter(a_region,Parameter(a_parameter,a_value)));
69}
std::pair< G4String, G4String > Parameter
Definition: G4Plotter.hh:43
std::pair< unsigned int, Parameter > RegionParameter
Definition: G4Plotter.hh:44

References fRegionParameters.

◆ AddRegionStyle()

void G4Plotter::AddRegionStyle ( unsigned int  region,
const G4String style 
)

Definition at line 64 of file G4Plotter.cc.

64 {
65 fRegionStyles.push_back(RegionStyle(a_region,a_style));
66}
std::pair< unsigned int, G4String > RegionStyle
Definition: G4Plotter.hh:42

References fRegionStyles.

◆ AddStyle()

void G4Plotter::AddStyle ( const G4String style)

Definition at line 61 of file G4Plotter.cc.

61 {
62 fStyles.push_back(a_style);
63}

References fStyles.

◆ Clear()

void G4Plotter::Clear ( )

Definition at line 95 of file G4Plotter.cc.

95 {
96 fRegion_h1ds.clear();
97 fRegion_h2ds.clear();
98 fRegion_h1s.clear();
99 fRegion_h2s.clear();
100}

References fRegion_h1ds, fRegion_h1s, fRegion_h2ds, and fRegion_h2s.

◆ ClearRegion()

void G4Plotter::ClearRegion ( unsigned int  region)

Definition at line 101 of file G4Plotter.cc.

101 {
102 {std::vector<Region_h1d>::iterator it;
103 for(it=fRegion_h1ds.begin();it!=fRegion_h1ds.end();) {
104 if((*it).first==a_region) {
105 it = fRegion_h1ds.erase(it);
106 } else {
107 ++it;
108 }
109 }}
110 {std::vector<Region_h2d>::iterator it;
111 for(it=fRegion_h2ds.begin();it!=fRegion_h2ds.end();) {
112 if((*it).first==a_region) {
113 it = fRegion_h2ds.erase(it);
114 } else {
115 ++it;
116 }
117 }}
118
119 {std::vector<Region_h1>::iterator it;
120 for(it=fRegion_h1s.begin();it!=fRegion_h1s.end();) {
121 if((*it).first==a_region) {
122 it = fRegion_h1s.erase(it);
123 } else {
124 ++it;
125 }
126 }}
127 {std::vector<Region_h2>::iterator it;
128 for(it=fRegion_h2s.begin();it!=fRegion_h2s.end();) {
129 if((*it).first==a_region) {
130 it = fRegion_h2s.erase(it);
131 } else {
132 ++it;
133 }
134 }}
135}

References fRegion_h1ds, fRegion_h1s, fRegion_h2ds, and fRegion_h2s.

◆ GetColumns()

unsigned int G4Plotter::GetColumns ( ) const
inline

Definition at line 67 of file G4Plotter.hh.

67{return fColumns;}

References fColumns.

Referenced by G4ToolsSGSceneHandler::AddPrimitive().

◆ GetRegionH1Ds()

const std::vector< Region_h1d > & G4Plotter::GetRegionH1Ds ( ) const
inline

Definition at line 72 of file G4Plotter.hh.

72{return fRegion_h1ds;}

References fRegion_h1ds.

◆ GetRegionH1s()

const std::vector< Region_h1 > & G4Plotter::GetRegionH1s ( ) const
inline

Definition at line 75 of file G4Plotter.hh.

75{return fRegion_h1s;}

References fRegion_h1s.

Referenced by G4ToolsSGSceneHandler::AddPrimitive().

◆ GetRegionH2Ds()

const std::vector< Region_h2d > & G4Plotter::GetRegionH2Ds ( ) const
inline

Definition at line 73 of file G4Plotter.hh.

73{return fRegion_h2ds;}

References fRegion_h2ds.

◆ GetRegionH2s()

const std::vector< Region_h2 > & G4Plotter::GetRegionH2s ( ) const
inline

Definition at line 76 of file G4Plotter.hh.

76{return fRegion_h2s;}

References fRegion_h2s.

Referenced by G4ToolsSGSceneHandler::AddPrimitive().

◆ GetRegionParameters()

const std::vector< RegionParameter > & G4Plotter::GetRegionParameters ( ) const
inline

Definition at line 71 of file G4Plotter.hh.

71{return fRegionParameters;}

References fRegionParameters.

Referenced by G4ToolsSGSceneHandler::AddPrimitive().

◆ GetRegionStyles()

const std::vector< RegionStyle > & G4Plotter::GetRegionStyles ( ) const
inline

Definition at line 70 of file G4Plotter.hh.

70{return fRegionStyles;}

References fRegionStyles.

Referenced by G4ToolsSGSceneHandler::AddPrimitive().

◆ GetRows()

unsigned int G4Plotter::GetRows ( ) const
inline

Definition at line 68 of file G4Plotter.hh.

68{return fRows;}

References fRows.

Referenced by G4ToolsSGSceneHandler::AddPrimitive().

◆ GetStyles()

const std::vector< G4String > & G4Plotter::GetStyles ( ) const
inline

Definition at line 69 of file G4Plotter.hh.

69{return fStyles;}

References fStyles.

Referenced by G4ToolsSGSceneHandler::AddPrimitive().

◆ operator=()

G4Plotter & G4Plotter::operator= ( const G4Plotter a_from)

Definition at line 44 of file G4Plotter.cc.

44 {
45 fColumns = a_from.fColumns;
46 fRows = a_from.fRows;
47 fStyles = a_from.fStyles;
52 fRegion_h1s = a_from.fRegion_h1s;
53 fRegion_h2s = a_from.fRegion_h2s;
54 return *this;
55}

References fColumns, fRegion_h1ds, fRegion_h1s, fRegion_h2ds, fRegion_h2s, fRegionParameters, fRegionStyles, fRows, and fStyles.

◆ Reset()

void G4Plotter::Reset ( )

Definition at line 84 of file G4Plotter.cc.

84 {
85 fColumns = 1;
86 fRows = 1;
87 fStyles.clear();
88 fRegionStyles.clear();
89 fRegionParameters.clear();
90 fRegion_h1ds.clear();
91 fRegion_h2ds.clear();
92 fRegion_h1s.clear();
93 fRegion_h2s.clear();
94}

References fColumns, fRegion_h1ds, fRegion_h1s, fRegion_h2ds, fRegion_h2s, fRegionParameters, fRegionStyles, fRows, and fStyles.

◆ SetLayout()

void G4Plotter::SetLayout ( unsigned int  colums,
unsigned int  rows 
)

Definition at line 57 of file G4Plotter.cc.

57 {
58 fColumns = a_cols;
59 fRows = a_rows;
60}

References fColumns, and fRows.

Field Documentation

◆ fColumns

unsigned int G4Plotter::fColumns
private

Definition at line 79 of file G4Plotter.hh.

Referenced by GetColumns(), operator=(), Reset(), and SetLayout().

◆ fRegion_h1ds

std::vector<Region_h1d> G4Plotter::fRegion_h1ds
private

Definition at line 84 of file G4Plotter.hh.

Referenced by AddRegionHistogram(), Clear(), ClearRegion(), GetRegionH1Ds(), operator=(), and Reset().

◆ fRegion_h1s

std::vector<Region_h1> G4Plotter::fRegion_h1s
private

Definition at line 86 of file G4Plotter.hh.

Referenced by AddRegionH1(), Clear(), ClearRegion(), GetRegionH1s(), operator=(), and Reset().

◆ fRegion_h2ds

std::vector<Region_h2d> G4Plotter::fRegion_h2ds
private

Definition at line 85 of file G4Plotter.hh.

Referenced by AddRegionHistogram(), Clear(), ClearRegion(), GetRegionH2Ds(), operator=(), and Reset().

◆ fRegion_h2s

std::vector<Region_h2> G4Plotter::fRegion_h2s
private

Definition at line 87 of file G4Plotter.hh.

Referenced by AddRegionH2(), Clear(), ClearRegion(), GetRegionH2s(), operator=(), and Reset().

◆ fRegionParameters

std::vector<RegionParameter> G4Plotter::fRegionParameters
private

Definition at line 83 of file G4Plotter.hh.

Referenced by AddRegionParameter(), GetRegionParameters(), operator=(), and Reset().

◆ fRegionStyles

std::vector<RegionStyle> G4Plotter::fRegionStyles
private

Definition at line 82 of file G4Plotter.hh.

Referenced by AddRegionStyle(), GetRegionStyles(), operator=(), and Reset().

◆ fRows

unsigned int G4Plotter::fRows
private

Definition at line 80 of file G4Plotter.hh.

Referenced by GetRows(), operator=(), Reset(), and SetLayout().

◆ fStyles

std::vector<G4String> G4Plotter::fStyles
private

Definition at line 81 of file G4Plotter.hh.

Referenced by AddStyle(), GetStyles(), operator=(), and Reset().


The documentation for this class was generated from the following files: