Geant4  10.00.p02
G4H1DummyManager.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: G4H1DummyManager.hh 70604 2013-06-03 11:27:06Z ihrivnac $
27 
28 // Manager class for H1 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 G4H1DummyManager_h
34 #define G4H1DummyManager_h 1
35 
36 #include "G4VH1Manager.hh"
37 #include "globals.hh"
38 
40 {
41  public:
43  virtual ~G4H1DummyManager();
44 
45  protected:
46  // Virtual functions from base class
47 
48  // Methods to create histograms
49  //
50  virtual G4int CreateH1(const G4String& name, const G4String& title,
51  G4int nbins, G4double xmin, G4double xmax,
52  const G4String& unitName = "none",
53  const G4String& fcnName = "none",
54  const G4String& binScheme = "linear");
55  virtual G4int CreateH1(const G4String& name, const G4String& title,
56  const std::vector<G4double>& edges,
57  const G4String& unitName = "none",
58  const G4String& fcnName = "none");
59 
60  virtual G4bool SetH1(G4int id,
61  G4int nbins, G4double xmin, G4double xmax,
62  const G4String& unitName = "none",
63  const G4String& fcnName = "none",
64  const G4String& binSchemeName = "linear");
65  virtual G4bool SetH1(G4int id,
66  const std::vector<G4double>& edges,
67  const G4String& unitName = "none",
68  const G4String& fcnName = "none");
69 
70  virtual G4bool ScaleH1(G4int id, G4double factor);
71 
72  // Method to fill histograms
73  //
74  virtual G4bool FillH1(G4int id, G4double value, G4double weight = 1.0);
75 
76  // Access methods
77  //
78  virtual G4int GetNofH1s() const;
79  virtual G4int GetH1Id(const G4String& name, G4bool warn = true) const;
80 
81  // Access to H1 parameters
82  virtual G4int GetH1Nbins(G4int id) const;
83  virtual G4double GetH1Xmin(G4int id) const;
84  virtual G4double GetH1Xmax(G4int id) const;
85  virtual G4double GetH1Width(G4int id) const;
86 
87  // Attributes for plotting
88  //
89 
90  // Setters
91  virtual G4bool SetH1Title(G4int id, const G4String& title);
92  virtual G4bool SetH1XAxisTitle(G4int id, const G4String& title);
93  virtual G4bool SetH1YAxisTitle(G4int id, const G4String& title);
94 
95  // Accessors
96  virtual G4String GetH1Title(G4int id) const;
97  virtual G4String GetH1XAxisTitle(G4int id) const;
98  virtual G4String GetH1YAxisTitle(G4int id) const;
99 
100  // Write data on ASCII file
101  virtual G4bool WriteOnAscii(std::ofstream& output);
102 };
103 
104 #endif
105 
virtual G4bool SetH1Title(G4int id, const G4String &title)
virtual G4int GetNofH1s() const
virtual G4bool SetH1XAxisTitle(G4int id, const G4String &title)
virtual G4bool SetH1(G4int id, G4int nbins, G4double xmin, G4double xmax, const G4String &unitName="none", const G4String &fcnName="none", const G4String &binSchemeName="linear")
G4String name
Definition: TRTMaterials.hh:40
virtual G4double GetH1Width(G4int id) const
virtual G4double GetH1Xmax(G4int id) const
int G4int
Definition: G4Types.hh:78
G4H1DummyManager(const G4AnalysisManagerState &state)
virtual G4int GetH1Nbins(G4int id) const
virtual G4String GetH1YAxisTitle(G4int id) const
bool G4bool
Definition: G4Types.hh:79
virtual G4bool FillH1(G4int id, G4double value, G4double weight=1.0)
virtual G4String GetH1Title(G4int id) const
virtual ~G4H1DummyManager()
virtual G4bool SetH1YAxisTitle(G4int id, const G4String &title)
virtual G4bool WriteOnAscii(std::ofstream &output)
double G4double
Definition: G4Types.hh:76
virtual G4bool ScaleH1(G4int id, G4double factor)
virtual G4int CreateH1(const G4String &name, const G4String &title, G4int nbins, G4double xmin, G4double xmax, const G4String &unitName="none", const G4String &fcnName="none", const G4String &binScheme="linear")
virtual G4int GetH1Id(const G4String &name, G4bool warn=true) const
virtual G4double GetH1Xmin(G4int id) const
virtual G4String GetH1XAxisTitle(G4int id) const