Files
geant4/source/persistency/run/include/G4PersistentRunMan.hh
T
2016-06-08 15:55:53 +02:00

80 lines
2.0 KiB
C++

// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PersistentRunMan.hh,v 1.9 2000/12/15 07:55:32 morita Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
// Class Description:
// A Utility class to be used by G4PersistencyManager.
// Average users do not need to use this class.
//
// This class is not persistent-capable.
//
// Member functions:
// =================
// G4bool Store(HepDbApplication* dbApp, const G4Run* aRun);
// Store aRun and associated objects into database.
// G4bool Retrieve(HepDbApplication* dbApp, G4Run*& aRun);
// Retrieve aRun and associated objects into database.
// void SetContainer(HepContainerRef container);
// Set Run Container reference.
//
// Member data:
// ============
// HepContainerRef f_container;
// Reference to the event container in the database.
// HepContainerRef f_currentContainer;
// Reference to the current scan scope in Retrieve().
//
// History:
// 98.10.30 Y.Morita Splited from G4PersistencyManager
#ifndef G4PERSISTENTRUNMAN_H
#define G4PERSISTENTRUNMAN_H 1
#include "globals.hh"
#include "G4VPersistentSubMan.hh"
#include "G4VPersistentSubDbMan.hh"
#include "G4PRun.hh"
class HepDbApplication;
class G4Run;
class G4PersistentRunMan
: public G4VPersistentSubMan, public G4VPersistentSubDbMan
{
friend class G4PersistencyManager;
friend class G4TransactionManager;
private:
G4PersistentRunMan();
~G4PersistentRunMan();
private:
G4int f_currentRunID;
HepRef(G4PRun) f_currentPRun;
public:
inline G4int CurrentRunID()
{ return f_currentRunID; }
protected:
// interface with G4TransactionManager
private:
// interface with G4PersistencyManager
G4bool Store( HepDbApplication* dbApp, const G4Run* aRun);
G4bool Retrieve( HepDbApplication* dbApp, G4Run*& aRun );
};
#endif