#ifndef TPCDIGIMAPPER_H #define TPCDIGIMAPPER_H #include #include "TVector3.h" #include "TpcGas.h" #include "TpcDigi.h" #include "TpcGem.h" #include "TpcPadShapePool.h" #include "TpcPadPlane.h" //singleton that can give x,y,z from TpcDigi s class TpcDigiMapper { private: virtual ~TpcDigiMapper(); TpcDigiMapper(); static TpcDigiMapper *_instance; TpcGas *_gas; TpcGem *_gem; TpcPadShapePool *_padShapes; TpcPadPlane *_padPlane; public: void padsize(const unsigned int id, double& dx, double& dy); void map(const TpcDigi* const _dig, TVector3& _vec); TpcPadPlane* getPadPlane() {return _padPlane;} inline static TpcDigiMapper* getInstance() { if(_instance == NULL) { _instance = new TpcDigiMapper(); } return _instance; } inline static void destruct() { if(_instance != NULL) { delete _instance; _instance = NULL; } } }; #endif //TPCDIGIMAPPER_H