Import Geant4 10.7.0 source tree

This commit is contained in:
Gabriele Cosmo
2020-12-04 12:30:43 +01:00
parent 67ba86d073
commit dab42d2018
3770 changed files with 226369 additions and 286486 deletions
@@ -23,108 +23,123 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// File: G4PersistencyManagerT.hh
// G4PersistencyManagerT
//
// History:
// '01.08.10 Youhei Morita Initial creation (with "fadsclass3")
// Class Description:
//
// Template class of G4PersistencyManager for late binding.
#ifndef PERSISTENCY_MANAGER_T_HH
#define PERSISTENCY_MANAGER_T_HH 1
// Author: Youhei Morita, 10.08.2001
// --------------------------------------------------------------------
#ifndef G4PERSISTENCYMANAGERT_HH
#define G4PERSISTENCYMANAGERT_HH 1
#include "G4PersistencyCenter.hh"
// Class inherited:
#include "G4PersistencyManager.hh"
// Class Description:
// Template class of G4PersistencyManager for late binding
template <class T> class G4PersistencyManagerT
: public G4PersistencyManager
template <class T>
class G4PersistencyManagerT : public G4PersistencyManager
{
public: // With description
G4PersistencyManagerT(G4PersistencyCenter* pc, std::string n)
: G4PersistencyManager(pc, n), pm(0)
public:
G4PersistencyManagerT(G4PersistencyCenter* pc, const G4String& n)
: G4PersistencyManager(pc, n)
{
if(m_verbose > 2)
{
if ( m_verbose > 2 ) {
G4cout << "G4PersistencyManagerT: Registering G4PersistencyManager \""
<< n << "\"" << G4endl;
}
G4PersistencyCenter::GetPersistencyCenter()->
RegisterPersistencyManager(this);
G4cout << "G4PersistencyManagerT: Registering G4PersistencyManager \""
<< n << "\"" << G4endl;
}
G4PersistencyCenter::GetPersistencyCenter()
->RegisterPersistencyManager(this);
}
// Constructor
~G4PersistencyManagerT() {};
~G4PersistencyManagerT() {}
// Destructor
public: // With description
G4PersistencyManager* Create()
{
pm = new T(f_pc, GetName());
return pm;
}
G4PersistencyManager* Create()
{
pm = new T(f_pc, GetName());
return pm;
}
// Create a new persistency manager
void Delete() { if (pm!=0) delete pm; };
void Delete()
{
if(pm != nullptr) delete pm;
}
// Delete a persistency mamanger
G4VPEventIO* EventIO()
{
if (pm) return pm->EventIO();
else return 0;
};
G4VPEventIO* EventIO()
{
if(pm != nullptr)
return pm->EventIO();
else
return nullptr;
}
// Returns the current event I/O handling manager
G4VPHitIO* HitIO()
{
if (pm) return pm->HitIO();
else return 0;
};
G4VPHitIO* HitIO()
{
if(pm != nullptr)
return pm->HitIO();
else
return nullptr;
}
// Returns the current hit I/O handling manager
G4VPDigitIO* DigitIO()
{
if (pm) return pm->DigitIO();
else return 0;
};
G4VPDigitIO* DigitIO()
{
if(pm != nullptr)
return pm->DigitIO();
else
return nullptr;
}
// Returns the current digit I/O handling manager
G4VHepMCIO* HepMCIO()
{
if (pm) return pm->HepMCIO();
else return 0;
};
G4VHepMCIO* HepMCIO()
{
if(pm != nullptr)
return pm->HepMCIO();
else
return nullptr;
}
// Returns the current digit I/O handling manager
G4VMCTruthIO* MCTruthIO()
{
if (pm) return pm->MCTruthIO();
else return 0;
};
G4VMCTruthIO* MCTruthIO()
{
if(pm != nullptr)
return pm->MCTruthIO();
else
return nullptr;
}
// Returns the current digit I/O handling manager
G4VTransactionManager* TransactionManager()
{
if (pm) return pm->TransactionManager();
else return 0;
};
G4VTransactionManager* TransactionManager()
{
if(pm != nullptr)
return pm->TransactionManager();
else
return nullptr;
}
// Returns the current transaction manager
void Initialize() {};
void Initialize() {}
// Initialize the persistency package.
void SetVerboseLevel(int v)
{
if (pm) return pm->SetVerboseLevel();
else return 0;
};
void SetVerboseLevel(G4int v)
{
if(pm != nullptr)
return pm->SetVerboseLevel();
else
return nullptr;
}
// Sets the verbose level to the persistency manager
private:
G4PersistencyManager* pm;
private:
}; // End of class G4PersistencyManagerT
G4PersistencyManager* pm = nullptr;
};
#endif