35 #ifndef ExG4HbookH1Manager_h
36 #define ExG4HbookH1Manager_h 1
44 #include <tools/hbook/h1>
49 class ExG4HbookFileManager;
60 h1_booking(
const std::vector<G4double>& edges)
68 for (
G4int i=0; i<
G4int(edges.size()); ++i) fEdges.push_back(edges[i]);
76 std::vector<G4double> fEdges;
88 friend class ExG4HbookAnalysisManager;
92 virtual ~ExG4HbookH1Manager();
105 G4int GetH1HbookIdOffset()
const;
108 void SetFileManager(ExG4HbookFileManager* fileManager);
112 tools::hbook::h1* GetH1(
G4int id,
G4bool warn =
true,
113 G4bool onlyIfActive =
true)
const;
116 std::vector<tools::hbook::h1*>::iterator BeginH1();
117 std::vector<tools::hbook::h1*>::iterator EndH1();
118 std::vector<tools::hbook::h1*>::const_iterator BeginConstH1()
const;
119 std::vector<tools::hbook::h1*>::const_iterator EndConstH1()
const;
129 const G4String& binSchemeName =
"linear");
131 const std::vector<G4double>& edges,
139 const G4String& binSchemeName =
"linear");
141 const std::vector<G4double>& edges,
180 void SetH1HbookIdOffset();
186 G4int CreateH1FromBooking(h1_booking* h1Booking,
189 h1_booking* h1Booking);
201 void CreateH1sFromBooking();
203 virtual h1_booking* GetH1Booking(
G4int id,
G4bool warn =
true)
const;
205 virtual tools::hbook::h1* GetH1InFunction(
G4int id,
G4String function,
207 G4bool onlyIfActive =
true)
const;
212 ExG4HbookFileManager* fFileManager;
213 G4int fH1HbookIdOffset;
214 std::vector<tools::hbook::h1*> fH1Vector;
215 std::vector<h1_booking*> fH1BookingVector;
216 std::map<G4String, G4int> fH1NameIdMap;
221 inline void ExG4HbookH1Manager::SetFileManager(ExG4HbookFileManager* fileManager)
222 { fFileManager = fileManager; }
224 inline G4int ExG4HbookH1Manager::GetH1HbookIdOffset()
const {
225 return fH1HbookIdOffset;
228 inline std::vector<tools::hbook::h1*>::iterator ExG4HbookH1Manager::BeginH1()
231 inline std::vector<tools::hbook::h1*>::iterator ExG4HbookH1Manager::EndH1()
234 inline std::vector<tools::hbook::h1*>::const_iterator
235 ExG4HbookH1Manager::BeginConstH1()
const
236 {
return BeginConstT(); }
238 inline std::vector<tools::hbook::h1*>::const_iterator
239 ExG4HbookH1Manager::EndConstH1()
const
240 {
return EndConstT(); }
242 inline std::shared_ptr<G4HnManager> ExG4HbookH1Manager::GetHnManager()
243 {
return std::shared_ptr<G4HnManager>(fHnManager); }
virtual G4bool SetH1YAxisTitle(G4int id, const G4String &title)=0
virtual G4double GetH1Width(G4int id) const =0
virtual G4String GetH1Title(G4int id) const =0
virtual G4String GetH1YAxisTitle(G4int id) const =0
virtual std::shared_ptr< G4HnManager > GetHnManager()=0
virtual G4double GetH1Xmin(G4int id) const =0
virtual G4int GetH1Nbins(G4int id) const =0
Manager class for tools::hbook::base_histo functions.
Definition of the ExG4HbookBaseHnManager class.
virtual G4double GetH1Xmax(G4int id) const =0
virtual G4int GetH1Id(const G4String &name, G4bool warn=true) const =0
virtual G4bool SetH1XAxisTitle(G4int id, const G4String &title)=0
virtual G4bool FillH1(G4int id, G4double value, G4double weight=1.0)=0
virtual G4String GetH1XAxisTitle(G4int id) const =0
static const G4double factor
virtual G4bool SetH1Title(G4int id, const G4String &title)=0
virtual G4bool SetH1(G4int id, G4int nbins, G4double xmin, G4double xmax, const G4String &unitName="none", const G4String &fcnName="none", const G4String &binSchemeName="linear")=0
virtual G4bool ScaleH1(G4int id, G4double factor)=0
virtual G4bool WriteOnAscii(std::ofstream &output)=0
virtual G4int CreateH1(const G4String &name, const G4String &title, G4int nbins, G4double xmin, G4double xmax, const G4String &unitName="none", const G4String &fcnName="none", const G4String &binSchemeName="linear")=0