00001 // 00002 // ******************************************************************** 00003 // * License and Disclaimer * 00004 // * * 00005 // * The Geant4 software is copyright of the Copyright Holders of * 00006 // * the Geant4 Collaboration. It is provided under the terms and * 00007 // * conditions of the Geant4 Software License, included in the file * 00008 // * LICENSE and available at http://cern.ch/geant4/license . These * 00009 // * include a list of copyright holders. * 00010 // * * 00011 // * Neither the authors of this software system, nor their employing * 00012 // * institutes,nor the agencies providing financial support for this * 00013 // * work make any representation or warranty, express or implied, * 00014 // * regarding this software system or assume any liability for its * 00015 // * use. Please see the license in the file LICENSE and URL above * 00016 // * for the full disclaimer and the limitation of liability. * 00017 // * * 00018 // * This code implementation is the result of the scientific and * 00019 // * technical work of the GEANT4 collaboration. * 00020 // * By using, copying, modifying or distributing the software (or * 00021 // * any work based on the software) you agree to acknowledge its * 00022 // * use in resulting scientific publications, and indicate your * 00023 // * acceptance of all terms of the Geant4 Software license. * 00024 // ******************************************************************** 00025 // 00026 // 00027 // $Id$ 00028 // 00029 00030 #ifndef G4VDigitizerModule_H 00031 #define G4VDigitizerModule_H 1 00032 00033 class G4DigiManager; 00034 class G4VDigiCollection; 00035 #include "globals.hh" 00036 //#include "g4rw/tvordvec.h" 00037 #include <vector> 00038 00039 // class description: 00040 // 00041 // This is the abstract base class of the digitizer module. The user's 00042 // digitizer module which generates digits must be derived from this 00043 // class. 00044 // In the derived class constructor, name(s) of digi collection(s) which 00045 // are made by the digitizer module must be set to "collectionName" string 00046 // vector. 00047 00048 class G4VDigitizerModule 00049 { 00050 public: // with description 00051 G4VDigitizerModule(G4String modName); 00052 // Constructor. The user's concrete class must use this constructor 00053 // by the constructor initializer of the derived class. The name of 00054 // the detector module must be unique. 00055 public: 00056 virtual ~G4VDigitizerModule(); 00057 int operator==(const G4VDigitizerModule &right) const; 00058 int operator!=(const G4VDigitizerModule &right) const; 00059 00060 public: // with description 00061 virtual void Digitize() = 0; 00062 // The pure virtual method that the derived class must implement. 00063 // In the concrete implementation of this method, necessary digi 00064 // collection object must be constructed and set to G4DCofThisEvent 00065 // by StoreDigiCollection protected method. 00066 00067 protected: 00068 void StoreDigiCollection(G4VDigiCollection* aDC); 00069 void StoreDigiCollection(G4int DCID,G4VDigiCollection* aDC); 00070 00071 protected: 00072 G4DigiManager* DigiManager; 00073 G4String moduleName; 00074 std::vector<G4String> collectionName; 00075 G4int verboseLevel; 00076 00077 public: 00078 inline G4int GetNumberOfCollections() const 00079 { return collectionName.size(); } 00080 inline G4String GetCollectionName(G4int i) const 00081 { return collectionName[i]; } 00082 inline G4String GetName() const 00083 { return moduleName; } 00084 inline void SetVerboseLevel(G4int val) 00085 { verboseLevel = val; } 00086 }; 00087 00088 #endif 00089