source: trunk/examples/extended/geometry/olap/include/SolidAnalyser.hh @ 1346

Last change on this file since 1346 was 1337, checked in by garnier, 14 years ago

tag geant4.9.4 beta 1 + modifs locales

File size: 3.6 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: SolidAnalyser.hh,v 1.3 2006/06/29 17:22:46 gunter Exp $
28// GEANT4 tag $Name: geant4-09-04-beta-01 $
29//
30//
31// --------------------------------------------------------------
32// SolidAnalyser
33//
34// Sigleton providing Geant4 solids specifications in a generic way.
35//
36// Author: Martin Liendl - Martin.Liendl@cern.ch
37//
38// --------------------------------------------------------------
39//
40#ifndef SolidAnalyser_h
41#define SolidAnalyser_h
42
43#include <vector>
44#include <algorithm>
45
46#include "globals.hh"
47
48// supported Geant4 solids:
49class G4VSolid;
50class G4Box;
51class G4Cons;
52class G4Polycone;
53class G4Polyhedra;
54class G4Trap;
55class G4Trd;
56class G4Tubs;
57
58class SolidAnalyser
59{
60
61public:
62
63   static SolidAnalyser * GetSolidAnalyser();
64   
65   //void Reset();
66   
67   // user method to retrieve information
68   G4int GetParam(const G4VSolid *,
69                  std::vector<std::pair<G4String,G4double> > & ) const;
70   
71   ~SolidAnalyser();
72
73protected:   
74   G4int  GetParam(const G4Box *,
75                   std::vector<std::pair<G4String,G4double> > & ) const;
76   G4int  GetParam(const G4Cons *,
77                   std::vector<std::pair<G4String,G4double> > & ) const;
78   G4int  GetParam(const G4Polycone  *,
79                   std::vector<std::pair<G4String,G4double> > & ) const;
80   G4int  GetParam(const G4Polyhedra *,
81                   std::vector<std::pair<G4String,G4double> > & ) const;
82   G4int  GetParam(const G4Trap *,
83                   std::vector<std::pair<G4String,G4double> > & ) const;
84   G4int  GetParam(const G4Trd *,
85                   std::vector<std::pair<G4String,G4double> > & ) const;
86   G4int  GetParam(const G4Tubs *,
87                   std::vector<std::pair<G4String,G4double> > & ) const;
88   
89private:
90
91   SolidAnalyser();
92   
93   G4int NotImplemented(const G4VSolid *,
94                       std::vector<std::pair<G4String,G4double> > & ) const;
95
96   static SolidAnalyser * theInstance;
97};
98
99std::ostream & operator<<(std::ostream& flux,
100                            std::vector<std::pair<G4String,G4double> >& v);
101
102#endif
Note: See TracBrowser for help on using the repository browser.