#include "hwallraw.h"
ClassImp(HWallRaw)
Int_t HWallRaw::getTime(const Int_t n) const
{
switch (n) {
case 1: return time1;
case 2: return time2;
case 3: return time3;
case 4: return time4;
default:
Error("getTime()","hit number: %i out of range [1,4]",n);
return -1;
}
}
Int_t HWallRaw::getWidth(const Int_t n) const
{
switch (n) {
case 1: return width1;
case 2: return width2;
case 3: return width3;
case 4: return width4;
default:
Error("getWidth()","hit number: %i out of range [1,4]",n);
return -1;
}
}
void HWallRaw::getTimeAndWidth(const Int_t n, Int_t& time, Int_t& width )
{
switch (n) {
case 1:
time=time1;
width=width1;
return;
case 2:
time=time2;
width=width2;
return;
case 3:
time=time3;
width=width3;
return;
case 4:
time=time4;
width=width4;
return;
default:
Error("getTime()","hit number: %i out of range [1,4]",n);
time=width=-500;
return;
}
}
Bool_t HWallRaw::fill(const Int_t time,const Int_t width)
{
switch (nHits) {
case 0:
time1 = time;
width1 = width;
nHits++;
break;
case 1:
time2 = time;
width2 = width;
nHits++;
break;
case 2:
time3 = time;
width3 = width;
nHits++;
break;
case 3:
time4 = time;
width4 = width;
nHits++;
break;
default:
if( nHits>=4) nHits++;
return kFALSE;
}
return kTRUE;
}
Bool_t HWallRaw::fill_lead(const Int_t time)
{
switch (nHits) {
case 0:
time1 = time;
nHits++;
break;
case 1:
time2 = time;
nHits++;
break;
case 2:
time3 = time;
nHits++;
break;
case 3:
time4 = time;
nHits++;
break;
default:
if( nHits>=4) nHits++;
return kFALSE;
}
return kTRUE;
}
Bool_t HWallRaw::fill_trail(const Int_t time)
{
switch (nHits) {
case 0:
return kFALSE;
case 1:
if(width1>=0) return kFALSE;
width1 = time-time1;
break;
case 2:
if(width2>=0) return kFALSE;
width2 = time-time2;
break;
case 3:
if(width3>=0) return kFALSE;
width3 = time-time3;
break;
case 4:
if(width4>=0) return kFALSE;
width4 = time-time4;
break;
default:
return kFALSE;
}
return kTRUE;
}
Last change: Sat May 22 13:17:46 2010
Last generated: 2010-05-22 13:17
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.