Changeset 105 for MEMPHYS/HEAD


Ignore:
Timestamp:
Jan 25, 2006, 4:11:50 PM (18 years ago)
Author:
campagne
Message:

no more non standard hash_map and static

File:
1 edited

Legend:

Unmodified
Added
Removed
  • MEMPHYS/HEAD/MEMPHYS/DetectorConstruction.hh

    r104 r105  
    1313#include <fstream>
    1414#include <map>
    15 #include <hash_map.h>
    16 
     15#include <string>
    1716
    1817class G4Box;
     
    2524
    2625
    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 }
    3726
    3827namespace AIDA {
     
    7362
    7463  // 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);
    7766  G4Transform3D GetTubeTransform(int tubeNo){return tubeIDMap[tubeNo];}
    7867
     
    8978
    9079  typedef void (DetectorConstruction::*DescriptionFcnPtr) (G4VPhysicalVolume*,
    91                                                                   int, int, const G4Transform3D&);
     80                                                           int, int, const G4Transform3D&);
    9281
    9382  // Now Funcs for traversing the geometry
     
    173162
    174163  // Tube map information
    175   //JEC FIXME: why it works wo using std::hash_map and std::hash?
    176164  //JEC 25/1/06 no more static variables
    177165  std::map<int, G4Transform3D> tubeIDMap;
    178166  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
    180168
    181169  // Variable related to the rock
Note: See TracChangeset for help on using the changeset viewer.