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,
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); }
virtual G4int GetP1Nbins(G4int id) const =0
virtual G4bool SetP1XAxisTitle(G4int id, const G4String &title)=0
virtual G4String GetP1Title(G4int id) const =0
virtual G4bool SetP1Title(G4int id, const G4String &title)=0
virtual G4String GetP1XAxisTitle(G4int id) const =0
virtual std::shared_ptr< G4HnManager > GetHnManager()=0
virtual G4bool SetP1YAxisTitle(G4int id, const G4String &title)=0
virtual G4double GetP1Xmin(G4int id) const =0
virtual G4bool ScaleP1(G4int id, G4double factor)=0
Manager class for tools::hbook::base_histo functions.
Definition of the ExG4HbookBaseHnManager class.
virtual G4double GetP1Ymax(G4int id) const =0
static const G4double factor
virtual G4double GetP1Ymin(G4int id) const =0
virtual G4int CreateP1(const G4String &name, const G4String &title, G4int nbins, G4double xmin, G4double xmax, G4double ymin=0, G4double ymax=0, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &xbinScheme="linear")=0
virtual G4bool FillP1(G4int id, G4double xvalue, G4double yvalue, G4double weight=1.0)=0
virtual G4bool SetP1(G4int id, G4int nbins, G4double xmin, G4double xmax, G4double ymin=0, G4double ymax=0, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &xbinScheme="linear")=0
virtual G4String GetP1YAxisTitle(G4int id) const =0
virtual G4double GetP1XWidth(G4int id) const =0
virtual G4double GetP1Xmax(G4int id) const =0
virtual G4int GetP1Id(const G4String &name, G4bool warn=true) const =0