00001 /* @version $Revision: 1328 $ * @modifiedby $Author: jacquem $ * @lastmodified $Date: 2011-10-03 17:04:17 +0200 (Mon, 03 Oct 2011) $ */ 00002 /* 00003 * File: ChipSoftId.hh 00004 * Author: jacquem 00005 * 00006 * Created on May 8, 2010, 7:46 PM 00007 */ 00008 00009 #ifndef _CHIPSOFTID_HH 00010 #define _CHIPSOFTID_HH 00011 00012 00013 #define OFFSET_CHAMBER 100000 // 1 000 000 00014 #define NB_CHAMBER 100 // chamber id on 2 digit 00015 00016 #define OFFSET_DIF 1000 //10 000 00017 #define NB_DIF 100 // diff id on 2 digit 00018 00019 #define NB_CHIP 1000 // chip id on 3 digit 00020 #define OFFSET_CHIP 1 00021 00022 #include "geometry/DifSoftId.hh" 00023 00024 class ChipSoftId : public DifSoftId{ 00025 public: 00026 ChipSoftId(); 00027 ChipSoftId(const ChipSoftId& orig); 00028 ~ChipSoftId(); 00029 00030 unsigned int GetChipId()const { return chipId; } ; 00031 unsigned int GetBoardId()const { return boardId; } ; 00032 void SetValue(unsigned int chamberId,unsigned int difId, unsigned int boardId, unsigned int chipId); 00033 long GetValue() const; 00034 00035 00036 std::string toString( ) const; 00037 std::string ToString( ) const { return toString(); }; 00038 protected: 00039 unsigned int chipId; 00040 unsigned int boardId; 00041 00042 00043 }; 00044 00045 00046 #endif /* _CHIPSOFTID_HH */ 00047