MicrorocChamber6 Class Reference

#include <MicrorocChamber6.hh>

Inheritance diagram for MicrorocChamber6:

Inheritance graph
[legend]
Collaboration diagram for MicrorocChamber6:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MicrorocChamber6 (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)
 ~MicrorocChamber6 ()
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)

Detailed Description

Definition at line 18 of file MicrorocChamber6.hh.


Constructor & Destructor Documentation

MicrorocChamber6::MicrorocChamber6 ( 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 MicrorocChamber6.cpp.

00022 : Chamber(aX, aY , aZ ,  xRotation,yRotation, zRotation, 2, 3 , id)
00023 {
00024   FILE_LOG(logDEBUG1) << "---MicrorocChamber6 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 << "] :MicrorocChamber6 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 = "MicrorocChamber6";
00043     type = MICROROCCHAMBER6;
00044     init(id, difInfos,  boardInfos,  chipInfos);
00045     myIsValid = true;
00046    }
00047 }

MicrorocChamber6::~MicrorocChamber6 (  ) 

Definition at line 51 of file MicrorocChamber6.cpp.

00052 {
00053   //FILE_LOG(logDEBUG) << "---MicrorocChamber6 destructor"<< endl;
00054 }; // ~MicrorocChamber6


Member Function Documentation

void MicrorocChamber6::print ( void   )  const

unsigned int MicrorocChamber6::getNumberOfBoards (  )  const [inline]

Reimplemented from Chamber.

Definition at line 29 of file MicrorocChamber6.hh.

00029 { return 0; }

const float MicrorocChamber6::getXGap (  )  const [inline, virtual]

Implements Chamber.

Definition at line 31 of file MicrorocChamber6.hh.

00031 { return(5000); };// 5000 beetwen Board(ASU) in micrometer

const float MicrorocChamber6::getYGap (  )  const [inline, virtual]

Implements Chamber.

Definition at line 32 of file MicrorocChamber6.hh.

00032 { return(5000); };// 5000  beetwen Board(ASU) in micrometer

void MicrorocChamber6::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 MicrorocChamber6.cpp.

Referenced by MicrorocChamber6().

00077 {
00078 int bcol = 0;
00079 int brow = 0;
00080 
00081 
00082 for (int difNum = 0 ; difNum < difInfos.size(); difNum++)
00083 {
00084    const DifInfo_t& difInfo =  difInfos.at(difNum);
00085    if (difInfo.chamberId != this->getId())
00086    {
00087        continue;
00088    }
00089    Dif *dif = new Dif(difInfo.id);
00090 
00091    for (int boardNum = 0 ; boardNum < boardInfos.size(); boardNum++)
00092    {
00093        const BoardInfo_t& boardInfo = boardInfos.at(boardNum);
00094        if (boardInfo.difId != dif->getId() || boardInfo.chamberId != this->getId())
00095        {
00096            continue;
00097        }
00098 
00099        bcol= boardNum % 2;
00100        MicrorocBoard *board = new MicrorocBoard(*this,bcol , brow , 6, 4, boardInfo.id);
00101 
00102        this->addDif(dif);
00103        dif->addBoard(board);
00104        this->addBoard(board);
00105 
00106 
00107 
00108        int ccol = 0;
00109        int crow = 0;
00110        for (int chipNum = 0; chipNum < chipInfos.size(); chipNum++)
00111        {
00112            const ChipInfo_t& chipInfo = chipInfos.at(chipNum);
00113            if ((chipInfo.boardId != boardInfo.id)
00114                 || (chipInfo.difId != difInfo.id)
00115                 || (chipInfo.chamberId != id))
00116            {
00117              continue;
00118            }
00119            FILE_LOG(logDEBUG1)<< "      Detector.build : chip " << chipInfo.id << ", board " << chipInfo.boardId << endl;
00120            ccol=  chipNum%6 ;
00121 
00122 
00123            MicrorocChip *chip = new MicrorocChip(*board, ccol, crow, chipInfo.id,chipInfo.serial);
00124            FILE_LOG(logDEBUG1)<< "  Detector.build : Microroc Chip col " << ccol << "], row[" << crow  << "], chipId[" <<  chipInfo.id <<"]" << *this << endl;
00125            board->addChip(chip);
00126 
00127            if (ccol == 5) { ++crow; }
00128        }
00129           FILE_LOG(logDEBUG1)<< "  Detector.build : dif " << difInfo.id << ", chamber " << difInfo.chamberId << *this << endl;
00130            if ( bcol >= 1) { brow++ ; }
00131       
00132    }
00133 }
00134 }


The documentation for this class was generated from the following files:
Generated on Mon Jan 7 13:18:43 2013 for MicromegasFramework by  doxygen 1.4.7