Warning, file /include/Geant4/G4Plotter.hh was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029 #ifndef G4PLOTTER_HH
0030 #define G4PLOTTER_HH
0031
0032 #include "G4String.hh"
0033
0034 #include <utility>
0035 #include <vector>
0036
0037 namespace tools {namespace histo {class h1d;}}
0038 namespace tools {namespace histo {class h2d;}}
0039
0040 class G4Plotter {
0041 public:
0042 using RegionStyle = std::pair<unsigned int,G4String>;
0043 using Parameter = std::pair<G4String,G4String>;
0044 using RegionParameter = std::pair<unsigned int,Parameter>;
0045 using Region_h1d = std::pair<unsigned int,tools::histo::h1d*>;
0046 using Region_h2d = std::pair<unsigned int,tools::histo::h2d*>;
0047 using Region_h1 = std::pair<unsigned int,int>;
0048 using Region_h2 = std::pair<unsigned int,int>;
0049
0050 G4Plotter();
0051 virtual ~G4Plotter() = default;
0052 G4Plotter(const G4Plotter&);
0053 G4Plotter& operator = (const G4Plotter&);
0054
0055 void SetLayout(unsigned int colums,unsigned int rows);
0056 void AddStyle(const G4String& style);
0057 void AddRegionStyle(unsigned int region,const G4String& style);
0058 void AddRegionParameter(unsigned int region,const G4String& parameter,const G4String& value);
0059 void AddRegionHistogram(unsigned int region,tools::histo::h1d* histo);
0060 void AddRegionHistogram(unsigned int region,tools::histo::h2d* histo);
0061 void AddRegionH1(unsigned int region,int id);
0062 void AddRegionH2(unsigned int region,int id);
0063 void Reset();
0064 void Clear();
0065 void ClearRegion(unsigned int region);
0066
0067 unsigned int GetColumns() const {return fColumns;}
0068 unsigned int GetRows() const {return fRows;}
0069 const std::vector<G4String>& GetStyles() const {return fStyles;}
0070 const std::vector<RegionStyle>& GetRegionStyles() const {return fRegionStyles;}
0071 const std::vector<RegionParameter>& GetRegionParameters() const {return fRegionParameters;}
0072 const std::vector<Region_h1d>& GetRegionH1Ds() const {return fRegion_h1ds;}
0073 const std::vector<Region_h2d>& GetRegionH2Ds() const {return fRegion_h2ds;}
0074
0075 const std::vector<Region_h1>& GetRegionH1s() const {return fRegion_h1s;}
0076 const std::vector<Region_h2>& GetRegionH2s() const {return fRegion_h2s;}
0077
0078 private:
0079 unsigned int fColumns{1};
0080 unsigned int fRows{1};
0081 std::vector<G4String> fStyles;
0082 std::vector<RegionStyle> fRegionStyles;
0083 std::vector<RegionParameter> fRegionParameters;
0084 std::vector<Region_h1d> fRegion_h1ds;
0085 std::vector<Region_h2d> fRegion_h2ds;
0086 std::vector<Region_h1> fRegion_h1s;
0087 std::vector<Region_h2> fRegion_h2s;
0088 };
0089
0090 #endif