Geant4 11.2.2
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
42#include "globals.hh"
43
44#include <vector>
45#include <fstream>
46#include <memory>
47#include <string_view>
48
49#include "G4VTBaseHnManager.hh" // make forward declaration if possible
50
53class G4HnManager;
56class G4VFileManager;
57
58namespace tools {
59namespace histo{
60class hmpi;
61}
62}
63
67
69{
70 friend class G4AnalysisMessenger;
71
72 public:
74
75 // Methods for handling files
76 G4bool OpenFile(const G4String& fileName = "");
77 G4bool Write();
78 G4bool CloseFile(G4bool reset = true);
79 G4bool Reset();
80 void Clear();
81 G4bool Merge(tools::histo::hmpi* hmpi);
82 G4bool Plot();
83 G4bool IsOpenFile() const;
84
85 // Method for handling default file type
86 void SetDefaultFileType(const G4String& value);
88
89 // Methods for handling files and directories names
90 G4bool SetFileName(const G4String& fileName);
93 void SetCompressionLevel(G4int level);
94
95 G4String GetFileName() const;
99
100 // Methods for handling histograms
101 //
102 G4int CreateH1(const G4String& name, const G4String& title,
103 G4int nbins, G4double xmin, G4double xmax,
104 const G4String& unitName = "none",
105 const G4String& fcnName = "none",
106 const G4String& binSchemeName = "linear");
107
108 G4int CreateH1(const G4String& name, const G4String& title,
109 const std::vector<G4double>& edges,
110 const G4String& unitName = "none",
111 const G4String& fcnName = "none");
112
113 G4int CreateH2(const G4String& name, const G4String& title,
114 G4int nxbins, G4double xmin, G4double xmax,
115 G4int nybins, G4double ymin, G4double ymax,
116 const G4String& xunitName = "none",
117 const G4String& yunitName = "none",
118 const G4String& xfcnName = "none",
119 const G4String& yfcnName = "none",
120 const G4String& xbinSchemeName = "linear",
121 const G4String& ybinSchemeName = "linear");
122
123 G4int CreateH2(const G4String& name, const G4String& title,
124 const std::vector<G4double>& xedges,
125 const std::vector<G4double>& yedges,
126 const G4String& xunitName = "none",
127 const G4String& yunitName = "none",
128 const G4String& xfcnName = "none",
129 const G4String& yfcnName = "none");
130
131 G4int CreateH3(const G4String& name, const G4String& title,
132 G4int nxbins, G4double xmin, G4double xmax,
133 G4int nybins, G4double ymin, G4double ymax,
134 G4int nzbins, G4double zmin, G4double zmax,
135 const G4String& xunitName = "none",
136 const G4String& yunitName = "none",
137 const G4String& zunitName = "none",
138 const G4String& xfcnName = "none",
139 const G4String& yfcnName = "none",
140 const G4String& zfcnName = "none",
141 const G4String& xbinSchemeName = "linear",
142 const G4String& ybinSchemeName = "linear",
143 const G4String& zbinSchemeName = "linear");
144
145 G4int CreateH3(const G4String& name, const G4String& title,
146 const std::vector<G4double>& xedges,
147 const std::vector<G4double>& yedges,
148 const std::vector<G4double>& zedges,
149 const G4String& xunitName = "none",
150 const G4String& yunitName = "none",
151 const G4String& zunitName = "none",
152 const G4String& xfcnName = "none",
153 const G4String& yfcnName = "none",
154 const G4String& zfcnName = "none");
155
156 G4bool SetH1(G4int id,
157 G4int nbins, G4double xmin, G4double xmax,
158 const G4String& unitName = "none",
159 const G4String& fcnName = "none",
160 const G4String& binSchemeName = "linear");
161
162 G4bool SetH1(G4int id,
163 const std::vector<G4double>& edges,
164 const G4String& unitName = "none",
165 const G4String& fcnName = "none");
166
167 G4bool SetH2(G4int id,
168 G4int nxbins, G4double xmin, G4double xmax,
169 G4int nybins, G4double ymin, G4double ymax,
170 const G4String& xunitName = "none",
171 const G4String& yunitName = "none",
172 const G4String& xfcnName = "none",
173 const G4String& yfcnName = "none",
174 const G4String& xbinSchemeName = "linear",
175 const G4String& ybinSchemeName = "linear");
176
177 G4bool SetH2(G4int id,
178 const std::vector<G4double>& xedges,
179 const std::vector<G4double>& yedges,
180 const G4String& xunitName = "none",
181 const G4String& yunitName = "none",
182 const G4String& xfcnName = "none",
183 const G4String& yfcnName = "none");
184
185 G4bool SetH3(G4int id,
186 G4int nxbins, G4double xmin, G4double xmax,
187 G4int nzbins, G4double zmin, G4double zmax,
188 G4int nybins, G4double ymin, G4double ymax,
189 const G4String& xunitName = "none",
190 const G4String& yunitName = "none",
191 const G4String& zunitName = "none",
192 const G4String& xfcnName = "none",
193 const G4String& yfcnName = "none",
194 const G4String& zfcnName = "none",
195 const G4String& xbinSchemeName = "linear",
196 const G4String& ybinSchemeName = "linear",
197 const G4String& zbinSchemeName = "linear");
198
199 G4bool SetH3(G4int id,
200 const std::vector<G4double>& xedges,
201 const std::vector<G4double>& yedges,
202 const std::vector<G4double>& zedges,
203 const G4String& xunitName = "none",
204 const G4String& yunitName = "none",
205 const G4String& zunitName = "none",
206 const G4String& xfcnName = "none",
207 const G4String& yfcnName = "none",
208 const G4String& zfcnName = "none");
209
210 G4bool ScaleH1(G4int id, G4double factor);
211 G4bool ScaleH2(G4int id, G4double factor);
212 G4bool ScaleH3(G4int id, G4double factor);
213
214 // Methods for handling profiles
215 //
216 G4int CreateP1(const G4String& name, const G4String& title,
217 G4int nbins, G4double xmin, G4double xmax,
218 G4double ymin = 0, G4double ymax = 0,
219 const G4String& xunitName = "none",
220 const G4String& yunitName = "none",
221 const G4String& xfcnName = "none",
222 const G4String& yfcnName = "none",
223 const G4String& xbinSchemeName = "linear");
224 G4int CreateP1(const G4String& name, const G4String& title,
225 const std::vector<G4double>& edges,
226 G4double ymin = 0, G4double ymax = 0,
227 const G4String& xunitName = "none",
228 const G4String& yunitName = "none",
229 const G4String& xfcnName = "none",
230 const G4String& yfcnName = "none");
231
232 G4int CreateP2(const G4String& name, const G4String& title,
233 G4int nxbins, G4double xmin, G4double xmax,
234 G4int nybins, G4double ymin, G4double ymax,
235 G4double zmin = 0, G4double zmax = 0,
236 const G4String& xunitName = "none",
237 const G4String& yunitName = "none",
238 const G4String& zunitName = "none",
239 const G4String& xfcnName = "none",
240 const G4String& yfcnName = "none",
241 const G4String& zfcnName = "none",
242 const G4String& xbinSchemeName = "linear",
243 const G4String& ybinSchemeName = "linear");
244 G4int CreateP2(const G4String& name, const G4String& title,
245 const std::vector<G4double>& xedges,
246 const std::vector<G4double>& yedges,
247 G4double zmin = 0, G4double zmax = 0,
248 const G4String& xunitName = "none",
249 const G4String& yunitName = "none",
250 const G4String& zunitName = "none",
251 const G4String& xfcnName = "none",
252 const G4String& yfcnName = "none",
253 const G4String& zfcnName = "none");
254
255 G4bool SetP1(G4int id,
256 G4int nbins, G4double xmin, G4double xmax,
257 G4double ymin = 0, G4double ymax = 0,
258 const G4String& xunitName = "none",
259 const G4String& yunitName = "none",
260 const G4String& xfcnName = "none",
261 const G4String& yfcnName = "none",
262 const G4String& xbinSchemeName = "linear");
263 G4bool SetP1(G4int id,
264 const std::vector<G4double>& edges,
265 G4double ymin = 0, G4double ymax = 0,
266 const G4String& xunitName = "none",
267 const G4String& yunitName = "none",
268 const G4String& xfcnName = "none",
269 const G4String& yfcnName = "none");
270
271 G4bool SetP2(G4int id,
272 G4int nxbins, G4double xmin, G4double xmax,
273 G4int nybins, G4double ymin, G4double ymax,
274 G4double zmin = 0, G4double zmax = 0,
275 const G4String& xunitName = "none",
276 const G4String& yunitName = "none",
277 const G4String& zunitName = "none",
278 const G4String& xfcnName = "none",
279 const G4String& yfcnName = "none",
280 const G4String& zfcnName = "none",
281 const G4String& xbinSchemeName = "linear",
282 const G4String& ybinSchemeName = "linear");
283 G4bool SetP2(G4int id,
284 const std::vector<G4double>& xedges,
285 const std::vector<G4double>& yedges,
286 G4double zmin = 0, G4double zmax = 0,
287 const G4String& xunitName = "none",
288 const G4String& yunitName = "none",
289 const G4String& zunitName = "none",
290 const G4String& xfcnName = "none",
291 const G4String& yfcnName = "none",
292 const G4String& zfcnName = "none");
293
294 G4bool ScaleP1(G4int id, G4double factor);
295 G4bool ScaleP2(G4int id, G4double factor);
296
297 // Methods for handling ntuples
298 //
299 G4int CreateNtuple(const G4String& name, const G4String& title);
300
301 // Create columns in the last created ntuple
306
307 // Create columns of vector in the last created ntuple
309 const G4String& name, std::vector<int>& vector);
311 const G4String& name, std::vector<float>& vector);
313 const G4String& name, std::vector<double>& vector);
315 const G4String& name, std::vector<std::string>& vector);
316 void FinishNtuple();
317
318 // Create columns in the ntuple with given id
319 G4int CreateNtupleIColumn(G4int ntupleId, const G4String& name);
320 G4int CreateNtupleFColumn(G4int ntupleId, const G4String& name);
321 G4int CreateNtupleDColumn(G4int ntupleId, const G4String& name);
322 G4int CreateNtupleSColumn(G4int ntupleId, const G4String& name);
323
324 // Create columns of vector in the ntuple with given id
326 const G4String& name, std::vector<int>& vector);
328 const G4String& name, std::vector<float>& vector);
330 const G4String& name, std::vector<double>& vector);
332 const G4String& name, std::vector<std::string>& vector);
333
334 void FinishNtuple(G4int ntupleId);
335
336 // MT/MPI
337 virtual void SetNtupleMerging(G4bool mergeNtuples,
338 G4int nofReducedNtupleFiles = 0);
339 virtual void SetNtupleRowWise(G4bool rowWise, G4bool rowMode = true);
340 virtual void SetBasketSize(unsigned int basketSize);
341 virtual void SetBasketEntries(unsigned int basketEntries);
342
343 // The ids of histograms and ntuples are generated automatically
344 // starting from 0; with following functions it is possible to
345 // change the first Id to start from other value
347 G4bool SetFirstH1Id(G4int firstId);
348 G4bool SetFirstH2Id(G4int firstId);
349 G4bool SetFirstH3Id(G4int firstId);
351 G4bool SetFirstP1Id(G4int firstId);
352 G4bool SetFirstP2Id(G4int firstId);
355
356 // Methods to fill histograms
357 G4bool FillH1(G4int id, G4double value, G4double weight = 1.0);
358 G4bool FillH2(G4int id, G4double xvalue, G4double yvalue,
359 G4double weight = 1.0);
361 G4double xvalue, G4double yvalue, G4double zvalue,
362 G4double weight = 1.0);
363 // Methods to fill profiles
364 G4bool FillP1(G4int id, G4double xvalue, G4double yvalue,
365 G4double weight = 1.0);
367 G4double xvalue, G4double yvalue, G4double zvalue,
368 G4double weight = 1.0);
369
370 // Methods to fill ntuples
371 // Methods for ntuple with id = FirstNtupleId
377 // Methods for ntuple with id > FirstNtupleId (when more ntuples exist)
378 G4bool FillNtupleIColumn(G4int ntupleId, G4int columnId, G4int value);
379 G4bool FillNtupleFColumn(G4int ntupleId, G4int columnId, G4float value);
380 G4bool FillNtupleDColumn(G4int ntupleId, G4int columnId, G4double value);
381 G4bool FillNtupleSColumn(G4int ntupleId, G4int id, const G4String& value);
383
384 // Activation option
385
386 // When this option is enabled, only the histograms/profiles marked as activated
387 // are returned, filled or saved on file.
388 // No warning is issued when Get or Fill is called on inactive histogram.
389 void SetActivation(G4bool activation);
391
392 // Return false if activation is enabled and there is no object activated,
393 // return true otherwise
394 G4bool IsActive() const;
395
396 // ASCII option
397
398 // Return false if there is no object selected for ASCII output,
399 // return true otherwise
400 G4bool IsAscii() const;
401
402 // Plotting option
403
404 // Return false if there is no object selected for plottng,
405 // return true otherwise
406 G4bool IsPlotting() const;
407
408 // Access methods
409 G4int GetFirstH1Id() const;
410 G4int GetFirstH2Id() const;
411 G4int GetFirstH3Id() const;
412 G4int GetFirstP1Id() const;
413 G4int GetFirstP2Id() const;
414 G4int GetFirstNtupleId() const;
416
417 G4int GetNofH1s(G4bool onlyIfExist = false) const;
418 G4int GetNofH2s(G4bool onlyIfExist = false) const;
419 G4int GetNofH3s(G4bool onlyIfExist = false) const;
420 G4int GetNofP1s(G4bool onlyIfExist = false) const;
421 G4int GetNofP2s(G4bool onlyIfExist = false) const;
422 G4int GetNofNtuples(G4bool onlyIfExist = false) const;
423
424 // Access methods via names
425 G4int GetH1Id(const G4String& name, G4bool warn = true) const;
426 G4int GetH2Id(const G4String& name, G4bool warn = true) const;
427 G4int GetH3Id(const G4String& name, G4bool warn = true) const;
428 G4int GetP1Id(const G4String& name, G4bool warn = true) const;
429 G4int GetP2Id(const G4String& name, G4bool warn = true) const;
430
431 // List objects
432 G4bool ListH1(G4bool onlyIfActive = true) const;
433 G4bool ListH2(G4bool onlyIfActive = true) const;
434 G4bool ListH3(G4bool onlyIfActive = true) const;
435 G4bool ListP1(G4bool onlyIfActive = true) const;
436 G4bool ListP2(G4bool onlyIfActive = true) const;
437 G4bool ListNtuple(G4bool onlyIfActive = true) const;
438 G4bool List(G4bool onlyIfActive = true) const;
439
440 // Methods to manipulate histogram, profiles & ntuples additional information
441 //
442 void SetH1Activation(G4bool activation);
443 void SetH1Activation(G4int id, G4bool activation);
444 void SetH1Ascii(G4int id, G4bool ascii);
445 void SetH1Plotting(G4int id, G4bool plotting);
446 void SetH1FileName(G4int id, const G4String& fileName);
447 //
448 void SetH2Activation(G4bool activation);
449 void SetH2Activation(G4int id, G4bool activation);
450 void SetH2Ascii(G4int id, G4bool ascii);
451 void SetH2Plotting(G4int id, G4bool plotting);
452 void SetH2FileName(G4int id, const G4String& fileName);
453 //
454 void SetH3Activation(G4bool activation);
455 void SetH3Activation(G4int id, G4bool activation);
456 void SetH3Ascii(G4int id, G4bool ascii);
457 void SetH3Plotting(G4int id, G4bool plotting);
458 void SetH3FileName(G4int id, const G4String& fileName);
459 //
460 void SetP1Activation(G4bool activation);
461 void SetP1Activation(G4int id, G4bool activation);
462 void SetP1Ascii(G4int id, G4bool ascii);
463 void SetP1Plotting(G4int id, G4bool plotting);
464 void SetP1FileName(G4int id, const G4String& fileName);
465 //
466 void SetP2Activation(G4bool activation);
467 void SetP2Activation(G4int id, G4bool activation);
468 void SetP2Ascii(G4int id, G4bool ascii);
469 void SetP2Plotting(G4int id, G4bool plotting);
470 void SetP2FileName(G4int id, const G4String& fileName);
471 //
472 void SetNtupleActivation(G4bool activation);
473 void SetNtupleActivation(G4int id, G4bool activation);
474 void SetNtupleFileName(const G4String& fileName);
475 void SetNtupleFileName(G4int id, const G4String& fileName);
476
477
478 // Access to histogram & profiles parameters
479 //
484 //
493 //
506 //
513 //
524
525 // Access to histogram & profiles additional information
526 //
533 //
540 //
548 //
555 //
563 //
566
567 // Setters for histogram & profiles attributes for plotting
568 //
569 G4bool SetH1Title(G4int id, const G4String& title);
574 //
575 G4bool SetH2Title(G4int id, const G4String& title);
582 //
583 G4bool SetH3Title(G4int id, const G4String& title);
590 //
591 G4bool SetP1Title(G4int id, const G4String& title);
596 //
597 G4bool SetP2Title(G4int id, const G4String& title);
604
605 // Access histogram & profiles attributes for plotting
606 //
612 //
620 //
628 //
634 //
642
643 // New methods for deleting selected objects
644 //
645 G4bool DeleteH1(G4int id, G4bool keepSetting = false);
646 G4bool DeleteH2(G4int id, G4bool keepSetting = false);
647 G4bool DeleteH3(G4int id, G4bool keepSetting = false);
648 G4bool DeleteP1(G4int id, G4bool keepSetting = false);
649 G4bool DeleteP2(G4int id, G4bool keepSetting = false);
650 G4bool DeleteNtuple(G4int id, G4bool clear = false);
651
652 // Verbosity
653 void SetVerboseLevel(G4int verboseLevel);
655
656 // The manager type (starts with an uppercase letter)
658 // The manager file type (starts with a lowercase letter)
660
661 protected:
662 G4VAnalysisManager(const G4String& type);
664
665 // Virtual methods
666 virtual G4bool OpenFileImpl(const G4String& fileName) = 0;
667 virtual G4bool WriteImpl() = 0;
668 virtual G4bool CloseFileImpl(G4bool reset) = 0;
669 virtual G4bool ResetImpl() = 0;
670 virtual void ClearImpl() = 0;
671 virtual G4bool PlotImpl() = 0;
672 virtual G4bool MergeImpl(tools::histo::hmpi* hmpi) = 0;
673 virtual G4bool IsOpenFileImpl() const = 0;
674 // Set default output type (backward compatibility)
675 // this type will be used for file names without extension
676 virtual void SetDefaultFileTypeImpl(const G4String& value);
677 virtual G4String GetDefaultFileTypeImpl() const;
678
679 // Methods
680 void Message(G4int level,
681 const G4String& action,
682 const G4String& objectType,
683 const G4String& objectName = "",
684 G4bool success = true) const;
685
686 // Methods
687 void SetH1Manager(G4VTBaseHnManager<kDim1>* h1Manager);
688 void SetH2Manager(G4VTBaseHnManager<kDim2>* h2Manager);
689 void SetH3Manager(G4VTBaseHnManager<kDim3>* h3Manager);
690 void SetP1Manager(G4VTBaseHnManager<kDim2>* p1Manager);
691 void SetP2Manager(G4VTBaseHnManager<kDim3>* p2Manager);
692 void SetNtupleManager(std::shared_ptr<G4VNtupleManager> ntupleManager);
693 void SetNtupleFileManager(std::shared_ptr<G4VNtupleFileManager> ntupleFileManager);
694 void SetFileManager(std::shared_ptr<G4VFileManager> fileManager);
695
696 // Methods to manipulate additional information
697 G4bool WriteAscii(const G4String& fileName);
698
699 // File manager access
700 virtual std::shared_ptr<G4VFileManager> GetFileManager(const G4String& fileName);
701
702 // Data members
704 std::shared_ptr<G4VFileManager> fVFileManager { nullptr };
705 std::shared_ptr<G4NtupleBookingManager> fNtupleBookingManager { nullptr };
706 std::shared_ptr<G4VNtupleManager> fVNtupleManager { nullptr };
707 std::shared_ptr<G4VNtupleFileManager> fVNtupleFileManager { nullptr };
708
709 private:
710 // Method invoked from UI commands
711 G4bool WriteFromUI();
712 G4bool CloseFileFromUI(G4bool reset = true);
713 G4bool ResetFromUI();
714
715 // Static data members
716 static constexpr std::string_view fkClass { "G4VAnalysisManager" };
717
718 // Static data members
719 inline static G4VAnalysisManager* fgMasterInstance { nullptr };
720 // For registering worker managers needed in "FromUI" functions
721
722 // Data members
723 std::unique_ptr<G4AnalysisMessenger> fMessenger;
724 std::shared_ptr<G4HnManager> fH1HnManager { nullptr };
725 std::shared_ptr<G4HnManager> fH2HnManager { nullptr };
726 std::shared_ptr<G4HnManager> fH3HnManager { nullptr };
727 std::shared_ptr<G4HnManager> fP1HnManager { nullptr };
728 std::shared_ptr<G4HnManager> fP2HnManager { nullptr };
729 std::unique_ptr<G4VTBaseHnManager<kDim1>> fVH1Manager;
730 std::unique_ptr<G4VTBaseHnManager<kDim2>> fVH2Manager;
731 std::unique_ptr<G4VTBaseHnManager<kDim3>> fVH3Manager;
732 std::unique_ptr<G4VTBaseHnManager<kDim2>> fVP1Manager;
733 std::unique_ptr<G4VTBaseHnManager<kDim3>> fVP2Manager;
734
735 std::vector<G4VAnalysisManager*> fWorkerManagers;
736 // Used only in "FromUI" functions
737};
738
739// inline functions
740
741#include "G4VAnalysisManager.icc"
742
743#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
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)
G4bool GetP1XAxisIsLog(G4int id) const
G4double GetP1Ymax(G4int id) const
G4bool DeleteH1(G4int id, G4bool keepSetting=false)
G4bool GetActivation() const
void SetP1Manager(G4VTBaseHnManager< kDim2 > *p1Manager)
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
void SetP2Manager(G4VTBaseHnManager< kDim3 > *p2Manager)
G4bool SetH2Title(G4int id, const G4String &title)
G4int GetNofH3s(G4bool onlyIfExist=false) const
void SetH2FileName(G4int id, const G4String &fileName)
G4VAnalysisManager()=delete
void SetH1Activation(G4bool activation)
G4bool DeleteNtuple(G4int id, G4bool clear=false)
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
virtual void SetDefaultFileTypeImpl(const G4String &value)
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
G4int GetNofH2s(G4bool onlyIfExist=false) 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
G4bool DeleteP1(G4int id, G4bool keepSetting=false)
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
G4int GetNofH1s(G4bool onlyIfExist=false) 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)
G4int GetNofP1s(G4bool onlyIfExist=false) const
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")
G4bool DeleteP2(G4int id, G4bool keepSetting=false)
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
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")
G4int GetNofP2s(G4bool onlyIfExist=false) const
std::shared_ptr< G4VNtupleFileManager > fVNtupleFileManager
void SetH1Manager(G4VTBaseHnManager< kDim1 > *h1Manager)
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
void SetH3Manager(G4VTBaseHnManager< kDim3 > *h3Manager)
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
G4String GetDefaultFileType() 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)
G4bool GetP1Plotting(G4int id) const
G4bool ScaleH3(G4int id, G4double factor)
void SetH2Ascii(G4int id, G4bool ascii)
G4bool DeleteH2(G4int id, G4bool keepSetting=false)
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
virtual void SetBasketSize(unsigned int basketSize)
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)
G4bool DeleteH3(G4int id, G4bool keepSetting=false)
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
virtual G4String GetDefaultFileTypeImpl() const
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
void SetH2Manager(G4VTBaseHnManager< kDim2 > *h2Manager)
G4bool SetH2ZAxisTitle(G4int id, const G4String &title)
G4bool SetFirstNtupleId(G4int firstId)
G4bool GetH3Plotting(G4int id) const
G4bool SetFirstHistoId(G4int firstId)
G4double GetH1Xmax(G4int id) const
G4bool SetFirstProfileId(G4int firstId)
G4bool SetNtupleDirectoryName(const G4String &dirName)
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
void SetDefaultFileType(const G4String &value)
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
G4int GetNofNtuples(G4bool onlyIfExist=false) const
void SetNtupleFileManager(std::shared_ptr< G4VNtupleFileManager > ntupleFileManager)
constexpr unsigned int kDim3
constexpr unsigned int kDim2
constexpr unsigned int kDim1