Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CrateMonitorEvent.cxx

Go to the documentation of this file.
00001 
00002 // $Id: CrateMonitorEvent.cxx,v 1.5 2005/02/22 21:47:38 bspeak Exp $
00003 //
00004 // CrateMonitorEvent and CMChipEvent inherit from BlockEvent and
00005 // ChipEvent classes.  Additions are:
00006 //
00007 // CrateMonitorEvent:
00008 //   Float_t ROPTempCPU[16]
00009 //   Float_t ROPTempMem[16]
00010 //   Float_t ROPTempPmc[16]
00011 // CMChipEvent:
00012 //   Float_t Temp;
00013 //   Float_t GroundPlaneV;
00014 //   Float_t ASDSupplyV;
00015 //   Float_t PosRailV;
00016 //   Float_t NegRail0V;
00017 //   Float_t NegRail1V;
00018 //   Float_t NegRail2V;
00019 //
00020 // Author: B. Speakman 2004.09.03
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 }

Generated on Mon Feb 15 11:06:33 2010 for loon by  doxygen 1.3.9.1