Changeset 12555 for trunk/FACT++


Ignore:
Timestamp:
11/18/11 15:07:48 (13 years ago)
Author:
tbretz
Message:
Added the UNIX start-time to the report.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/ratescan.cc

    r12504 r12555  
    8282    double fOnTime;
    8383
     84    uint64_t fStartTime;
     85
    8486    float fResolution;
    8587
     
    208210            const uint32_t th   = fThresholdMin+fCounter*fThresholdStep;
    209211
    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;
    215218            for (int i=0; i<40; i++)
    216                 data[i+4] = fRateBoard[i]/fSeconds;
     219                data[i+6] = fRateBoard[i]/fSeconds;
    217220            for (int i=0; i<160; i++)
    218                 data[i+44] = fRatePatch[i]/fSeconds;
     221                data[i+46] = fRatePatch[i]/fSeconds;
    219222
    220223            ostringstream sout1, sout2, sout3;
    221224
    222             sout1 << th << " " << data[3];
     225            sout1 << th << " " << data[5];
    223226            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];
    226229
    227230            Info(sout1.str());
     
    297300
    298301        const Time now;
    299 
     302        fStartTime = trunc(now.UnixTime());
    300303
    301304        ofstream fout("ratescan.txt", ios::app);
    302         fout << "# ----- " << now << " -----\n";
     305        fout << "# ----- " << now << " (" << fStartTime << ") -----\n";
    303306        fout << "# Command: " << fCommand << '\n';
    304307        fout << "# Reference: ";
     
    325328
    326329        ostringstream msg;
    327         msg << "Rate scan " << now << " from " << fThresholdMin << " to ";
     330        msg << "Rate scan " << now << "(" << fStartTime << ") from " << fThresholdMin << " to ";
    328331        msg << fThresholdMax << " in steps of " << fThresholdStep;
    329332        msg << " started.";
     
    438441        fFTM("FTM_CONTROL/STATE",       (void*)NULL, 0, this),
    439442        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", ""),
    441444        fDimProc("RATE_SCAN/PROCESS_DATA", "I:1;I:1;I:1",
    442445                 "Rate scan process data"
Note: See TracChangeset for help on using the changeset viewer.