35 #ifndef ExG4HbookAnalysisManager_h
36 #define ExG4HbookAnalysisManager_h 1
41 #include <tools/hbook/wfile>
42 #include <tools/hbook/h1>
43 #include <tools/hbook/h2>
44 #include <tools/hbook/wntuple>
49 #define setpawc setpawc_
50 #define setntuc setntuc_
53 class ExG4HbookAnalysisManager;
101 ExG4HbookAnalysisManager();
102 virtual ~ExG4HbookAnalysisManager();
105 static ExG4HbookAnalysisManager* Instance();
158 G4bool onlyIfActive =
true)
const;
160 G4bool onlyIfActive =
true)
const;
161 virtual tools::hbook::wntuple* GetNtuple()
const;
218 G4int GetH1HbookIdOffset()
const;
219 G4int GetH2HbookIdOffset()
const;
220 G4int GetNtupleHbookId()
const;
228 static ExG4HbookAnalysisManager* fgInstance;
229 static const G4int fgkDefaultH2HbookIdOffset;
230 static const G4int fgkDefaultNtupleHbookId;
231 static const G4String fgkDefaultNtupleDirectoryName;
235 void SetH1HbookIdOffset();
236 void SetH2HbookIdOffset();
237 void CreateH1FromBooking();
238 void CreateH2FromBooking();
239 void CreateNtupleFromBooking();
240 tools::hbook::wntuple::column<int>* GetNtupleIColumn(
G4int id)
const;
241 tools::hbook::wntuple::column<float>* GetNtupleFColumn(
G4int id)
const;
242 tools::hbook::wntuple::column<double>* GetNtupleDColumn(
G4int id)
const;
245 virtual h1_booking* GetH1Booking(
G4int id,
G4bool warn =
true)
const;
246 virtual h2_booking* GetH2Booking(
G4int id,
G4bool warn =
true)
const;
250 G4bool onlyIfActive =
true)
const;
253 G4bool onlyIfActive =
true)
const;
259 G4int fH1HbookIdOffset;
260 G4int fH2HbookIdOffset;
261 G4int fNtupleHbookId;
263 tools::hbook::wfile* fFile;
265 std::vector<tools::hbook::h1*> fH1Vector;
266 std::vector<tools::hbook::h2*> fH2Vector;
267 std::vector<h1_booking*> fH1BookingVector;
268 std::vector<h2_booking*> fH2BookingVector;
269 std::map<G4String, G4int> fH1NameIdMap;
270 std::map<G4String, G4int> fH2NameIdMap;
272 tools::hbook::wntuple* fNtuple;
273 tools::ntuple_booking* fNtupleBooking;
274 std::map<G4int, tools::hbook::wntuple::column<int>* > fNtupleIColumnMap;
275 std::map<G4int, tools::hbook::wntuple::column<float>* > fNtupleFColumnMap;
276 std::map<G4int, tools::hbook::wntuple::column<double>* > fNtupleDColumnMap;
281 inline G4int ExG4HbookAnalysisManager::GetH1HbookIdOffset()
const {
282 return fH1HbookIdOffset;
285 inline G4int ExG4HbookAnalysisManager::GetH2HbookIdOffset()
const {
286 return fH2HbookIdOffset;
289 inline G4int ExG4HbookAnalysisManager::GetNtupleHbookId()
const {
290 return fNtupleHbookId;