#include #include #include #include #include #include #include namespace RAT { PMTWaveform::PMTWaveform() { } PMTWaveform::~PMTWaveform() { deepdelete_vector(fPulse); } float PMTWaveform::GetHeight(double time) { float height = 0.; unsigned int i = 0; while (iGetPulseStartTime()<=time){ height+=fPulse[i]->GetPulseHeight(time); i++; } return height; } int PMTWaveform::GetNext(double time) { unsigned int i = 0; while (iGetPulseStartTime()<=time){ i++; } if(i==fPulse.size())return 0; if(fPulse[i]->GetPulseStartTime()<=time){return 0;} else{return i;} } } // namespace RAT