Hardroc1Chamber Class Reference

#include <Hardroc1Chamber.hh>

Inheritance diagram for Hardroc1Chamber:

Inheritance graph
[legend]
Collaboration diagram for Hardroc1Chamber:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Hardroc1Chamber (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)
 ~Hardroc1Chamber ()
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 20 of file Hardroc1Chamber.hh.


Constructor & Destructor Documentation

Hardroc1Chamber::Hardroc1Chamber ( 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 19 of file Hardroc1Chamber.cpp.

00023 : Chamber(aX, aY , aZ ,  xRotation,yRotation,zRotation, 1, 1 , id)
00024 {
00025 
00026   if ( difInfos.size() != 1 |
00027       boardInfos.size() != 1 |
00028       chipInfos.size()  != 4)
00029    {
00030        FILE_LOG(logERROR)<< endl << "XML geometry error for chamber id[" << id << "] :Hardroc2Chamber1 must be composed of:\n"
00031             "-[1] dif." << endl <<
00032             "-[1] board." << endl <<
00033             "-[4] chips." << endl << endl <<
00034             "-> And chamber your XML file is composed of:" << endl <<
00035             "[" <<  difInfos.size()   << "] dif" << endl <<
00036             "[" <<  boardInfos.size() << "] board" << endl <<
00037             "[" <<  chipInfos.size()  << "] chips" << endl;
00038        myIsValid = false;
00039   }
00040   else {
00041     FILE_LOG(logDEBUG1) << "---Hardroc1Chamber constructor id " << id << endl;
00042      description = "Hardroc1Chamber";
00043      type = HARDROC1CHAMBER;
00044      init(id, difInfos,  boardInfos,  chipInfos);
00045      myIsValid = true;
00046   }
00047 
00048 }; // Hardroc1Chamber6

Hardroc1Chamber::~Hardroc1Chamber (  ) 

Definition at line 51 of file Hardroc1Chamber.cpp.

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


Member Function Documentation

void Hardroc1Chamber::print ( void   )  const

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

Reimplemented from Chamber.

Definition at line 31 of file Hardroc1Chamber.hh.

00031 { return 1; }

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

Implements Chamber.

Definition at line 33 of file Hardroc1Chamber.hh.

00033 { return(0); };// in centimeter

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

Implements Chamber.

Definition at line 34 of file Hardroc1Chamber.hh.

00034 { return(0); };// in centimeter

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

Referenced by Hardroc1Chamber().

00061 {
00062 
00063 
00064       FILE_LOG(logDEBUG1)<< " add chamber[" << id << "]" <<  endl;
00065       for (int difNum = 0 ; difNum < difInfos.size(); difNum++)
00066       {
00067           const DifInfo_t& difInfo = difInfos[difNum];
00068 
00069           if (difInfo.chamberId != this->getId() )
00070           {
00071               continue;
00072           }
00073 
00074           Dif *dif = new Dif(difInfo.id);
00075           this->addDif(dif);
00076 
00077           for (int boardNum = 0 ; boardNum < boardInfos.size(); boardNum++) {
00078               const BoardInfo_t& boardInfo = boardInfos[boardNum];
00079               if (boardInfo.difId != dif->getId() || boardInfo.chamberId != this->getId())
00080               {
00081                   continue;
00082               }
00083               Hardroc1Board *board = new Hardroc1Board(*this, 0,  0, 4, 1, boardInfo.id);
00084               dif->addBoard(board);
00085               this->addBoard(board);
00086 
00087 
00088 
00089               for (int chipNum = 0, crow = 0 ; chipNum < chipInfos.size(); chipNum++) {
00090                   const ChipInfo_t& chipInfo = chipInfos[chipNum];
00091                   if ((chipInfo.boardId != boardInfo.id)
00092                    || (chipInfo.difId != difInfo.id)
00093                    || (chipInfo.chamberId != id))
00094                     continue;
00095                   FILE_LOG(logDEBUG1)<< "      Detector.build : chip " << chipInfo.id << ", board " << chipInfo.boardId << endl;
00096                   int ccol = chipNum % 4;
00097                   Hardroc1Chip *chip = new Hardroc1Chip(*board, ccol, 0, 8, 8, chipInfo.id,chipInfo.serial);
00098                   board->addChip(chip);
00099               }
00100               FILE_LOG(logDEBUG1)<< "  Detector.build : dif " << difInfo.id << ", chamber " << difInfo.chamberId << *this << endl;
00101           }
00102       }
00103 }


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