FibreNumberConverters.h

00001 #ifndef SCT_FIBRE_NUMBER_CONVERTERS_H
00002 #define SCT_FIBRE_NUMBER_CONVERTERS_H
00003 
00004 namespace Sct {
00005 
00006   class FibreNumberConverters {
00007   public:
00008     // In 96 format, valid fibres are in range [0,95]
00009     // In 124 format, valid fibres are in range [0,123] so long as they are also in the range [0,11] modulo 16.
00010     static const unsigned int from124FormatTo96Format(const unsigned int zeroTo123Pos) {
00011     const unsigned int zeroTo95Pos = (zeroTo123Pos/16)*12 + (zeroTo123Pos%16);
00012     return zeroTo95Pos;
00013     };
00014     static const unsigned int from96FormatTo124Format(const unsigned int zeroTo95Pos) {
00015     const unsigned int zeroTo123Pos = (zeroTo95Pos/12)*16 + (zeroTo95Pos%12);
00016     return zeroTo123Pos;
00017     };
00018   };
00019 
00020 };
00021 
00022 #endif 

Generated on Mon Feb 6 14:01:19 2006 for SCT DAQ/DCS Software - C++ by  doxygen 1.4.6