void TAbstract_Integration_Manager::AllocateSmoothedSignal() /* -------------------------- * Author : Gilles Orazi * Created : 06/2002 * Purpose : * History : * -------------------------- */ { FreeSmoothedSignal(); //works even if not allocated FIntegrator.SignalSmooth = new INT_FLOAT[signal_size()]; }
void TIntegration_Manager_Cstruct::SetResults(INT_RESULTS* pResults) /* -------------------------- * Author : Gilles Orazi * Created : Oct. 2002 * Purpose : * History : * -------------------------- */ { for(int lineidx = 0; lineidx<pResults->NumberOfLines; ++lineidx) { TCandidateBaseLine& curline = FIntegrator.Lines().push_back(); INT_RESULT_LINE& structline = pResults->Lines[lineidx]; curline.StartTime = structline.StartTime; curline.EndTime = structline.EndTime; curline.StartValue = structline.StartValue; curline.EndValue = structline.EndValue; curline.type = TBaseLineType(structline.LineType); } int peakidx ; for(peakidx = 0 ; peakidx<pResults->NumberOfPeaks; ++peakidx) { TCandidatePeak& curpeak = FIntegrator.Peaks().push_back() ; INT_RESULT_PEAK& structPeak = pResults->Peaks[peakidx]; curpeak.StartTime = structPeak.StartTime ; curpeak.RetentionTime = structPeak.RetentionTime ; curpeak.EndTime = structPeak.EndTime ; curpeak.BaseLineHeight_AtRetTime = structPeak.BaseLineHeight_AtRetTime; curpeak.MotherIndex = structPeak.MotherIdx ; curpeak.StartIndex = (int)ceil(curpeak.StartTime / FParams->DeltaTime); curpeak.EndIndex = min( (int)(floor(curpeak.EndTime /FParams->DeltaTime)), (signal_size()-1)); //Note : StartIndex and EndIndex are recomputed. This may be // unstable because the results of the divisions should // very often be "equal" to an integer. // It could be better to keep the index. //GO (during translation) curpeak.code = string(structPeak.code) ; if (structPeak.BaselineIdx>-1) { curpeak.pFmyLine = &(FIntegrator.Lines()[structPeak.BaselineIdx]) ; } else { curpeak.pFmyLine = NULL ; } } for(peakidx = 0 ; peakidx < FIntegrator.Peaks().size(); ++peakidx) { TCandidatePeak& curpeak = FIntegrator.Peaks()[peakidx] ; if (curpeak.MotherIndex>-1) { TCandidatePeak& Mother = (FIntegrator.Peaks())[curpeak.MotherIndex] ; if (Mother.pFDaughters == NULL) Mother.pFDaughters = new TCandidatePeakList ; Mother.pFDaughters->push_back(&curpeak); } } }