35 #ifndef ExG4HbookP1Manager_h 36 #define ExG4HbookP1Manager_h 1 45 #include <tools/hbook/p1> 50 class ExG4HbookFileManager;
65 p1_booking(
const std::vector<G4double>& edges,
77 for (
G4int i=0; i<
G4int(edges.size()); ++i) fEdges.push_back(edges[i]);
88 std::vector<G4double> fEdges;
100 friend class ExG4HbookAnalysisManager;
104 virtual ~ExG4HbookP1Manager();
117 G4int GetP1HbookIdOffset()
const;
120 void SetFileManager(ExG4HbookFileManager* fileManager);
124 tools::hbook::p1* GetP1(
G4int id,
G4bool warn =
true,
125 G4bool onlyIfActive =
true)
const;
128 std::vector<tools::hbook::p1*>::iterator BeginP1();
129 std::vector<tools::hbook::p1*>::iterator EndP1();
130 std::vector<tools::hbook::p1*>::const_iterator BeginConstP1()
const;
131 std::vector<tools::hbook::p1*>::const_iterator EndConstP1()
const;
144 const G4String& xbinScheme =
"linear");
146 const std::vector<G4double>& edges,
160 const G4String& xbinScheme =
"linear");
162 const std::vector<G4double>& edges,
202 virtual std::shared_ptr<G4HnManager> GetHnManager();
207 void SetP1HbookIdOffset();
215 G4int CreateP1FromBooking(p1_booking* p1Booking,
218 p1_booking* p1Booking);
236 void CreateP1sFromBooking();
238 virtual p1_booking* GetP1Booking(
G4int id,
G4bool warn =
true)
const;
240 virtual tools::hbook::p1* GetP1InFunction(
G4int id,
G4String function,
242 G4bool onlyIfActive =
true)
const;
246 static const G4int fgkDefaultP1HbookIdOffset;
251 ExG4HbookFileManager* fFileManager;
252 G4int fP1HbookIdOffset;
253 std::vector<tools::hbook::p1*> fP1Vector;
254 std::vector<p1_booking*> fP1BookingVector;
255 std::map<G4String, G4int> fP1NameIdMap;
260 inline void ExG4HbookP1Manager::SetFileManager(ExG4HbookFileManager* fileManager)
261 { fFileManager = fileManager; }
263 inline G4int ExG4HbookP1Manager::GetP1HbookIdOffset()
const 264 {
return fP1HbookIdOffset; }
266 inline std::vector<tools::hbook::p1*>::iterator ExG4HbookP1Manager::BeginP1()
269 inline std::vector<tools::hbook::p1*>::iterator ExG4HbookP1Manager::EndP1()
272 inline std::vector<tools::hbook::p1*>::const_iterator
273 ExG4HbookP1Manager::BeginConstP1()
const 274 {
return BeginConstT(); }
276 inline std::vector<tools::hbook::p1*>::const_iterator
277 ExG4HbookP1Manager::EndConstP1()
const 278 {
return EndConstT(); }
280 inline std::shared_ptr<G4HnManager> ExG4HbookP1Manager::GetHnManager()
281 {
return std::shared_ptr<G4HnManager>(fHnManager); }
Definition of the ExG4HbookBaseHnManager class.
ntupleExperimental Reset()
static const G4double factor