00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef GL3ALGORITHM
00017 #define GL3ALGORITHM
00018
00019 #include "Stl3Util/gl3/gl3Event.h"
00020 #include "Stl3Util/gl3/gl3Histo.h"
00021
00022
00023 #include "Stl3Util/foreign/L3/L3Algorithms.h"
00024
00025 #include <stdio.h>
00026 #include <math.h>
00027
00028
00029 class gl3Algorithm {
00030 public:
00031
00032 gl3Algorithm();
00033 virtual ~gl3Algorithm();
00034
00035 virtual int init();
00036 virtual int end();
00037
00038 int process (gl3Event* event_in);
00039 void incrementCounters();
00040
00041 virtual int setParameters(int, int, int, int, int,
00042 float, float, float, float, float);
00043 void setScaling(int preScale, int postScale);
00044
00045 void fillSummary(struct algorithm_data *dest);
00046
00047 virtual const int getAlgorithmID() = 0;
00048 virtual const char *getAlgorithmName() = 0;
00049
00050 protected:
00051 virtual int decide () = 0;
00052 int priority;
00053
00054
00055
00056
00057 gl3Event * event;
00058
00059
00060 int GI1, GI2, GI3, GI4, GI5;
00061 float GF1, GF2, GF3, GF4, GF5;
00062
00063
00064
00065 float SummaryData[10];
00066
00067
00068 public:
00069 void showConfiguration();
00070
00071
00072
00073 private:
00074
00075 void resetCounters();
00076
00077 typedef int counter_type;
00078
00079 counter_type preScale_cnt;
00080 counter_type call_cnt;
00081 counter_type accept_cnt;
00082 counter_type build_cnt;
00083
00084 int preScale;
00085 int postScale;
00086
00087 char on, accept, build;
00088 };
00089
00090 gl3Algorithm *gl3InstantiateAlgorithm(int algID);
00091
00092
00093 #endif