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

DaqSnarlEvent.cxx

Go to the documentation of this file.
00001 
00002 // $Id: DaqSnarlEvent.cxx,v 1.5 2005/02/22 21:47:38 bspeak Exp $
00003 //
00004 // DaqSnarlEvent and DSChipEvent inherit from BlockEvent and ChipEvent
00005 // classes.  Additions are:
00006 //
00007 // DaqSnarlEvent:
00008 //   Int_t CrateADC[NCRATE]
00009 //   Int_t MFADC[NMF]
00010 //   Short_t SMPlanesHit[2]
00011 //   Short_t SHPlanesHit[4]
00012 //   Short_t SMHitBlock
00013 //   Short_t Hits
00014 // DSChipEvent:
00015 //   Int_t ADC
00016 //
00017 // Author: B. Speakman 2004.09.03
00018 //
00020 #include "TClonesArray.h"
00021 
00022 #include "DaqSnarlEvent.h"
00023 #include "RSM.h"
00024 
00025 #include "MessageService/MsgService.h"
00026 
00027 CVSID("$Id: DaqSnarlEvent.cxx,v 1.5 2005/02/22 21:47:38 bspeak Exp $");
00028 
00029 ClassImp(DSChipEvent)
00030 DSChipEvent::DSChipEvent() {
00031   RSMVer << "DSChipEvent::DSChipEvent()" << endl;
00032   this->Reset();
00033 }
00034 
00035 void DSChipEvent::LocalReset() {
00036   RSMVer << "DSChipEvent::LocalReset()" << endl;
00037   ADC=0;
00038   IsPulsed=false;
00039   IsShield=false;
00040 }
00041 
00042 ClassImp(DaqSnarlEvent)
00043 DaqSnarlEvent::DaqSnarlEvent() {
00044   RSMVer << "DaqSnarlEvent::DaqSnarlEvent()" << endl;
00045   ChipEvents = new TClonesArray("DSChipEvent",2304);
00046   this->Reset();
00047 }
00048 
00049 void DaqSnarlEvent::LocalReset() {
00050   RSMVer << "DaqSnarlEvent::LocalReset()" << endl;
00051   for(int i=0; i<NCRATE; i++) CrateADC[i]=0;
00052   for(int i=0; i<NMF; i++) MFADC[i]=0;
00053   PreTrigADC=0;
00054   PostTrigADC=0;
00055   TotalADC=0;
00056 
00057   for(int i=0;i<2;i++) SMPlanesHit[i]=0;
00058   //for(int i=0;i<4;i++) SHPlanesHit[i]=0;
00059 
00060   SMHitBlock=0;
00061   Hits=0;
00062 }
00063 
00064 DSChipEvent* DaqSnarlEvent::ChipGen(Char_t Crate,
00065                                     Char_t Varc,
00066                                     Char_t Vmm,
00067                                     Char_t Vadc,
00068                                     Char_t Vachip) {
00069   RSMVer << "DaqSnarlEvent::ChipGen()" << endl;
00070   int ichip = this->IChip(Crate,Varc,Vmm,Vadc,Vachip);
00071 
00072   DSChipEvent* chip = 0;
00073   if((chip=dynamic_cast<DSChipEvent*>(ChipEvents->At(ichip))))
00074     return chip;
00075 
00076   chip = new((*ChipEvents)[ichip]) DSChipEvent();
00077   chip->PackLoc(Crate,Varc,Vmm,Vadc,Vachip);
00078   return chip;
00079 }

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