#include "VGenericSignal.h"
#include "Frv.h"
#ifdef USE_VEGA
// Case of using the library in conjonction with vega
ClassImp(VGenericSignal)
#endif
//////////////////////////////// PUBLIC -STATISTICS ////////////////////////////______________________________________________________________________________doubleVGenericSignal::Mean()
{
double mean=0;
if(!mVect){printf("ERROR in Mean - vector is null n\n");return -1;}
if(FrvMean(mVect,&mean)!=0){
printf(" n ERROR in Mean --> Problem in Frv mean operation: %sn\n",mVect->name);
return(0);
}
return mean;
}
//______________________________________________________________________________doubleVGenericSignal::Rms()
{
double mean=0;
double rms=0;
if(!mVect){printf("ERROR in Rms - vector is null n\n");return -1;}
if(FrvRms(mVect,&mean, &rms)!=0){
printf(" n ERROR in Rms --> Problem in Frv Rms operation: %sn\n",mVect->name);
return(0);
}
return rms;
}
//______________________________________________________________________________doubleVGenericSignal::Max()
{
unsigned int i;
double maximum_value=0;
if(!mVect){printf("ERROR in Max - vector is null n\n");return -1;}
maximum_value = mVect->dataD[0];
for(i=0;i<mVect->nData;i++) if(mVect->dataD[i]>maximum_value)maximum_value = mVect->dataD[i];
return maximum_value;
}
//______________________________________________________________________________doubleVGenericSignal::Min()
{
unsigned int i;
double minimum_value=0;
if(!mVect){printf("ERROR in Min - vector is null n\n");return -1;}
minimum_value = mVect->dataD[0];
for(i=0;i<mVect->nData;i++) if(mVect->dataD[i]<minimum_value)minimum_value = mVect->dataD[i];
return minimum_value;
}
//______________________________________________________________________________doubleVGenericSignal::PkPk()
{
double pk_pk_value=0;
if(!mVect){printf("ERROR in PkPk - vector is null n\n");return -1;}
pk_pk_value = Max()-Min();
return pk_pk_value;
}
//______________________________________________________________________________doubleVGenericSignal::Delta()
{
double delta=0;
if(!mVect){printf("ERROR in Min - vector is null n\n");return -1;}
if(FrvDelta(mVect,&delta,&(mVect->dataD[0]))!=0){
printf(" n ERROR in Delta --> Problem in Frv Delta operation: %sn\n",mVect->name);
return(0);
}
return delta;
}
- ROOT page - VEGA page - Class index - Top of the page This page has been automatically generated. If you have any comments or suggestions
about the page layout send a mail to
, or
contact
with any questions or problems regarding ROOT or VEGA.