00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include "StRpsRomanPot.h"
00018 #include "StRpsCollection.h"
00019 #include "StRpsCluster.h"
00020
00021 static const char rcsid[] = "$Id: StRpsRomanPot.cxx,v 2.1 2009/11/23 22:18:25 ullrich Exp $";
00022
00023 ClassImp(StRpsRomanPot)
00024
00025 StRpsRomanPot::StRpsRomanPot()
00026 {
00027 mStatus = 0;
00028 mAdc[0] = mAdc[1] = mTac[0] = mTac[1] = 0;
00029
00030
00031 }
00032
00033 StRpsRomanPot::~StRpsRomanPot() { }
00034
00035 unsigned int
00036 StRpsRomanPot::romanPotId() const
00037 {
00038 return mRomanPotId;
00039 }
00040
00041 unsigned int
00042 StRpsRomanPot::numberOfPlanes() const
00043 {
00044 return mNumberOfPlanes;
00045 }
00046
00047 unsigned int
00048 StRpsRomanPot::numberOfPlanesWithClusters() const
00049 {
00050 unsigned int count = 0;
00051 for (int i=0; i<mNumberOfPlanes; i++)
00052 count += mPlanes[i].numberOfClusters();
00053 return count;
00054 }
00055
00056 unsigned int
00057 StRpsRomanPot::adc(unsigned int i) const
00058 {
00059 return (i < 2 ? mAdc[i] : 0);
00060 }
00061
00062 unsigned int
00063 StRpsRomanPot::tac(unsigned int i) const
00064 {
00065 return (i < 2 ? mTac[i] : 0);
00066 }
00067
00068 unsigned char
00069 StRpsRomanPot::status() const
00070 {
00071 return mStatus;
00072 }
00073
00074 const StRpsPlane*
00075 StRpsRomanPot::plane(unsigned int i) const
00076 {
00077 if (i < mNumberOfPlanes)
00078 return &mPlanes[i];
00079 else
00080 return 0;
00081 }
00082
00083 StRpsPlane* StRpsRomanPot::plane(unsigned int i)
00084 {
00085 if (i < mNumberOfPlanes)
00086 return &mPlanes[i];
00087 else
00088 return 0;
00089 }
00090
00091 void
00092 StRpsRomanPot::setStatus(unsigned char val)
00093 {
00094 mStatus = val;
00095 }
00096
00097 void StRpsRomanPot::setRomanPotId(unsigned char i)
00098 {
00099 mRomanPotId = i;
00100 }
00101
00102 void StRpsRomanPot::setAdc(unsigned int adc0, unsigned int adc1)
00103 {
00104 mAdc[0] = adc0;
00105 mAdc[1] = adc1;
00106 }
00107
00108 void StRpsRomanPot::setTac(unsigned int tac0, unsigned int tac1)
00109 {
00110 mTac[0] = tac0;
00111 mTac[1] = tac1;
00112 }
00113