source: trunk/examples/advanced/radiation_monitor/analysis/include/RadmonAnalysisLayout.hh @ 1321

Last change on this file since 1321 was 807, checked in by garnier, 16 years ago

update

File size: 7.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// File name:     RadmonAnalysisLayout.hh
28// Creation date: Nov 2005
29// Main author:   Riccardo Capra <capra@ge.infn.it>
30//
31// Id:            $Id: RadmonAnalysisLayout.hh,v 1.3 2006/06/29 16:06:44 gunter Exp $
32// Tag:           $Name:  $
33//
34// Description:   Concrete class to keep track of the analysis options
35//
36
37#ifndef   RADMONANALYSISLAYOUT_HH
38 #define  RADMONANALYSISLAYOUT_HH
39 
40 // Include files
41 #include "RadmonVAnalysisLayout.hh"
42 #include "RadmonAnalysisSensitiveDetectorTypeLayout.hh"
43 #include "RadmonTLabelledCollection.hh"
44 #include "globals.hh"
45 #include <vector>
46 #include <utility>
47 
48 class RadmonAnalysisLayout : public RadmonVAnalysisLayout
49 {
50  public:
51                                                RadmonAnalysisLayout();
52                                               ~RadmonAnalysisLayout();
53
54   virtual void                                 SetOutputFileName(const G4String & outputFileName);
55   virtual const G4String &                     GetOutputFileName(void) const;
56   virtual void                                 SetOutputFileFormat(const G4String & outputFileFormat);
57   virtual const G4String &                     GetOutputFileFormat(void) const;
58 
59   virtual void                                 CreateSensitiveDetector(const G4String & sensitiveDetectorLabel, const G4String & sensitiveDetectorType);
60   virtual void                                 SetSensitiveDetectorType(const G4String & sensitiveDetectorLabel, const G4String & sensitiveDetectorType);
61   virtual const G4String &                     GetSensitiveDetectorType(const G4String & sensitiveDetectorLabel) const;
62   virtual void                                 RemoveSensitiveDetector(const G4String & sensitiveDetectorLabel);
63   virtual G4int                                GetNSensitiveDetectors(void) const;
64   virtual const G4String &                     GetSensitiveDetectorLabel(G4int index) const;
65   
66   virtual void                                 CreateSensitiveDetectorType(const G4String & sensitiveDetectorTypeLabel);
67   virtual void                                 RemoveSensitiveDetectorType(const G4String & sensitiveDetectorTypeLabel);
68
69   virtual void                                 AppendDataAnalysisToSensitiveDetectorType(const G4String & sensitiveDetectorTypeLabel, const G4String & dataAnalysisLabel);
70   virtual void                                 SetDataAnalysisType(const G4String & sensitiveDetectorTypeLabel, const G4String & dataAnalysisLabel, const G4String & dataAnalysisType);
71   virtual void                                 RemoveDataAnalysis(const G4String & sensitiveDetectorTypeLabel, const G4String & dataAnalysisLabel);
72   virtual G4int                                GetNDataAnalyses(const G4String & sensitiveDetectorTypeLabel) const;
73   virtual const G4String &                     GetDataAnalysisLabel(const G4String & sensitiveDetectorTypeLabel, G4int index) const;
74   virtual const G4String &                     GetDataAnalysisType(const G4String & sensitiveDetectorTypeLabel, const G4String & dataAnalysisLabel) const;
75
76   virtual void                                 SetDataAnalysisAttribute(const G4String & sensitiveDetectorTypeLabel, const G4String & dataAnalysisLabel, const G4String & attributeName, const G4String & attributeValue);
77   virtual void                                 ClearDataAnalysisAttribute(const G4String & sensitiveDetectorTypeLabel, const G4String & dataAnalysisLabel, const G4String & attributeName);
78   virtual G4int                                GetDataAnalysisNAttributes(const G4String & sensitiveDetectorTypeLabel, const G4String & dataAnalysisLabel) const;
79   virtual G4String                             GetDataAnalysisAttributeName(const G4String & sensitiveDetectorTypeLabel, const G4String & dataAnalysisLabel, G4int index) const;
80   virtual G4String                             GetDataAnalysisAttribute(const G4String & sensitiveDetectorTypeLabel, const G4String & dataAnalysisLabel, const G4String & attributeName, const G4String & defaultAttributeValue=G4String()) const;
81
82   virtual void                                 DumpLayout(std::ostream & out) const;
83
84   virtual G4bool                               Load(std::istream & in);
85   virtual G4bool                               Save(std::ostream & out) const;
86
87  private:
88   typedef std::pair<G4String, G4String>        SensitiveDetector;
89   typedef std::vector<SensitiveDetector>       SensitiveDetectors;
90
91   inline G4bool                                SensitiveDetectorTypeInUse(const G4String & sensitiveDetectorType);
92   inline G4bool                                ExistsSensitiveDetector(const G4String & sensitiveDetectorLabel) const;
93   inline SensitiveDetector *                   FindSensitiveDetector(const G4String & sensitiveDetectorLabel);
94   inline const SensitiveDetector *             FindSensitiveDetector(const G4String & sensitiveDetectorLabel) const;
95   inline RadmonAnalysisSensitiveDetectorTypeLayout * FindSensitiveDetectorType(const G4String & sensitiveDetectorTypeLabel);
96   inline const RadmonAnalysisSensitiveDetectorTypeLayout * FindSensitiveDetectorType(const G4String & sensitiveDetectorTypeLabel) const;
97   inline RadmonDataAnalysisLayout *            FindDataAnalysis(const G4String & sensitiveDetectorTypeLabel, const G4String & dataAnalysisLabel);
98   inline const RadmonDataAnalysisLayout *      FindDataAnalysis(const G4String & sensitiveDetectorTypeLabel, const G4String & dataAnalysisLabel) const;
99   
100   inline G4String &                            GetNullStr() const;
101   
102  // Hidden constructors and operators
103                                                RadmonAnalysisLayout(const RadmonAnalysisLayout & copy);
104   RadmonAnalysisLayout &                       operator=(const RadmonAnalysisLayout & copy);
105   
106   G4String                                     fileName;
107   G4String                                     fileFormat;
108   
109   SensitiveDetectors                           sensitiveDetectors;
110   RadmonTLabelledCollection<RadmonAnalysisSensitiveDetectorTypeLayout> sensitiveDetectorTypes;
111 };
112#endif /* RADMONANALYSISLAYOUT_HH */
Note: See TracBrowser for help on using the repository browser.