|
@@
-580,7
+580,7
class JRODataReader(JRODataIO):
|
|
580
|
idFile += 1
|
|
580
|
idFile += 1
|
|
581
|
if not(idFile < len(self.filenameList)):
|
|
581
|
if not(idFile < len(self.filenameList)):
|
|
582
|
self.flagNoMoreFiles = 1
|
|
582
|
self.flagNoMoreFiles = 1
|
|
583
|
print "No more Files"
|
|
583
|
# print "[Reading] No more Files"
|
|
584
|
return 0
|
|
584
|
return 0
|
|
585
|
|
|
585
|
|
|
586
|
filename = self.filenameList[idFile]
|
|
586
|
filename = self.filenameList[idFile]
|
|
@@
-598,7
+598,7
class JRODataReader(JRODataIO):
|
|
598
|
self.fileSize = fileSize
|
|
598
|
self.fileSize = fileSize
|
|
599
|
self.fp = fp
|
|
599
|
self.fp = fp
|
|
600
|
|
|
600
|
|
|
601
|
print "[Reading] Setting the file: %s"%self.filename
|
|
601
|
# print "[Reading] Setting the file: %s"%self.filename
|
|
602
|
|
|
602
|
|
|
603
|
return 1
|
|
603
|
return 1
|
|
604
|
|
|
604
|
|
|
@@
-650,10
+650,10
class JRODataReader(JRODataIO):
|
|
650
|
|
|
650
|
|
|
651
|
for nTries in range( tries ):
|
|
651
|
for nTries in range( tries ):
|
|
652
|
if firstTime_flag:
|
|
652
|
if firstTime_flag:
|
|
653
|
print "\tWaiting %0.2f sec for the file \"%s\" , try %03d ..." % ( self.delay, filename, nTries+1 )
|
|
653
|
print "\t[Reading] Waiting %0.2f sec for the file \"%s\" , try %03d ..." % ( self.delay, filename, nTries+1 )
|
|
654
|
sleep( self.delay )
|
|
654
|
sleep( self.delay )
|
|
655
|
else:
|
|
655
|
else:
|
|
656
|
print "\tSearching next \"%s%04d%03d%03d%s\" file ..." % (self.optchar, self.year, self.doy, self.set, self.ext)
|
|
656
|
print "\t[Reading] Searching the next \"%s%04d%03d%03d%s\" file ..." % (self.optchar, self.year, self.doy, self.set, self.ext)
|
|
657
|
|
|
657
|
|
|
658
|
fullfilename, filename = checkForRealPath( self.path, self.foldercounter, self.year, self.doy, self.set, self.ext )
|
|
658
|
fullfilename, filename = checkForRealPath( self.path, self.foldercounter, self.year, self.doy, self.set, self.ext )
|
|
659
|
if fullfilename:
|
|
659
|
if fullfilename:
|
|
@@
-666,7
+666,7
class JRODataReader(JRODataIO):
|
|
666
|
|
|
666
|
|
|
667
|
firstTime_flag = False
|
|
667
|
firstTime_flag = False
|
|
668
|
|
|
668
|
|
|
669
|
print "\tSkipping the file \"%s\" due to this file doesn't exist" % filename
|
|
669
|
print "\t[Reading] Skipping the file \"%s\" due to this file doesn't exist" % filename
|
|
670
|
self.set += 1
|
|
670
|
self.set += 1
|
|
671
|
|
|
671
|
|
|
672
|
if nFiles == (self.nFiles-1): #si no encuentro el file buscado cambio de carpeta y busco en la siguiente carpeta
|
|
672
|
if nFiles == (self.nFiles-1): #si no encuentro el file buscado cambio de carpeta y busco en la siguiente carpeta
|
|
@@
-681,14
+681,14
class JRODataReader(JRODataIO):
|
|
681
|
if self.fp != None: self.fp.close()
|
|
681
|
if self.fp != None: self.fp.close()
|
|
682
|
self.fp = open(fullfilename, 'rb')
|
|
682
|
self.fp = open(fullfilename, 'rb')
|
|
683
|
self.flagNoMoreFiles = 0
|
|
683
|
self.flagNoMoreFiles = 0
|
|
684
|
print '[Reading] Setting the file: %s' % fullfilename
|
|
684
|
# print '[Reading] Setting the file: %s' % fullfilename
|
|
685
|
else:
|
|
685
|
else:
|
|
686
|
self.fileSize = 0
|
|
686
|
self.fileSize = 0
|
|
687
|
self.filename = None
|
|
687
|
self.filename = None
|
|
688
|
self.flagIsNewFile = 0
|
|
688
|
self.flagIsNewFile = 0
|
|
689
|
self.fp = None
|
|
689
|
self.fp = None
|
|
690
|
self.flagNoMoreFiles = 1
|
|
690
|
self.flagNoMoreFiles = 1
|
|
691
|
print '[Reading] No more files to read'
|
|
691
|
# print '[Reading] No more files to read'
|
|
692
|
|
|
692
|
|
|
693
|
return fileOk_flag
|
|
693
|
return fileOk_flag
|
|
694
|
|
|
694
|
|
|
@@
-702,8
+702,11
class JRODataReader(JRODataIO):
|
|
702
|
newFile = self.__setNextFileOffline()
|
|
702
|
newFile = self.__setNextFileOffline()
|
|
703
|
|
|
703
|
|
|
704
|
if not(newFile):
|
|
704
|
if not(newFile):
|
|
|
|
|
705
|
print '[Reading] No more files to read'
|
|
705
|
return 0
|
|
706
|
return 0
|
|
706
|
|
|
707
|
|
|
|
|
|
708
|
print '[Reading] Setting the file: %s' % self.filename
|
|
|
|
|
709
|
|
|
707
|
self.__readFirstHeader()
|
|
710
|
self.__readFirstHeader()
|
|
708
|
self.nReadBlocks = 0
|
|
711
|
self.nReadBlocks = 0
|
|
709
|
return 1
|
|
712
|
return 1
|