35 #ifndef ExG4HbookH1Manager_h 36 #define ExG4HbookH1Manager_h 1 44 #include <tools/hbook/h1> 49 class ExG4HbookFileManager;
60 h1_booking(
const std::vector<G4double>& edges)
68 for (
G4int i=0; i<
G4int(edges.size()); ++i) fEdges.push_back(edges[i]);
76 std::vector<G4double> fEdges;
88 friend class ExG4HbookAnalysisManager;
92 virtual ~ExG4HbookH1Manager();
105 G4int GetH1HbookIdOffset()
const;
108 void SetFileManager(ExG4HbookFileManager* fileManager);
113 G4bool onlyIfActive =
true)
const;
116 std::vector<tools::hbook::h1*>::iterator BeginH1();
117 std::vector<tools::hbook::h1*>::iterator EndH1();
118 std::vector<tools::hbook::h1*>::const_iterator BeginConstH1()
const;
119 std::vector<tools::hbook::h1*>::const_iterator EndConstH1()
const;
129 const G4String& binSchemeName =
"linear");
131 const std::vector<G4double>& edges,
139 const G4String& binSchemeName =
"linear");
141 const std::vector<G4double>& edges,
172 virtual G4bool WriteOnAscii(std::ofstream& output);
175 virtual std::shared_ptr<G4HnManager> GetHnManager();
180 void SetH1HbookIdOffset();
186 G4int CreateH1FromBooking(h1_booking* h1Booking,
189 h1_booking* h1Booking);
201 void CreateH1sFromBooking();
203 virtual h1_booking* GetH1Booking(
G4int id,
G4bool warn =
true)
const;
207 G4bool onlyIfActive =
true)
const;
212 ExG4HbookFileManager* fFileManager;
213 G4int fH1HbookIdOffset;
214 std::vector<tools::hbook::h1*> fH1Vector;
215 std::vector<h1_booking*> fH1BookingVector;
216 std::map<G4String, G4int> fH1NameIdMap;
221 inline void ExG4HbookH1Manager::SetFileManager(ExG4HbookFileManager* fileManager)
222 { fFileManager = fileManager; }
224 inline G4int ExG4HbookH1Manager::GetH1HbookIdOffset()
const {
225 return fH1HbookIdOffset;
228 inline std::vector<tools::hbook::h1*>::iterator ExG4HbookH1Manager::BeginH1()
231 inline std::vector<tools::hbook::h1*>::iterator ExG4HbookH1Manager::EndH1()
234 inline std::vector<tools::hbook::h1*>::const_iterator
235 ExG4HbookH1Manager::BeginConstH1()
const 236 {
return BeginConstT(); }
238 inline std::vector<tools::hbook::h1*>::const_iterator
239 ExG4HbookH1Manager::EndConstH1()
const 240 {
return EndConstT(); }
242 inline std::shared_ptr<G4HnManager> ExG4HbookH1Manager::GetHnManager()
243 {
return std::shared_ptr<G4HnManager>(fHnManager); }
Definition of the ExG4HbookBaseHnManager class.
ntupleExperimental Reset()
static const G4double factor