#include <Hardroc2IPNLChamber6.hh>
Inheritance diagram for Hardroc2IPNLChamber6:
Public Member Functions | |
Hardroc2IPNLChamber6 (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) | |
~Hardroc2IPNLChamber6 () | |
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 Hardroc2IPNLChamber6.hh.
Hardroc2IPNLChamber6::Hardroc2IPNLChamber6 | ( | 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 Hardroc2IPNLChamber6.cpp.
00022 : Chamber(aX, aY , aZ , xRotation,yRotation,zRotation, 2, 3 , id) 00023 { 00024 FILE_LOG(logDEBUG1) << "---Hardroc2IPNLChamber6 constructor id " << id << endl; 00025 00026 if ( difInfos.size() != 3 | 00027 boardInfos.size() != 6 | 00028 chipInfos.size() != 144) 00029 { 00030 FILE_LOG(logERROR)<< endl << "XML geometry error for chamber id[" << id << "] :Hardroc2IPNLChamber6 must be composed of:\n" 00031 "-[3] dif." << endl << 00032 "-[6] board." << endl << 00033 "-[144] 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 = "Hardroc2IPNLChamber6"; 00043 type = HARDROC2CHAMBER6; 00044 init(id, difInfos, boardInfos, chipInfos); 00045 myIsValid = true; 00046 } 00047 }
Hardroc2IPNLChamber6::~Hardroc2IPNLChamber6 | ( | ) |
Definition at line 51 of file Hardroc2IPNLChamber6.cpp.
00052 { 00053 //FILE_LOG(logDEBUG) << "---Hardroc2IPNLChamber6 destructor"<< endl; 00054 }; // ~Hardroc2IPNLChamber6
void Hardroc2IPNLChamber6::print | ( | void | ) | const |
unsigned int Hardroc2IPNLChamber6::getNumberOfBoards | ( | ) | const [inline] |
const float Hardroc2IPNLChamber6::getXGap | ( | ) | const [inline, virtual] |
const float Hardroc2IPNLChamber6::getYGap | ( | ) | const [inline, virtual] |
void Hardroc2IPNLChamber6::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 58 of file Hardroc2IPNLChamber6.cpp.
Referenced by Hardroc2IPNLChamber6().
00061 { 00062 int bcol = 0; 00063 int brow = 0; 00064 00065 00066 for (int difNum = 0 ; difNum < difInfos.size(); difNum++) 00067 { 00068 const DifInfo_t& difInfo = difInfos.at(difNum); 00069 if (difInfo.chamberId != this->getId()) 00070 { 00071 continue; 00072 } 00073 Dif *dif = new Dif(difInfo.id); 00074 00075 for (int boardNum = 0 ; boardNum < boardInfos.size(); boardNum++) 00076 { 00077 const BoardInfo_t& boardInfo = boardInfos.at(boardNum); 00078 if (boardInfo.difId != dif->getId() || boardInfo.chamberId != this->getId()) 00079 { 00080 continue; 00081 } 00082 00083 bcol= boardNum % 2; 00084 Hardroc2Board *board = new Hardroc2Board(*this,bcol , brow , 6, 4, boardInfo.id); 00085 00086 this->addDif(dif); 00087 dif->addBoard(board); 00088 this->addBoard(board); 00089 00090 00091 00092 int ccol = 0; 00093 int crow = 0; 00094 for (int chipNum = 0; chipNum < chipInfos.size(); chipNum++) 00095 { 00096 const ChipInfo_t& chipInfo = chipInfos.at(chipNum); 00097 if ((chipInfo.boardId != boardInfo.id) 00098 || (chipInfo.difId != difInfo.id) 00099 || (chipInfo.chamberId != id)) 00100 { 00101 continue; 00102 } 00103 FILE_LOG(logDEBUG1)<< " Detector.build : chip " << chipInfo.id << ", board " << chipInfo.boardId << endl; 00104 ccol= chipNum%6 ; 00105 00106 00107 Hardroc2IPNLChip *chip = new Hardroc2IPNLChip(*board, ccol, crow, chipInfo.id,chipInfo.serial); 00108 board->addChip(chip); 00109 00110 if (ccol == 5) { ++crow; } 00111 } 00112 FILE_LOG(logDEBUG1)<< " Detector.build : dif " << difInfo.id << ", chamber " << difInfo.chamberId << *this << endl; 00113 if ( bcol >= 1) { brow++ ; } 00114 } 00115 } 00116 }