[807] | 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 | // File name: RadmonVDetectorLayout.hh |
---|
| 28 | // Creation date: Sep 2005 |
---|
| 29 | // Main author: Riccardo Capra <capra@ge.infn.it> |
---|
| 30 | // |
---|
| 31 | // Id: $Id: RadmonVDetectorLayout.hh,v 1.7 2006/06/29 16:13:24 gunter Exp $ |
---|
| 32 | // Tag: $Name: $ |
---|
| 33 | // |
---|
| 34 | // Description: Abstract class to keep track of the configured detector |
---|
| 35 | // layout |
---|
| 36 | // |
---|
| 37 | |
---|
| 38 | #ifndef RADMONVDETECTORLAYOUT_HH |
---|
| 39 | #define RADMONVDETECTORLAYOUT_HH |
---|
| 40 | |
---|
| 41 | // Include files |
---|
| 42 | #include "RadmonVLayoutSubject.hh" |
---|
| 43 | |
---|
| 44 | #include "globals.hh" |
---|
| 45 | #include "G4ThreeVector.hh" |
---|
| 46 | #include "G4RotationMatrix.hh" |
---|
| 47 | |
---|
| 48 | class RadmonVDetectorLayout : public RadmonVLayoutSubject |
---|
| 49 | { |
---|
| 50 | public: |
---|
| 51 | virtual void EnableEnvironment(void) = 0; |
---|
| 52 | virtual void DisableEnvironment(void) = 0; |
---|
| 53 | virtual G4bool IsEnabledEnvironment(void) const = 0; |
---|
| 54 | |
---|
| 55 | virtual void SetEnvironmentType(const G4String & type) = 0; |
---|
| 56 | virtual const G4String & GetEnvironmentType() const = 0; |
---|
| 57 | virtual G4int GetEnvironmentNAttributes(void) const = 0; |
---|
| 58 | virtual const G4String & GetEnvironmentAttributeName(G4int index) const = 0; |
---|
| 59 | virtual void SetEnvironmentAttribute(const G4String & attributeName, const G4String & attributeValue) = 0; |
---|
| 60 | virtual const G4String GetEnvironmentAttribute(const G4String & attributeName, const G4String & defaultAttributeValue) const = 0; |
---|
| 61 | virtual void ClearEnvironmentAttribute(const G4String & attributeName) = 0; |
---|
| 62 | |
---|
| 63 | virtual void CreateMultilayer(const G4String & multilayerLabel) = 0; |
---|
| 64 | virtual void RemoveMultilayer(const G4String & multilayerLabel) = 0; |
---|
| 65 | virtual void SetMultilayerWidth(const G4String & multilayerLabel, G4double width) = 0; |
---|
| 66 | virtual G4double GetMultilayerWidth(const G4String & multilayerLabel) const = 0; |
---|
| 67 | virtual void SetMultilayerHeight(const G4String & multilayerLabel, G4double height) = 0; |
---|
| 68 | virtual G4double GetMultilayerHeight(const G4String & multilayerLabel) const = 0; |
---|
| 69 | virtual G4double GetMultilayerTotalThickness(const G4String & multilayerLabel) const = 0; |
---|
| 70 | |
---|
| 71 | virtual void AppendLayerToMultilayer(const G4String & multilayerLabel, const G4String & layerLabel) = 0; |
---|
| 72 | virtual void RemoveLayerFromMultilayer(const G4String & multilayerLabel, const G4String & layerLabel) = 0; |
---|
| 73 | virtual void RemoveAllLayersFromMultilayer(const G4String & multilayerLabel) = 0; |
---|
| 74 | virtual G4int GetMultilayerNLayers(const G4String & multilayerLabel) const = 0; |
---|
| 75 | virtual const G4String & GetMultilayerLayerLabel(const G4String & multilayerLabel, G4int index) const = 0; |
---|
| 76 | |
---|
| 77 | virtual void SetLayerThickness(const G4String & multilayerLabel, const G4String & layerLabel, G4double thickness) = 0; |
---|
| 78 | virtual G4double GetLayerThickness(const G4String & multilayerLabel, const G4String & layerLabel) const = 0; |
---|
| 79 | virtual void SetLayerType(const G4String & multilayerLabel, const G4String & layerLabel, const G4String & type) = 0; |
---|
| 80 | virtual const G4String & GetLayerType(const G4String & multilayerLabel, const G4String & layerLabel) const = 0; |
---|
| 81 | |
---|
| 82 | virtual G4int GetLayerNAttributes(const G4String & multilayerLabel, const G4String & layerLabel) const = 0; |
---|
| 83 | virtual const G4String & GetLayerAttributeName(const G4String & multilayerLabel, const G4String & layerLabel, G4int index) const = 0; |
---|
| 84 | virtual void SetLayerAttribute(const G4String & multilayerLabel, const G4String & layerLabel, const G4String & attributeName, const G4String & attributeValue) = 0; |
---|
| 85 | virtual const G4String GetLayerAttribute(const G4String & multilayerLabel, const G4String & layerLabel, const G4String & attributeName, const G4String & defaultAttributeValue) const = 0; |
---|
| 86 | virtual void ClearLayerAttribute(const G4String & multilayerLabel, const G4String & layerLabel, const G4String & attributeName) = 0; |
---|
| 87 | |
---|
| 88 | virtual void CreatePlacement(const G4String & placementLabel, const G4String & multilayerName) = 0; |
---|
| 89 | virtual G4int GetNPlacements() const = 0; |
---|
| 90 | virtual const G4String & GetPlacementLabel(G4int index) const = 0; |
---|
| 91 | virtual void RemovePlacement(const G4String & placementLabel) = 0; |
---|
| 92 | |
---|
| 93 | virtual const G4String & GetPlacementMultilayerType(const G4String & placementLabel) const = 0; |
---|
| 94 | virtual void SetPlacementPosition(const G4String & placementLabel, const G4ThreeVector & position) = 0; |
---|
| 95 | virtual const G4ThreeVector & GetPlacementPosition(const G4String & placementLabel) const = 0; |
---|
| 96 | virtual void SetPlacementPosition(const G4String & placementLabel, const G4String & originLabel, const G4ThreeVector & offset) = 0; |
---|
| 97 | virtual void SetPlacementRotation(const G4String & placementLabel, const G4RotationMatrix & rotation) = 0; |
---|
| 98 | virtual const G4RotationMatrix & GetPlacementRotation(const G4String & placementLabel) const = 0; |
---|
| 99 | virtual void SetPlacementRotation(const G4String & placementLabel, const G4String & originLabel, const G4RotationMatrix & relativeRotation) = 0; |
---|
| 100 | |
---|
| 101 | virtual void DumpLayout(std::ostream & out) const = 0; |
---|
| 102 | |
---|
| 103 | virtual G4bool Load(std::istream & in) = 0; |
---|
| 104 | virtual G4bool Save(std::ostream & out) const = 0; |
---|
| 105 | |
---|
| 106 | protected: |
---|
| 107 | inline RadmonVDetectorLayout(); |
---|
| 108 | inline ~RadmonVDetectorLayout(); |
---|
| 109 | |
---|
| 110 | private: |
---|
| 111 | // Hidden constructors and operators |
---|
| 112 | RadmonVDetectorLayout(const RadmonVDetectorLayout & copy); |
---|
| 113 | RadmonVDetectorLayout & operator=(const RadmonVDetectorLayout & copy); |
---|
| 114 | }; |
---|
| 115 | |
---|
| 116 | // Inline implementations |
---|
| 117 | #include "RadmonVDetectorLayout.icc" |
---|
| 118 | #endif /* RADMONVDETECTORLAYOUT_HH */ |
---|