48 : fState(type, isMaster),
49 fVFileManager(nullptr),
51 fH1HnManager(nullptr),
52 fH2HnManager(nullptr),
53 fH3HnManager(nullptr),
54 fP1HnManager(nullptr),
55 fP2HnManager(nullptr),
61 fVNtupleManager(nullptr)
132 G4bool finalResult =
true;
136 if ( name.find(
".") != std::string::npos ) {
137 name.erase(name.find(
"."), name.length());
146 std::ofstream output(name, std::ios::out);
150 <<
"Cannot open file. File name is not defined.";
155 output.setf( std::ios::scientific, std::ios::floatfield );
158 finalResult = finalResult && result;
161 finalResult = finalResult && result;
164 finalResult = finalResult && result;
187 if ( fileName !=
"" ) {
194 <<
"Cannot open file. File name is not defined.";
206 G4bool finalResult =
true;
209 finalResult = finalResult && result;
213 finalResult = finalResult && result;
301 return fVH1Manager->CreateH1(name, title, nbins, xmin, xmax,
302 unitName, fcnName, binSchemeName);
307 const std::vector<G4double>& edges,
313 return fVH1Manager->CreateH1(name, title, edges, unitName, fcnName);
335 nxbins, xmin, xmax, nybins, ymin, ymax,
336 xunitName, yunitName, xfcnName, yfcnName,
337 xbinSchemeName, ybinSchemeName);
342 const std::vector<G4double>& xedges,
343 const std::vector<G4double>& yedges,
355 xunitName, yunitName, xfcnName, yfcnName);
384 nxbins, xmin, xmax, nybins, ymin, ymax,
386 xunitName, yunitName, zunitName,
387 xfcnName, yfcnName, zfcnName,
388 xbinSchemeName, ybinSchemeName, zbinSchemeName);
393 const std::vector<G4double>& xedges,
394 const std::vector<G4double>& yedges,
395 const std::vector<G4double>& zedges,
409 xedges, yedges, zedges,
410 xunitName, yunitName, zunitName,
411 xfcnName, yfcnName, zfcnName);
423 return fVH1Manager->SetH1(
id, nbins, xmin, xmax, unitName, fcnName, binSchemeName);
428 const std::vector<G4double>& edges,
433 return fVH1Manager->SetH1(
id, edges, unitName, fcnName);
451 return fVH2Manager->SetH2(
id, nxbins, xmin, xmax, nybins, ymin, ymax,
452 xunitName, yunitName, xfcnName, yfcnName,
453 xbinSchemeName, ybinSchemeName);
458 const std::vector<G4double>& xedges,
459 const std::vector<G4double>& yedges,
467 xunitName, yunitName, xfcnName, yfcnName);
493 nxbins, xmin, xmax, nybins, ymin, ymax,
495 xunitName, yunitName, zunitName,
496 xfcnName, yfcnName, zfcnName,
497 xbinSchemeName, ybinSchemeName, zbinSchemeName);
502 const std::vector<G4double>& xedges,
503 const std::vector<G4double>& yedges,
504 const std::vector<G4double>& zedges,
514 return fVH3Manager->SetH3(
id, xedges, yedges, zedges,
515 xunitName, yunitName, zunitName,
516 xfcnName, yfcnName, zfcnName);
548 if ( ymin != 0. || ymax != 0. ) {
553 return fVP1Manager->CreateP1(name, title, nbins, xmin, xmax, ymin, ymax,
554 xunitName, yunitName, xfcnName, yfcnName,
560 const std::vector<G4double>& edges,
567 if ( ymin != 0. || ymax != 0. ) {
572 return fVP1Manager->CreateP1(name, title, edges, ymin, ymax,
573 xunitName, yunitName, xfcnName, yfcnName);
592 if ( zmin != 0. || zmax != 0. ) {
598 nxbins, xmin, xmax, nybins, ymin, ymax,
600 xunitName, yunitName, zunitName,
601 xfcnName, yfcnName, zfcnName,
602 xbinSchemeName, ybinSchemeName);
607 const std::vector<G4double>& xedges,
608 const std::vector<G4double>& yedges,
618 if ( zmin != 0. || zmax != 0. ) {
623 return fVP2Manager->CreateP2(name, title, xedges, yedges, zmin, zmax,
624 xunitName, yunitName, zunitName,
625 xfcnName, yfcnName, zfcnName);
638 if ( ymin != 0. || ymax != 0. ) {
643 return fVP1Manager->SetP1(
id, nbins, xmin, xmax, ymin, ymax,
644 xunitName, yunitName, xfcnName, yfcnName,
650 const std::vector<G4double>& edges,
656 if ( ymin != 0. || ymax != 0. ) {
662 xunitName, yunitName, xfcnName, yfcnName);
681 if ( zmin != 0. || zmax != 0. ) {
686 return fVP2Manager->SetP2(
id, nxbins, xmin, xmax, nybins, ymin, ymax,
688 xunitName, yunitName, zunitName,
689 xfcnName, yfcnName, zfcnName,
690 xbinSchemeName, ybinSchemeName);
695 const std::vector<G4double>& xedges,
696 const std::vector<G4double>& yedges,
707 if ( zmin != 0. || zmax != 0. ) {
712 return fVP2Manager->SetP2(
id, xedges, yedges, zmin, zmax,
713 xunitName, yunitName, zunitName,
714 xfcnName, yfcnName, zfcnName);
772 std::vector<int>& vector)
781 std::vector<float>& vector)
790 std::vector<double>& vector)
843 std::vector<int>& vector)
853 std::vector<float>& vector)
863 std::vector<double>& vector)
879 G4bool finalResult =
true;
882 finalResult = finalResult && result;
885 finalResult = finalResult && result;
888 finalResult = finalResult && result;
914 G4bool finalResult =
true;
917 finalResult = finalResult && result;
920 finalResult = finalResult && result;
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")
void SetP1Manager(G4VP1Manager *p1Manager)
G4bool SetHistoDirectoryName(const G4String &dirName)
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
void SetH2Ascii(G4int id, G4bool ascii)
G4String GetNtupleDirectoryName() const
std::unique_ptr< T > make_unique(Args &&...args)
void SetH3Plotting(G4int id, G4bool plotting)
G4int CreateNtupleIColumn(const G4String &name)
G4int GetCompressionLevel() const
G4bool SetFirstHistoId(G4int firstId)
virtual G4bool MergeImpl(tools::histo::hmpi *hmpi)=0
void SetCompressionLevel(G4int level)
virtual G4int GetNofNtuples() const =0
std::ostringstream G4ExceptionDescription
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")
void SetCompressionLevel(G4int level)
G4bool ScaleH1(G4int id, G4double factor)
G4bool ScaleH2(G4int id, G4double factor)
void SetH1Manager(G4VH1Manager *h1Manager)
void SetP2Activation(G4bool activation)
virtual G4bool WriteImpl()=0
void SetVerboseLevel(G4int verboseLevel)
G4bool SetFirstId(G4int firstId)
void SetH2Plotting(G4int id, G4bool plotting)
void SetH2Activation(G4bool activation)
G4int CreateNtuple(const G4String &name, const G4String &title)
G4int GetFirstP2Id() const
virtual G4int CreateNtupleSColumn(const G4String &name)=0
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")
const char * name(G4int ptype)
G4int GetFirstH2Id() const
std::unique_ptr< G4VP2Manager > fVP2Manager
G4int GetFirstH1Id() const
G4VNtupleManager * fVNtupleManager
G4bool SetFileName(const G4String &fileName)
G4bool ScaleH3(G4int id, G4double factor)
virtual std::shared_ptr< G4HnManager > GetHnManager()=0
G4int CreateNtupleSColumn(const G4String &name)
G4bool SetNtupleDirectoryName(const G4String &dirName)
G4int GetFirstP1Id() const
void SetP1Activation(G4bool activation)
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")
G4int GetFirstNtupleColumnId() const
G4bool OpenFile(const G4String &fileName="")
void SetH3Manager(G4VH3Manager *h3Manager)
G4bool SetFirstH1Id(G4int firstId)
G4VAnalysisManager(const G4String &type, G4bool isMaster)
std::shared_ptr< G4HnManager > fH1HnManager
void SetH3Ascii(G4int id, G4bool ascii)
virtual G4int CreateNtuple(const G4String &name, const G4String &title)=0
G4bool SetFirstProfileId(G4int firstId)
virtual G4bool PlotImpl()=0
const G4AnalysisVerbose * GetVerboseL3() const
virtual std::shared_ptr< G4HnManager > GetHnManager()=0
std::unique_ptr< G4VH2Manager > fVH2Manager
void SetH1Ascii(G4int id, G4bool ascii)
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")
void SetP2Manager(G4VP2Manager *p2Manager)
virtual std::shared_ptr< G4HnManager > GetHnManager()=0
G4bool SetFirstNtupleColumnId(G4int firstId)
G4bool CheckName(const G4String &name, const G4String &objectType)
virtual void FinishNtuple()=0
G4int GetNofNtuples() const
std::shared_ptr< G4VFileManager > fVFileManager
virtual G4bool OpenFileImpl(const G4String &fileName)=0
void SetIsActivation(G4bool isActivation)
G4int GetFirstH3Id() const
G4bool SetFirstP1Id(G4int firstId)
virtual G4bool IsOpenFileImpl() const =0
std::unique_ptr< G4VH1Manager > fVH1Manager
virtual G4int CreateNtupleFColumn(const G4String &name, std::vector< float > *vector)=0
virtual G4int CreateNtupleIColumn(const G4String &name, std::vector< int > *vector)=0
virtual std::shared_ptr< G4HnManager > GetHnManager()=0
G4bool SetH1(G4int id, G4int nbins, G4double xmin, G4double xmax, const G4String &unitName="none", const G4String &fcnName="none", const G4String &binSchemeName="linear")
G4String GetFileName() const
std::shared_ptr< G4HnManager > fP2HnManager
G4bool ScaleP2(G4int id, G4double factor)
std::unique_ptr< G4VP1Manager > fVP1Manager
G4String GetHistoDirectoryName() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
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")
void SetFileManager(std::shared_ptr< G4VFileManager > fileManager)
void SetH2Manager(G4VH2Manager *h2Manager)
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")
G4bool SetFirstNtupleId(G4int firstId)
G4bool SetFirstH3Id(G4int firstId)
G4bool IsOpenFile() const
virtual ~G4VAnalysisManager()
G4bool SetFirstP2Id(G4int firstId)
std::shared_ptr< G4HnManager > fH3HnManager
std::unique_ptr< G4AnalysisMessenger > fMessenger
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")
void SetH1Plotting(G4int id, G4bool plotting)
G4String & append(const G4String &)
void SetH1Activation(G4bool activation)
void SetActivation(G4bool activation)
void SetP2Ascii(G4int id, G4bool ascii)
G4int CreateNtupleFColumn(const G4String &name)
G4int GetCompressionLevel() const
void SetH3Activation(G4bool activation)
void SetP1Ascii(G4int id, G4bool ascii)
std::shared_ptr< G4HnManager > fP1HnManager
G4bool CheckNbins(G4int nbins)
G4bool SetFirstNtupleColumnId(G4int firstId)
G4bool SetFirstH2Id(G4int firstId)
G4int GetFirstNtupleColumnId() const
G4int CreateNtupleDColumn(const G4String &name)
std::shared_ptr< G4HnManager > fH2HnManager
virtual void SetActivation(G4bool activation)=0
void SetNtupleActivation(G4bool activation)
void SetP1Plotting(G4int id, G4bool plotting)
virtual G4int CreateNtupleDColumn(const G4String &name, std::vector< double > *vector)=0
G4AnalysisManagerState fState
void SetVerboseLevel(G4int verboseLevel)
void SetP2Plotting(G4int id, G4bool plotting)
std::unique_ptr< G4VH3Manager > fVH3Manager
virtual G4bool CloseFileImpl()=0
virtual std::shared_ptr< G4HnManager > GetHnManager()=0
G4int GetFirstNtupleId() const
G4bool GetIsActivation() const
const G4AnalysisVerbose * GetVerboseL1() const
void SetNtupleManager(G4VNtupleManager *ntupleManager)
G4bool CheckMinMax(G4double xmin, G4double xmax, const G4String &fcnName="none", const G4String &binSchemeName="linear")
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")
G4bool CheckEdges(const std::vector< G4double > &edges)
G4bool ScaleP1(G4int id, G4double factor)
G4bool WriteAscii(const G4String &fileName)
G4bool Merge(tools::histo::hmpi *hmpi)
G4bool IsPlotting() const