00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #include "RdbStatsAve.h"
00028
00029 RdbStatsAve::RdbStatsAve( RDB& irdbtable, const string& name )
00030 throw( Exception ) try : RdbStats( irdbtable, name ) {
00031
00032 try {
00033
00034 #ifdef TRACEFCT
00035 TraceFct tf( "RdbStatsAve::RdbStatsAve( RDB&, const string& ) "
00036 "throw( Exception)" );
00037 #endif
00038
00039 } catch ( RDBErr& rdbe ) {
00040
00041 throw Exception( rdbe );
00042
00043 } catch ( Exception& e ) {
00044
00045 throw;
00046
00047 } catch ( exception& e ) {
00048
00049 throw Exception( e.what( ) );
00050
00051 }
00052
00053 } catch ( Exception& E ) {
00054
00055
00056 throw;
00057
00058 } catch ( exception& e ) {
00059
00060
00061 throw Exception( e.what( ) );
00062
00063 }
00064
00065
00066 int RdbStatsAve::calculate_statistics( ) throw( ) {
00067
00068 #ifdef TRACEFCT
00069 TraceFct tf( "int RdbStatsAve::calculate_statistics( ) throw( )" );
00070 #endif
00071
00072 if ( 0 == this->RdbStats::calculate_statistics( ) )
00073 return 0;
00074
00075
00076 double norm_factor = get_absolute_average( );
00077 normalize_results( norm_factor );
00078
00079 return num_n;
00080
00081 }