Changeset 12291 for trunk


Ignore:
Timestamp:
10/27/11 01:21:59 (13 years ago)
Author:
tbretz
Message:
Use new features of trigger rate service.
File:
1 edited

Legend:

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

    r12268 r12291  
    7777    uint64_t fTriggersPatch[160];
    7878
    79     uint64_t fOnTimeStart;
     79    float fElapsedTime;
     80    float fOnTime;
    8081
    8182    float fResolution;
     
    137138        if (curr==&fRates)
    138139        {
    139             if (curr->getSize()!=sizeof(FTM::DimTriggerRates))
     140            if (!CheckEventSize(curr->getSize(), "infoHandler[DimTriggerRates]", sizeof(FTM::DimTriggerRates)))
    140141                return;
    141142
     
    155156                memset(fTriggersPatch, 0, 160*sizeof(uint64_t));
    156157
    157                 fOnTimeStart = sdata.fOnTimeCounter;
     158                fOnTime = 0;
     159                fElapsedTime = 0;
    158160                return;
    159161            }
     
    170172            if (fReference==kPatch)
    171173                reference = fTriggersPatch[fReferenceIdx];
     174
     175            fOnTime      += sdata.fOnTime;
     176            fElapsedTime += sdata.fElapsedTime;
     177
     178            reference *= fElapsedTime*10;
     179
     180            cout << fElapsedTime << " " << fOnTime << endl;
    172181
    173182            if ((reference==0 || sqrt(reference)>fResolution*reference) && fSeconds<fSecondsMax)
     
    190199            for (int i=0; i<160; i++)
    191200                sout2 << float(fTriggersPatch[i])/fSeconds << " ";
    192             sout3 << fSeconds << " ";
    193             sout3 << float(sdata.fOnTimeCounter-fOnTimeStart)/fSeconds/1000000;
    194 
    195             Info(sout1.str()+sout3.str());
     201            sout3 << fElapsedTime << " " << fOnTime;
     202
     203            Info(sout1.str());
    196204
    197205
Note: See TracChangeset for help on using the changeset viewer.