ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HistoManager.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file HistoManager.hh
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 //
30 //---------------------------------------------------------------------------
31 //
32 // ClassName: HistoManager
33 //
34 // Description: Singleton class to hold parameters and build histograms.
35 // User cannot access to the constructor.
36 // The pointer of the only existing object can be got via
37 // HistoManager::GetPointer() static method.
38 // The first invokation of this static method makes
39 // the singleton object.
40 //
41 // Author: V.Ivanchenko 27/09/00
42 //
43 // Modified:
44 //
45 //----------------------------------------------------------------------------
46 //
47 
48 #ifndef HistoManager_h
49 #define HistoManager_h 1
50 
51 #include "globals.hh"
52 #include "G4Material.hh"
53 
54 #include "g4root.hh"
55 
56 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
57 
58 class Histo;
61 
62 class HistoManager
63 {
64 public:
65 
66  HistoManager();
67 
68  ~HistoManager();
69 
70  void BeginOfRun();
71  void EndOfRun();
72 
73  void SetVerbose(G4int val);
74 
75  inline void SetParticleName(const G4String&);
76  inline void SetElementName(const G4String&);
77 
78  inline void SetNumberOfBinsE(G4int val);
79  inline void SetNumberOfBinsP(G4int val);
80 
81  inline void SetMinKinEnergy(G4double val);
82  inline void SetMaxKinEnergy(G4double val);
83 
84  inline void SetMinMomentum(G4double val);
85  inline void SetMaxMomentum(G4double val);
86 
87  inline void SetHistoName(G4String& val);
88 
89  inline void SetTargetMaterial(const G4Material* p);
90 
91 private:
92 
95 
98 
101 
106 
107  G4int fVerbose;
108  G4int fBinsE;
110 
112 };
113 
115 {
117 }
118 
120 {
121  fElementName = name;
122 }
123 
125 {
126  if(val>0) { fBinsE = val; }
127 }
128 
130 {
131  if(val>0) { fBinsP = val; }
132 }
133 
135 {
136  if(val>0 && val<fMaxKinEnergy) { fMinKinEnergy = val; }
137 }
138 
140 {
141  if(val>fMinKinEnergy) { fMaxKinEnergy = val; }
142 }
143 
145 {
146  if(val>0 && val<fMaxMomentum) { fMinMomentum = val; }
147 }
148 
150 {
151  if(val>fMinMomentum) { fMaxMomentum = val; }
152 }
153 
155 {
156  fHistoName = val;
157 }
158 
160 {
161  fTargetMaterial = p;
162 }
163 
164 #endif