/*************************************************************************** * * Blatant copy of StFpdCollection written by Akio * *************************************************************************** * * Description: * *************************************************************************** * **************************************************************************/ #include "StHiMicroFpdCollection.h" ClassImp(StHiMicroFpdCollection) StHiMicroFpdCollection::StHiMicroFpdCollection() { int i; for(i=0; i0 && n<=mMaxPMTpEEMC) return mAdc[n+47]; return 9999; } unsigned short StHiMicroFpdCollection::south(unsigned int n) const { if(n>0 && n<=mMaxPMTPbg) return mAdc[n+31]; return 9999; } unsigned short StHiMicroFpdCollection::top(unsigned int n) const { if(n>0 && n<=mMaxPMTPbg) return mAdc[n-1]; return 9999; } unsigned short StHiMicroFpdCollection::bottom(unsigned int n) const { if(n>0 && n<=mMaxPMTPbg) return mAdc[n+15]; return 9999; } unsigned short StHiMicroFpdCollection::smdx(unsigned int n) const { if(n>0 && n<=mMaxPMTSmdX) return mAdc[n+59]; return 9999; } unsigned short StHiMicroFpdCollection::smdy(unsigned int n) const { if(n>0 && n<=mMaxPMTSmdY) return mAdc[n+119]; return 9999; } unsigned short StHiMicroFpdCollection::pres1(unsigned int n) const { if(n>0 && n<=mMaxPMTpEEMC) return mAdc[n+219]; return 9999; } unsigned short StHiMicroFpdCollection::pres2(unsigned int n) const { if(n>0 && n<=mMaxPMTpEEMC) return mAdc[n+235]; return 9999; } unsigned short StHiMicroFpdCollection::southVeto() const { return mAdc[253]; } unsigned int StHiMicroFpdCollection::sumAdcNorth() const { unsigned int sum=0; for(int i=1; i<=mMaxPMTpEEMC; i++){sum+=(unsigned int)north(i);} return sum; } unsigned int StHiMicroFpdCollection::sumAdcSouth() const { unsigned int sum=0; for(int i=1; i<=mMaxPMTPbg; i++){sum+=(unsigned int)south(i);} return sum; } unsigned int StHiMicroFpdCollection::sumAdcTop() const { unsigned int sum=0; for(int i=1; i<=mMaxPMTPbg; i++){sum+=(unsigned int)top(i);} return sum; } unsigned int StHiMicroFpdCollection::sumAdcBottom() const { unsigned int sum=0; for(int i=1; i<=mMaxPMTPbg; i++){sum+=(unsigned int)bottom(i);} return sum; } unsigned int StHiMicroFpdCollection::sumAdcPreShower1() const { unsigned int sum=0; for(int i=1; i<=mMaxPMTpEEMC; i++){sum+=(unsigned int)pres1(i);} return sum; } unsigned int StHiMicroFpdCollection::sumAdcPreShower2() const { unsigned int sum=0; for(int i=1; i<=mMaxPMTpEEMC; i++){sum+=(unsigned int)pres2(i);} return sum; } unsigned int StHiMicroFpdCollection::sumAdcSmdX() const { unsigned int sum=0; for(int i=1; i<=mMaxPMTSmdX; i++){sum+=(unsigned int)smdx(i);} return sum; } unsigned int StHiMicroFpdCollection::sumAdcSmdY() const { unsigned int sum=0; for(int i=1; i<=mMaxPMTSmdY; i++){sum+=(unsigned int)smdy(i);} return sum; } void StHiMicroFpdCollection::setToken(unsigned int val) { mToken=val; } void StHiMicroFpdCollection::dump() { unsigned int i; cout << "FPD data dump token " << mToken << endl; cout << "North ADC "; for(i=1; i<13; i++){cout << north(i) << " ";}; cout << endl; cout << "South ADC "; for(i=1; i<17; i++){cout << south(i) << " ";}; cout << endl; cout << "Top ADC "; for(i=1; i<17; i++){cout << top(i) << " ";}; cout << endl; cout << "Bottom ADC "; for(i=1; i<17; i++){cout << bottom(i) << " ";}; cout << endl; cout << "PreShower1 "; for(i=1; i<13; i++){cout << pres1(i) << " ";}; cout << endl; cout << "PreShower2 "; for(i=1; i<13; i++){cout << pres2(i) << " ";}; cout << endl; cout << "SMD X "; for(i=1; i<61; i++){cout << smdx(i) << " ";}; cout << endl; cout << "SMD Y "; for(i=1; i<101; i++){cout << smdy(i) << " ";}; cout << endl; cout << "South Veto " << southVeto() << endl; cout << "Scalers "; for(i=0; i<128; i++){printf(" %x ",mScl[i]);}; cout << endl; }