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: G4VDigitizerModule.hh,v 1.8 2006/06/29 21:12:58 gunter Exp $ |
---|
28 | // GEANT4 tag $Name: $ |
---|
29 | // |
---|
30 | |
---|
31 | #ifndef G4VDigitizerModule_H |
---|
32 | #define G4VDigitizerModule_H 1 |
---|
33 | |
---|
34 | class G4DigiManager; |
---|
35 | class G4VDigiCollection; |
---|
36 | #include "globals.hh" |
---|
37 | //#include "g4rw/tvordvec.h" |
---|
38 | #include <vector> |
---|
39 | |
---|
40 | // class description: |
---|
41 | // |
---|
42 | // This is the abstract base class of the digitizer module. The user's |
---|
43 | // digitizer module which generates digits must be derived from this |
---|
44 | // class. |
---|
45 | // In the derived class constructor, name(s) of digi collection(s) which |
---|
46 | // are made by the digitizer module must be set to "collectionName" string |
---|
47 | // vector. |
---|
48 | |
---|
49 | class G4VDigitizerModule |
---|
50 | { |
---|
51 | public: // with description |
---|
52 | G4VDigitizerModule(G4String modName); |
---|
53 | // Constructor. The user's concrete class must use this constructor |
---|
54 | // by the constructor initializer of the derived class. The name of |
---|
55 | // the detector module must be unique. |
---|
56 | public: |
---|
57 | virtual ~G4VDigitizerModule(); |
---|
58 | int operator==(const G4VDigitizerModule &right) const; |
---|
59 | int operator!=(const G4VDigitizerModule &right) const; |
---|
60 | |
---|
61 | public: // with description |
---|
62 | virtual void Digitize() = 0; |
---|
63 | // The pure virtual method that the derived class must implement. |
---|
64 | // In the concrete implementation of this method, necessary digi |
---|
65 | // collection object must be constructed and set to G4DCofThisEvent |
---|
66 | // by StoreDigiCollection protected method. |
---|
67 | |
---|
68 | protected: |
---|
69 | void StoreDigiCollection(G4VDigiCollection* aDC); |
---|
70 | void StoreDigiCollection(G4int DCID,G4VDigiCollection* aDC); |
---|
71 | |
---|
72 | protected: |
---|
73 | G4DigiManager* DigiManager; |
---|
74 | G4String moduleName; |
---|
75 | std::vector<G4String> collectionName; |
---|
76 | G4int verboseLevel; |
---|
77 | |
---|
78 | public: |
---|
79 | inline G4int GetNumberOfCollections() const |
---|
80 | { return collectionName.size(); } |
---|
81 | inline G4String GetCollectionName(G4int i) const |
---|
82 | { return collectionName[i]; } |
---|
83 | inline G4String GetName() const |
---|
84 | { return moduleName; } |
---|
85 | inline void SetVerboseLevel(G4int val) |
---|
86 | { verboseLevel = val; } |
---|
87 | }; |
---|
88 | |
---|
89 | #endif |
---|
90 | |
---|