/data3/calcul/jacquem/working_dir/Micromegas/micromegasFrameWork/src/geometry/GassiplexBoardBeta21.cpp

Go to the documentation of this file.
00001 /* @version $Revision: 1328 $ * @modifiedby $Author: jacquem $ * @lastmodified $Date: 2011-10-03 17:04:17 +0200 (Mon, 03 Oct 2011) $ */
00002 
00003 #include "geometry/GassiplexBoardBeta21.hh"
00004 #include "geometry/GassiplexChip.hh"
00005 #include "geometry/GassiplexChannel.hh"
00006 #include <iostream>
00007 #include "tools/Log.hh"
00008 
00009 #define NBCHANNEL 96
00010 
00011 using namespace std;
00012 
00013 // mapping between a channel number (0 - n-1) and the physical channel map FOR BETA@.1 OMNLY
00014 static int chMapBeta21(const int chNum)
00015 {
00016         int mod = (chNum % 16) * 2;
00017         return((((chNum & 16) == 0) ? mod : 15 - mod) + (chNum / 16) * 16);
00018 }
00019 //--------------------------//
00020 GassiplexBoardBeta21::GassiplexBoardBeta21(const Chamber& aChamber, const i32 aCol, const i32 aRow, const ui32 nbColumns, const ui32 nbRows,const i32 aId)
00021       : Board(aChamber,  aCol, aRow, nbColumns, nbRows,  aId)
00022 {
00023 //  FILE_LOG(logDEBUG) << "GassiplexBoardBeta21 constructor id[" <<  aId << "]" <<endl;
00024   init();
00025         };
00026 
00027 //--------------------------//
00028 GassiplexBoardBeta21::~GassiplexBoardBeta21()
00029 {
00030   //FILE_LOG(logDEBUG) << "GassiplexBoardBeta21 destructor" << endl;
00031 };
00032 
00033 //--------------------------//
00034 void GassiplexBoardBeta21::init()
00035 {
00036     // Le mapping est different entre BETA 2.1 et BETA 2.4
00037     for (int chipNum = 0; chipNum < NBCHANNEL; chipNum++)
00038     {
00039             int chipMap = chMapBeta21(chipNum);
00040             int row = chipMap % 6, col = chipMap / 6;
00041 //        cout << "add Chip[" << chipNum << "] col[" << col <<"] row[" << row << "]" << endl;
00042           Chip *chip = new GassiplexChip(*this, col, row, 1, 1 , chipNum,0); // only 1 row and 1 column for gassiplex Chip ( wich contains only one channel )
00043             chips.insert(make_pair(chipNum, chip));
00044     }
00045 }
00046 
00047 
00048 

Generated on Mon Jan 7 13:15:22 2013 for MicromegasFramework by  doxygen 1.4.7