00001 #ifndef TkNavigation_SymmetricLayerFinder_H 00002 #define TkNavigation_SymmetricLayerFinder_H 00003 00004 #include <vector> 00005 #include <map> 00006 00007 class DetLayer; 00008 class BarrelDetLayer; 00009 class ForwardDetLayer; 00010 00016 class SymmetricLayerFinder { 00017 00018 typedef std::vector<ForwardDetLayer*> FDLC; 00019 typedef FDLC::iterator FDLI; 00020 typedef FDLC::const_iterator ConstFDLI; 00021 typedef std::pair< ForwardDetLayer*, ForwardDetLayer*> PairType; 00022 00023 public: 00024 00025 SymmetricLayerFinder( const FDLC&); 00026 00027 ForwardDetLayer* mirror( const ForwardDetLayer* layer) { 00028 return theForwardMap[layer]; 00029 } 00030 00031 FDLC mirror( const FDLC& input); 00032 00033 private: 00034 00035 // typedef map< const ForwardDetLayer*, const ForwardDetLayer*, less<const ForwardDetLayer*> > 00036 typedef std::map< const ForwardDetLayer*, ForwardDetLayer*, std::less<const ForwardDetLayer*> > 00037 ForwardMapType; 00038 00039 ForwardMapType theForwardMap; 00040 00041 ForwardDetLayer* mirrorPartner( const ForwardDetLayer* layer, 00042 const FDLC& rightLayers); 00043 00044 00045 }; 00046 #endif // SymmetricLayerFinder_H 00047