#include <Chamber.hh>
Inheritance diagram for Chamber:
Public Member Functions | |
const float | getXLength () const |
const float | getYLength () const |
virtual const float | getXGap () const =0 |
virtual const float | getYGap () const =0 |
operator bool () const | |
bool | operator! () const |
bool | isValid () const |
unsigned int | getNumberOfBoards () const |
virtual unsigned int | getNumberOfGassiplexBoards () const |
BoardMap_t | getBoards (void) const |
void | setDescription (const std::string aDesc) |
std::string | getDescription () const |
std::string | getType () const |
const Channel & | getChannelById (const i32 channelId, const i32 chipId=-1, const i32 difId=-1) const |
const BoardMap_t & | getBoardsByDifId (const i32 difId) const |
void | addDif (Dif *dif) |
Dif * | getDif (i32 key) const |
DifMap_t | getDifs () const |
const Dif & | getDifById (const i32 difId) const |
void | addBoard (Board *board) |
float | getX () const |
void | setX (const float aX) |
float | getY () const |
void | setY (const float aY) |
float | getZ (void) const |
void | setZ (const float aZ) |
const float | getLeftBottomX () const |
const float | getLeftBottomY () const |
const float | getRightUpperX () const |
const float | getRightUpperY () const |
i32 | getId (void) const |
void | setId (const i32 aId) |
bool | getXrotation () const |
void | setXrotation (bool val) |
bool | getYrotation () const |
void | setYrotation (bool val) |
i16 | getZrotation () const |
void | setZrotation (i16 val) |
ui32 | getNbColumns (void) const |
ui32 | getNbRows (void) const |
Protected Member Functions | |
Chamber (const float xPos, const float yPos, const float zPos, bool xRotation, const bool yRotation, const i16 zRotation, const ui32 nbColumns, const ui32 nbRows, const i32 id) | |
Chamber (const Chamber &source) | |
Chamber & | operator= (const Chamber &source) |
std::ostream & | operator<< (std::ostream &out) const |
virtual | ~Chamber () |
Protected Attributes | |
float | xPos |
float | yPos |
float | zPos |
bool | xRotation |
bool | yRotation |
i16 | zRotation |
i32 | id |
std::string | description |
BoardMap_t | boards |
std::string | type |
ui32 | nbColumns |
ui32 | nbRows |
DifMap_t | difs |
bool | myIsValid |
Friends | |
class | Detector |
std::ostream & | operator<< (std::ostream &out, const Chamber &x) |
Definition at line 37 of file Chamber.hh.
Chamber::Chamber | ( | const float | xPos, | |
const float | yPos, | |||
const float | zPos, | |||
bool | xRotation, | |||
const bool | yRotation, | |||
const i16 | zRotation, | |||
const ui32 | nbColumns, | |||
const ui32 | nbRows, | |||
const i32 | id | |||
) | [protected] |
Definition at line 41 of file Chamber.cpp.
00042 : id(aId), xPos(aX), yPos(aY), zPos(aZ), xRotation(axRotation), yRotation(ayRotation), zRotation(azRotation) , description(""), nbColumns(aNbColumns) , nbRows(aNbRows) 00043 { 00044 //cout << "Chamber[" << this->id << "] x[" << xPos <<"] y[" << yPos << "]" << endl; 00045 // FILE_LOG(logDEBUG) << "--Chamber constructor id:" << id << endl; 00046 }
Chamber::Chamber | ( | const Chamber & | source | ) | [protected] |
Definition at line 50 of file Chamber.cpp.
00051 { 00052 // FILE_LOG(logDEBUG) << "--Chamber Constructeur de copie"<< endl; 00053 *this = source; //appel de l operateur = 00054 }
Chamber::~Chamber | ( | ) | [protected, virtual] |
Definition at line 75 of file Chamber.cpp.
00076 { 00077 // FILE_LOG(logDEBUG)<< "----Chamber destructeur"<< endl; 00078 for (std::map<i32, Board *>::const_iterator it = boards.begin(); it != boards.end(); ++it) { 00079 delete (it->second); 00080 } 00081 }
Definition at line 58 of file Chamber.cpp.
00059 { 00060 //FILE_LOG(logDEBUG) << "--Chamber operator de copie"<< endl; 00061 xPos = source.xPos; 00062 yPos = source.yPos; 00063 zPos = source.zPos; 00064 xRotation = source.xRotation; 00065 yRotation = source.yRotation; 00066 zRotation = source.zRotation; 00067 id = source.id; 00068 description = source.description; 00069 boards = source.boards; 00070 // type = source.type; 00071 return *this; 00072 }
std::ostream & Chamber::operator<< | ( | std::ostream & | out | ) | const [protected] |
Definition at line 22 of file Chamber.cpp.
00022 { 00023 out << description << " id " << id << " @[" << xPos << ", " << yPos << ", " << zPos << "] x rotation[" << xRotation << "][ y rotation[" << yRotation << "] [ z rotation[" << zRotation << "]" << boards.size() << " boards, " << difs.size() << " difs" << endl; 00024 00025 00026 if (difs.size()) { 00027 for (DifMap_t::const_iterator it = difs.begin(); it != difs.end(); ++it) { 00028 out << *(it->second) << endl; 00029 } 00030 } 00031 else { 00032 for (std::map<i32, Board *>::const_iterator it = boards.begin(); it != boards.end(); ++it) { 00033 out << *(it->second) << endl; 00034 } 00035 } 00036 return(out); 00037 } // operator <<
const float Chamber::getXLength | ( | ) | const |
Definition at line 163 of file Chamber.cpp.
Referenced by getLeftBottomX(), getLeftBottomY(), getRightUpperX(), getRightUpperY(), Board::getXRelative(), main(), and MTChamber::operator=().
00164 { 00165 const Board& board = *(boards.begin()->second); 00166 //cout << "Chamber getXleght: this->nbRows[" << this->nbRows << "] board.getXLength()[" << board.getXLength() <<"[ this->getXGap()[" << this->getXGap() << endl; 00167 return (this->nbRows * board.getXLength()) + ( (this->nbRows -1 ) * this->getXGap() ); 00168 }
const float Chamber::getYLength | ( | ) | const |
Definition at line 171 of file Chamber.cpp.
Referenced by getLeftBottomX(), getLeftBottomY(), getRightUpperX(), getRightUpperY(), Board::getYRelative(), main(), and MTChamber::operator=().
00172 { 00173 const Board& board = *(boards.begin()->second); 00174 return (this->nbColumns * board.getYLength() )+ ((this->nbColumns-1 ) * this->getYGap() ); 00175 }
virtual const float Chamber::getXGap | ( | ) | const [pure virtual] |
Implemented in DiracChamber1, GassiplexChamber1, GassiplexChamber4, GassiplexStripChamber1, Hardroc1Chamber, Hardroc2Chamber1, Hardroc2Chamber2, Hardroc2Chamber6, Hardroc2IPNLChamber6, MetreCarreChamber, MicrorocChamber1, MicrorocChamber6, and MicrorocTestChamber.
Referenced by Board::getXRelative().
virtual const float Chamber::getYGap | ( | ) | const [pure virtual] |
Implemented in DiracChamber1, GassiplexChamber1, GassiplexChamber4, GassiplexStripChamber1, Hardroc1Chamber, Hardroc2Chamber1, Hardroc2Chamber2, Hardroc2Chamber6, Hardroc2IPNLChamber6, MetreCarreChamber, MicrorocChamber1, MicrorocChamber6, and MicrorocTestChamber.
Referenced by Board::getYRelative().
Chamber::operator bool | ( | ) | const [inline] |
bool Chamber::operator! | ( | ) | const [inline] |
bool Chamber::isValid | ( | void | ) | const [inline] |
unsigned int Chamber::getNumberOfBoards | ( | ) | const [inline] |
Reimplemented in DiracChamber1, GassiplexChamber1, GassiplexChamber4, GassiplexStripChamber1, Hardroc1Chamber, Hardroc2Chamber1, Hardroc2Chamber2, Hardroc2Chamber6, Hardroc2IPNLChamber6, MetreCarreChamber, MicrorocChamber1, MicrorocChamber6, and MicrorocTestChamber.
Definition at line 60 of file Chamber.hh.
00060 { return(boards.size()); };
virtual unsigned int Chamber::getNumberOfGassiplexBoards | ( | ) | const [inline, virtual] |
Reimplemented in GassiplexChamber1, GassiplexChamber4, and GassiplexStripChamber1.
Definition at line 61 of file Chamber.hh.
BoardMap_t Chamber::getBoards | ( | void | ) | const [inline] |
Definition at line 62 of file Chamber.hh.
Referenced by BeamProfile::FillHitPerChannel(), BeamProfile::FillHitPerChipDist(), main(), and MTChamber::operator=().
00062 { return boards; };
void Chamber::setDescription | ( | const std::string | aDesc | ) | [inline] |
std::string Chamber::getDescription | ( | ) | const [inline] |
std::string Chamber::getType | ( | ) | const [inline] |
Definition at line 66 of file Chamber.hh.
Referenced by main(), and MTChamber::operator=().
00066 { return type; };
const Channel & Chamber::getChannelById | ( | const i32 | channelId, | |
const i32 | chipId = -1 , |
|||
const i32 | difId = -1 | |||
) | const |
Definition at line 104 of file Chamber.cpp.
00105 { 00106 // default case for Gassiplex without chipId and difId : direct use of the board list 00107 // case for Hardroc and Dirac boards which are connected to a Dif : look for the boards which Dif Id 00108 const BoardMap_t& boardMap = (chipId < 0) ? boards : getBoardsByDifId(difId); 00109 00110 // then look for the channel with given board list 00111 //for (BoardMap_t::const_iterator boardIt = boards.begin(); boardIt != boards.end(); ++boardIt) { 00112 for (BoardMap_t::const_iterator boardIt = boardMap.begin(); boardIt != boardMap.end(); ++boardIt) { 00113 try { 00114 Channel& channel = boardIt->second->getChannelById(channelId, chipId); 00115 return(channel); 00116 } 00117 catch (MicroException &e) { 00118 //FILE_LOG(logDEBUG)<< "Chamber::getChannelById channelid["<< channelId << "] chipId:["<< chipId << "] difId:["<< difId << "], trying next board" << endl; 00119 } 00120 } 00121 00122 throw MicroException("Chamber.getChannelById : no Channel found for this id and this chamber "); 00123 } // Chamber.getChannelById
const BoardMap_t & Chamber::getBoardsByDifId | ( | const i32 | difId | ) | const |
Definition at line 95 of file Chamber.cpp.
Referenced by getChannelById().
00095 { 00096 DifMap_t::const_iterator difIt = difs.find(difId); 00097 if (difIt == difs.end()) { 00098 throw MicroException("no Dif found with this id: "); 00099 } 00100 return(difIt->second->getBoards()); 00101 } // Chamber.getBoardByDifId
void Chamber::addDif | ( | Dif * | dif | ) |
Definition at line 84 of file Chamber.cpp.
Referenced by MicrorocTestChamber::init(), MicrorocChamber6::init(), MicrorocChamber1::init(), MetreCarreChamber::init(), Hardroc2IPNLChamber6::init(), Hardroc2Chamber6::init(), Hardroc2Chamber2::init(), Hardroc2Chamber1::init(), Hardroc1Chamber::init(), and DiracChamber1::init().
Dif* Chamber::getDif | ( | i32 | key | ) | const [inline] |
DifMap_t Chamber::getDifs | ( | ) | const [inline] |
Definition at line 72 of file Chamber.hh.
Referenced by TestMicrorocParser::getNextEvent().
00072 { return difs ;} ;
const Dif & Chamber::getDifById | ( | const i32 | difId | ) | const |
Definition at line 179 of file Chamber.cpp.
Referenced by BeamProfile::DrawChip2D().
00180 { 00181 std::map<i32, Dif *>::const_iterator it = difs.find(difId); 00182 if (it == difs.end()) 00183 throw MicroException("Chanber.getDifById : no Dif found for this id"); 00184 00185 return(*(it->second)); 00186 };
void Chamber::addBoard | ( | Board * | board | ) |
Definition at line 89 of file Chamber.cpp.
Referenced by MicrorocTestChamber::init(), MicrorocChamber6::init(), MicrorocChamber1::init(), MetreCarreChamber::init(), Hardroc2IPNLChamber6::init(), Hardroc2Chamber6::init(), Hardroc2Chamber2::init(), Hardroc2Chamber1::init(), Hardroc1Chamber::init(), and DiracChamber1::init().
float Chamber::getX | ( | ) | const |
Definition at line 126 of file Chamber.cpp.
Referenced by getLeftBottomX(), getRightUpperX(), Chip::getX(), Channel::getX(), Board::getX(), main(), and MTChamber::operator=().
00127 { 00128 return xPos; 00129 }
void Chamber::setX | ( | const float | aX | ) | [inline] |
float Chamber::getY | ( | ) | const |
Definition at line 131 of file Chamber.cpp.
Referenced by getLeftBottomY(), getRightUpperY(), Chip::getY(), Channel::getY(), Board::getY(), main(), and MTChamber::operator=().
00132 { 00133 00134 return yPos; 00135 }
void Chamber::setY | ( | const float | aY | ) | [inline] |
float Chamber::getZ | ( | void | ) | const [inline] |
Definition at line 83 of file Chamber.hh.
Referenced by Channel::getZ(), main(), Board::operator<<(), and MTChamber::operator=().
00083 { return zPos; };
void Chamber::setZ | ( | const float | aZ | ) | [inline] |
const float Chamber::getLeftBottomX | ( | ) | const |
Definition at line 138 of file Chamber.cpp.
Referenced by BeamProfile::FillXyDist(), and main().
00139 { 00140 if ( getZrotation() == 90 || getZrotation() == -90 ) return ( getX() - getYLength() / 2.); 00141 return ( getX() - getXLength() / 2.); 00142 }
const float Chamber::getLeftBottomY | ( | ) | const |
Definition at line 144 of file Chamber.cpp.
Referenced by BeamProfile::FillXyDist(), and main().
00145 { 00146 if ( getZrotation() == 90 || getZrotation() == -90) return ( getY() - getXLength() / 2.); 00147 return ( getY() - getYLength() / 2.); 00148 }
const float Chamber::getRightUpperX | ( | ) | const |
Definition at line 150 of file Chamber.cpp.
Referenced by BeamProfile::FillXyDist(), and main().
00151 { 00152 if ( getZrotation() == 90 || getZrotation() == -90) return ( getX() + getYLength() / 2.); 00153 return ( getX() + getXLength() / 2.); 00154 }
const float Chamber::getRightUpperY | ( | ) | const |
Definition at line 156 of file Chamber.cpp.
Referenced by BeamProfile::FillXyDist(), and main().
00157 { 00158 if ( getZrotation() == 90 || getZrotation() == -90) return ( getY() + getXLength() / 2.); 00159 return ( getY() + getYLength() / 2.); 00160 }
i32 Chamber::getId | ( | void | ) | const [inline] |
Definition at line 92 of file Chamber.hh.
Referenced by Detector::addChamber(), Channel::Channel(), Chip::Chip(), Event::getChannelHitByOrder(), Event::getChannelHitVector(), MicrorocTestChamber::init(), MicrorocChamber6::init(), MicrorocChamber1::init(), MetreCarreChamber::init(), Hardroc2IPNLChamber6::init(), Hardroc2Chamber6::init(), Hardroc2Chamber2::init(), Hardroc1Chamber::init(), DiracChamber1::init(), Event::insertHit(), MTChannel::MTChannel(), MTChip::operator=(), MTChamber::operator=(), and Chip::operator=().
00092 { return id; };
void Chamber::setId | ( | const i32 | aId | ) | [inline] |
bool Chamber::getXrotation | ( | ) | const [inline] |
Definition at line 95 of file Chamber.hh.
Referenced by Channel::getColInChamber(), Chip::getY(), main(), and MTChamber::operator=().
00095 { return xRotation ;};
void Chamber::setXrotation | ( | bool | val | ) | [inline] |
bool Chamber::getYrotation | ( | ) | const [inline] |
Definition at line 98 of file Chamber.hh.
Referenced by Channel::getRowInChamber(), Chip::getX(), main(), and MTChamber::operator=().
00098 { return yRotation ; };
void Chamber::setYrotation | ( | bool | val | ) | [inline] |
i16 Chamber::getZrotation | ( | ) | const [inline] |
Definition at line 101 of file Chamber.hh.
Referenced by Channel::getColInChamber(), Chip::getLeftBottomX(), Channel::getLeftBottomX(), getLeftBottomX(), Chip::getLeftBottomY(), Channel::getLeftBottomY(), getLeftBottomY(), Chip::getRightUpperX(), Channel::getRightUpperX(), getRightUpperX(), Chip::getRightUpperY(), Channel::getRightUpperY(), getRightUpperY(), Channel::getRowInChamber(), Chip::getX(), Chip::getY(), main(), and MTChamber::operator=().
00101 { return zRotation ; };
void Chamber::setZrotation | ( | i16 | val | ) | [inline] |
ui32 Chamber::getNbColumns | ( | void | ) | const [inline] |
Definition at line 108 of file Chamber.hh.
Referenced by Channel::getColInChamber(), and Channel::getRowInChamber().
00108 { return nbColumns; };
ui32 Chamber::getNbRows | ( | void | ) | const [inline] |
Definition at line 109 of file Chamber.hh.
Referenced by Channel::getColInChamber(), and Channel::getRowInChamber().
00109 { return nbRows; };
friend class Detector [friend] |
Definition at line 39 of file Chamber.hh.
std::ostream& operator<< | ( | std::ostream & | out, | |
const Chamber & | x | |||
) | [friend] |
float Chamber::xPos [protected] |
Definition at line 109 of file Chamber.hh.
Referenced by getX(), operator<<(), operator=(), and setX().
float Chamber::yPos [protected] |
Definition at line 109 of file Chamber.hh.
Referenced by getY(), operator<<(), operator=(), and setY().
float Chamber::zPos [protected] |
Definition at line 109 of file Chamber.hh.
Referenced by GassiplexChamber1::GassiplexChamber1(), getZ(), operator<<(), operator=(), and setZ().
bool Chamber::xRotation [protected] |
the chamber position
Definition at line 118 of file Chamber.hh.
Referenced by getXrotation(), operator<<(), operator=(), and setXrotation().
bool Chamber::yRotation [protected] |
Definition at line 119 of file Chamber.hh.
Referenced by getYrotation(), operator<<(), operator=(), and setYrotation().
i16 Chamber::zRotation [protected] |
Definition at line 120 of file Chamber.hh.
Referenced by getZrotation(), operator<<(), operator=(), and setZrotation().
i32 Chamber::id [protected] |
std::string Chamber::description [protected] |
the chamber unique id
Definition at line 122 of file Chamber.hh.
Referenced by DiracChamber1::DiracChamber1(), GassiplexChamber1::GassiplexChamber1(), GassiplexChamber4::GassiplexChamber4(), GassiplexStripChamber1::GassiplexStripChamber1(), getDescription(), Hardroc1Chamber::Hardroc1Chamber(), Hardroc2Chamber1::Hardroc2Chamber1(), Hardroc2Chamber2::Hardroc2Chamber2(), Hardroc2Chamber6::Hardroc2Chamber6(), Hardroc2IPNLChamber6::Hardroc2IPNLChamber6(), MetreCarreChamber::MetreCarreChamber(), MicrorocChamber1::MicrorocChamber1(), MicrorocChamber6::MicrorocChamber6(), MicrorocTestChamber::MicrorocTestChamber(), operator<<(), operator=(), and setDescription().
BoardMap_t Chamber::boards [protected] |
short description
Definition at line 123 of file Chamber.hh.
Referenced by addBoard(), getBoards(), getChannelById(), getNumberOfBoards(), getXLength(), getYLength(), GassiplexStripChamber1::init(), GassiplexChamber4::init(), GassiplexChamber1::init(), operator<<(), operator=(), and ~Chamber().
std::string Chamber::type [protected] |
the list of boards which compose the chamber
Definition at line 124 of file Chamber.hh.
Referenced by GassiplexChamber1::GassiplexChamber1(), GassiplexChamber4::GassiplexChamber4(), GassiplexStripChamber1::GassiplexStripChamber1(), getType(), Hardroc1Chamber::Hardroc1Chamber(), Hardroc2Chamber1::Hardroc2Chamber1(), Hardroc2Chamber2::Hardroc2Chamber2(), Hardroc2Chamber6::Hardroc2Chamber6(), Hardroc2IPNLChamber6::Hardroc2IPNLChamber6(), MetreCarreChamber::MetreCarreChamber(), MicrorocChamber1::MicrorocChamber1(), MicrorocChamber6::MicrorocChamber6(), and MicrorocTestChamber::MicrorocTestChamber().
ui32 Chamber::nbColumns [protected] |
ui32 Chamber::nbRows [protected] |
Definition at line 125 of file Chamber.hh.
DifMap_t Chamber::difs [protected] |
number of board row and column
Definition at line 126 of file Chamber.hh.
Referenced by addDif(), getBoardsByDifId(), getDif(), getDifById(), getDifs(), and operator<<().
bool Chamber::myIsValid [protected] |
the list of difs which compose the chamber (Hardroc and Dirac only)
Definition at line 127 of file Chamber.hh.
Referenced by DiracChamber1::DiracChamber1(), GassiplexChamber1::GassiplexChamber1(), GassiplexChamber4::GassiplexChamber4(), GassiplexStripChamber1::GassiplexStripChamber1(), Hardroc1Chamber::Hardroc1Chamber(), Hardroc2Chamber1::Hardroc2Chamber1(), Hardroc2Chamber2::Hardroc2Chamber2(), Hardroc2Chamber6::Hardroc2Chamber6(), Hardroc2IPNLChamber6::Hardroc2IPNLChamber6(), isValid(), MetreCarreChamber::MetreCarreChamber(), MicrorocChamber1::MicrorocChamber1(), MicrorocChamber6::MicrorocChamber6(), MicrorocTestChamber::MicrorocTestChamber(), operator bool(), and operator!().