Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VAnalysisManager.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26
27// The nonvirtual public interface class to g4tools based analysis.
28// It is defined as a composite of object manager base classes.
29// Individual use of the component managers is disabled
30// (except for file manager and Hn manager which are also used from
31// other object managers).
32// The functions which has to be implemented in concrete managers
33// are declared as virtual protected.
34
35// Author: Ivana Hrivnacova, 09/07/2013 ([email protected])
36
37#ifndef G4VAnalysisManager_h
38#define G4VAnalysisManager_h 1
39
41#include "globals.hh"
42
43#include <vector>
44#include <fstream>
45#include <memory>
46#include <string_view>
47
48#include "G4VTBaseHnManager.hh" // make forward declaration if possible
49
52class G4HnManager;
55class G4VFileManager;
56
57namespace tools {
58namespace histo{
59class hmpi;
60}
61}
62
64{
65 friend class G4AnalysisMessenger;
66
67 public:
69
70 // Methods for handling files
71 G4bool OpenFile(const G4String& fileName = "");
72 G4bool Write();
73 G4bool CloseFile(G4bool reset = true);
74 G4bool Reset();
75 void Clear();
76 G4bool Merge(tools::histo::hmpi* hmpi);
77 G4bool Plot();
78 G4bool IsOpenFile() const;
79
80 // Methods for handling files and directories names
81 G4bool SetFileName(const G4String& fileName);
84 void SetCompressionLevel(G4int level);
85
86 G4String GetFileName() const;
90
91 // Methods for handling histograms
92 //
93 G4int CreateH1(const G4String& name, const G4String& title,
94 G4int nbins, G4double xmin, G4double xmax,
95 const G4String& unitName = "none",
96 const G4String& fcnName = "none",
97 const G4String& binSchemeName = "linear");
98
99 G4int CreateH1(const G4String& name, const G4String& title,
100 const std::vector<G4double>& edges,
101 const G4String& unitName = "none",
102 const G4String& fcnName = "none");
103
104 G4int CreateH2(const G4String& name, const G4String& title,
105 G4int nxbins, G4double xmin, G4double xmax,
106 G4int nybins, G4double ymin, G4double ymax,
107 const G4String& xunitName = "none",
108 const G4String& yunitName = "none",
109 const G4String& xfcnName = "none",
110 const G4String& yfcnName = "none",
111 const G4String& xbinSchemeName = "linear",
112 const G4String& ybinSchemeName = "linear");
113
114 G4int CreateH2(const G4String& name, const G4String& title,
115 const std::vector<G4double>& xedges,
116 const std::vector<G4double>& yedges,
117 const G4String& xunitName = "none",
118 const G4String& yunitName = "none",
119 const G4String& xfcnName = "none",
120 const G4String& yfcnName = "none");
121
122 G4int CreateH3(const G4String& name, const G4String& title,
123 G4int nxbins, G4double xmin, G4double xmax,
124 G4int nybins, G4double ymin, G4double ymax,
125 G4int nzbins, G4double zmin, G4double zmax,
126 const G4String& xunitName = "none",
127 const G4String& yunitName = "none",
128 const G4String& zunitName = "none",
129 const G4String& xfcnName = "none",
130 const G4String& yfcnName = "none",
131 const G4String& zfcnName = "none",
132 const G4String& xbinSchemeName = "linear",
133 const G4String& ybinSchemeName = "linear",
134 const G4String& zbinSchemeName = "linear");
135
136 G4int CreateH3(const G4String& name, const G4String& title,
137 const std::vector<G4double>& xedges,
138 const std::vector<G4double>& yedges,
139 const std::vector<G4double>& zedges,
140 const G4String& xunitName = "none",
141 const G4String& yunitName = "none",
142 const G4String& zunitName = "none",
143 const G4String& xfcnName = "none",
144 const G4String& yfcnName = "none",
145 const G4String& zfcnName = "none");
146
147 G4bool SetH1(G4int id,
148 G4int nbins, G4double xmin, G4double xmax,
149 const G4String& unitName = "none",
150 const G4String& fcnName = "none",
151 const G4String& binSchemeName = "linear");
152
153 G4bool SetH1(G4int id,
154 const std::vector<G4double>& edges,
155 const G4String& unitName = "none",
156 const G4String& fcnName = "none");
157
158 G4bool SetH2(G4int id,
159 G4int nxbins, G4double xmin, G4double xmax,
160 G4int nybins, G4double ymin, G4double ymax,
161 const G4String& xunitName = "none",
162 const G4String& yunitName = "none",
163 const G4String& xfcnName = "none",
164 const G4String& yfcnName = "none",
165 const G4String& xbinSchemeName = "linear",
166 const G4String& ybinSchemeName = "linear");
167
168 G4bool SetH2(G4int id,
169 const std::vector<G4double>& xedges,
170 const std::vector<G4double>& yedges,
171 const G4String& xunitName = "none",
172 const G4String& yunitName = "none",
173 const G4String& xfcnName = "none",
174 const G4String& yfcnName = "none");
175
176 G4bool SetH3(G4int id,
177 G4int nxbins, G4double xmin, G4double xmax,
178 G4int nzbins, G4double zmin, G4double zmax,
179 G4int nybins, G4double ymin, G4double ymax,
180 const G4String& xunitName = "none",
181 const G4String& yunitName = "none",
182 const G4String& zunitName = "none",
183 const G4String& xfcnName = "none",
184 const G4String& yfcnName = "none",
185 const G4String& zfcnName = "none",
186 const G4String& xbinSchemeName = "linear",
187 const G4String& ybinSchemeName = "linear",
188 const G4String& zbinSchemeName = "linear");
189
190 G4bool SetH3(G4int id,
191 const std::vector<G4double>& xedges,
192 const std::vector<G4double>& yedges,
193 const std::vector<G4double>& zedges,
194 const G4String& xunitName = "none",
195 const G4String& yunitName = "none",
196 const G4String& zunitName = "none",
197 const G4String& xfcnName = "none",
198 const G4String& yfcnName = "none",
199 const G4String& zfcnName = "none");
200
201 G4bool ScaleH1(G4int id, G4double factor);
202 G4bool ScaleH2(G4int id, G4double factor);
203 G4bool ScaleH3(G4int id, G4double factor);
204
205 // Methods for handling profiles
206 //
207 G4int CreateP1(const G4String& name, const G4String& title,
208 G4int nbins, G4double xmin, G4double xmax,
209 G4double ymin = 0, G4double ymax = 0,
210 const G4String& xunitName = "none",
211 const G4String& yunitName = "none",
212 const G4String& xfcnName = "none",
213 const G4String& yfcnName = "none",
214 const G4String& xbinSchemeName = "linear");
215 G4int CreateP1(const G4String& name, const G4String& title,
216 const std::vector<G4double>& edges,
217 G4double ymin = 0, G4double ymax = 0,
218 const G4String& xunitName = "none",
219 const G4String& yunitName = "none",
220 const G4String& xfcnName = "none",
221 const G4String& yfcnName = "none");
222
223 G4int CreateP2(const G4String& name, const G4String& title,
224 G4int nxbins, G4double xmin, G4double xmax,
225 G4int nybins, G4double ymin, G4double ymax,
226 G4double zmin = 0, G4double zmax = 0,
227 const G4String& xunitName = "none",
228 const G4String& yunitName = "none",
229 const G4String& zunitName = "none",
230 const G4String& xfcnName = "none",
231 const G4String& yfcnName = "none",
232 const G4String& zfcnName = "none",
233 const G4String& xbinSchemeName = "linear",
234 const G4String& ybinSchemeName = "linear");
235 G4int CreateP2(const G4String& name, const G4String& title,
236 const std::vector<G4double>& xedges,
237 const std::vector<G4double>& yedges,
238 G4double zmin = 0, G4double zmax = 0,
239 const G4String& xunitName = "none",
240 const G4String& yunitName = "none",
241 const G4String& zunitName = "none",
242 const G4String& xfcnName = "none",
243 const G4String& yfcnName = "none",
244 const G4String& zfcnName = "none");
245
246 G4bool SetP1(G4int id,
247 G4int nbins, G4double xmin, G4double xmax,
248 G4double ymin = 0, G4double ymax = 0,
249 const G4String& xunitName = "none",
250 const G4String& yunitName = "none",
251 const G4String& xfcnName = "none",
252 const G4String& yfcnName = "none",
253 const G4String& xbinSchemeName = "linear");
254 G4bool SetP1(G4int id,
255 const std::vector<G4double>& edges,
256 G4double ymin = 0, G4double ymax = 0,
257 const G4String& xunitName = "none",
258 const G4String& yunitName = "none",
259 const G4String& xfcnName = "none",
260 const G4String& yfcnName = "none");
261
262 G4bool SetP2(G4int id,
263 G4int nxbins, G4double xmin, G4double xmax,
264 G4int nybins, G4double ymin, G4double ymax,
265 G4double zmin = 0, G4double zmax = 0,
266 const G4String& xunitName = "none",
267 const G4String& yunitName = "none",
268 const G4String& zunitName = "none",
269 const G4String& xfcnName = "none",
270 const G4String& yfcnName = "none",
271 const G4String& zfcnName = "none",
272 const G4String& xbinSchemeName = "linear",
273 const G4String& ybinSchemeName = "linear");
274 G4bool SetP2(G4int id,
275 const std::vector<G4double>& xedges,
276 const std::vector<G4double>& yedges,
277 G4double zmin = 0, G4double zmax = 0,
278 const G4String& xunitName = "none",
279 const G4String& yunitName = "none",
280 const G4String& zunitName = "none",
281 const G4String& xfcnName = "none",
282 const G4String& yfcnName = "none",
283 const G4String& zfcnName = "none");
284
285 G4bool ScaleP1(G4int id, G4double factor);
286 G4bool ScaleP2(G4int id, G4double factor);
287
288 // Methods for handling ntuples
289 //
290 G4int CreateNtuple(const G4String& name, const G4String& title);
291
292 // Create columns in the last created ntuple
297
298 // Create columns of vector in the last created ntuple
300 const G4String& name, std::vector<int>& vector);
302 const G4String& name, std::vector<float>& vector);
304 const G4String& name, std::vector<double>& vector);
306 const G4String& name, std::vector<std::string>& vector);
307 void FinishNtuple();
308
309 // Create columns in the ntuple with given id
310 G4int CreateNtupleIColumn(G4int ntupleId, const G4String& name);
311 G4int CreateNtupleFColumn(G4int ntupleId, const G4String& name);
312 G4int CreateNtupleDColumn(G4int ntupleId, const G4String& name);
313 G4int CreateNtupleSColumn(G4int ntupleId, const G4String& name);
314
315 // Create columns of vector in the ntuple with given id
317 const G4String& name, std::vector<int>& vector);
319 const G4String& name, std::vector<float>& vector);
321 const G4String& name, std::vector<double>& vector);
323 const G4String& name, std::vector<std::string>& vector);
324
325 void FinishNtuple(G4int ntupleId);
326
327 // MT/MPI
328 virtual void SetNtupleMerging(G4bool mergeNtuples,
329 G4int nofReducedNtupleFiles = 0);
330 virtual void SetNtupleRowWise(G4bool rowWise, G4bool rowMode = true);
331 virtual void SetBasketSize(unsigned int basketSize);
332 virtual void SetBasketEntries(unsigned int basketEntries);
333
334 // The ids of histograms and ntuples are generated automatically
335 // starting from 0; with following functions it is possible to
336 // change the first Id to start from other value
338 G4bool SetFirstH1Id(G4int firstId);
339 G4bool SetFirstH2Id(G4int firstId);
340 G4bool SetFirstH3Id(G4int firstId);
342 G4bool SetFirstP1Id(G4int firstId);
343 G4bool SetFirstP2Id(G4int firstId);
346
347 // Methods to fill histograms
348 G4bool FillH1(G4int id, G4double value, G4double weight = 1.0);
349 G4bool FillH2(G4int id, G4double xvalue, G4double yvalue,
350 G4double weight = 1.0);
352 G4double xvalue, G4double yvalue, G4double zvalue,
353 G4double weight = 1.0);
354 // Methods to fill profiles
355 G4bool FillP1(G4int id, G4double xvalue, G4double yvalue,
356 G4double weight = 1.0);
358 G4double xvalue, G4double yvalue, G4double zvalue,
359 G4double weight = 1.0);
360
361 // Methods to fill ntuples
362 // Methods for ntuple with id = FirstNtupleId
368 // Methods for ntuple with id > FirstNtupleId (when more ntuples exist)
369 G4bool FillNtupleIColumn(G4int ntupleId, G4int columnId, G4int value);
370 G4bool FillNtupleFColumn(G4int ntupleId, G4int columnId, G4float value);
371 G4bool FillNtupleDColumn(G4int ntupleId, G4int columnId, G4double value);
372 G4bool FillNtupleSColumn(G4int ntupleId, G4int id, const G4String& value);
374
375 // Activation option
376
377 // When this option is enabled, only the histograms/profiles marked as activated
378 // are returned, filled or saved on file.
379 // No warning is issued when Get or Fill is called on inactive histogram.
380 void SetActivation(G4bool activation);
382
383 // Return false if activation is enabled and there is no object activated,
384 // return true otherwise
385 G4bool IsActive() const;
386
387 // ASCII option
388
389 // Return false if there is no object selected for ASCII output,
390 // return true otherwise
391 G4bool IsAscii() const;
392
393 // Plotting option
394
395 // Return false if there is no object selected for plottng,
396 // return true otherwise
397 G4bool IsPlotting() const;
398
399 // Access methods
400 G4int GetFirstH1Id() const;
401 G4int GetFirstH2Id() const;
402 G4int GetFirstH3Id() const;
403 G4int GetFirstP1Id() const;
404 G4int GetFirstP2Id() const;
405 G4int GetFirstNtupleId() const;
407
408 G4int GetNofH1s() const;
409 G4int GetNofH2s() const;
410 G4int GetNofH3s() const;
411 G4int GetNofP1s() const;
412 G4int GetNofP2s() const;
413 G4int GetNofNtuples() const;
414
415 // Access methods via names
416 G4int GetH1Id(const G4String& name, G4bool warn = true) const;
417 G4int GetH2Id(const G4String& name, G4bool warn = true) const;
418 G4int GetH3Id(const G4String& name, G4bool warn = true) const;
419 G4int GetP1Id(const G4String& name, G4bool warn = true) const;
420 G4int GetP2Id(const G4String& name, G4bool warn = true) const;
421
422 // List objects
423 G4bool ListH1(G4bool onlyIfActive = true) const;
424 G4bool ListH2(G4bool onlyIfActive = true) const;
425 G4bool ListH3(G4bool onlyIfActive = true) const;
426 G4bool ListP1(G4bool onlyIfActive = true) const;
427 G4bool ListP2(G4bool onlyIfActive = true) const;
428 G4bool ListNtuple(G4bool onlyIfActive = true) const;
429 G4bool List(G4bool onlyIfActive = true) const;
430
431 // Methods to manipulate histogram, profiles & ntuples additional information
432 //
433 void SetH1Activation(G4bool activation);
434 void SetH1Activation(G4int id, G4bool activation);
435 void SetH1Ascii(G4int id, G4bool ascii);
436 void SetH1Plotting(G4int id, G4bool plotting);
437 void SetH1FileName(G4int id, const G4String& fileName);
438 //
439 void SetH2Activation(G4bool activation);
440 void SetH2Activation(G4int id, G4bool activation);
441 void SetH2Ascii(G4int id, G4bool ascii);
442 void SetH2Plotting(G4int id, G4bool plotting);
443 void SetH2FileName(G4int id, const G4String& fileName);
444 //
445 void SetH3Activation(G4bool activation);
446 void SetH3Activation(G4int id, G4bool activation);
447 void SetH3Ascii(G4int id, G4bool ascii);
448 void SetH3Plotting(G4int id, G4bool plotting);
449 void SetH3FileName(G4int id, const G4String& fileName);
450 //
451 void SetP1Activation(G4bool activation);
452 void SetP1Activation(G4int id, G4bool activation);
453 void SetP1Ascii(G4int id, G4bool ascii);
454 void SetP1Plotting(G4int id, G4bool plotting);
455 void SetP1FileName(G4int id, const G4String& fileName);
456 //
457 void SetP2Activation(G4bool activation);
458 void SetP2Activation(G4int id, G4bool activation);
459 void SetP2Ascii(G4int id, G4bool ascii);
460 void SetP2Plotting(G4int id, G4bool plotting);
461 void SetP2FileName(G4int id, const G4String& fileName);
462 //
463 void SetNtupleActivation(G4bool activation);
464 void SetNtupleActivation(G4int id, G4bool activation);
465 void SetNtupleFileName(const G4String& fileName);
466 void SetNtupleFileName(G4int id, const G4String& fileName);
467
468
469 // Access to histogram & profiles parameters
470 //
475 //
484 //
497 //
504 //
515
516 // Access to histogram & profiles additional information
517 //
524 //
531 //
539 //
546 //
554 //
557
558 // Setters for histogram & profiles attributes for plotting
559 //
560 G4bool SetH1Title(G4int id, const G4String& title);
565 //
566 G4bool SetH2Title(G4int id, const G4String& title);
573 //
574 G4bool SetH3Title(G4int id, const G4String& title);
581 //
582 G4bool SetP1Title(G4int id, const G4String& title);
587 //
588 G4bool SetP2Title(G4int id, const G4String& title);
595
596 // Access histogram & profiles attributes for plotting
597 //
603 //
611 //
619 //
625 //
633
634 // Verbosity
635 void SetVerboseLevel(G4int verboseLevel);
637
638 // The manager type (starts with an uppercase letter)
640 // The manager file type (starts with a lowercase letter)
642
643 protected:
644 G4VAnalysisManager(const G4String& type);
646
647 // Virtual methods
648 virtual G4bool OpenFileImpl(const G4String& fileName) = 0;
649 virtual G4bool WriteImpl() = 0;
650 virtual G4bool CloseFileImpl(G4bool reset) = 0;
651 virtual G4bool ResetImpl() = 0;
652 virtual void ClearImpl() = 0;
653 virtual G4bool PlotImpl() = 0;
654 virtual G4bool MergeImpl(tools::histo::hmpi* hmpi) = 0;
655 virtual G4bool IsOpenFileImpl() const = 0;
656
657 // Methods
658 void Message(G4int level,
659 const G4String& action,
660 const G4String& objectType,
661 const G4String& objectName = "",
662 G4bool success = true) const;
663
664 // Methods
665 void SetH1Manager(G4VTBaseHnManager<1>* h1Manager);
666 void SetH2Manager(G4VTBaseHnManager<2>* h2Manager);
667 void SetH3Manager(G4VTBaseHnManager<3>* h3Manager);
668 void SetP1Manager(G4VTBaseHnManager<2>* p1Manager);
669 void SetP2Manager(G4VTBaseHnManager<3>* p2Manager);
670 void SetNtupleManager(std::shared_ptr<G4VNtupleManager> ntupleManager);
671 void SetNtupleFileManager(std::shared_ptr<G4VNtupleFileManager> ntupleFileManager);
672 void SetFileManager(std::shared_ptr<G4VFileManager> fileManager);
673
674 // Methods to manipulate additional information
675 G4bool WriteAscii(const G4String& fileName);
676
677 // File manager access
678 virtual std::shared_ptr<G4VFileManager> GetFileManager(const G4String& fileName);
679
680 // Static data members
681 static constexpr unsigned int kDim1 { 1 };
682 static constexpr unsigned int kDim2 { 2 };
683 static constexpr unsigned int kDim3 { 3 };
684
685 // Data members
687 std::shared_ptr<G4VFileManager> fVFileManager { nullptr };
688 std::shared_ptr<G4NtupleBookingManager> fNtupleBookingManager { nullptr };
689 std::shared_ptr<G4VNtupleManager> fVNtupleManager { nullptr };
690 std::shared_ptr<G4VNtupleFileManager> fVNtupleFileManager { nullptr };
691
692 private:
693 // Method invoked from UI commands
694 G4bool WriteFromUI();
695 G4bool CloseFileFromUI(G4bool reset = true);
696 G4bool ResetFromUI();
697
698 // Static data members
699 static constexpr std::string_view fkClass { "G4VAnalysisManager" };
700
701 // Static data members
702 inline static G4VAnalysisManager* fgMasterInstance { nullptr };
703 // For registering worker managers needed in "FromUI" functions
704
705 // Data members
706 std::unique_ptr<G4AnalysisMessenger> fMessenger;
707 std::shared_ptr<G4HnManager> fH1HnManager { nullptr };
708 std::shared_ptr<G4HnManager> fH2HnManager { nullptr };
709 std::shared_ptr<G4HnManager> fH3HnManager { nullptr };
710 std::shared_ptr<G4HnManager> fP1HnManager { nullptr };
711 std::shared_ptr<G4HnManager> fP2HnManager { nullptr };
712 std::unique_ptr<G4VTBaseHnManager<kDim1>> fVH1Manager;
713 std::unique_ptr<G4VTBaseHnManager<kDim2>> fVH2Manager;
714 std::unique_ptr<G4VTBaseHnManager<kDim3>> fVH3Manager;
715 std::unique_ptr<G4VTBaseHnManager<kDim2>> fVP1Manager;
716 std::unique_ptr<G4VTBaseHnManager<kDim3>> fVP2Manager;
717
718 std::vector<G4VAnalysisManager*> fWorkerManagers;
719 // Used only in "FromUI" functions
720};
721
722// inline functions
723
724#include "G4VAnalysisManager.icc"
725
726#endif
float G4float
Definition: G4Types.hh:84
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
G4bool SetP2YAxisTitle(G4int id, const G4String &title)
G4bool ListNtuple(G4bool onlyIfActive=true) const
G4double GetH3Xmin(G4int id) const
G4bool GetP2ZAxisIsLog(G4int id) const
static constexpr unsigned int kDim1
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 &xbinSchemeName="linear")
G4bool SetH2XAxisIsLog(G4int id, G4bool isLog)
G4int GetP1Nbins(G4int id) const
G4int GetVerboseLevel() const
virtual G4bool MergeImpl(tools::histo::hmpi *hmpi)=0
G4bool FillNtupleIColumn(G4int ntupleId, G4int columnId, G4int value)
G4double GetP1Xmax(G4int id) const
G4int GetH3Nxbins(G4int id) const
void SetH1Ascii(G4int id, G4bool ascii)
G4int GetFirstNtupleId() const
G4bool GetP1XAxisIsLog(G4int id) const
G4double GetP1Ymax(G4int id) const
G4bool GetActivation() const
G4String GetH3YAxisTitle(G4int id) const
virtual G4bool IsOpenFileImpl() const =0
G4int CreateP2(const G4String &name, const G4String &title, G4int nxbins, G4double xmin, G4double xmax, G4int nybins, G4double ymin, G4double ymax, G4double zmin=0, G4double zmax=0, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &zunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &zfcnName="none", const G4String &xbinSchemeName="linear", const G4String &ybinSchemeName="linear")
G4String GetP1XAxisTitle(G4int id) const
G4bool SetH2Title(G4int id, const G4String &title)
void SetH3Manager(G4VTBaseHnManager< 3 > *h3Manager)
void SetH2FileName(G4int id, const G4String &fileName)
G4VAnalysisManager()=delete
void SetH1Activation(G4bool activation)
G4bool FillNtupleSColumn(G4int id, const G4String &value)
G4bool GetH1YAxisIsLog(G4int id) const
G4bool ListH1(G4bool onlyIfActive=true) const
G4bool GetP2Plotting(G4int id) const
virtual std::shared_ptr< G4VFileManager > GetFileManager(const G4String &fileName)
virtual ~G4VAnalysisManager()
G4double GetH3YWidth(G4int id) const
G4double GetP1XWidth(G4int id) const
void SetH1Plotting(G4int id, G4bool plotting)
G4String GetP2ZAxisTitle(G4int id) const
void SetH3Ascii(G4int id, G4bool ascii)
G4bool GetNtupleActivation(G4int id) const
G4String GetH1YAxisTitle(G4int id) const
G4String GetH1Name(G4int id) const
G4int GetP2Id(const G4String &name, G4bool warn=true) const
void SetH3Activation(G4bool activation)
G4int GetH2Id(const G4String &name, G4bool warn=true) const
G4String GetH1FileName(G4int id) const
G4bool GetH2ZAxisIsLog(G4int id) const
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")
G4int GetH2Nybins(G4int id) const
G4double GetP1XUnit(G4int id) const
G4double GetH2XUnit(G4int id) const
G4double GetP1Xmin(G4int id) const
G4double GetP2Ymax(G4int id) const
G4bool SetP1XAxisTitle(G4int id, const G4String &title)
G4bool FillP1(G4int id, G4double xvalue, G4double yvalue, G4double weight=1.0)
G4String GetH2Name(G4int id) const
G4int CreateNtupleIColumn(const G4String &name)
virtual G4bool WriteImpl()=0
G4String GetHistoDirectoryName() const
G4bool GetH2YAxisIsLog(G4int id) const
G4int CreateNtupleDColumn(const G4String &name)
G4bool GetH3ZAxisIsLog(G4int id) const
void SetH3Plotting(G4int id, G4bool plotting)
G4bool FillH2(G4int id, G4double xvalue, G4double yvalue, G4double weight=1.0)
void SetP2FileName(G4int id, const G4String &fileName)
G4bool SetH1YAxisIsLog(G4int id, G4bool isLog)
void SetNtupleFileName(const G4String &fileName)
G4String GetP2Name(G4int id) const
G4int CreateNtupleFColumn(const G4String &name)
G4bool FillH3(G4int id, G4double xvalue, G4double yvalue, G4double zvalue, G4double weight=1.0)
G4double GetH2Xmin(G4int id) const
G4bool SetH3Title(G4int id, const G4String &title)
G4bool SetH3(G4int id, G4int nxbins, G4double xmin, G4double xmax, G4int nzbins, G4double zmin, G4double zmax, G4int nybins, G4double ymin, G4double ymax, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &zunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &zfcnName="none", const G4String &xbinSchemeName="linear", const G4String &ybinSchemeName="linear", const G4String &zbinSchemeName="linear")
void SetP2Plotting(G4int id, G4bool plotting)
G4int GetP1Id(const G4String &name, G4bool warn=true) const
G4double GetH3Zmin(G4int id) const
G4String GetH2XAxisTitle(G4int id) const
G4bool GetH1Plotting(G4int id) const
G4bool GetP1Ascii(G4int id) const
G4bool GetP1Activation(G4int id) const
G4int GetH3Nzbins(G4int id) const
G4bool FillNtupleDColumn(G4int id, G4double value)
G4double GetP2XWidth(G4int id) const
G4String GetNtupleFileName(G4int id) const
G4bool GetP1YAxisIsLog(G4int id) const
G4bool SetH2YAxisIsLog(G4int id, G4bool isLog)
G4double GetP2YUnit(G4int id) const
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 &xbinSchemeName="linear")
G4bool SetP2ZAxisIsLog(G4int id, G4bool isLog)
G4double GetP2Xmin(G4int id) const
G4bool SetFirstP1Id(G4int firstId)
G4double GetH2YWidth(G4int id) const
void SetP2Manager(G4VTBaseHnManager< 3 > *p2Manager)
G4int GetH1Id(const G4String &name, G4bool warn=true) const
G4double GetH2YUnit(G4int id) const
G4bool SetP2(G4int id, G4int nxbins, G4double xmin, G4double xmax, G4int nybins, G4double ymin, G4double ymax, G4double zmin=0, G4double zmax=0, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &zunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &zfcnName="none", const G4String &xbinSchemeName="linear", const G4String &ybinSchemeName="linear")
std::shared_ptr< G4VNtupleFileManager > fVNtupleFileManager
static constexpr unsigned int kDim3
G4bool FillNtupleSColumn(G4int ntupleId, G4int id, const G4String &value)
G4bool SetH3YAxisTitle(G4int id, const G4String &title)
G4bool FillNtupleIColumn(G4int id, G4int value)
virtual G4bool OpenFileImpl(const G4String &fileName)=0
G4double GetP2Zmin(G4int id) const
void SetActivation(G4bool activation)
G4bool SetFirstNtupleColumnId(G4int firstId)
G4String GetFileName() const
G4bool ListH2(G4bool onlyIfActive=true) const
G4String GetType() const
G4double GetP2YWidth(G4int id) const
G4bool GetH2Plotting(G4int id) const
G4bool GetH3YAxisIsLog(G4int id) const
G4bool CloseFile(G4bool reset=true)
G4bool OpenFile(const G4String &fileName="")
void SetH3FileName(G4int id, const G4String &fileName)
G4String GetH1Title(G4int id) const
G4bool GetH1Activation(G4int id) const
G4bool FillNtupleDColumn(G4int ntupleId, G4int columnId, G4double value)
virtual void ClearImpl()=0
G4double GetP1Ymin(G4int id) const
G4bool GetH3XAxisIsLog(G4int id) const
G4int GetH1Nbins(G4int id) const
G4bool GetH2Activation(G4int id) const
G4bool SetP1YAxisIsLog(G4int id, G4bool isLog)
std::shared_ptr< G4NtupleBookingManager > fNtupleBookingManager
G4bool ScaleP1(G4int id, G4double factor)
G4String GetP1YAxisTitle(G4int id) const
G4bool GetH3Ascii(G4int id) const
G4bool SetP2Title(G4int id, const G4String &title)
static constexpr unsigned int kDim2
G4bool GetP1Plotting(G4int id) const
G4bool ScaleH3(G4int id, G4double factor)
void SetH2Ascii(G4int id, G4bool ascii)
G4bool ListP2(G4bool onlyIfActive=true) const
void Message(G4int level, const G4String &action, const G4String &objectType, const G4String &objectName="", G4bool success=true) const
G4int CreateNtupleSColumn(const G4String &name)
virtual G4bool PlotImpl()=0
G4double GetP2ZUnit(G4int id) const
void SetP1Ascii(G4int id, G4bool ascii)
G4bool GetH1XAxisIsLog(G4int id) const
G4double GetH3Zmax(G4int id) const
G4double GetH3ZUnit(G4int id) const
G4int CreateH3(const G4String &name, const G4String &title, G4int nxbins, G4double xmin, G4double xmax, G4int nybins, G4double ymin, G4double ymax, G4int nzbins, G4double zmin, G4double zmax, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &zunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &zfcnName="none", const G4String &xbinSchemeName="linear", const G4String &ybinSchemeName="linear", const G4String &zbinSchemeName="linear")
G4bool FillNtupleFColumn(G4int id, G4float value)
G4bool SetFirstH3Id(G4int firstId)
G4bool SetHistoDirectoryName(const G4String &dirName)
G4double GetH1Width(G4int id) const
G4bool GetP2YAxisIsLog(G4int id) const
G4String GetP2YAxisTitle(G4int id) const
G4bool SetH3XAxisIsLog(G4int id, G4bool isLog)
G4bool FillH1(G4int id, G4double value, G4double weight=1.0)
G4bool GetH2Ascii(G4int id) const
G4AnalysisManagerState fState
void SetP2Activation(G4bool activation)
void SetH1FileName(G4int id, const G4String &fileName)
G4bool GetH2XAxisIsLog(G4int id) const
G4bool SetP1YAxisTitle(G4int id, const G4String &title)
G4String GetP1Name(G4int id) const
G4bool SetH2XAxisTitle(G4int id, const G4String &title)
G4String GetH3ZAxisTitle(G4int id) const
G4bool SetH1Title(G4int id, const G4String &title)
virtual void SetNtupleRowWise(G4bool rowWise, G4bool rowMode=true)
G4bool SetP1XAxisIsLog(G4int id, G4bool isLog)
void SetP1Plotting(G4int id, G4bool plotting)
G4double GetH3Xmax(G4int id) const
G4bool SetP2ZAxisTitle(G4int id, const G4String &title)
G4String GetH3Title(G4int id) const
G4String GetH3Name(G4int id) const
void SetH1Manager(G4VTBaseHnManager< 1 > *h1Manager)
virtual void SetBasketSize(unsigned int basketSize)
void SetP1Manager(G4VTBaseHnManager< 2 > *p1Manager)
G4bool GetP2XAxisIsLog(G4int id) const
G4bool SetH1XAxisTitle(G4int id, const G4String &title)
G4double GetP2Zmax(G4int id) const
G4bool FillP2(G4int id, G4double xvalue, G4double yvalue, G4double zvalue, G4double weight=1.0)
G4double GetH3YUnit(G4int id) const
void SetFileManager(std::shared_ptr< G4VFileManager > fileManager)
G4bool SetH1XAxisIsLog(G4int id, G4bool isLog)
void SetP1FileName(G4int id, const G4String &fileName)
G4double GetH1Unit(G4int id) const
G4double GetP2Ymin(G4int id) const
G4bool GetP2Ascii(G4int id) const
G4double GetH2Ymin(G4int id) const
G4double GetH3Ymin(G4int id) const
G4bool WriteAscii(const G4String &fileName)
virtual void SetNtupleMerging(G4bool mergeNtuples, G4int nofReducedNtupleFiles=0)
G4bool SetP2YAxisIsLog(G4int id, G4bool isLog)
G4int GetH3Id(const G4String &name, G4bool warn=true) const
G4bool ListP1(G4bool onlyIfActive=true) const
void SetP1Activation(G4bool activation)
G4bool SetP1Title(G4int id, const G4String &title)
virtual void SetBasketEntries(unsigned int basketEntries)
G4int GetFirstNtupleColumnId() const
G4double GetP2XUnit(G4int id) const
G4bool SetH3XAxisTitle(G4int id, const G4String &title)
G4String GetH2YAxisTitle(G4int id) const
G4double GetH1Xmin(G4int id) const
void SetVerboseLevel(G4int verboseLevel)
G4bool AddNtupleRow(G4int ntupleId)
G4bool SetH1(G4int id, G4int nbins, G4double xmin, G4double xmax, const G4String &unitName="none", const G4String &fcnName="none", const G4String &binSchemeName="linear")
G4bool SetH3YAxisIsLog(G4int id, G4bool isLog)
G4String GetH3XAxisTitle(G4int id) const
G4double GetH3XUnit(G4int id) const
void SetH2Activation(G4bool activation)
G4int CreateNtuple(const G4String &name, const G4String &title)
G4bool GetH3Activation(G4int id) const
G4bool SetH2YAxisTitle(G4int id, const G4String &title)
G4String GetP1Title(G4int id) const
std::shared_ptr< G4VNtupleManager > fVNtupleManager
G4String GetP2XAxisTitle(G4int id) const
void SetNtupleManager(std::shared_ptr< G4VNtupleManager > ntupleManager)
G4bool SetFirstH2Id(G4int firstId)
G4bool SetH3ZAxisIsLog(G4int id, G4bool isLog)
G4double GetH3Ymax(G4int id) const
G4double GetH2Xmax(G4int id) const
G4bool SetFirstP2Id(G4int firstId)
G4int GetP2Nxbins(G4int id) const
G4bool List(G4bool onlyIfActive=true) const
G4String GetH1XAxisTitle(G4int id) const
G4String GetH2Title(G4int id) const
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 &xbinSchemeName="linear", const G4String &ybinSchemeName="linear")
G4bool GetP2Activation(G4int id) const
G4bool SetH3ZAxisTitle(G4int id, const G4String &title)
G4String GetH2ZAxisTitle(G4int id) const
G4String GetFileType() const
virtual G4bool ResetImpl()=0
std::shared_ptr< G4VFileManager > fVFileManager
G4bool SetH2ZAxisIsLog(G4int id, G4bool isLog)
G4int GetP2Nybins(G4int id) const
G4bool SetFileName(const G4String &fileName)
void SetCompressionLevel(G4int level)
G4double GetH3XWidth(G4int id) const
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 &xbinSchemeName="linear", const G4String &ybinSchemeName="linear")
void SetNtupleActivation(G4bool activation)
G4int GetCompressionLevel() const
G4bool SetFirstH1Id(G4int firstId)
G4bool ScaleH1(G4int id, G4double factor)
G4String GetP2Title(G4int id) const
G4String GetNtupleDirectoryName() const
G4bool SetH2ZAxisTitle(G4int id, const G4String &title)
G4bool SetFirstNtupleId(G4int firstId)
G4bool IsOpenFile() const
G4bool GetH3Plotting(G4int id) const
G4bool SetFirstHistoId(G4int firstId)
G4double GetH1Xmax(G4int id) const
G4bool SetFirstProfileId(G4int firstId)
G4bool SetNtupleDirectoryName(const G4String &dirName)
void SetH2Manager(G4VTBaseHnManager< 2 > *h2Manager)
G4double GetH2Ymax(G4int id) const
G4bool ScaleP2(G4int id, G4double factor)
G4double GetP2Xmax(G4int id) const
virtual G4bool CloseFileImpl(G4bool reset)=0
G4bool ScaleH2(G4int id, G4double factor)
G4double GetH3ZWidth(G4int id) const
G4double GetH2XWidth(G4int id) const
G4int GetH2Nxbins(G4int id) const
G4bool Merge(tools::histo::hmpi *hmpi)
G4bool FillNtupleFColumn(G4int ntupleId, G4int columnId, G4float value)
void SetP2Ascii(G4int id, G4bool ascii)
G4bool SetH1YAxisTitle(G4int id, const G4String &title)
G4double GetP1YUnit(G4int id) const
void SetH2Plotting(G4int id, G4bool plotting)
G4bool SetP2XAxisIsLog(G4int id, G4bool isLog)
G4bool SetP2XAxisTitle(G4int id, const G4String &title)
G4int GetH3Nybins(G4int id) const
G4bool ListH3(G4bool onlyIfActive=true) const
G4bool GetH1Ascii(G4int id) const
void SetNtupleFileManager(std::shared_ptr< G4VNtupleFileManager > ntupleFileManager)