Geant4  10.00.p02
HistoManager.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 //
28 //
29 // $Id: HistoManager.hh 79241 2014-02-20 16:03:35Z gcosmo $
30 //
31 //---------------------------------------------------------------------------
32 //
33 // ClassName: HistoManager
34 //
35 // Description: Singleton class to make analysis and build histograms.
36 // User cannot access to the constructor.
37 // The pointer of the only existing object can be got via
38 // HistoManager::GetPointer() static method.
39 // The first invokation of this static method makes
40 // the singleton object.
41 //
42 // Author: V.Ivanchenko 01.09.2010
43 //
44 //----------------------------------------------------------------------------
45 //
46 
47 #ifndef HistoManager_h
48 #define HistoManager_h 1
49 
50 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
51 
52 #include "globals.hh"
53 #include "G4DataVector.hh"
54 #include "G4StatDouble.hh"
55 
56 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
57 
58 class Histo;
59 class G4Step;
60 class G4ElectronIonPair;
61 
62 class HistoManager
63 {
64 
65 public:
66  // With description
67 
68  static HistoManager* GetPointer();
69 
70 private:
71 
72  HistoManager();
73 
74 public: // Without description
75 
76  ~HistoManager();
77 
78  void BeginOfRun();
79  void EndOfRun();
80 
81  void BeginOfEvent();
82  void EndOfEvent();
83 
84  void AddEnergy(G4double edep, const G4Step*);
85 
86  inline void SetMaxEnergy(G4double value);
87 
88  inline void SetNumberBins(G4int value);
89 
90  inline void SetNumberBinsCluster(G4int value);
91 
92  inline void SetEnergyPerChannel(G4double value);
93 
94  inline void SetVerbose(G4int value);
95 
96  inline G4int GetVerbose() const;
97 
98 private:
99 
100  // MEMBERS
102 
105 
114 
117 
119 
124 
127 };
128 
130 {
131  fMaxEnergy = value;
132 }
133 
135 {
136  fBinsE = value;
137 }
138 
140 {
141  fBinsCluster = value;
142 }
143 
145 {
146  if(value > 0.0) { fFactorALICE = 1./value; }
147 }
148 
149 inline void HistoManager::SetVerbose(G4int value)
150 {
151  fVerbose = value;
152 }
153 
155 {
156  return fVerbose;
157 }
158 
159 #endif
void SetEnergyPerChannel(G4double value)
G4double fMaxEnergy
G4double fTotStepGas
void EndOfEvent()
Definition: Histo.hh:56
G4double fFactorALICE
void SetNumberBins(G4int value)
void AddEnergy(G4double edep, const G4Step *)
void SetNumberBinsCluster(G4int value)
int G4int
Definition: G4Types.hh:78
G4double fTotCluster
G4double fStepGas
G4int fBinsCluster
G4ElectronIonPair * fElIonPair
G4double fMeanCluster
bool G4bool
Definition: G4Types.hh:79
void BeginOfEvent()
void BeginOfRun()
G4double fCluster
Definition: G4Step.hh:76
G4double fEvt
Histo * fHisto
G4DataVector fEgas
G4int GetVerbose() const
static HistoManager * fManager
G4double fOverflow
static HistoManager * GetPointer()
Definition: HistoManager.cc:58
double G4double
Definition: G4Types.hh:76
void SetMaxEnergy(G4double value)
G4double fTotEdep
G4bool fHistoBooked
void SetVerbose(G4int value)
G4StatDouble fEdep