35 #ifndef ExG4HbookH1Manager_h
36 #define ExG4HbookH1Manager_h 1
43 #include <tools/hbook/h1>
48 class ExG4HbookFileManager;
57 h1_booking(
const std::vector<G4double>& edges)
63 for (
G4int i=0; i<=
G4int(edges.size()); ++i) fEdges.push_back(edges[i]);
69 std::vector<G4double> fEdges;
80 friend class ExG4HbookAnalysisManager;
84 virtual ~ExG4HbookH1Manager();
97 G4int GetH1HbookIdOffset()
const;
100 void SetFileManager(ExG4HbookFileManager* fileManager);
104 tools::hbook::h1* GetH1(
G4int id,
G4bool warn =
true,
105 G4bool onlyIfActive =
true)
const;
108 std::vector<tools::hbook::h1*>::iterator BeginH1();
109 std::vector<tools::hbook::h1*>::iterator EndH1();
110 std::vector<tools::hbook::h1*>::const_iterator BeginConstH1()
const;
111 std::vector<tools::hbook::h1*>::const_iterator EndConstH1()
const;
121 const G4String& binSchemeName =
"linear");
123 const std::vector<G4double>& edges,
131 const G4String& binSchemeName =
"linear");
133 const std::vector<G4double>& edges,
169 void SetH1HbookIdOffset();
175 G4int CreateH1FromBooking(h1_booking* h1Booking,
178 h1_booking* h1Booking);
186 h1_booking* h1Booking,
193 void CreateH1sFromBooking();
195 virtual h1_booking* GetH1Booking(
G4int id,
G4bool warn =
true)
const;
197 virtual tools::hbook::h1* GetH1InFunction(
G4int id,
G4String function,
199 G4bool onlyIfActive =
true)
const;
204 ExG4HbookFileManager* fFileManager;
205 G4int fH1HbookIdOffset;
206 std::vector<tools::hbook::h1*> fH1Vector;
207 std::vector<h1_booking*> fH1BookingVector;
208 std::map<G4String, G4int> fH1NameIdMap;
213 inline void ExG4HbookH1Manager::SetFileManager(ExG4HbookFileManager* fileManager)
214 { fFileManager = fileManager; }
216 inline G4int ExG4HbookH1Manager::GetH1HbookIdOffset()
const {
217 return fH1HbookIdOffset;
220 inline std::vector<tools::hbook::h1*>::iterator ExG4HbookH1Manager::BeginH1()
221 {
return fH1Vector.begin(); }
223 inline std::vector<tools::hbook::h1*>::iterator ExG4HbookH1Manager::EndH1()
224 {
return fH1Vector.end(); }
226 inline std::vector<tools::hbook::h1*>::const_iterator
227 ExG4HbookH1Manager::BeginConstH1()
const
228 {
return fH1Vector.begin(); }
230 inline std::vector<tools::hbook::h1*>::const_iterator
231 ExG4HbookH1Manager::EndConstH1()
const
232 {
return fH1Vector.end(); }
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 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