00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00023 #include "TClonesArray.h"
00024
00025 #include "CrateMonitorEvent.h"
00026 #include "RSM.h"
00027
00028 #include "MessageService/MsgService.h"
00029
00030 CVSID("$Id: CrateMonitorEvent.cxx,v 1.5 2005/02/22 21:47:38 bspeak Exp $");
00031
00032 ClassImp(CMChipEvent)
00033 CMChipEvent::CMChipEvent() {
00034 RSMVer << "CMChipEvent::CMChipEvent()" << endl;
00035 this->Reset();
00036 }
00037
00038 void CMChipEvent::LocalReset() {
00039 Temp = 0;
00040 GroundPlaneV = 0;
00041 ASDSupplyV = 0;
00042 PosRailV = 0;
00043 NegRail0V = 0;
00044 NegRail1V = 0;
00045 NegRail2V = 0;
00046 }
00047
00048 ClassImp(CrateMonitorEvent)
00049 CrateMonitorEvent::CrateMonitorEvent() {
00050 RSMVer << "CrateMonitorEvent::CrateMonitorEvent()" << endl;
00051 ChipEvents = new TClonesArray("CMChipEvent",2304);
00052 this->Reset();
00053 }
00054
00055 void CrateMonitorEvent::LocalReset() {
00056 for (int i=0; i<NCRATE; i++) {
00057 ROPTempCPU[i]=0;
00058 ROPTempMem[i]=0;
00059 ROPTempPmc[i]=0;
00060 }
00061 }
00062
00063 CMChipEvent* CrateMonitorEvent::ChipGen(Char_t Crate,
00064 Char_t Varc,
00065 Char_t Vmm,
00066 Char_t Vadc,
00067 Char_t Vachip) {
00068 int ichip = this->IChip(Crate,Varc,Vmm,Vadc,Vachip);
00069
00070 CMChipEvent* chip = 0;
00071 chip=dynamic_cast<CMChipEvent*>(ChipEvents->At(ichip));
00072 if(chip) return chip;
00073
00074 chip = new((*ChipEvents)[ichip]) CMChipEvent();
00075 chip->PackLoc(Crate,Varc,Vmm,Vadc,Vachip);
00076 return chip;
00077 }