Geant4_10
G4H2DummyManager.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: G4H2DummyManager.hh 70604 2013-06-03 11:27:06Z ihrivnac $
27 
28 // Manager class for H2 for managers which do not support this object
29 // type. It will just issue warnings.
30 
31 // Author: Ivana Hrivnacova, 18/06/2013 (ivana@ipno.in2p3.fr)
32 
33 #ifndef G4H2DummyManager_h
34 #define G4H2DummyManager_h 1
35 
36 #include "G4VH2Manager.hh"
37 #include "globals.hh"
38 
40 {
41  public:
43  virtual ~G4H2DummyManager();
44 
45  protected:
46  // Virtual functions from base class
47  //
48 
49  // Methods to create histograms
50  //
51  virtual G4int CreateH2(const G4String& name, const G4String& title,
52  G4int nxbins, G4double xmin, G4double xmax,
53  G4int nybins, G4double ymin, G4double ymax,
54  const G4String& xunitName = "none",
55  const G4String& yunitName = "none",
56  const G4String& xfcnName = "none",
57  const G4String& yfcnName = "none",
58  const G4String& xbinScheme = "linear",
59  const G4String& ybinScheme = "linear");
60 
61  virtual G4int CreateH2(const G4String& name, const G4String& title,
62  const std::vector<G4double>& xedges,
63  const std::vector<G4double>& yedges,
64  const G4String& xunitName = "none",
65  const G4String& yunitName = "none",
66  const G4String& xfcnName = "none",
67  const G4String& yfcnName = "none");
68 
69  virtual G4bool SetH2(G4int id,
70  G4int nxbins, G4double xmin, G4double xmax,
71  G4int nybins, G4double ymin, G4double ymax,
72  const G4String& xunitName = "none",
73  const G4String& yunitName = "none",
74  const G4String& xfcnName = "none",
75  const G4String& yfcnName = "none",
76  const G4String& xbinScheme = "linear",
77  const G4String& ybinScheme = "linear");
78 
79  virtual G4bool SetH2(G4int id,
80  const std::vector<G4double>& xedges,
81  const std::vector<G4double>& yedges,
82  const G4String& xunitName = "none",
83  const G4String& yunitName = "none",
84  const G4String& xfcnName = "none",
85  const G4String& yfcnName = "none");
86 
87  virtual G4bool ScaleH2(G4int id, G4double factor);
88 
89  // Method to fill histograms
90  //
91  virtual G4bool FillH2(G4int id, G4double xvalue, G4double yvalue,
92  G4double weight = 1.0);
93 
94  // Methods to manipulate histograms
95  //
96 
97  // Access methods
98  virtual G4int GetNofH2s() const;
99  virtual G4int GetH2Id(const G4String& name, G4bool warn = true) const;
100 
101  // Access to H2 parameters
102  virtual G4int GetH2Nxbins(G4int id) const;
103  virtual G4double GetH2Xmin(G4int id) const;
104  virtual G4double GetH2Xmax(G4int id) const;
105  virtual G4double GetH2XWidth(G4int id) const;
106  virtual G4int GetH2Nybins(G4int id) const;
107  virtual G4double GetH2Ymin(G4int id) const;
108  virtual G4double GetH2Ymax(G4int id) const;
109  virtual G4double GetH2YWidth(G4int id) const;
110 
111  // Setters for attributes for plotting
112  virtual G4bool SetH2Title(G4int id, const G4String& title);
113  virtual G4bool SetH2XAxisTitle(G4int id, const G4String& title);
114  virtual G4bool SetH2YAxisTitle(G4int id, const G4String& title);
115  virtual G4bool SetH2ZAxisTitle(G4int id, const G4String& title);
116 
117  // Access attributes for plotting
118  virtual G4String GetH2Title(G4int id) const;
119  virtual G4String GetH2XAxisTitle(G4int id) const;
120  virtual G4String GetH2YAxisTitle(G4int id) const;
121  virtual G4String GetH2ZAxisTitle(G4int id) const;
122 
123  // Write data on ASCII file
124  virtual G4bool WriteOnAscii(std::ofstream& output);
125 };
126 
127 #endif
128 
virtual G4double GetH2XWidth(G4int id) const
virtual G4int GetH2Id(const G4String &name, G4bool warn=true) const
virtual G4bool SetH2Title(G4int id, const G4String &title)
virtual G4double GetH2Xmin(G4int id) const
const XML_Char * name
Definition: expat.h:151
virtual G4String GetH2XAxisTitle(G4int id) const
G4H2DummyManager(const G4AnalysisManagerState &state)
double weight
Definition: plottest35.C:25
int G4int
Definition: G4Types.hh:78
virtual G4double GetH2YWidth(G4int id) const
virtual G4double GetH2Ymax(G4int id) const
bool G4bool
Definition: G4Types.hh:79
virtual G4bool ScaleH2(G4int id, G4double factor)
virtual G4int GetH2Nybins(G4int id) const
virtual G4String GetH2Title(G4int id) const
virtual ~G4H2DummyManager()
virtual G4bool SetH2XAxisTitle(G4int id, const G4String &title)
virtual G4String GetH2ZAxisTitle(G4int id) const
subroutine title(NA, NB, NCA, NCB)
Definition: dpm25nuc7.f:1744
virtual G4int CreateH2(const G4String &name, const G4String &title, G4int nxbins, G4double xmin, G4double xmax, G4int nybins, G4double ymin, G4double ymax, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &xbinScheme="linear", const G4String &ybinScheme="linear")
virtual G4double GetH2Xmax(G4int id) const
virtual G4String GetH2YAxisTitle(G4int id) const
virtual G4bool WriteOnAscii(std::ofstream &output)
virtual G4double GetH2Ymin(G4int id) const
virtual G4bool SetH2ZAxisTitle(G4int id, const G4String &title)
double G4double
Definition: G4Types.hh:76
virtual G4bool FillH2(G4int id, G4double xvalue, G4double yvalue, G4double weight=1.0)
virtual G4bool SetH2YAxisTitle(G4int id, const G4String &title)
virtual G4int GetNofH2s() const
virtual G4int GetH2Nxbins(G4int id) const
virtual G4bool SetH2(G4int id, G4int nxbins, G4double xmin, G4double xmax, G4int nybins, G4double ymin, G4double ymax, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &xbinScheme="linear", const G4String &ybinScheme="linear")