Changeset 105
- Timestamp:
- Jan 25, 2006, 4:11:50 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
MEMPHYS/HEAD/MEMPHYS/DetectorConstruction.hh
r104 r105 13 13 #include <fstream> 14 14 #include <map> 15 #include <hash_map.h> 16 15 #include <string> 17 16 18 17 class G4Box; … … 25 24 26 25 27 //JEC FIXME does it runs on over plateform?28 // look in /usr/include/c++/3.2.3/ext/29 namespace __gnu_cxx {30 template<> struct hash< std::string >31 {32 size_t operator()( const std::string& x ) const {33 return hash< const char* >()( x.c_str() );34 }35 };36 }37 26 38 27 namespace AIDA { … … 73 62 74 63 // Related to the WC tube IDs 75 //JEC 25/1/06 no more static functions 76 G4int GetTubeID(std::string tubeTag) {return tubeLocationMap[tubeTag];}64 //JEC 25/1/06 no more static functions + const char* 65 G4int GetTubeID(std::string tubeTag); 77 66 G4Transform3D GetTubeTransform(int tubeNo){return tubeIDMap[tubeNo];} 78 67 … … 89 78 90 79 typedef void (DetectorConstruction::*DescriptionFcnPtr) (G4VPhysicalVolume*, 91 80 int, int, const G4Transform3D&); 92 81 93 82 // Now Funcs for traversing the geometry … … 173 162 174 163 // Tube map information 175 //JEC FIXME: why it works wo using std::hash_map and std::hash?176 164 //JEC 25/1/06 no more static variables 177 165 std::map<int, G4Transform3D> tubeIDMap; 178 166 std::map<int, cyl_location> tubeCylLocation; 179 hash_map<std::string, int, hash<std::string> > tubeLocationMap;167 std::map<std::string, int> tubeLocationMap; //JEC 25/1/06 use a map standard 180 168 181 169 // Variable related to the rock
Note: See TracChangeset
for help on using the changeset viewer.