• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

onlinemonitor/spadicmonitor/TSpadicEvent.cxx (r4864/r3721)

Go to the documentation of this file.
00001 /* Generated by Together */
00002 
00003 #include "TSpadicEvent.h"
00004 
00005 #include "TGo4Log.h"
00006 
00007 
00008 UInt_t    TSpadicEvent::ConfigSpadics[MAX_SPADIC] = SET_SPADICS;
00009 
00011 // Subevent containing the data of one single spadic:
00012 
00013 TSpadicData::TSpadicData(const char* name, Short_t id) :
00014    TGo4EventElement(name,name,id)
00015 {
00016    TGo4Log::Info("TTRDSpadicData: Create instance %s with composite id %d", name, id);
00017 }
00018 
00019 TSpadicData::TSpadicData() :
00020    TGo4EventElement()
00021 {
00022 }
00023 
00024 TSpadicData::~TSpadicData()
00025 {
00026 }
00027 
00028 
00029 void  TSpadicData::Clear(Option_t *t)
00030 {
00031    if(IsValid()) { // only clear if real data from previous event exists
00032       fSpadicOffSpillEvent=kFALSE;
00033       fSpadicOverFlowEvent=kFALSE;
00034       fSpadicUndershootsEvent=kFALSE;
00035       fSpadicHighestChannel=-1;
00036       for(int ch=0; ch<NUM_SPADIC_CHA;++ch) {
00037          for(int i=0; i<SPADIC_TRACE_SIZE;++i) {
00038             fSpadicPulse[ch][i]=0;
00039             fSpadicCompensated[ch][i]=0.;
00040             fSpadicOverflows[ch][i]=kFALSE;
00041             fSpadicUndershoots[ch][i]=kFALSE;
00042          }
00043          fSpadicSignalCh[ch]=kFALSE;
00044          fSpadicIntensity[ch]=0.;
00045          fIntensityGate[ch]=kFALSE;
00046       }
00047    }
00048    SetValid(kFALSE);
00049 //   cout <<"do not clear spadic data!" << endl;
00050 }
00051 
00052 
00054 // The complete spadic event:
00055 
00056 
00057 TSpadicEvent::TSpadicEvent(const char* name, Short_t id) :
00058    TGo4CompositeEvent(name,name,id)
00059 {
00060   TGo4Log::Info("TTRDSpadicEvent: Create instance %s with composite id %d", name, id);
00061   TString modname;
00062   for(int sp=0; sp<MAX_SPADIC;++sp)  {
00063      if (TSpadicEvent::ConfigSpadics[sp]==0) continue; // skip empty ids
00064 
00065      //modname.Form("SPADIC%02d%02d",id,sp);// branch names should be unique in complete tree!
00066      modname.Form("SPADIC%02d",sp); // however, for better readibility of tree...
00067      addEventElement(new TSpadicData(modname.Data(),sp));
00068    }
00069 }
00070 
00071 TSpadicEvent::TSpadicEvent() :
00072    TGo4CompositeEvent()
00073 {
00074 }
00075 
00076 TSpadicEvent::~TSpadicEvent()
00077 {
00078 }
00079 

Generated on Tue Dec 10 2013 04:52:23 for ROCsoft by  doxygen 1.7.1