#include <MTBoard.hh>
Inheritance diagram for MTBoard:
Public Member Functions | |
MTBoard () | |
MTBoard (const Board &aBoard) | |
virtual | ~MTBoard () |
MTBoard & | operator= (const Board &aBoard) |
void | Info (void) const |
UInt_t | GetId (void) const |
void | SetId (UInt_t value) |
const std::map< UInt_t, MTChip * > & | GetChips (void) const |
MTChip & | GetChip (UInt_t id) const |
Private Attributes | |
Int_t | id |
std::map< UInt_t, MTChip * > | chips |
Definition at line 20 of file MTBoard.hh.
MTBoard::MTBoard | ( | ) |
MTBoard::MTBoard | ( | const Board & | aBoard | ) |
MTBoard::~MTBoard | ( | ) | [virtual] |
Definition at line 38 of file MTBoard.cpp.
00039 { 00040 for( map<UInt_t,MTChip*>::const_iterator iiChip=this->chips.begin(); iiChip!=this->chips.end(); ++iiChip) 00041 { 00042 MTChip *foo =(*iiChip).second ; 00043 delete foo; 00044 } 00045 // } 00046 }
Definition at line 48 of file MTBoard.cpp.
00049 { 00050 try 00051 { 00052 id = aBoard.getId(); 00053 00054 MTChip* mtChip = NULL; 00055 const ChipMap_t& boardChips = aBoard.getChips(); 00056 00057 for (ChipMap_t::const_iterator chipIt = boardChips.begin(); chipIt != boardChips.end(); ++chipIt) 00058 { 00059 Chip& chip = *(chipIt->second); 00060 try { 00061 DiracChip &diracChip = dynamic_cast<DiracChip &> (chip); 00062 mtChip = new MTDiracChip(diracChip); 00063 } 00064 catch (...) {} 00065 try { 00066 Hardroc1Chip &hr1Chip = dynamic_cast<Hardroc1Chip &> (chip); 00067 mtChip = new MTHardroc1Chip(hr1Chip); 00068 } 00069 catch (...) {} 00070 try { 00071 Hardroc2Chip &hr2Chip = dynamic_cast<Hardroc2Chip &> (chip); 00072 mtChip = new MTHardroc2Chip(hr2Chip); 00073 } 00074 catch (...) {} 00075 try { 00076 MicrorocChip µChip = dynamic_cast<MicrorocChip &> (chip); 00077 mtChip = new MTMicrorocChip(microChip); 00078 } 00079 catch (...) {} 00080 00081 00082 if ( mtChip != NULL) 00083 { 00084 //mtChip->SetBoard(*this); 00085 chips[chip.getId()] = mtChip; 00086 // if ( id == 14 ) 00087 // { 00088 // cout << "Board id[" << id << "] adr[" << this << "] add chip id[" << chip.getId() << "] chip adr[" << mtChip << "]" << endl; 00089 // } 00090 } 00091 } 00092 } 00093 catch (MicroException e) 00094 { 00095 throw MicroException(e.getMessage()); 00096 } 00097 return *this; 00098 }
void MTBoard::Info | ( | void | ) | const |
Definition at line 101 of file MTBoard.cpp.
00102 { 00103 cout << "**** Board informations ****" << endl << endl ; 00104 cout << " Id: " << id << " " << endl ; 00105 }
UInt_t MTBoard::GetId | ( | void | ) | const [inline] |
void MTBoard::SetId | ( | UInt_t | value | ) | [inline] |
const std::map<UInt_t,MTChip*>& MTBoard::GetChips | ( | void | ) | const [inline] |
Definition at line 33 of file MTBoard.hh.
Referenced by MTRun::GetOneChip().
00033 { return chips; } ;
MTChip& MTBoard::GetChip | ( | UInt_t | id | ) | const [inline] |
Int_t MTBoard::id [private] |
std::map<UInt_t,MTChip*> MTBoard::chips [private] |