Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4Plotter Class Reference

#include <G4Plotter.hh>

Public Types

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

Public Member Functions

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

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 ( )
default

◆ ~G4Plotter()

virtual G4Plotter::~G4Plotter ( )
virtualdefault

◆ G4Plotter() [2/2]

G4Plotter::G4Plotter ( const G4Plotter & )
default

Member Function Documentation

◆ AddRegionH1()

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

Definition at line 56 of file G4Plotter.cc.

56 {
57 fRegion_h1s.emplace_back(a_region,a_id);
58}

◆ AddRegionH2()

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

Definition at line 59 of file G4Plotter.cc.

59 {
60 fRegion_h2s.emplace_back(a_region,a_id);
61}

◆ AddRegionHistogram() [1/2]

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

Definition at line 50 of file G4Plotter.cc.

50 {
51 fRegion_h1ds.emplace_back(a_region,a_h);
52}

◆ AddRegionHistogram() [2/2]

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

Definition at line 53 of file G4Plotter.cc.

53 {
54 fRegion_h2ds.emplace_back(a_region,a_h);
55}

◆ AddRegionParameter()

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

Definition at line 46 of file G4Plotter.cc.

46 {
47 fRegionParameters.emplace_back(a_region,Parameter(a_parameter,a_value));
48}
std::pair< G4String, G4String > Parameter
Definition G4Plotter.hh:43

◆ AddRegionStyle()

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

Definition at line 43 of file G4Plotter.cc.

43 {
44 fRegionStyles.emplace_back(a_region,a_style);
45}

◆ AddStyle()

void G4Plotter::AddStyle ( const G4String & style)

Definition at line 40 of file G4Plotter.cc.

40 {
41 fStyles.push_back(a_style);
42}

◆ Clear()

void G4Plotter::Clear ( )

Definition at line 74 of file G4Plotter.cc.

74 {
75 fRegion_h1ds.clear();
76 fRegion_h2ds.clear();
77 fRegion_h1s.clear();
78 fRegion_h2s.clear();
79}

◆ ClearRegion()

void G4Plotter::ClearRegion ( unsigned int region)

Definition at line 80 of file G4Plotter.cc.

80 {
81 {std::vector<Region_h1d>::iterator it;
82 for(it=fRegion_h1ds.begin();it!=fRegion_h1ds.end();) {
83 if((*it).first==a_region) {
84 it = fRegion_h1ds.erase(it);
85 } else {
86 ++it;
87 }
88 }}
89 {std::vector<Region_h2d>::iterator it;
90 for(it=fRegion_h2ds.begin();it!=fRegion_h2ds.end();) {
91 if((*it).first==a_region) {
92 it = fRegion_h2ds.erase(it);
93 } else {
94 ++it;
95 }
96 }}
97
98 {std::vector<Region_h1>::iterator it;
99 for(it=fRegion_h1s.begin();it!=fRegion_h1s.end();) {
100 if((*it).first==a_region) {
101 it = fRegion_h1s.erase(it);
102 } else {
103 ++it;
104 }
105 }}
106 {std::vector<Region_h2>::iterator it;
107 for(it=fRegion_h2s.begin();it!=fRegion_h2s.end();) {
108 if((*it).first==a_region) {
109 it = fRegion_h2s.erase(it);
110 } else {
111 ++it;
112 }
113 }}
114}

◆ GetColumns()

unsigned int G4Plotter::GetColumns ( ) const
inline

Definition at line 67 of file G4Plotter.hh.

67{return 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;}

◆ GetRegionH1s()

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

Definition at line 75 of file G4Plotter.hh.

75{return 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;}

◆ GetRegionH2s()

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

Definition at line 76 of file G4Plotter.hh.

76{return 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;}

Referenced by G4ToolsSGSceneHandler::AddPrimitive().

◆ GetRegionStyles()

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

Definition at line 70 of file G4Plotter.hh.

70{return fRegionStyles;}

Referenced by G4ToolsSGSceneHandler::AddPrimitive().

◆ GetRows()

unsigned int G4Plotter::GetRows ( ) const
inline

Definition at line 68 of file G4Plotter.hh.

68{return 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;}

Referenced by G4ToolsSGSceneHandler::AddPrimitive().

◆ operator=()

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

◆ Reset()

void G4Plotter::Reset ( )

Definition at line 63 of file G4Plotter.cc.

63 {
64 fColumns = 1;
65 fRows = 1;
66 fStyles.clear();
67 fRegionStyles.clear();
68 fRegionParameters.clear();
69 fRegion_h1ds.clear();
70 fRegion_h2ds.clear();
71 fRegion_h1s.clear();
72 fRegion_h2s.clear();
73}

◆ SetLayout()

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

Definition at line 36 of file G4Plotter.cc.

36 {
37 fColumns = a_cols;
38 fRows = a_rows;
39}

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