/data3/calcul/jacquem/working_dir/Micromegas/micromegasFrameWork/src/geometry/GassiplexBoardBeta24.cpp File Reference

#include "geometry/GassiplexBoardBeta24.hh"
#include "geometry/GassiplexChip.hh"
#include "geometry/GassiplexChannel.hh"
#include <iostream>
#include "tools/Log.hh"

Include dependency graph for GassiplexBoardBeta24.cpp:

Go to the source code of this file.

Defines

#define NBCHANNEL   96

Functions

static int chMap (int boardId, const int chNum)


Define Documentation

#define NBCHANNEL   96

Definition at line 9 of file GassiplexBoardBeta24.cpp.


Function Documentation

static int chMap ( int  boardId,
const int  chNum 
) [static]

Definition at line 16 of file GassiplexBoardBeta24.cpp.

Referenced by GassiplexBoardBeta24::init().

00016                                                {
00017   static const int g4map[4][96] = {
00018 
00019 
00020     /* board 1    channel   0- 95              */
00021     /*             0    1    2    3    4    5  */
00022     /*  0 */ {    0,  31,   1,  30,   2,  29 ,
00023     /*  1 */      3,  28,   4,  27,   5,  26 ,
00024     /*  2 */      6,  25,   7,  24,   8,  23 ,
00025     /*  3 */      9,  22,  10,  21,  11,  20 ,
00026     /*  4 */     12,  19,  13,  18,  14,  17 ,
00027     /*  5 */     15,  16,  32,  63,  33,  62 ,
00028     /*  6 */     34,  61,  35,  60,  36,  59 ,
00029     /*  7 */     37,  58,  38,  57,  39,  56 ,
00030     /*  8 */     40,  55,  41,  54,  42,  53 ,
00031     /*  9 */     43,  52,  44,  51,  45,  50 ,
00032     /* 10 */     46,  49,  47,  48,  64,  95 ,
00033     /* 11 */     65,  94,  66,  93,  67,  92 ,
00034     /* 12 */     68,  91,  69,  90,  70,  89 ,
00035     /* 13 */     71,  88,  72,  87,  73,  86 ,
00036     /* 14 */     74,  85,  75,  84,  76,  83 ,
00037     /* 15 */     77,  82,  78,  81,  79,  80  },
00038     /* board 2    channel   96-191             */
00039     /*             0    1    2    3    4    5  */
00040     /*  0 */ {    96, 127,  97, 126,  98, 125 ,
00041     /*  1 */     99, 124, 100, 123, 101, 122 ,
00042     /*  2 */    102, 121, 103, 120, 104, 119 ,
00043     /*  3 */    105, 118, 106, 117, 107, 116 ,
00044     /*  4 */    108, 115, 109, 114, 110, 113 ,
00045     /*  5 */    111, 112, 128, 159, 129, 158 ,
00046     /*  6 */    130, 157, 131, 156, 132, 155 ,
00047     /*  7 */    133, 154, 134, 153, 135, 152 ,
00048     /*  8 */    136, 151, 137, 150, 138, 149 ,
00049     /*  9 */    139, 148, 140, 147, 141, 146 ,
00050     /* 10 */    142, 145, 143, 144, 160, 191 ,
00051     /* 11 */    161, 190, 162, 189, 163, 188 ,
00052     /* 12 */    164, 187, 165, 186, 166, 185 ,
00053     /* 13 */    167, 184, 168, 183, 169, 182 ,
00054     /* 14 */    170, 181, 171, 180, 172, 179 ,
00055     /* 15 */    173, 178, 174, 177, 175, 176  },
00056     /* board 3    channel 192-287              */
00057     /*             0    1    2    3    4    5  */
00058     /*  0 */ {  272, 271, 273, 270, 274, 269 ,
00059     /*  1 */    275, 268, 276, 267, 277, 266 ,
00060     /*  2 */    278, 265, 279, 264, 280, 263 ,
00061     /*  3 */    281, 262, 282, 261, 283, 260 ,
00062     /*  4 */    284, 259, 285, 258, 286, 257 ,
00063     /*  5 */    287, 256, 240, 239, 241, 238 ,
00064     /*  6 */    242, 237, 243, 236, 244, 235 ,
00065     /*  7 */    245, 234, 246, 233, 247, 232 ,
00066     /*  8 */    248, 231, 249, 230, 250, 229 ,
00067     /*  9 */    251, 228, 252, 227, 253, 226 ,
00068     /* 10 */    254, 225, 255, 224, 208, 207 ,
00069     /* 11 */    209, 206, 210, 205, 211, 204 ,
00070     /* 12 */    212, 203, 213, 202, 214, 201 ,
00071     /* 13 */    215, 200, 216, 199, 217, 198 ,
00072     /* 14 */    218, 197, 219, 196, 220, 195 ,
00073     /* 15 */    221, 194, 222, 193, 223, 192  },
00074     /* board 4    channel 288-383              */
00075     /*             0    1    2    3    4    5  */
00076     /*  0 */ {  368, 367, 369, 366, 370, 365 ,
00077     /*  1 */    371, 364, 372, 363, 373, 362 ,
00078     /*  2 */    374, 361, 375, 360, 376, 359 ,
00079     /*  3 */    377, 358, 378, 357, 379, 356 ,
00080     /*  4 */    380, 355, 381, 354, 382, 353 ,
00081     /*  5 */    383, 352, 336, 335, 337, 334 ,
00082     /*  6 */    338, 333, 339, 332, 340, 331 ,
00083     /*  7 */    341, 330, 342, 329, 343, 328 ,
00084     /*  8 */    344, 327, 345, 326, 346, 325 ,
00085     /*  9 */    347, 324, 348, 323, 349, 322 ,
00086     /* 10 */    350, 321, 351, 320, 304, 303 ,
00087     /* 11 */    305, 302, 306, 301, 307, 300 ,
00088     /* 12 */    308, 299, 309, 298, 310, 297 ,
00089     /* 13 */    311, 296, 312, 295, 313, 294 ,
00090     /* 14 */    314, 293, 315, 292, 316, 291 ,
00091     /* 15 */    317, 290, 318, 289, 319, 288  }
00092   };
00093 
00094   for ( int i = 0 ; i < 96  ; i++)
00095   {
00096       if ( g4map[boardId-1][i] == chNum)
00097       {
00098           return i;
00099       }
00100   }
00101  // return (g4map[boardId - 1][(chNum / 6) % 16][chNum % 6]);
00102 }


Generated on Mon Jan 7 13:17:31 2013 for MicromegasFramework by  doxygen 1.4.7