00001 // $Id: GiGaHitsByName.h,v 1.1 2002/12/07 21:05:30 ibelyaev Exp $ 00002 // ============================================================================ 00003 // CVS tag $Name: v19r4 $ 00004 // ============================================================================ 00005 // $Log: GiGaHitsByName.h,v $ 00006 // Revision 1.1 2002/12/07 21:05:30 ibelyaev 00007 // see $GIGAROOT/doc/release.notes 2002-12-07 00008 // 00009 // ============================================================================ 00010 #ifndef GIGA_GIGAHITSBYNAME_H 00011 #define GIGA_GIGAHITSBYNAME_H 1 00012 // Include files 00013 // STD & STL 00014 #include <string> 00015 // forward declaration from G4 00016 class G4VHitsCollection ; 00017 00028 class GiGaHitsByName 00029 { 00030 public: 00031 00036 GiGaHitsByName( const std::string& name , 00037 G4VHitsCollection* collection = 0 ) 00038 : m_name ( name ) 00039 , m_collection ( collection ) {} ; 00040 00041 // destructor 00042 ~GiGaHitsByName(){}; 00043 00045 const std::string& name () const { return m_name ; } 00046 // access to the collection itself (const) 00047 const G4VHitsCollection* collection () const { return m_collection ; } 00048 // access to the collection itself (const) 00049 const G4VHitsCollection* hits () const { return collection () ; } 00050 // access to the collection itself (const) 00051 const G4VHitsCollection* col () const { return collection () ; } 00052 00054 G4VHitsCollection* collection () { return m_collection ; } 00056 G4VHitsCollection* hits () { return collection () ; } 00058 G4VHitsCollection* col () { return collection () ; } 00059 00063 GiGaHitsByName& setCollection ( G4VHitsCollection* value ) 00064 { m_collection = value ; return *this ; }; 00065 00069 GiGaHitsByName& setHits ( G4VHitsCollection* value ) 00070 { return setCollection ( value ); } 00071 00075 GiGaHitsByName& setCol ( G4VHitsCollection* value ) 00076 { return setCollection ( value ); } 00077 00078 private: 00079 00081 GiGaHitsByName(); 00082 00083 private: 00084 00085 std::string m_name ; 00086 G4VHitsCollection* m_collection ; 00087 00088 }; 00089 // ============================================================================ 00090 00091 // ============================================================================ 00092 // The END 00093 // ============================================================================ 00094 #endif // GIGA_GIGAHITSBYNAME_H 00095 // ============================================================================