Changeset 17299 for trunk


Ignore:
Timestamp:
10/21/13 17:34:52 (11 years ago)
Author:
tbretz
Message:
Added some comments to the code.
File:
1 edited

Legend:

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

    r17276 r17299  
    184184    if (fits)
    185185    {
    186         // Maximum number of tiles setup by user
     186        const uint32_t nrpt = zofits::DefaultNumRowsPerTile();
     187
     188        // Maximum number of events if taken with 100Hz
     189        // (If no limit requested, maxtime is 24*60*60)
     190        const uint32_t ntime = d.maxtime*100/nrpt;
     191
     192        // Maximum number of events if taken as number
     193        // (If no limit requested, maxevts is INT32_MAX)
     194        const uint32_t nevts = d.maxevt/nrpt+1;
     195
     196        // get the minimum of all three
    187197        uint32_t num = zofits::DefaultMaxNumTiles();
    188 
    189         // Maximum number if data is taken with 100Hz
    190         if (d.maxtime*100<num)
    191             num = d.maxtime*100/zofits::DefaultNumRowsPerTile()+1;
    192 
    193         // Maximum number if number is known
    194         if (d.maxevt<num)
    195             num = d.maxevt/zofits::DefaultNumRowsPerTile()+1;
     198        if (ntime<num)
     199            num = ntime;
     200        if (nevts<num)
     201            num = nevts;
    196202
    197203        fits->SetNumTiles(num);
Note: See TracChangeset for help on using the changeset viewer.