Geant4  10.01
G4VH3Manager.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // $Id: G4VH3Manager.hh 70604 2013-06-03 11:27:06Z ihrivnac $
27 
28 // Base class for H3 manager.
29 //
30 // Author: Ivana Hrivnacova, 24/07/2014 (ivana@ipno.in2p3.fr)
31 
32 #ifndef G4VH3Manager_h
33 #define G4VH3Manager_h 1
34 
35 #include "G4BaseAnalysisManager.hh"
36 #include "globals.hh"
37 
38 class G4HnManager;
40 
42 {
43  // Disable using the object managers outside G4VAnalysisManager
44  friend class G4VAnalysisManager;
45  friend class G4VAnalysisReader;
46 
47  protected:
49  virtual ~G4VH3Manager();
50 
51  // Methods for handling histograms
52  virtual G4int CreateH3(const G4String& name, const G4String& title,
53  G4int nxbins, G4double xmin, G4double xmax,
54  G4int nybins, G4double ymin, G4double ymax,
55  G4int nzbins, G4double zmin, G4double zmax,
56  const G4String& xunitName = "none",
57  const G4String& yunitName = "none",
58  const G4String& zunitName = "none",
59  const G4String& xfcnName = "none",
60  const G4String& yfcnName = "none",
61  const G4String& zfcnName = "none",
62  const G4String& xbinScheme = "linear",
63  const G4String& ybinScheme = "linear",
64  const G4String& zbinScheme = "linear") = 0;
65 
66  virtual G4int CreateH3(const G4String& name, const G4String& title,
67  const std::vector<G4double>& xedges,
68  const std::vector<G4double>& yedges,
69  const std::vector<G4double>& zedges,
70  const G4String& xunitName = "none",
71  const G4String& yunitName = "none",
72  const G4String& zunitName = "none",
73  const G4String& xfcnName = "none",
74  const G4String& yfcnName = "none",
75  const G4String& zfcnName = "none") = 0;
76 
77  virtual G4bool SetH3(G4int id,
78  G4int nxbins, G4double xmin, G4double xmax,
79  G4int nzbins, G4double zmin, G4double zmax,
80  G4int nybins, G4double ymin, G4double ymax,
81  const G4String& xunitName = "none",
82  const G4String& yunitName = "none",
83  const G4String& zunitName = "none",
84  const G4String& xfcnName = "none",
85  const G4String& yfcnName = "none",
86  const G4String& zfcnName = "none",
87  const G4String& xbinScheme = "linear",
88  const G4String& ybinScheme = "linear",
89  const G4String& zbinScheme = "linear") = 0;
90 
91  virtual G4bool SetH3(G4int id,
92  const std::vector<G4double>& xedges,
93  const std::vector<G4double>& yedges,
94  const std::vector<G4double>& zedges,
95  const G4String& xunitName = "none",
96  const G4String& yunitName = "none",
97  const G4String& zunitName = "none",
98  const G4String& xfcnName = "none",
99  const G4String& yfcnName = "none",
100  const G4String& zfcnName = "none") = 0;
101 
102  virtual G4bool ScaleH3(G4int id, G4double factor) = 0;
103 
104  // Methods to fill histograms
105  virtual G4bool FillH3(G4int id,
106  G4double xvalue, G4double yvalue, G4double zvalue,
107  G4double weight = 1.0) = 0;
108 
109  // Access methods
110  virtual G4int GetH3Id(const G4String& name, G4bool warn = true) const = 0;
111 
112  // Access to H3 parameters
113  virtual G4int GetH3Nxbins(G4int id) const = 0;
114  virtual G4double GetH3Xmin(G4int id) const = 0;
115  virtual G4double GetH3Xmax(G4int id) const = 0;
116  virtual G4double GetH3XWidth(G4int id) const = 0;
117  virtual G4int GetH3Nybins(G4int id) const = 0;
118  virtual G4double GetH3Ymin(G4int id) const = 0;
119  virtual G4double GetH3Ymax(G4int id) const = 0;
120  virtual G4double GetH3YWidth(G4int id) const = 0;
121  virtual G4int GetH3Nzbins(G4int id) const = 0;
122  virtual G4double GetH3Zmin(G4int id) const = 0;
123  virtual G4double GetH3Zmax(G4int id) const = 0;
124  virtual G4double GetH3ZWidth(G4int id) const = 0;
125 
126  // Setters for attributes for plotting
127  virtual G4bool SetH3Title(G4int id, const G4String& title) = 0;
128  virtual G4bool SetH3XAxisTitle(G4int id, const G4String& title) = 0;
129  virtual G4bool SetH3YAxisTitle(G4int id, const G4String& title) = 0;
130  virtual G4bool SetH3ZAxisTitle(G4int id, const G4String& title) = 0;
131 
132  // Access attributes for plotting
133  virtual G4String GetH3Title(G4int id) const = 0;
134  virtual G4String GetH3XAxisTitle(G4int id) const = 0;
135  virtual G4String GetH3YAxisTitle(G4int id) const = 0;
136  virtual G4String GetH3ZAxisTitle(G4int id) const = 0;
137 
138  // Methods to manipulate histograms
139  virtual G4bool WriteOnAscii(std::ofstream& output) = 0;
140 
141  // data members
143 
144  private:
145  // Not implemented copy constructor
146  G4VH3Manager(const G4VH3Manager& rhs);
147  // Not implemented assignment operator
148  G4VH3Manager& operator=(const G4VH3Manager& rhs);
149 };
150 
151 #endif
152 
virtual G4double GetH3Ymin(G4int id) const =0
G4VH3Manager & operator=(const G4VH3Manager &rhs)
virtual G4double GetH3Xmax(G4int id) const =0
virtual G4bool SetH3(G4int id, G4int nxbins, G4double xmin, G4double xmax, G4int nzbins, G4double zmin, G4double zmax, G4int nybins, G4double ymin, G4double ymax, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &zunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &zfcnName="none", const G4String &xbinScheme="linear", const G4String &ybinScheme="linear", const G4String &zbinScheme="linear")=0
virtual G4bool ScaleH3(G4int id, G4double factor)=0
virtual G4double GetH3ZWidth(G4int id) const =0
G4String name
Definition: TRTMaterials.hh:40
virtual G4bool SetH3ZAxisTitle(G4int id, const G4String &title)=0
virtual G4int GetH3Nybins(G4int id) const =0
virtual G4String GetH3ZAxisTitle(G4int id) const =0
virtual G4int GetH3Nzbins(G4int id) const =0
virtual G4int CreateH3(const G4String &name, const G4String &title, G4int nxbins, G4double xmin, G4double xmax, G4int nybins, G4double ymin, G4double ymax, G4int nzbins, G4double zmin, G4double zmax, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &zunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &zfcnName="none", const G4String &xbinScheme="linear", const G4String &ybinScheme="linear", const G4String &zbinScheme="linear")=0
int G4int
Definition: G4Types.hh:78
G4HnManager * fHnManager
virtual G4int GetH3Id(const G4String &name, G4bool warn=true) const =0
virtual G4bool SetH3XAxisTitle(G4int id, const G4String &title)=0
virtual G4bool SetH3Title(G4int id, const G4String &title)=0
bool G4bool
Definition: G4Types.hh:79
virtual G4double GetH3Zmax(G4int id) const =0
virtual G4double GetH3Ymax(G4int id) const =0
virtual ~G4VH3Manager()
Definition: G4VH3Manager.cc:42
virtual G4String GetH3XAxisTitle(G4int id) const =0
virtual G4int GetH3Nxbins(G4int id) const =0
virtual G4double GetH3Zmin(G4int id) const =0
static const G4double factor
virtual G4bool WriteOnAscii(std::ofstream &output)=0
virtual G4double GetH3Xmin(G4int id) const =0
virtual G4double GetH3XWidth(G4int id) const =0
virtual G4bool FillH3(G4int id, G4double xvalue, G4double yvalue, G4double zvalue, G4double weight=1.0)=0
virtual G4double GetH3YWidth(G4int id) const =0
virtual G4String GetH3Title(G4int id) const =0
G4VH3Manager(const G4AnalysisManagerState &state)
Definition: G4VH3Manager.cc:34
virtual G4String GetH3YAxisTitle(G4int id) const =0
double G4double
Definition: G4Types.hh:76
virtual G4bool SetH3YAxisTitle(G4int id, const G4String &title)=0