#include <MTChip.hh>
Inheritance diagram for MTChip:
Public Member Functions | |
MTChip (UInt_t id=0) | |
MTChip (const Chip &aChip) | |
virtual | ~MTChip () |
MTChip & | operator= (const Chip &aChip) |
UInt_t | GetId () const |
void | SetId (UInt_t aValue) |
UInt_t | GetSerialNumber () const |
void | SetSerialNumber (UInt_t value) |
Int_t | GetGain () const |
void | SetGain (Int_t aValue) |
MTBoard & | GetBoard (void) |
void | SetBoard (MTBoard &value) |
void | Info (void) const |
bool | IsConfigured () const |
const MTChipSoftId & | GetSoftId () const |
bool | GetEnableChannel (UInt_t channelId) const |
const bool * | GetEnableChannels () const |
void | SetEnableChannel (UInt_t channelId, bool aValue) |
bool | GetMaskChannel (UInt_t channelId, UInt_t index) const |
void | SetMaskChannel (UInt_t channelId, UInt_t index, bool aValue) |
bool | GetStimulatedChannel (UInt_t channelId) const |
const bool * | GetStimulatedChannels () const |
void | SetStimulatedChannel (UInt_t channelId, bool aValue) |
UInt_t | GetPedestalChannel (UInt_t channelId) const |
const UInt_t * | GetPedestalChannels () const |
void | SetPedestalChannel (UInt_t channelId, UInt_t aValue) |
Private Attributes | |
UInt_t | id |
MTChipSoftId | softId |
MTBoard | board |
UInt_t | serialNum |
Int_t | gain |
bool | configured |
bool | stimulatedChannel [64] |
bool | enableChannel [64] |
bool | maskChannel [64][3] |
UInt_t | pedestal_offset [64] |
Definition at line 21 of file MTChip.hh.
MTChip::MTChip | ( | UInt_t | id = 0 |
) |
MTChip::MTChip | ( | const Chip & | aChip | ) |
MTChip::~MTChip | ( | ) | [virtual] |
Definition at line 43 of file MTChip.cpp.
00044 { 00045 const Board& board = aChip.getBoard() ; 00046 const Dif* dif = board.getDif(); 00047 unsigned int difId = 0; 00048 if ( dif != NULL) difId = dif->getId(); 00049 const Chamber& cham = board.getChamber(); 00050 00051 softId.SetValue(cham.getId(), difId, aChip.getBoard().getId(),aChip.getBoard().getRow(),aChip.getBoard().getColumn(), aChip.getBoard().getNbRows(), aChip.getBoard().getNbColumns(), aChip.getId(), aChip.getRow(), aChip.getNbRows(), aChip.getNbColumns(), aChip.getColumn(), aChip.getSerialNumber()); 00052 00053 id = aChip.getId(); 00054 serialNum = aChip.getSerialNumber(); 00055 gain = aChip.getGain(); 00056 configured = aChip.isConfigured(); 00057 00058 ChannelMap_t channels = aChip.getChannels(); // get channel list for corrersponding Chip 00059 for (ChannelMap_t::const_iterator channelIt = channels.begin(); channelIt != channels.end(); channelIt++) 00060 { 00061 const Channel& channel = *(channelIt->second); 00062 00063 enableChannel[channel.getHardId()] = channel.getEnable(); 00064 00065 stimulatedChannel[channel.getHardId()] = channel.getStimulate(); 00066 00067 pedestal_offset[channel.getHardId()] = channel.getPedestalOffset(); 00068 00069 enableChannel[channel.getHardId()] = channel.getEnable(); 00070 try 00071 { 00072 const MicrorocChannel& mc = dynamic_cast<const MicrorocChannel&> (channel) ; 00073 for ( unsigned int i = 0 ; i <= 2 ; i++ ) 00074 { 00075 maskChannel[channel.getHardId()][i] = mc.getMask(i); 00076 } 00077 } 00078 catch ( ... ) {} 00079 } 00080 return *this; 00081 }
UInt_t MTChip::GetId | ( | void | ) | const [inline] |
void MTChip::SetId | ( | UInt_t | aValue | ) | [inline] |
UInt_t MTChip::GetSerialNumber | ( | ) | const [inline] |
void MTChip::SetSerialNumber | ( | UInt_t | value | ) | [inline] |
Int_t MTChip::GetGain | ( | ) | const [inline] |
void MTChip::SetGain | ( | Int_t | aValue | ) | [inline] |
MTBoard& MTChip::GetBoard | ( | void | ) | [inline] |
void MTChip::SetBoard | ( | MTBoard & | value | ) | [inline] |
void MTChip::Info | ( | void | ) | const |
Reimplemented in MTDiracChip, MTHardroc1Chip, MTHardroc2Chip, and MTMicrorocChip.
Definition at line 84 of file MTChip.cpp.
00085 { 00086 cout << "------------ Chip[" << this->GetId() << "] on Dif[" << softId.GetDifId() <<"] configuration ---------------" << endl ; 00087 00088 int index = 0; 00089 cout << "Enable channel:" << endl; 00090 for ( UInt_t num = 0; num <=63 ; num++) 00091 { 00092 cout << "[" << index++ << ":" << enableChannel[num] << "]"; 00093 } 00094 cout << endl; 00095 index = 0; 00096 cout << "stimulated value:" << endl; 00097 for ( UInt_t num = 0; num <=63 ; num++) 00098 { 00099 cout << "[" << index++ << ":" << stimulatedChannel[num] << "]"; 00100 } 00101 00102 cout << endl; 00103 cout << endl; 00104 index = 0; 00105 cout << "pedestal value:" << endl; 00106 //for(vector<UInt_t>::const_iterator ii=pedestal_offset.begin(); ii!=pedestal_offset.end(); ++ii) 00107 for ( UInt_t num = 0; num <=63 ; num++) 00108 { 00109 //cout << "[" << index++ << ":" << *(ii) << "]"; 00110 cout << "[" << index++ << ":" << pedestal_offset[num] << "]"; 00111 00112 } 00113 cout << endl; 00114 00115 cout << "gain = " << gain << endl; 00116 cout << "serial number:[" << serialNum << endl; 00117 }
bool MTChip::IsConfigured | ( | ) | const [inline] |
const MTChipSoftId& MTChip::GetSoftId | ( | ) | const [inline] |
bool MTChip::GetEnableChannel | ( | UInt_t | channelId | ) | const [inline] |
const bool* MTChip::GetEnableChannels | ( | ) | const [inline] |
void MTChip::SetEnableChannel | ( | UInt_t | channelId, | |
bool | aValue | |||
) | [inline] |
bool MTChip::GetMaskChannel | ( | UInt_t | channelId, | |
UInt_t | index | |||
) | const [inline] |
void MTChip::SetMaskChannel | ( | UInt_t | channelId, | |
UInt_t | index, | |||
bool | aValue | |||
) | [inline] |
bool MTChip::GetStimulatedChannel | ( | UInt_t | channelId | ) | const [inline] |
const bool* MTChip::GetStimulatedChannels | ( | ) | const [inline] |
void MTChip::SetStimulatedChannel | ( | UInt_t | channelId, | |
bool | aValue | |||
) | [inline] |
UInt_t MTChip::GetPedestalChannel | ( | UInt_t | channelId | ) | const [inline] |
const UInt_t* MTChip::GetPedestalChannels | ( | ) | const [inline] |
void MTChip::SetPedestalChannel | ( | UInt_t | channelId, | |
UInt_t | aValue | |||
) | [inline] |
UInt_t MTChip::id [private] |
MTChipSoftId MTChip::softId [private] |
MTBoard MTChip::board [private] |
UInt_t MTChip::serialNum [private] |
Definition at line 35 of file MTChip.hh.
Referenced by GetSerialNumber(), Info(), operator=(), and SetSerialNumber().
Int_t MTChip::gain [private] |
bool MTChip::configured [private] |
bool MTChip::stimulatedChannel[64] [private] |
Definition at line 40 of file MTChip.hh.
Referenced by GetStimulatedChannel(), GetStimulatedChannels(), Info(), operator=(), and SetStimulatedChannel().
bool MTChip::enableChannel[64] [private] |
Definition at line 41 of file MTChip.hh.
Referenced by GetEnableChannel(), GetEnableChannels(), Info(), operator=(), and SetEnableChannel().
bool MTChip::maskChannel[64][3] [private] |
Definition at line 42 of file MTChip.hh.
Referenced by GetMaskChannel(), operator=(), and SetMaskChannel().
UInt_t MTChip::pedestal_offset[64] [private] |
Definition at line 43 of file MTChip.hh.
Referenced by GetPedestalChannel(), GetPedestalChannels(), Info(), operator=(), and SetPedestalChannel().