35 #ifndef ExG4HbookP1Manager_h
36 #define ExG4HbookP1Manager_h 1
43 #include <tools/hbook/p1>
48 class ExG4HbookFileManager;
60 p1_booking(
const std::vector<G4double>& edges,
69 for (
G4int i=0; i<=
G4int(edges.size()); ++i) fEdges.push_back(edges[i]);
77 std::vector<G4double> fEdges;
88 friend class ExG4HbookAnalysisManager;
92 virtual ~ExG4HbookP1Manager();
105 G4int GetP1HbookIdOffset()
const;
108 void SetFileManager(ExG4HbookFileManager* fileManager);
112 tools::hbook::p1* GetP1(
G4int id,
G4bool warn =
true,
113 G4bool onlyIfActive =
true)
const;
116 std::vector<tools::hbook::p1*>::iterator BeginP1();
117 std::vector<tools::hbook::p1*>::iterator EndP1();
118 std::vector<tools::hbook::p1*>::const_iterator BeginConstP1()
const;
119 std::vector<tools::hbook::p1*>::const_iterator EndConstP1()
const;
132 const G4String& xbinScheme =
"linear");
134 const std::vector<G4double>& edges,
148 const G4String& xbinScheme =
"linear");
150 const std::vector<G4double>& edges,
192 void SetP1HbookIdOffset();
200 G4int CreateP1FromBooking(p1_booking* p1Booking,
203 p1_booking* p1Booking);
214 p1_booking* p1Booking,
224 void CreateP1sFromBooking();
226 virtual p1_booking* GetP1Booking(
G4int id,
G4bool warn =
true)
const;
228 virtual tools::hbook::p1* GetP1InFunction(
G4int id,
G4String function,
230 G4bool onlyIfActive =
true)
const;
235 ExG4HbookFileManager* fFileManager;
236 G4int fP1HbookIdOffset;
237 std::vector<tools::hbook::p1*> fP1Vector;
238 std::vector<p1_booking*> fP1BookingVector;
239 std::map<G4String, G4int> fP1NameIdMap;
244 inline void ExG4HbookP1Manager::SetFileManager(ExG4HbookFileManager* fileManager)
245 { fFileManager = fileManager; }
247 inline G4int ExG4HbookP1Manager::GetP1HbookIdOffset()
const
248 {
return fP1HbookIdOffset; }
250 inline std::vector<tools::hbook::p1*>::iterator ExG4HbookP1Manager::BeginP1()
251 {
return fP1Vector.begin(); }
253 inline std::vector<tools::hbook::p1*>::iterator ExG4HbookP1Manager::EndP1()
254 {
return fP1Vector.end(); }
256 inline std::vector<tools::hbook::p1*>::const_iterator
257 ExG4HbookP1Manager::BeginConstP1()
const
258 {
return fP1Vector.begin(); }
260 inline std::vector<tools::hbook::p1*>::const_iterator
261 ExG4HbookP1Manager::EndConstP1()
const
262 {
return fP1Vector.end(); }
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 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