Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4HnManager.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 //
26 // $Id: G4HnManager.hh 70604 2013-06-03 11:27:06Z ihrivnac $
27 
28 // Class for management of G4HnInformation.
29 // It implements functions handling the added H1/H2 information
30 // (not available in g4tools).
31 //
32 // Author: Ivana Hrivnacova, 18/06/2013 (ivana@ipno.in2p3.fr)
33 
34 #ifndef G4HnManager_h
35 #define G4HnManager_h 1
36 
37 #include "G4BaseAnalysisManager.hh"
38 #include "G4HnInformation.hh"
39 #include "globals.hh"
40 
41 #include <vector>
42 
44 {
45  public:
46  G4HnManager(const G4String& hnType,
47  const G4AnalysisManagerState& state);
48  virtual ~G4HnManager();
49 
50  // Methods to manipulate additional information
51 
52  G4HnInformation* AddHnInformation(const G4String& name, G4int nofDimensions);
53 
54  // Access methofd
56  G4String functionName = "",
57  G4bool warn = true) const;
58 
60  G4int dimension,
61  G4String functionName = "",
62  G4bool warn = true) const;
63 
64  const std::vector<G4HnInformation*>& GetHnVector() const;
65  G4int GetNofHns() const;
66  G4String GetHnType() const;
67 
68  // Activation option
69 
70  // Return false if activation is enabled and there is no object activated,
71  // return true otherwise
72  G4bool IsActive() const;
73 
74  // ASCII option
75 
76  // Return false if there is no object selected for ASCII output,
77  // return true otherwise
78  G4bool IsAscii() const;
79 
80  // Plotting option
81 
82  // Return false if there is no object selected for plotting,
83  // return true otherwise
84  G4bool IsPlotting() const;
85 
86  // Function implementing public analysis manager interface
87  //
88 
89  void SetActivation(G4bool activation);
90  void SetActivation(G4int id, G4bool activation);
91  void SetAscii(G4int id, G4bool ascii);
92  void SetPlotting(G4bool plotting);
93  void SetPlotting(G4int id, G4bool plotting);
94 
95  // Access to Hn additional information
96  G4String GetName(G4int id) const;
97  G4double GetXUnit(G4int id) const;
98  G4double GetYUnit(G4int id) const;
99  G4double GetZUnit(G4int id) const;
100  G4bool GetActivation(G4int id) const;
101  G4bool GetAscii(G4int id) const;
102  G4bool GetPlotting(G4int id) const;
103 
104  private:
105  // Data members
110 
111  // Additional histograms/ntuple properties not included in tools
112  std::vector<G4HnInformation*> fHnVector;
113 };
114 
116 { return fHnVector.size(); }
117 
119 { return fHnType; }
120 
121 inline const std::vector<G4HnInformation*>& G4HnManager::GetHnVector() const
122 { return fHnVector; }
123 
124 #endif
125 
const XML_Char * name
Definition: expat.h:151
G4String GetName(G4int id) const
Definition: G4HnManager.cc:219
void SetPlotting(G4bool plotting)
Definition: G4HnManager.cc:200
G4bool IsPlotting() const
Definition: G4HnManager.cc:115
G4int fNofPlottingObjects
Definition: G4HnManager.hh:109
G4double GetZUnit(G4int id) const
Definition: G4HnManager.cc:249
G4double GetYUnit(G4int id) const
Definition: G4HnManager.cc:239
const std::vector< G4HnInformation * > & GetHnVector() const
Definition: G4HnManager.hh:121
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
void SetActivation(G4bool activation)
Definition: G4HnManager.cc:141
void SetAscii(G4int id, G4bool ascii)
Definition: G4HnManager.cc:164
G4double GetXUnit(G4int id) const
Definition: G4HnManager.cc:229
G4HnManager(const G4String &hnType, const G4AnalysisManagerState &state)
Definition: G4HnManager.cc:36
G4HnInformation * GetHnInformation(G4int id, G4String functionName="", G4bool warn=true) const
Definition: G4HnManager.cc:70
G4bool GetActivation(G4int id) const
Definition: G4HnManager.cc:259
int G4int
Definition: G4Types.hh:78
G4String GetHnType() const
Definition: G4HnManager.hh:118
G4int GetNofHns() const
Definition: G4HnManager.hh:115
G4bool IsAscii() const
Definition: G4HnManager.cc:109
std::vector< G4HnInformation * > fHnVector
Definition: G4HnManager.hh:112
virtual ~G4HnManager()
Definition: G4HnManager.cc:48
G4int fNofActiveObjects
Definition: G4HnManager.hh:107
G4int fNofAsciiObjects
Definition: G4HnManager.hh:108
G4bool GetAscii(G4int id) const
Definition: G4HnManager.cc:269
G4bool GetPlotting(G4int id) const
Definition: G4HnManager.cc:279
G4HnDimensionInformation * GetHnDimensionInformation(G4int id, G4int dimension, G4String functionName="", G4bool warn=true) const
Definition: G4HnManager.cc:92
G4bool IsActive() const
Definition: G4HnManager.cc:103
G4HnInformation * AddHnInformation(const G4String &name, G4int nofDimensions)
Definition: G4HnManager.cc:60
G4String fHnType
Definition: G4HnManager.hh:106