Ignore:
Timestamp:
04/05/12 15:54:46 (13 years ago)
Author:
lusterma
Message:
limit iterations for _test_iter
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fact/tools/pyscripts/pyfact/pyfact.py

    r13320 r13321  
    321321# end of class definition: fnames( object )
    322322
    323 def _test_iter():
     323def _test_iter( nevents ):
    324324    """ test for function __iter__ """
    325325
     
    331331
    332332    for data, scell, tt in run:
    333         print 'data[0,0] = ', data[0,0], "start_cell[0] =", scell[0], "trigger type = ", tt
    334 
    335 
     333        print 'ev ', run.event_id.value, 'data[0,0] = ', data[0,0], 'start_cell[0] = ', scell[0], 'trigger type = ', tt
     334        if run.event_id.value == nevents:
     335            break
     336       
     337   
    336338if __name__ == '__main__':
    337339    """ tests  """
    338340
    339     _test_iter()
     341    _test_iter(10)
Note: See TracChangeset for help on using the changeset viewer.