source: trunk/examples/extended/geometry/olap/include/OlapManager.hh@ 1192

Last change on this file since 1192 was 807, checked in by garnier, 17 years ago

update

File size: 4.1 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: OlapManager.hh,v 1.4 2006/06/29 17:22:08 gunter Exp $
28// GEANT4 tag $Name: $
29//
30//
31// --------------------------------------------------------------
32// OlapManager
33//
34// Author: Martin Liendl - Martin.Liendl@cern.ch
35//
36// --------------------------------------------------------------
37//
38#ifndef OlapManager_h
39#define OlapManager_h
40
41#include <vector>
42#include <map>
43#include <set>
44
45#include "globals.hh"
46#include "G4LogicalVolumeStore.hh"
47#include "G4LogicalVolume.hh"
48#include "OlapNotify.hh"
49#include "OlapEventAction.hh" // class OlapInfo!
50
51class OlapManagerMessenger;
52class OlapDetConstr;
53class OlapVolTree;
54class G4RunManager;
55class G4GeoNav;
56class OlapGui;
57class CMSPrimaryGeneratorAction;
58class OlapGenerator;
59
60class OlapManager
61{
62public:
63 ~OlapManager();
64 static OlapManager * GetOlapManager();
65 void TriggerRun();
66 void TriggerFull(G4int=10);
67 G4VPhysicalVolume * GetNewWorld();
68 G4VPhysicalVolume * GetFullWorld();
69 //G4bool SetNextWorld(G4int=1);
70 //G4bool SetPrevWorld(G4int=1);
71 void SetGrid(G4int,G4int,G4int);
72 void SetDelta(G4double d) { delta = d;}
73 G4double Delta() { return delta;}
74 G4bool Next();
75 void ListLV(const G4String &);
76 void GotoLV(const G4String &);
77 void ChangeLV(const G4String &);
78 void SetNewWorld(G4LogicalVolume*);
79 void SetRotation(G4double theta, G4double phi, G4double alpha);
80 G4LogicalVolume* GetOriginalWorld();
81 void PwdLV();
82 void LsLV();
83 void TestVolTree();
84 G4int GetNrLVs();
85 //! interrupts olap-processing (only during 'triggerFull');
86 // next trigger/triggerFull will continue!
87 void Interrupt() { interrupt=true ; }
88 void registerNotification(OlapNotify*n) { theNotifs.insert(n); }
89 void notifyNewWorld(G4LogicalVolume*);
90 void notifyOlaps(const std::vector<OlapInfo*> &);
91 void deRegisterNotification(OlapNotify*n) { ; }
92 // FIXME: handle completly different in next redesign!
93 std::map<G4LogicalVolume *, G4bool> NoOlapMap;
94
95private:
96
97 OlapManager();
98
99 OlapManagerMessenger * theMessenger;
100 OlapDetConstr * theDet;
101
102 OlapGenerator * olapGenerator;
103 CMSPrimaryGeneratorAction * cmsGenerator;
104 G4double delta;
105 G4int eventsPerRun;
106 G4int lvPos;
107 G4bool polyMode;
108 G4RunManager * theRunManager;
109 G4LogicalVolumeStore * theLVStore;
110 std::vector<G4LogicalVolume*>::iterator theLVit;
111 std::vector<G4LogicalVolume*> theLVs;
112 static OlapManager * theInstance;
113 G4GeoNav * theGeoNav;
114 std::set<OlapNotify*> theNotifs;
115 G4bool interrupt;
116};
117#endif
Note: See TracBrowser for help on using the repository browser.