35 #ifndef ExG4HbookH2Manager_h
36 #define ExG4HbookH2Manager_h 1
42 #include <tools/hbook/h2>
47 class ExG4HbookFileManager;
76 friend class ExG4HbookAnalysisManager;
80 virtual ~ExG4HbookH2Manager();
89 G4int GetH2HbookIdOffset()
const;
92 void SetFileManager(ExG4HbookFileManager* fileManager);
95 tools::hbook::h2* GetH2(
G4int id,
G4bool warn =
true,
96 G4bool onlyIfActive =
true)
const;
99 std::vector<tools::hbook::h2*>::iterator BeginH2();
100 std::vector<tools::hbook::h2*>::iterator EndH2();
101 std::vector<tools::hbook::h2*>::const_iterator BeginConstH2()
const;
102 std::vector<tools::hbook::h2*>::const_iterator EndConstH2()
const;
116 const G4String& xbinScheme =
"linear",
117 const G4String& ybinScheme =
"linear");
120 const std::vector<G4double>& xedges,
121 const std::vector<G4double>& yedges,
134 const G4String& xbinScheme =
"linear",
135 const G4String& ybinScheme =
"linear");
138 const std::vector<G4double>& xedges,
139 const std::vector<G4double>& yedges,
182 static const G4int fgkDefaultH2HbookIdOffset;
186 void SetH2HbookIdOffset();
187 void CreateH2sFromBooking();
190 virtual h2_booking* GetH2Booking(
G4int id,
G4bool warn =
true)
const;
192 virtual tools::hbook::h2* GetH2InFunction(
G4int id,
G4String function,
194 G4bool onlyIfActive =
true)
const;
199 ExG4HbookFileManager* fFileManager;
200 G4int fH2HbookIdOffset;
201 std::vector<tools::hbook::h2*> fH2Vector;
202 std::vector<h2_booking*> fH2BookingVector;
203 std::map<G4String, G4int> fH2NameIdMap;
208 inline void ExG4HbookH2Manager::SetFileManager(ExG4HbookFileManager* fileManager)
209 { fFileManager = fileManager; }
211 inline G4int ExG4HbookH2Manager::GetH2HbookIdOffset()
const {
212 return fH2HbookIdOffset;
215 inline std::vector<tools::hbook::h2*>::iterator ExG4HbookH2Manager::BeginH2()
216 {
return fH2Vector.begin(); }
218 inline std::vector<tools::hbook::h2*>::iterator ExG4HbookH2Manager::EndH2()
219 {
return fH2Vector.end(); }
221 inline std::vector<tools::hbook::h2*>::const_iterator
222 ExG4HbookH2Manager::BeginConstH2()
const
223 {
return fH2Vector.begin(); }
225 inline std::vector<tools::hbook::h2*>::const_iterator
226 ExG4HbookH2Manager::EndConstH2()
const
227 {
return fH2Vector.end(); }
virtual G4bool SetH2YAxisTitle(G4int id, const G4String &title)=0
virtual G4String GetH2Title(G4int id) const =0
virtual G4double GetH2Xmax(G4int id) const =0
virtual G4int GetH2Nybins(G4int id) const =0
virtual G4bool ScaleH2(G4int id, G4double factor)=0
virtual G4bool WriteOnAscii(std::ofstream &output)=0
virtual G4bool SetH2ZAxisTitle(G4int id, const G4String &title)=0
virtual G4int GetH2Nxbins(G4int id) const =0
virtual G4double GetH2Xmin(G4int id) const =0
virtual G4bool SetH2Title(G4int id, const G4String &title)=0
virtual G4double GetH2YWidth(G4int id) const =0
virtual G4int CreateH2(const G4String &name, const G4String &title, G4int nxbins, G4double xmin, G4double xmax, G4int nybins, G4double ymin, G4double ymax, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &xbinScheme="linear", const G4String &ybinScheme="linear")=0
virtual G4bool SetH2(G4int id, G4int nxbins, G4double xmin, G4double xmax, G4int nybins, G4double ymin, G4double ymax, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &xbinScheme="linear", const G4String &ybinScheme="linear")=0
Manager class for tools::hbook::base_histo functions.
virtual G4double GetH2Ymin(G4int id) const =0
Definition of the ExG4HbookBaseHnManager class.
virtual G4String GetH2ZAxisTitle(G4int id) const =0
static const G4double factor
virtual G4String GetH2YAxisTitle(G4int id) const =0
virtual G4int GetH2Id(const G4String &name, G4bool warn=true) const =0
virtual G4String GetH2XAxisTitle(G4int id) const =0
virtual G4bool FillH2(G4int id, G4double xvalue, G4double yvalue, G4double weight=1.0)=0
virtual G4double GetH2XWidth(G4int id) const =0
virtual G4bool SetH2XAxisTitle(G4int id, const G4String &title)=0
virtual G4double GetH2Ymax(G4int id) const =0