6 #include "Stl3Util/gl3/gl3Algorithm.h"
8 #include "Stl3Util/base/FtfLog.h"
13 gl3Algorithm::gl3Algorithm ( )
15 GI1 = 0; GI2 = 0; GI3 = 0; GI4 = 0; GI5 = 0;
16 GF1 = 0; GF2 = 0; GF3 = 0; GF4 = 0; GF5 = 0;
29 gl3Algorithm::~gl3Algorithm ( )
37 int gl3Algorithm::process (
gl3Event* event_in)
41 on = 0; accept = 0; build = 0;
46 if ( (preScale > 0) && (preScale_cnt != preScale) ) {
53 int decision = this->decide();
63 if ( accept_cnt%postScale != 0 ) {
71 return decision ? priority : 0;
78 void gl3Algorithm::incrementCounters ()
81 if (accept) accept_cnt++;
82 if (build) build_cnt++;
89 int gl3Algorithm::init()
92 on = 0; accept = 0; build = 0;
94 for (
int i=0; i<10; i++) {
104 int gl3Algorithm::end ( )
112 int gl3Algorithm::setParameters(
int GI1_in,
int GI2_in,
int GI3_in,
113 int GI4_in,
int GI5_in,
114 float GF1_in,
float GF2_in,
float GF3_in,
115 float GF4_in,
float GF5_in)
136 void gl3Algorithm::setScaling(
int preScale_in,
int postScale_in)
138 preScale = (preScale_in > 0) ? preScale_in : 1;
139 postScale = (postScale_in > 0) ? postScale_in : 1;
147 dest->algId = getAlgorithmID();
149 dest->accept = accept;
151 dest->nProcessed = call_cnt;
152 dest->nAccept = accept_cnt;
153 dest->nBuild = build_cnt;;
155 for (
int i=0; i<10; i++) {
156 dest->data[i] = SummaryData[i];
161 void gl3Algorithm::resetCounters()
169 void gl3Algorithm::showConfiguration()
171 ftfLog(
"%s: Pre-PostScale: %d %d\n",
172 getAlgorithmName(), (
int)preScale, (
int)postScale);
174 ftfLog(
"%s: Int Parameters: %d %d %d %d %d\n",
175 getAlgorithmName(), GI1, GI2, GI3, GI4, GI5);
177 ftfLog(
"%s: Float Parameters: %f %f %f %f %f\n",
178 getAlgorithmName(), GF1, GF2, GF3, GF4, GF5);