Changeset 12555 for trunk/FACT++/src
- Timestamp:
- 11/18/11 15:07:48 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/ratescan.cc
r12504 r12555 82 82 double fOnTime; 83 83 84 uint64_t fStartTime; 85 84 86 float fResolution; 85 87 … … 208 210 const uint32_t th = fThresholdMin+fCounter*fThresholdStep; 209 211 210 float data[3+1+40+160]; 211 memcpy(data, &th, 4); 212 data[1] = time; // total elapsed time 213 data[2] = fOnTime/time; // relative on time 214 data[3] = fRate/fSeconds; 212 float data[2+3+1+40+160]; 213 memcpy(data, &fStartTime, 8); 214 memcpy(data+2, &th, 4); 215 data[3] = time; // total elapsed time 216 data[4] = fOnTime/time; // relative on time 217 data[5] = fRate/fSeconds; 215 218 for (int i=0; i<40; i++) 216 data[i+ 4] = fRateBoard[i]/fSeconds;219 data[i+6] = fRateBoard[i]/fSeconds; 217 220 for (int i=0; i<160; i++) 218 data[i+4 4] = fRatePatch[i]/fSeconds;221 data[i+46] = fRatePatch[i]/fSeconds; 219 222 220 223 ostringstream sout1, sout2, sout3; 221 224 222 sout1 << th << " " << data[ 3];225 sout1 << th << " " << data[5]; 223 226 for (int i=0; i<200; i++) 224 sout2 << " " << data[i+ 4];225 sout3 << " " << data[ 1] << " " << data[2];227 sout2 << " " << data[i+6]; 228 sout3 << " " << data[3] << " " << data[4]; 226 229 227 230 Info(sout1.str()); … … 297 300 298 301 const Time now; 299 302 fStartTime = trunc(now.UnixTime()); 300 303 301 304 ofstream fout("ratescan.txt", ios::app); 302 fout << "# ----- " << now << " -----\n";305 fout << "# ----- " << now << " (" << fStartTime << ") -----\n"; 303 306 fout << "# Command: " << fCommand << '\n'; 304 307 fout << "# Reference: "; … … 325 328 326 329 ostringstream msg; 327 msg << "Rate scan " << now << " from " << fThresholdMin << " to ";330 msg << "Rate scan " << now << "(" << fStartTime << ") from " << fThresholdMin << " to "; 328 331 msg << fThresholdMax << " in steps of " << fThresholdStep; 329 332 msg << " started."; … … 438 441 fFTM("FTM_CONTROL/STATE", (void*)NULL, 0, this), 439 442 fRates("FTM_CONTROL/TRIGGER_RATES", (void*)NULL, 0, this), 440 fDimData("RATE_SCAN/DATA", " I:1;F:1;F:1;F:1;F:40;F:160", ""),443 fDimData("RATE_SCAN/DATA", "X:1;I:1;F:1;F:1;F:1;F:40;F:160", ""), 441 444 fDimProc("RATE_SCAN/PROCESS_DATA", "I:1;I:1;I:1", 442 445 "Rate scan process data"
Note:
See TracChangeset
for help on using the changeset viewer.