UberRecord Class Reference

#include <UberRecord.h>

Inheritance diagram for UberRecord:
RecRecordImp< UberRecHeader > RecRecord

List of all members.

Public Member Functions

 UberRecord ()
 UberRecord (const UberRecHeader &header)
virtual ~UberRecord ()
void ResetEvent ()
int AddNextHit (UShort_t p, UShort_t s)
void AddNextHitValues (StripEnd::StripEnd_t se, Int_t adc, Float_t npe, Float_t sigcorr, Float_t mip, Float_t time, Int_t agg)
void AddNextCosmicHit (UShort_t p, UShort_t s)
void AddNextCosmicHitValues (StripEnd::StripEnd_t se, Int_t adc, Float_t time, Int_t agg)
const TClonesArray * GetHitList () const
virtual std::ostream & Print (std::ostream &os) const
virtual void Print (Option_t *option="") const
virtual void Clear (Option_t *option="")

Public Attributes

UInt_t snarlno
Int_t triggerword
Double_t triggertime
UInt_t nhits
UShort_t nhitplanes
UShort_t nhitstrips
UShort_t ndeadplanes
UShort_t mindeadplaneno
Float_t sigcorrconv
Float_t totmip
Int_t maxadc
Float_t maxnpe
Float_t maxmip
Float_t maxtime
Float_t p0totmip
Float_t p1totmip
UShort_t p0stripmaxmip
Float_t p0maxmiptstamp
UShort_t p1stripmaxmip
Float_t p1maxmiptstamp
Float_t mipweighaveplane
Float_t mipweighcentereven
Float_t mipweighcenterodd
Float_t mipweighrad
UShort_t showermax
Float_t mipshowermax
Float_t totmipposeven
Float_t totmipposodd
Float_t totmipnegeven
Float_t totmipnegodd
Int_t ceradc [CalDetConstants::KOVCONST]
Float_t certime [CalDetConstants::KOVCONST]
Int_t toftdc [CalDetConstants::TOFCONST]
Int_t tofadc [CalDetConstants::TOFCONST]
Float_t tofhittime [CalDetConstants::TOFCONST]
Float_t toftime
UInt_t torbits
UInt_t torok
NtpCalDetPID cpid
Float_t summip [CalDetConstants::PLANECONST]
UInt_t nshw
UInt_t ntrk
NtpSRShower shw
NtpSRTrack trk

Protected Member Functions

virtual void Init ()

Private Attributes

UInt_t fhitindex
TClonesArray * hitlist
 a variable to keep track of the position of current hit

Detailed Description

Definition at line 22 of file UberRecord.h.


Constructor & Destructor Documentation

UberRecord::UberRecord (  ) 

Definition at line 18 of file UberRecord.cxx.

References Msg::kDebug, CalDetConstants::KOVCONST, MSG, CalDetConstants::PLANECONST, and CalDetConstants::TOFCONST.

00018                       :
00019   RecRecordImp<UberRecHeader>(),
00020   snarlno(0),
00021   triggerword(0),
00022   triggertime(0.),
00023   nhits(0),
00024   nhitplanes(0),
00025   nhitstrips(0),
00026   ndeadplanes(0),
00027   mindeadplaneno(CalDetConstants::PLANECONST),
00028   sigcorrconv(0.),
00029   totmip(0.),
00030   maxadc(0),
00031   maxnpe(0.),
00032   maxmip(0.),
00033   maxtime(0.),
00034   p0totmip(0.),
00035   p1totmip(0.),
00036   p0stripmaxmip(CalDetConstants::STRIPCONST),
00037   p0maxmiptstamp(0.),
00038   p1stripmaxmip(CalDetConstants::STRIPCONST),
00039   p1maxmiptstamp(0.),
00040   mipweighaveplane(0.),
00041   mipweighcentereven(0.),
00042   mipweighcenterodd(0.),
00043   mipweighrad(0.),
00044   showermax(0),
00045   mipshowermax(0.),
00046   totmipposeven(0.),
00047   totmipposodd(0.),
00048   totmipnegeven(0.),
00049   totmipnegodd(0.),
00050   toftime(0.), torbits(0), torok(kFALSE),
00051   cpid(),
00052   nshw(0),
00053   ntrk(0),
00054 //  nevt(0),
00055   shw(),
00056   trk(),
00057 //  evt(),
00058   fhitindex(0),
00059   hitlist(0)
00060 
00061 //  fcoshitindex(0),
00062 //  coshitlist(0)
00063 {
00064 
00065   MSG("UberRecord",Msg::kDebug)<<"In UberRecord creator"<<endl;
00066   for(int i=0;i<CalDetConstants::KOVCONST;i++){
00067     ceradc[i]=0;
00068     certime[i]=0.;
00069   }
00070   for(int i=0;i<CalDetConstants::TOFCONST;i++){
00071     toftdc[i]=0;
00072     tofadc[i]=0;
00073     tofhittime[i]=0.;
00074   }
00075   for(int i=0;i<CalDetConstants::PLANECONST;i++){
00076      summip[i]=0.;
00077   }
00078   
00079   this->Init();
00080 }//end UberRecord()

UberRecord::UberRecord ( const UberRecHeader header  ) 

Definition at line 83 of file UberRecord.cxx.

References ceradc, certime, Init(), Msg::kDebug, CalDetConstants::KOVCONST, MSG, CalDetConstants::PLANECONST, summip, tofadc, CalDetConstants::TOFCONST, tofhittime, and toftdc.

00083                                                  :
00084   RecRecordImp<UberRecHeader>(header),
00085   snarlno(0),
00086   triggerword(0),
00087   triggertime(0.),
00088   nhits(0),
00089   nhitplanes(0),
00090   nhitstrips(0),
00091   ndeadplanes(0),
00092   mindeadplaneno(CalDetConstants::PLANECONST),
00093   sigcorrconv(0.),
00094   totmip(0.),
00095   maxadc(0),
00096   maxnpe(0.),
00097   maxmip(0.),
00098   maxtime(0.),
00099   p0totmip(0.),
00100   p1totmip(0.),
00101   p0stripmaxmip(CalDetConstants::STRIPCONST),
00102   p0maxmiptstamp(0.),
00103   p1stripmaxmip(CalDetConstants::STRIPCONST),
00104   p1maxmiptstamp(0.),
00105   mipweighaveplane(0.),
00106   mipweighcentereven(0.),
00107   mipweighcenterodd(0.),
00108   mipweighrad(0.),
00109   showermax(0),
00110   mipshowermax(0.),
00111   totmipposeven(0.),
00112   totmipposodd(0.),
00113   totmipnegeven(0.),
00114   totmipnegodd(0.),
00115   toftime(0.), torbits(0), torok(kFALSE),
00116   cpid(),
00117   nshw(0),
00118   ntrk(0),
00119 //  nevt(0),
00120   shw(),
00121   trk(),
00122 //  evt(),
00123   fhitindex(0),
00124   hitlist(0)
00125 //  fcoshitindex(0),
00126 //  coshitlist(0)
00127 
00128 {
00129 
00130   MSG("UberRecord",Msg::kDebug)<<"In UberRecord creator with header arg"<<endl;
00131   for(int i=0;i<CalDetConstants::KOVCONST;i++){
00132     ceradc[i]=0;
00133     certime[i]=0.;
00134   }
00135   for(int i=0;i<CalDetConstants::TOFCONST;i++){
00136     toftdc[i]=0;
00137     tofadc[i]=0;
00138     tofhittime[i]=0.;
00139   }
00140   for(int i=0;i<CalDetConstants::PLANECONST;i++){
00141      summip[i]=0.;
00142   }
00143 
00144   this->Init();
00145 
00146 }//end UberRecord(const UberRecHeader& header)
//________________________________________________________________________________

UberRecord::~UberRecord (  )  [virtual]

Definition at line 149 of file UberRecord.cxx.

References hitlist, RecArrayAllocator::Instance(), Msg::kDebug, MSG, and RecArrayAllocator::ReleaseArray().

00150 {
00151 
00152    MSG("UberRecord",Msg::kDebug)<<"In ~UberRecord"<<endl;
00153    RecArrayAllocator& allocator = RecArrayAllocator::Instance();
00154    MSG("UberRecord",Msg::kDebug)<<"got instance"<<endl;
00155    // Allocated memory is retrieved via object Clear call
00156    if ( hitlist ) { allocator.ReleaseArray( hitlist ); hitlist = 0; }
00157    MSG("UberRecord",Msg::kDebug)<<"In released hitlist"<<endl;
00158 //   if ( coshitlist ) { allocator.ReleaseArray( coshitlist ); coshitlist = 0; }
00159 //   MSG("UberRecord",Msg::kDebug)<<"In released coshitlist"<<endl;
00160 //   if ( shw ) { allocator.ReleaseArray( shw ); shw = 0; }
00161 //   MSG("UberRecord",Msg::kDebug)<<"In released shw"<<endl;
00162 //   if ( trk ) { allocator.ReleaseArray( trk ); trk = 0; }
00163 //   MSG("UberRecord",Msg::kDebug)<<"In released trk"<<endl;
00164 //   if ( evt ) { allocator.ReleaseArray( evt ); evt = 0; }
00165 //   MSG("UberRecord",Msg::kDebug)<<"In released evt"<<endl;
00166    
00167    
00168 }//end ~UberRecord()


Member Function Documentation

void UberRecord::AddNextCosmicHit ( UShort_t  p,
UShort_t  s 
)

Definition at line 317 of file UberRecord.cxx.

00318 {
00319 /*does nothing nowadays
00320   MSG("UberRecord",Msg::kDebug)<<"In UberRecord AddNextHit"<<endl;
00321   new((*coshitlist)[fcoshitindex]) UberCosmicHit();
00322   UberCosmicHit *uch = static_cast<UberCosmicHit *>((*coshitlist)[fcoshitindex]);
00323   uch->SetPlaneStrip(p,s);
00324   fcoshitindex++;
00325 */
00326   return;
00327 
00328 }//end AddNextCosmicHit()

void UberRecord::AddNextCosmicHitValues ( StripEnd::StripEnd_t  se,
Int_t  adc,
Float_t  time,
Int_t  agg 
)

Definition at line 331 of file UberRecord.cxx.

00333 {
00334 
00335 /*Does nothing nowadays
00336   MSG("UberRecord",Msg::kDebug)<<"In UberRecord AddnextCosmicHitValues"<<endl;
00337   UberCosmicHit *uch = static_cast<UberCosmicHit *>((*coshitlist)[fcoshitindex-1]);
00338   uch->AddValues(se, adc, time, agg);
00339 */
00340   return;
00341 }//end AddNextCosmicHitValues()

int UberRecord::AddNextHit ( UShort_t  p,
UShort_t  s 
)

Definition at line 288 of file UberRecord.cxx.

References fhitindex, hitlist, Msg::kDebug, MSG, and UberHit::SetPlaneStrip().

Referenced by UberModule::Reco().

00289 {
00290   MSG("UberRecord",Msg::kDebug)<<"In UberRecord AddNextHit"<<endl;
00291   MSG("UberRecord",Msg::kDebug)<<"value of hitlist "<<hitlist
00292                                <<" value of fhitindex "<<fhitindex<<endl;
00293   new((*hitlist)[fhitindex]) UberHit();
00294   MSG("UberRecord",Msg::kDebug)<<"Made new UberHit element in TClonesArray"<<endl;
00295   UberHit *uh = static_cast<UberHit *>((*hitlist)[fhitindex]);
00296   MSG("UberRecord",Msg::kDebug)<<"Cast array element to uberhit"<<endl;
00297   int fhi = fhitindex;
00298   uh->SetPlaneStrip(p,s);
00299 //  uh->Print();
00300   fhitindex++;
00301   return fhi;
00302 
00303 }//end AddNextHit()

void UberRecord::AddNextHitValues ( StripEnd::StripEnd_t  se,
Int_t  adc,
Float_t  npe,
Float_t  sigcorr,
Float_t  mip,
Float_t  time,
Int_t  agg 
)

Definition at line 306 of file UberRecord.cxx.

References UberHit::AddValues(), fhitindex, Msg::kDebug, and MSG.

Referenced by UberModule::Reco().

00309 {
00310   MSG("UberRecord",Msg::kDebug)<<"In UberRecord AddnextHitValues"<<endl;
00311   UberHit *uh = static_cast<UberHit *>((*hitlist)[fhitindex-1]);
00312   uh->AddValues(se, adc, siglin, npe, mip, time, agg);
00313   return;
00314 }//end AddNextHitValues()

void UberRecord::Clear ( Option_t *  option = ""  )  [virtual]

Definition at line 171 of file UberRecord.cxx.

References NtpSRTrack::Clear(), NtpSRShower::Clear(), hitlist, shw, and trk.

00171                                             {
00172 //  std::cout<<"UberRecord::Clear()"<<std::endl;
00173   // Function added MAK - Feb 28, 2005  
00174   hitlist->Clear("C");
00175   trk.Clear();
00176   shw.Clear();
00177   //
00178   //  RecArrayAllocator& allocator = RecArrayAllocator::Instance();
00179   //  allocator.Print(std::cout);
00180   //  evt.Clear();
00181 }

const TClonesArray* UberRecord::GetHitList (  )  const [inline]

Definition at line 42 of file UberRecord.h.

References hitlist.

Referenced by CalDet2003PlotsModule::Ana(), UberPlotsModule::Ana(), and MSTCalcAna::FillHitSets().

00042 {return hitlist;}

void UberRecord::Init ( void   )  [protected, virtual]

Definition at line 183 of file UberRecord.cxx.

References RecArrayAllocator::GetArray(), hitlist, RecArrayAllocator::Instance(), Msg::kDebug, MSG, and RecRecordImp< UberRecHeader >::SetClearable().

Referenced by UberRecord().

00184 {
00185   // Added MAK - Feb 28, 2005
00186   SetClearable(true);
00187 
00188    MSG("UberRecord",Msg::kDebug)<<"In Init"<<endl;
00189    RecArrayAllocator& allocator = RecArrayAllocator::Instance();
00190    MSG("UberRecord",Msg::kDebug)<<"GOT an allocator? "<<endl;
00191 
00192    MSG("UberRecord",Msg::kDebug)<<"hitlist "<<hitlist<<endl;
00193    if(!hitlist){
00194       hitlist = allocator.GetArray("UberHit");
00195       MSG("UberRecord",Msg::kDebug)<<"MADE NEW HITLIST"<<endl;
00196    }
00197    
00198 
00199 
00200 /*
00201    if(!coshitlist){
00202       coshitlist = allocator.GetArray("UberCosmicHit");
00203       MSG("UberRecord",Msg::kDebug)<<"MADE NEW COSHITLIST"<<endl;
00204    }
00205 
00206    if(!shw){
00207       shw = allocator.GetArray("NtpSRShower");
00208       MSG("UberRecord",Msg::kDebug)<<"MADE NEW SHW"<<endl;
00209    }   
00210    if(!trk){
00211       trk = allocator.GetArray("NtpSRTrack");
00212       MSG("UberRecord",Msg::kDebug)<<"MADE NEW TRK"<<endl;
00213    }  
00214    if(!evt){
00215       evt = allocator.GetArray("NtpSREvent");
00216       MSG("UberRecord",Msg::kDebug)<<"MADE NEW EVT"<<endl;
00217    }
00218 */
00219 //   hitlist->Print();
00220 }//end Init()

void UberRecord::Print ( Option_t *  option = ""  )  const [virtual]

Reimplemented from RecRecordImp< UberRecHeader >.

Definition at line 344 of file UberRecord.cxx.

References Print().

00345 {
00346    UberRecord::Print(std::cout);
00347    return;
00348 
00349 }

std::ostream & UberRecord::Print ( std::ostream &  os  )  const [virtual]

Reimplemented from RecRecordImp< UberRecHeader >.

Definition at line 353 of file UberRecord.cxx.

References hitlist, and UberHit::Print().

Referenced by Print().

00354 {
00355   os<<"UberRecord::Print"<<endl;
00356   RecRecordImp<UberRecHeader>::Print(os);
00357    
00358   int i=0;
00359   TObject *obj = 0;
00360   while((obj = hitlist->At(i))){
00361     UberHit *uh = static_cast<UberHit *>(obj);
00362     os<<"HIT "<<i<<endl;
00363     uh->Print();
00364     i++;
00365   }
00366   return os;
00367 }//end Print()

void UberRecord::ResetEvent (  ) 

Definition at line 223 of file UberRecord.cxx.

References ceradc, certime, NtpSRTrack::Clear(), NtpSRShower::Clear(), cpid, fhitindex, hitlist, Msg::kDebug, CalDetConstants::KOVCONST, maxadc, maxmip, maxnpe, maxtime, mindeadplaneno, mipshowermax, mipweighaveplane, mipweighcentereven, mipweighcenterodd, mipweighrad, MSG, ndeadplanes, nhitplanes, nhits, nhitstrips, nshw, ntrk, p0maxmiptstamp, p0stripmaxmip, p0totmip, p1maxmiptstamp, p1stripmaxmip, p1totmip, CalDetConstants::PLANECONST, NtpCalDetPID::Reset(), showermax, shw, sigcorrconv, snarlno, CalDetConstants::STRIPCONST, summip, tofadc, CalDetConstants::TOFCONST, tofhittime, toftdc, toftime, torbits, torok, totmip, totmipnegeven, totmipnegodd, totmipposeven, totmipposodd, triggertime, triggerword, and trk.

00224 {
00225   MSG("UberRecord",Msg::kDebug)<<"In UberRecord ResetEvent"<<endl;
00226   hitlist->Clear();
00227   fhitindex=0;
00228 //  coshitlist->Clear();
00229 //  fcoshitindex=0;
00230   shw.Clear();
00231   trk.Clear();
00232 //  evt.Clear();
00233 
00234   fhitindex=0;
00235   snarlno=0;
00236   triggerword=0;
00237   triggertime=0.;
00238   nhits=0;
00239   nhitplanes=0;
00240   nhitstrips=0;
00241   ndeadplanes=0;
00242   mindeadplaneno=CalDetConstants::PLANECONST;
00243   sigcorrconv =0.;
00244   totmip=0;
00245   maxadc=0;
00246   maxnpe=0;
00247   maxmip=0;
00248   maxtime=0;
00249   p0totmip=0;
00250   p1totmip=0;
00251   p0stripmaxmip=CalDetConstants::STRIPCONST;
00252   p0maxmiptstamp=0.;
00253   p1stripmaxmip=CalDetConstants::STRIPCONST;
00254   p1maxmiptstamp=0.;
00255   mipweighaveplane=0.;
00256   mipweighcentereven=0.;
00257   mipweighcenterodd=0.;
00258   mipweighrad=0.;
00259   showermax=0;
00260   mipshowermax = 0.;
00261   totmipposeven=0.;
00262   totmipposodd=0.;
00263   totmipnegeven=0.;
00264   totmipnegodd=0.;
00265 
00266   for(int i=0;i<CalDetConstants::KOVCONST;i++){
00267     ceradc[i]=0;
00268     certime[i]=0.;
00269   }
00270   for(int i=0;i<CalDetConstants::TOFCONST;i++){
00271     toftdc[i]=0;
00272     tofadc[i]=0;
00273     tofhittime[i]=0.;
00274   }
00275   toftime=0;
00276   for(int i=0;i<CalDetConstants::PLANECONST;i++){
00277      summip[i]=0.;
00278   }
00279 
00280   nshw=0;
00281   ntrk=0;
00282 //  nevt=0;
00283   torbits=0; torok=0;
00284   cpid.Reset();
00285 }//end ResetEvent()


Member Data Documentation

Definition at line 83 of file UberRecord.h.

Referenced by CalDet2003PlotsModule::Ana(), UberModule::Reco(), ResetEvent(), and UberRecord().

Definition at line 84 of file UberRecord.h.

Referenced by CalDet2003PlotsModule::Ana(), UberModule::Reco(), ResetEvent(), and UberRecord().

UInt_t UberRecord::fhitindex [private]

Definition at line 127 of file UberRecord.h.

Referenced by AddNextHit(), AddNextHitValues(), and ResetEvent().

TClonesArray* UberRecord::hitlist [private]

a variable to keep track of the position of current hit

Definition at line 128 of file UberRecord.h.

Referenced by AddNextHit(), Clear(), GetHitList(), Init(), Print(), ResetEvent(), and ~UberRecord().

Definition at line 60 of file UberRecord.h.

Referenced by UberModule::Reco(), and ResetEvent().

Definition at line 62 of file UberRecord.h.

Referenced by UberModule::Reco(), and ResetEvent().

Definition at line 61 of file UberRecord.h.

Referenced by UberModule::Reco(), and ResetEvent().

Definition at line 63 of file UberRecord.h.

Referenced by UberModule::Reco(), and ResetEvent().

Definition at line 57 of file UberRecord.h.

Referenced by UberModule::Reco(), and ResetEvent().

Definition at line 75 of file UberRecord.h.

Referenced by UberModule::Reco(), and ResetEvent().

Definition at line 70 of file UberRecord.h.

Referenced by UberModule::Reco(), and ResetEvent().

Definition at line 71 of file UberRecord.h.

Referenced by UberModule::Reco(), and ResetEvent().

Definition at line 72 of file UberRecord.h.

Referenced by UberModule::Reco(), and ResetEvent().

Definition at line 73 of file UberRecord.h.

Referenced by UberModule::Reco(), and ResetEvent().

Definition at line 56 of file UberRecord.h.

Referenced by UberModule::Reco(), and ResetEvent().

Definition at line 53 of file UberRecord.h.

Referenced by CalDet2003PlotsModule::Ana(), UberModule::Reco(), and ResetEvent().

Definition at line 114 of file UberRecord.h.

Referenced by UberModule::FillNtpShower(), and ResetEvent().

Definition at line 115 of file UberRecord.h.

Referenced by UberModule::FillNtpTrack(), and ResetEvent().

Definition at line 67 of file UberRecord.h.

Referenced by UberModule::Reco(), and ResetEvent().

Definition at line 66 of file UberRecord.h.

Referenced by CalDetInfoAna::Analyze(), UberModule::Reco(), and ResetEvent().

Definition at line 64 of file UberRecord.h.

Referenced by UberModule::Reco(), and ResetEvent().

Definition at line 69 of file UberRecord.h.

Referenced by UberModule::Reco(), and ResetEvent().

Definition at line 68 of file UberRecord.h.

Referenced by UberModule::Reco(), and ResetEvent().

Definition at line 65 of file UberRecord.h.

Referenced by UberModule::Reco(), and ResetEvent().

Definition at line 74 of file UberRecord.h.

Referenced by UberModule::Reco(), and ResetEvent().

Definition at line 58 of file UberRecord.h.

Referenced by UberModule::Reco(), and ResetEvent().

Definition at line 50 of file UberRecord.h.

Referenced by CalDet2003PlotsModule::Ana(), UberModule::Reco(), and ResetEvent().

Definition at line 105 of file UberRecord.h.

Referenced by UberModule::Reco(), ResetEvent(), and UberRecord().

Definition at line 86 of file UberRecord.h.

Referenced by UberModule::Reco(), ResetEvent(), and UberRecord().

Definition at line 87 of file UberRecord.h.

Referenced by UberModule::Reco(), ResetEvent(), and UberRecord().

Definition at line 85 of file UberRecord.h.

Referenced by CalDet2003PlotsModule::Ana(), UberModule::Reco(), ResetEvent(), and UberRecord().

Definition at line 88 of file UberRecord.h.

Referenced by CalDet2003PlotsModule::Ana(), UberModule::Reco(), and ResetEvent().

Definition at line 90 of file UberRecord.h.

Referenced by UberModule::Reco(), and ResetEvent().

Definition at line 98 of file UberRecord.h.

Referenced by UberModule::Reco(), and ResetEvent().

Definition at line 78 of file UberRecord.h.

Referenced by UberModule::Reco(), and ResetEvent().

Definition at line 79 of file UberRecord.h.

Referenced by UberModule::Reco(), and ResetEvent().

Definition at line 76 of file UberRecord.h.

Referenced by UberModule::Reco(), and ResetEvent().

Definition at line 77 of file UberRecord.h.

Referenced by UberModule::Reco(), and ResetEvent().

Definition at line 52 of file UberRecord.h.

Referenced by CalDet2003PlotsModule::Ana(), UberModule::Reco(), and ResetEvent().

Definition at line 51 of file UberRecord.h.

Referenced by UberModule::Reco(), and ResetEvent().


The documentation for this class was generated from the following files:

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1