44 using namespace G4Analysis;
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;
void SetP1Activation(G4bool activation)
G4VAnalysisManager(const G4String &type, G4bool isMaster)
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 SetFirstP2Id(G4int firstId)
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")
virtual G4int GetNofNtuples() const =0
G4VNtupleManager * fVNtupleManager
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")
G4int GetFirstH2Id() const
G4bool SetH1(G4int id, G4int nbins, G4double xmin, G4double xmax, const G4String &unitName="none", const G4String &fcnName="none", const G4String &binSchemeName="linear")
void SetH2Ascii(G4int id, G4bool ascii)
std::ostringstream G4ExceptionDescription
G4bool SetHistoDirectoryName(const G4String &dirName)
virtual G4bool WriteImpl()=0
std::unique_ptr< G4VH1Manager > fVH1Manager
std::shared_ptr< G4HnManager > fP2HnManager
void SetVerboseLevel(G4int verboseLevel)
void SetP1Plotting(G4int id, G4bool plotting)
G4bool SetFileName(const G4String &fileName)
G4bool GetIsActivation() const
virtual void SetActivation(G4bool activation)=0
G4String GetFileName() const
G4int GetNofNtuples() const
G4bool SetFirstH2Id(G4int firstId)
G4bool ScaleH1(G4int id, G4double factor)
std::unique_ptr< T > make_unique(Args &&...args)
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")
G4String GetHistoDirectoryName() const
virtual G4int CreateNtupleSColumn(const G4String &name)=0
G4bool SetFirstHistoId(G4int firstId)
virtual std::shared_ptr< G4HnManager > GetHnManager()=0
G4bool SetFirstNtupleColumnId(G4int firstId)
void SetH3Ascii(G4int id, G4bool ascii)
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 SetIsActivation(G4bool isActivation)
G4bool OpenFile(const G4String &fileName="")
std::shared_ptr< G4HnManager > fP1HnManager
G4String GetNtupleDirectoryName() const
void SetH1Manager(G4VH1Manager *h1Manager)
void SetH3Manager(G4VH3Manager *h3Manager)
G4bool SetFirstH1Id(G4int firstId)
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")
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< G4HnManager > fH3HnManager
std::unique_ptr< G4AnalysisMessenger > fMessenger
G4int CreateNtupleIColumn(const G4String &name)
G4bool ScaleP1(G4int id, G4double factor)
std::unique_ptr< G4VP2Manager > fVP2Manager
G4int GetFirstP1Id() const
virtual G4bool OpenFileImpl(const G4String &fileName)=0
void SetH2Plotting(G4int id, G4bool plotting)
void SetActivation(G4bool activation)
std::shared_ptr< G4HnManager > fH1HnManager
std::unique_ptr< G4VH2Manager > fVH2Manager
G4int GetFirstH3Id() const
virtual G4int CreateNtupleIColumn(const G4String &name, std::vector< int > *vector)=0
virtual G4int CreateNtupleDColumn(const G4String &name, std::vector< double > *vector)=0
G4AnalysisManagerState fState
void SetH2Manager(G4VH2Manager *h2Manager)
void SetP2Ascii(G4int id, G4bool ascii)
G4bool SetFirstP1Id(G4int firstId)
virtual G4int GetFirstNtupleColumnId() const =0
virtual G4bool IsOpenFileImpl() const =0
G4int GetFirstP2Id() const
virtual void FinishNtuple()=0
void SetH2Activation(G4bool activation)
std::shared_ptr< G4VFileManager > fVFileManager
G4bool CheckNbins(G4int nbins)
G4bool SetFirstId(G4int firstId)
virtual G4bool SetFirstNtupleColumnId(G4int firstId)=0
G4int GetCompressionLevel() const
void SetH3Plotting(G4int id, G4bool plotting)
G4bool SetFirstH3Id(G4int firstId)
void SetNtupleActivation(G4bool activation)
G4bool Merge(tools::histo::hmpi *hmpi)
std::unique_ptr< G4VH3Manager > fVH3Manager
virtual std::shared_ptr< G4HnManager > GetHnManager()=0
virtual G4bool PlotImpl()=0
virtual G4bool MergeImpl(tools::histo::hmpi *hmpi)=0
G4bool SetFirstProfileId(G4int firstId)
G4int GetFirstH1Id() const
const G4AnalysisVerbose * GetVerboseL3() const
virtual G4int CreateNtupleFColumn(const G4String &name, std::vector< float > *vector)=0
G4int CreateNtupleDColumn(const G4String &name)
G4int GetFirstNtupleColumnId() const
G4bool ScaleH3(G4int id, G4double factor)
void SetCompressionLevel(G4int level)
G4bool IsPlotting() const
G4bool ScaleP2(G4int id, G4double factor)
void SetP2Activation(G4bool activation)
void SetFileManager(std::shared_ptr< G4VFileManager > fileManager)
G4double G4ParticleHPJENDLHEData::G4double result
std::shared_ptr< G4HnManager > fH2HnManager
G4int GetFirstNtupleId() const
void SetVerboseLevel(G4int verboseLevel)
G4bool IsOpenFile() const
void SetH1Activation(G4bool activation)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4bool CheckName(const G4String &name, const G4String &objectType)
G4bool ScaleH2(G4int id, G4double factor)
G4int CreateNtupleSColumn(const G4String &name)
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)
void SetH1Ascii(G4int id, G4bool ascii)
G4bool SetNtupleDirectoryName(const G4String &dirName)
void SetP2Plotting(G4int id, G4bool plotting)
void SetNtupleManager(G4VNtupleManager *ntupleManager)
virtual ~G4VAnalysisManager()
virtual std::shared_ptr< G4HnManager > GetHnManager()=0
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
virtual G4int CreateNtuple(const G4String &name, const G4String &title)=0
void SetP2Manager(G4VP2Manager *p2Manager)
G4int CreateNtuple(const G4String &name, const G4String &title)
virtual std::shared_ptr< G4HnManager > GetHnManager()=0
G4bool CheckEdges(const std::vector< G4double > &edges)
std::unique_ptr< G4VP1Manager > fVP1Manager
G4bool CheckMinMax(G4double xmin, G4double xmax, const G4String &fcnName="none", const G4String &binSchemeName="linear")
G4String & append(const G4String &)
virtual G4bool CloseFileImpl()=0
G4int CreateNtupleFColumn(const G4String &name)
void SetH3Activation(G4bool activation)
virtual std::shared_ptr< G4HnManager > GetHnManager()=0
void SetP1Manager(G4VP1Manager *p1Manager)
G4int GetCompressionLevel() const
G4bool SetFirstNtupleId(G4int firstId)
const G4AnalysisVerbose * GetVerboseL1() const
void SetP1Ascii(G4int id, G4bool ascii)
void SetCompressionLevel(G4int level)
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 WriteAscii(const G4String &fileName)