35 #ifndef ExG4HbookH2Manager_h
36 #define ExG4HbookH2Manager_h 1
44 #include <tools/hbook/h2>
49 class ExG4HbookFileManager;
85 friend class ExG4HbookAnalysisManager;
89 virtual ~ExG4HbookH2Manager();
98 G4int GetH2HbookIdOffset()
const;
101 void SetFileManager(ExG4HbookFileManager* fileManager);
104 tools::hbook::h2* GetH2(
G4int id,
G4bool warn =
true,
105 G4bool onlyIfActive =
true)
const;
108 std::vector<tools::hbook::h2*>::iterator BeginH2();
109 std::vector<tools::hbook::h2*>::iterator EndH2();
110 std::vector<tools::hbook::h2*>::const_iterator BeginConstH2()
const;
111 std::vector<tools::hbook::h2*>::const_iterator EndConstH2()
const;
125 const G4String& xbinScheme =
"linear",
126 const G4String& ybinScheme =
"linear");
129 const std::vector<G4double>& xedges,
130 const std::vector<G4double>& yedges,
143 const G4String& xbinScheme =
"linear",
144 const G4String& ybinScheme =
"linear");
147 const std::vector<G4double>& xedges,
148 const std::vector<G4double>& yedges,
194 static const G4int fgkDefaultH2HbookIdOffset;
198 void SetH2HbookIdOffset();
199 void CreateH2sFromBooking();
202 virtual h2_booking* GetH2Booking(
G4int id,
G4bool warn =
true)
const;
204 virtual tools::hbook::h2* GetH2InFunction(
G4int id,
G4String function,
206 G4bool onlyIfActive =
true)
const;
211 ExG4HbookFileManager* fFileManager;
212 G4int fH2HbookIdOffset;
213 std::vector<tools::hbook::h2*> fH2Vector;
214 std::vector<h2_booking*> fH2BookingVector;
215 std::map<G4String, G4int> fH2NameIdMap;
220 inline void ExG4HbookH2Manager::SetFileManager(ExG4HbookFileManager* fileManager)
221 { fFileManager = fileManager; }
223 inline G4int ExG4HbookH2Manager::GetH2HbookIdOffset()
const {
224 return fH2HbookIdOffset;
227 inline std::vector<tools::hbook::h2*>::iterator ExG4HbookH2Manager::BeginH2()
230 inline std::vector<tools::hbook::h2*>::iterator ExG4HbookH2Manager::EndH2()
233 inline std::vector<tools::hbook::h2*>::const_iterator
234 ExG4HbookH2Manager::BeginConstH2()
const
235 {
return BeginConstT(); }
237 inline std::vector<tools::hbook::h2*>::const_iterator
238 ExG4HbookH2Manager::EndConstH2()
const
239 {
return EndConstT(); }
241 inline std::shared_ptr<G4HnManager> ExG4HbookH2Manager::GetHnManager()
242 {
return std::shared_ptr<G4HnManager>(fHnManager); }
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 std::shared_ptr< G4HnManager > GetHnManager()=0
virtual G4double GetH2XWidth(G4int id) const =0
virtual G4bool SetH2XAxisTitle(G4int id, const G4String &title)=0
virtual G4double GetH2Ymax(G4int id) const =0