Import Geant4 1.1.0 source tree
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PersistencyManager.cc,v 1.15.2.1 1999/12/07 20:50:14 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4PersistencyManager.cc,v 1.16 1999/12/15 14:51:27 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// class G4PersistencyManager
|
||||
//
|
||||
@@ -76,7 +76,7 @@ G4PersistencyManager::~G4PersistencyManager()
|
||||
// they are "persistent"!
|
||||
|
||||
if(f_verboseLevel>0)
|
||||
G4cout << "PersistencyManager is deleting." << endl;
|
||||
G4cout << "PersistencyManager is deleting." << G4endl;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -92,9 +92,9 @@ G4bool G4PersistencyManager::Store(const G4Event* anEvent)
|
||||
G4cout << " -- G4PEvent " << f_pEventMan->CurrentEventID() << " stored in "
|
||||
<< DBContainerName(kEventDB);
|
||||
if( f_transactionMan->SustainedMode() )
|
||||
G4cout << " (sustained)" << endl;
|
||||
G4cout << " (sustained)" << G4endl;
|
||||
else
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
f_transactionMan->Commit(kEventDB, false);
|
||||
return true;
|
||||
@@ -103,7 +103,7 @@ G4bool G4PersistencyManager::Store(const G4Event* anEvent)
|
||||
{
|
||||
f_transactionMan->Abort(kEventDB, false);
|
||||
G4cerr << "G4PersistencyManager: Failed to store G4PEvent in "
|
||||
<< DBContainerName(kEventDB) << endl;
|
||||
<< DBContainerName(kEventDB) << G4endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -116,7 +116,7 @@ G4bool G4PersistencyManager::Store(const G4Run* aRun)
|
||||
{
|
||||
if( f_verboseLevel>0 )
|
||||
G4cout << " -- G4PRun " << f_pRunMan->CurrentRunID() << " stored in "
|
||||
<< DBContainerName(kRunDB) << endl;
|
||||
<< DBContainerName(kRunDB) << G4endl;
|
||||
f_transactionMan->Commit(kRunDB, false);
|
||||
return true;
|
||||
}
|
||||
@@ -124,7 +124,7 @@ G4bool G4PersistencyManager::Store(const G4Run* aRun)
|
||||
{
|
||||
f_transactionMan->Abort(kRunDB, false);
|
||||
G4cerr << "G4PersistencyManager: Failed to store G4PRun in "
|
||||
<< DBContainerName(kRunDB) << endl;
|
||||
<< DBContainerName(kRunDB) << G4endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -137,7 +137,7 @@ G4bool G4PersistencyManager::Store(const G4VPhysicalVolume* aWorld)
|
||||
{
|
||||
if( f_verboseLevel>0 )
|
||||
G4cout << " -- Geometry stored in "
|
||||
<< DBContainerName(kGeomDB) << endl;
|
||||
<< DBContainerName(kGeomDB) << G4endl;
|
||||
f_transactionMan->Commit(kGeomDB, false);
|
||||
return true;
|
||||
}
|
||||
@@ -145,7 +145,7 @@ G4bool G4PersistencyManager::Store(const G4VPhysicalVolume* aWorld)
|
||||
{
|
||||
f_transactionMan->Abort(kGeomDB, false);
|
||||
G4cerr << "G4PersistencyManager: Failed to store Geometry in "
|
||||
<< DBContainerName(kGeomDB) << endl;
|
||||
<< DBContainerName(kGeomDB) << G4endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -161,11 +161,11 @@ G4bool G4PersistencyManager::Retrieve(G4Event*& anEvent)
|
||||
if( anEvent )
|
||||
G4cout << " -- G4Event " << f_pEventMan->CurrentEventID()
|
||||
<< " retrieved from "
|
||||
<< DBContainerName(kEventDB) << endl;
|
||||
<< DBContainerName(kEventDB) << G4endl;
|
||||
else
|
||||
G4cout << " -- scan of G4Event from "
|
||||
<< DBContainerName(kEventDB)
|
||||
<< " is completed." << endl;
|
||||
<< " is completed." << G4endl;
|
||||
}
|
||||
f_transactionMan->Commit(kEventDB, false);
|
||||
return true;
|
||||
@@ -174,7 +174,7 @@ G4bool G4PersistencyManager::Retrieve(G4Event*& anEvent)
|
||||
{
|
||||
f_transactionMan->Abort(kEventDB, false);
|
||||
G4cerr << "G4PersistencyManager: Failed to retrieve G4Event from "
|
||||
<< DBContainerName(kEventDB) << endl;
|
||||
<< DBContainerName(kEventDB) << G4endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -190,11 +190,11 @@ G4bool G4PersistencyManager::Retrieve(G4Run*& aRun)
|
||||
if( aRun )
|
||||
G4cout << " -- G4Run " << f_pRunMan->CurrentRunID()
|
||||
<< " retrieved from "
|
||||
<< DBContainerName(kRunDB) << "." << endl;
|
||||
<< DBContainerName(kRunDB) << "." << G4endl;
|
||||
else
|
||||
G4cout << " -- scan of G4Run from "
|
||||
<< DBContainerName(kRunDB)
|
||||
<< " is completed." << endl;
|
||||
<< " is completed." << G4endl;
|
||||
}
|
||||
f_transactionMan->Commit(kRunDB, false);
|
||||
return true;
|
||||
@@ -203,7 +203,7 @@ G4bool G4PersistencyManager::Retrieve(G4Run*& aRun)
|
||||
{
|
||||
f_transactionMan->Abort(kRunDB, false);
|
||||
G4cerr << "G4PersistencyManager: Failed to retrieve G4Run from "
|
||||
<< DBContainerName(kRunDB) << endl;
|
||||
<< DBContainerName(kRunDB) << G4endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -218,7 +218,7 @@ G4bool G4PersistencyManager::Retrieve(G4VPhysicalVolume*& theWorld)
|
||||
{
|
||||
if( theWorld )
|
||||
G4cout << " -- Geometry retrieved from "
|
||||
<< DBContainerName(kGeomDB) << endl;
|
||||
<< DBContainerName(kGeomDB) << G4endl;
|
||||
}
|
||||
f_transactionMan->Commit(kGeomDB, false);
|
||||
return true;
|
||||
@@ -227,7 +227,7 @@ G4bool G4PersistencyManager::Retrieve(G4VPhysicalVolume*& theWorld)
|
||||
{
|
||||
f_transactionMan->Abort(kGeomDB, false);
|
||||
G4cerr << "G4PersistencyManager: Failed to retrieve Geometry from "
|
||||
<< DBContainerName(kGeomDB) << endl;
|
||||
<< DBContainerName(kGeomDB) << G4endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PersistencyMessenger.cc,v 1.7 1999/11/26 16:50:21 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
|
||||
#include "G4PersistencyMessenger.hh"
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4TransactionManager.cc,v 1.5.2.1 1999/12/07 20:50:14 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4TransactionManager.cc,v 1.6 1999/12/15 14:51:27 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// class G4TransactionManager
|
||||
//
|
||||
@@ -44,7 +44,7 @@ G4TransactionManager::G4TransactionManager(
|
||||
f_dbApp = new HepDbApplication(applicationName);
|
||||
|
||||
// Open and Initialize a database
|
||||
G4cout << "Opening federated database OO_FD_BOOT." << endl;
|
||||
G4cout << "Opening federated database OO_FD_BOOT." << G4endl;
|
||||
f_dbApp->init();
|
||||
|
||||
// Locate or create run,event,geometry databases and containers
|
||||
@@ -72,11 +72,11 @@ G4bool G4TransactionManager::StartTransaction(
|
||||
case kAlreadySelected:
|
||||
if(f_verboseLevel>2)
|
||||
G4cout << "G4TransactionManager: Sustained transaction for /"
|
||||
<< DBName(f_whichDB) << "/ already in progress." << endl;
|
||||
<< DBName(f_whichDB) << "/ already in progress." << G4endl;
|
||||
break;
|
||||
case kCannotOverride:
|
||||
G4cerr << "G4TransactionManager: Cannot override the existing "
|
||||
<< "transaction for /" << DBName(f_whichDB) << "/" << endl;
|
||||
<< "transaction for /" << DBName(f_whichDB) << "/" << G4endl;
|
||||
return false;
|
||||
break;
|
||||
case kStartNewSustained:
|
||||
@@ -89,7 +89,7 @@ G4bool G4TransactionManager::StartTransaction(
|
||||
f_dbApp->commit();
|
||||
if(f_verboseLevel>1)
|
||||
G4cout << "Sustained transaction for /" << DBName(f_whichDB)
|
||||
<< "/ is paused." << endl;
|
||||
<< "/ is paused." << G4endl;
|
||||
DoStart(dbtype, dbmode, false);
|
||||
break;
|
||||
case kStartNonSustained:
|
||||
@@ -139,7 +139,7 @@ G4bool G4TransactionManager::DoStart(ETypeOfDB dbtype,
|
||||
if( aDBref == NULL )
|
||||
{
|
||||
G4cerr << "G4TransactionManager: Could not create or find /"
|
||||
<< DBName(dbtype) << "/ database." << endl;
|
||||
<< DBName(dbtype) << "/ database." << G4endl;
|
||||
return false;
|
||||
}
|
||||
SetDB( dbtype, aDBref );
|
||||
@@ -148,7 +148,7 @@ G4bool G4TransactionManager::DoStart(ETypeOfDB dbtype,
|
||||
if( aContRef == NULL )
|
||||
{
|
||||
G4cerr << "G4TransactionManager: Could not create or find /"
|
||||
<< ContainerName(dbtype) << "/ container." << endl;
|
||||
<< ContainerName(dbtype) << "/ container." << G4endl;
|
||||
return false;
|
||||
}
|
||||
SetContainer( dbtype, aContRef );
|
||||
@@ -160,9 +160,9 @@ G4bool G4TransactionManager::DoStart(ETypeOfDB dbtype,
|
||||
G4cout << "Transaction started for /" << DBName(dbtype) << "/"
|
||||
<< ContainerName(dbtype) << "/ with ";
|
||||
if(isSustained)
|
||||
G4cout << "sustained mode." << endl;
|
||||
G4cout << "sustained mode." << G4endl;
|
||||
else
|
||||
G4cout << "non-sustained mode." << endl;
|
||||
G4cout << "non-sustained mode." << G4endl;
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -178,14 +178,14 @@ G4bool G4TransactionManager::Commit(ETypeOfDB dbtype, G4bool isSustained)
|
||||
|
||||
if(f_verboseLevel>1)
|
||||
G4cout << "Transaction is committed on /" << DBName(dbtype)
|
||||
<< "/" << ContainerName(dbtype) << "/" << endl;
|
||||
<< "/" << ContainerName(dbtype) << "/" << G4endl;
|
||||
|
||||
if( f_isSustained && dbtype != f_whichDB )
|
||||
{
|
||||
StartTransaction( f_whichDB, f_transactionMode, true );
|
||||
if(f_verboseLevel>1)
|
||||
G4cout << "Resumeing transaction on /" << DBName(f_whichDB)
|
||||
<< "/" << ContainerName(f_whichDB) << "/" << endl;
|
||||
<< "/" << ContainerName(f_whichDB) << "/" << G4endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -198,9 +198,9 @@ G4bool G4TransactionManager::Commit(ETypeOfDB dbtype, G4bool isSustained)
|
||||
else
|
||||
{
|
||||
G4cerr << "Error: Commit() received on /" << DBName(dbtype)
|
||||
<< "/" << ContainerName(dbtype) << "/" << endl
|
||||
<< "/" << ContainerName(dbtype) << "/" << G4endl
|
||||
<< " Current transaction is on /" << DBName(f_currentDB)
|
||||
<< "/" << ContainerName(f_currentDB) << "/" << endl;
|
||||
<< "/" << ContainerName(f_currentDB) << "/" << G4endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -215,14 +215,14 @@ G4bool G4TransactionManager::Abort(ETypeOfDB dbtype, G4bool isSustained)
|
||||
|
||||
if(f_verboseLevel>1)
|
||||
G4cout << "Transaction is aborted on /" << DBName(dbtype)
|
||||
<< "/" << ContainerName(dbtype) << "/" << endl;
|
||||
<< "/" << ContainerName(dbtype) << "/" << G4endl;
|
||||
|
||||
if( f_isSustained && dbtype != f_whichDB )
|
||||
{
|
||||
StartTransaction( f_whichDB, f_transactionMode, true );
|
||||
if(f_verboseLevel>1)
|
||||
G4cout << "Resumeing transaction on /" << DBName(f_whichDB)
|
||||
<< "/" << ContainerName(f_whichDB) << "/" << endl;
|
||||
<< "/" << ContainerName(f_whichDB) << "/" << G4endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -235,9 +235,9 @@ G4bool G4TransactionManager::Abort(ETypeOfDB dbtype, G4bool isSustained)
|
||||
else
|
||||
{
|
||||
G4cerr << "Error: Abort() received on /" << DBName(dbtype)
|
||||
<< "/" << ContainerName(dbtype) << "/" << endl
|
||||
<< "/" << ContainerName(dbtype) << "/" << G4endl
|
||||
<< " Current transaction is on /" << DBName(f_currentDB)
|
||||
<< "/" << ContainerName(f_currentDB) << "/" << endl;
|
||||
<< "/" << ContainerName(f_currentDB) << "/" << G4endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -262,14 +262,14 @@ G4bool G4TransactionManager::SelectDB( ETypeOfDB dbtype,
|
||||
|
||||
if(f_verboseLevel>0)
|
||||
G4cout << "Set database to /"
|
||||
<< DBName(dbtype) << "/." << endl;
|
||||
<< DBName(dbtype) << "/." << G4endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
Abort( dbtype, false );
|
||||
SetDBName(dbtype, oldDBname);
|
||||
G4cerr << "G4TransactionManager: Failed to set database /"
|
||||
<< DBName(dbtype) << "/." << endl;
|
||||
<< DBName(dbtype) << "/." << G4endl;
|
||||
theStatus = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user