Changeset 14422 for fact/tools/pyscripts/pyfact
- Timestamp:
- 09/23/12 19:36:18 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/pyscripts/pyfact/pyfact.py
r14406 r14422 461 461 import ctypes 462 462 463 class SlowData( FactFits):463 class SlowData( object ): 464 464 """ -Fact SlowData File- 465 465 … … 471 471 * variable table column access, thus possibly increased speed while looping 472 472 """ 473 def __del__(self): 474 del self.f 475 473 476 def __init__(self, path): 474 477 """ creates meta and columns dictionaries 475 478 """ 479 import os 480 481 if not os.path.exists(path): 482 raise IOError(path+' was not found') 476 483 self.path = path 477 484 self.__module__ = 'pyfact' 478 485 try: 479 FactFits.__init__(self,path)486 self.f = FactFits(path) 480 487 except IOError: 481 488 print 'problem accessing data file: ', data_file_name … … 507 514 value: tuple( numerical value, string comment) 508 515 """ 516 # abbreviation 517 f = self.f 518 509 519 # intermediate variables for file metadata dict generation 510 keys=self.GetPy_KeyKeys() 511 values=self.GetPy_KeyValues() 512 comments=self.GetPy_KeyComments() 513 types=self.GetPy_KeyTypes() 520 521 keys=f.GetPy_KeyKeys() 522 values=f.GetPy_KeyValues() 523 comments=f.GetPy_KeyComments() 524 types=f.GetPy_KeyTypes() 514 525 515 526 if len(keys) != len(values): … … 555 566 unit - string like 'mV' or 'ADC count' 556 567 """ 568 # abbreviation 569 f = self.f 570 557 571 # intermediate variables for file table-metadata dict generation 558 keys= self.GetPy_ColumnKeys()572 keys=f.GetPy_ColumnKeys() 559 573 #offsets=self.GetPy_ColumnOffsets() #not needed on python level... 560 nums= self.GetPy_ColumnNums()561 sizes= self.GetPy_ColumnSizes()562 types= self.GetPy_ColumnTypes()563 units= self.GetPy_ColumnUnits()574 nums=f.GetPy_ColumnNums() 575 sizes=f.GetPy_ColumnSizes() 576 types=f.GetPy_ColumnTypes() 577 units=f.GetPy_ColumnUnits() 564 578 565 579 # zip the values … … 675 689 676 690 # Set the Pointer Address 677 self.SetPtrAddress(colname, local)691 f.SetPtrAddress(colname, local) 678 692 self._table_cols[colname] = local 679 693 if number_of_elements > 1: … … 764 778 returns self 765 779 """ 780 # abbreviaition 781 f = self.f 782 766 783 # Here one might check, if looping makes any sense, and if not 767 784 # one could stop looping or so... … … 771 788 # print 'warning: looping without any registered columns' 772 789 if self._current_row < self.number_of_rows: 773 if self.GetNextRow() == False:790 if f.GetNextRow() == False: 774 791 raise StopIteration 775 792 for col in self._registered_cols:
Note:
See TracChangeset
for help on using the changeset viewer.