source: trunk/source/run/include/G4VPersistencyManager.hh@ 1286

Last change on this file since 1286 was 1058, checked in by garnier, 17 years ago

file release beta

File size: 3.4 KB
Line 
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27// $Id: G4VPersistencyManager.hh,v 1.5 2006/06/29 21:13:30 gunter Exp $
28// GEANT4 tag $Name: geant4-09-02-ref-02 $
29//
30
31#ifndef G4VPersistencyManager_h
32#define G4VPersistencyManager_h 1
33
34#include "globals.hh"
35
36class G4Event;
37class G4Run;
38class G4VPhysicalVolume;
39
40// class description:
41//
42// This is an abstract base class for persistency management. The user's
43// concrete class derived from this class must be a singleton. The user
44// must construct the object of his/her concrete persistency manager at
45// his/her main().
46// The virtual methods of Store() and Retreive() will be invoked from
47// G4RunManager if the persistency manager exists.
48// Even if the user does not use any ODBMS, the user can use this class
49// especially for Store() methods. Writing an ASCII file for storing
50// event information can be delegated to this class, for example.
51//
52
53class G4VPersistencyManager
54{
55 public: // with description
56 static G4VPersistencyManager* GetPersistencyManager();
57 // Static method to return the pointer to the singleton object.
58 // Note that this method does NOT create the singleton object.
59
60 protected:
61 G4VPersistencyManager();
62
63 public:
64 virtual ~G4VPersistencyManager();
65
66 private:
67 static G4VPersistencyManager * fPersistencyManager;
68
69 public: // with description
70 virtual G4bool Store(const G4Event* anEvent)=0;
71 virtual G4bool Store(const G4Run* aRun)=0;
72 virtual G4bool Store(const G4VPhysicalVolume* theWorld)=0;
73 // Stores G4Event, G4Run, and geometry tree characterized by the world volume.
74
75 virtual G4bool Retrieve(G4Event*& anEvent)=0;
76 virtual G4bool Retrieve(G4Run*& aRun)=0;
77 virtual G4bool Retrieve(G4VPhysicalVolume*& theWorld)=0;
78 // Restore G4Event, G4Run, and geometry tree characterized by the world volume.
79
80};
81
82
83
84
85#endif
86
Note: See TracBrowser for help on using the repository browser.