#include <MicrorocChamber1.hh>
Inheritance diagram for MicrorocChamber1:
Public Member Functions | |
MicrorocChamber1 (const float aX, const float aY, const float aZ, const bool xRotation, const bool yRotation, const i16 zRotation, const i32 id, const std::vector< DifInfo_t > &difInfos, const std::vector< BoardInfo_t > &boardInfos, const std::vector< ChipInfo_t > &chipInfos) | |
~MicrorocChamber1 () | |
void | print (void) const |
unsigned int | getNumberOfBoards () const |
const float | getXGap () const |
const float | getYGap () const |
Protected Member Functions | |
void | init (i32 chamberId, const std::vector< DifInfo_t > &difInfos, const std::vector< BoardInfo_t > &boardInfos, const std::vector< ChipInfo_t > &chipInfos) |
Definition at line 18 of file MicrorocChamber1.hh.
MicrorocChamber1::MicrorocChamber1 | ( | const float | aX, | |
const float | aY, | |||
const float | aZ, | |||
const bool | xRotation, | |||
const bool | yRotation, | |||
const i16 | zRotation, | |||
const i32 | id, | |||
const std::vector< DifInfo_t > & | difInfos, | |||
const std::vector< BoardInfo_t > & | boardInfos, | |||
const std::vector< ChipInfo_t > & | chipInfos | |||
) |
Definition at line 18 of file MicrorocChamber1.cpp.
00022 : Chamber(aX, aY , aZ , xRotation,yRotation,zRotation, 1, 1 , id) 00023 { 00024 FILE_LOG(logDEBUG1) << "---MicrorocChamber1 constructor id " << id << endl; 00025 00026 if ( difInfos.size() != 1 | 00027 boardInfos.size() != 1 | 00028 chipInfos.size() != 24) 00029 { 00030 FILE_LOG(logERROR)<< endl << "XML geometry error for chamber id[" << id << "] :MicrorocChamber1 must be composed of:\n" 00031 "-[1] dif." << endl << 00032 "-[1] board." << endl << 00033 "-[24] chips." << endl << endl << 00034 "-> And in your XML file:" << endl << 00035 "[" << difInfos.size() << "] dif" << endl << 00036 "[" << boardInfos.size() << "] board" << endl << 00037 "[" << chipInfos.size() << "] chips" << endl; 00038 myIsValid = false; 00039 } 00040 00041 else { 00042 description = "MicrorocChamber1"; 00043 type = MICROROCCHAMBER1; 00044 init(id, difInfos, boardInfos, chipInfos); 00045 myIsValid = true; 00046 } 00047 }
MicrorocChamber1::~MicrorocChamber1 | ( | ) |
Definition at line 51 of file MicrorocChamber1.cpp.
00052 { 00053 //FILE_LOG(logDEBUG) << "---MicrorocChamber1 destructor"<< endl; 00054 }; // ~MicrorocChamber1
void MicrorocChamber1::print | ( | void | ) | const |
unsigned int MicrorocChamber1::getNumberOfBoards | ( | ) | const [inline] |
const float MicrorocChamber1::getXGap | ( | ) | const [inline, virtual] |
const float MicrorocChamber1::getYGap | ( | ) | const [inline, virtual] |
void MicrorocChamber1::init | ( | i32 | chamberId, | |
const std::vector< DifInfo_t > & | difInfos, | |||
const std::vector< BoardInfo_t > & | boardInfos, | |||
const std::vector< ChipInfo_t > & | chipInfos | |||
) | [protected] |
Definition at line 74 of file MicrorocChamber1.cpp.
Referenced by MicrorocChamber1().
00077 { 00078 int bcol = 0; 00079 int brow = 0; 00080 00081 00082 const DifInfo_t& difInfo = difInfos.at(0); 00083 if (difInfo.chamberId != this->getId()) 00084 { 00085 FILE_LOG(logERROR)<< " Detector.build : chamber id " << this->getId() << ", dif.chamber.Id " << difInfo.chamberId << endl; 00086 exit(-1); 00087 } 00088 Dif *dif = new Dif(difInfo.id); 00089 00090 const BoardInfo_t& boardInfo = boardInfos.at(0); 00091 if (boardInfo.difId != dif->getId() || boardInfo.chamberId != this->getId()) 00092 { 00093 FILE_LOG(logERROR)<< " Detector.build : dif id " << dif->getId() << ", boardInfo.difId.Id " << boardInfo.difId << endl; 00094 exit(-1); 00095 } 00096 00097 bcol= 0 ; 00098 MicrorocBoard *board = new MicrorocBoard(*this,bcol , brow , 6, 4, boardInfo.id); 00099 00100 this->addDif(dif); 00101 dif->addBoard(board); 00102 this->addBoard(board); 00103 00104 00105 00106 int ccol = 0; 00107 int crow = 0; 00108 for (int chipNum = 0; chipNum < chipInfos.size(); chipNum++) 00109 { 00110 const ChipInfo_t& chipInfo = chipInfos.at(chipNum); 00111 if ((chipInfo.boardId != boardInfo.id) 00112 || (chipInfo.difId != difInfo.id) 00113 || (chipInfo.chamberId != id)) 00114 { 00115 continue; 00116 } 00117 FILE_LOG(logDEBUG1)<< " Detector.build : chip " << chipInfo.id << ", board " << chipInfo.boardId << endl; 00118 ccol= chipNum%6 ; 00119 00120 00121 FILE_LOG(logDEBUG)<< " Detector.build : chip serial number[" << chipInfo.serial<< "] " << endl; 00122 MicrorocChip *chip = new MicrorocChip(*board, ccol, crow, chipInfo.id,chipInfo.serial); 00123 board->addChip(chip); 00124 00125 if (ccol == 5) { ++crow; } 00126 } 00127 FILE_LOG(logDEBUG1)<< " Detector.build : dif " << difInfo.id << ", chamber " << difInfo.chamberId << *this << endl; 00128 if ( bcol >= 1) { brow++ ; } 00129 }