Functions | |
def | readFile |
def readFile::readFile | ( | filename, | ||
maxRecords = 10 | ||||
) |
Definition at line 10 of file readFile.py.
00010 : 00011 # Load dictionary 00012 import ROOT 00013 ROOT.gSystem.Load("libCintex") 00014 ROOT.Cintex.Enable() 00015 ROOT.gSystem.Load("libRawDataDict") 00016 00017 # Make reader an open raw data file 00018 rr = ROOT.DayaBay.RawDataReader() 00019 ok = rr.open( filename ); 00020 if not ok: 00021 print "Failed to open: ", filename; 00022 return 00023 00024 # Loop over file records 00025 currentRecord = 0; 00026 while True: 00027 record = rr.nextRecord() 00028 if not record: break 00029 record.dump( ROOT.cout ) 00030 currentRecord += 1 00031 if currentRecord > maxRecords: break 00032 return 00033 if __name__ == "__main__":