Package glue :: Module pipeline :: Class LsyncCache
[hide private]
[frames] | no frames]

Class LsyncCache

source code

Instance Methods [hide private]
 
__init__(self, path) source code
 
get_lfns(self, site, frameType, gpsStart, gpsEnd) source code
 
group(self, lst, n)
Group an iterable into an n-tuples iterable.
source code
 
parse(self, type_regex=None)
Each line of the frame cache file is like the following:
source code
Method Details [hide private]

group(self, lst, n)

source code 

Group an iterable into an n-tuples iterable. Incomplete tuples are discarded

parse(self, type_regex=None)

source code 

Each line of the frame cache file is like the following:

/frames/E13/LHO/frames/hoftMon_H1/H-H1_DMT_C00_L2-9246,H,H1_DMT_C00_L2,1,16 1240664820 6231 {924600000 924646720 924646784 924647472 924647712 924700000}

The description is as follows:

1.1) Directory path of files 1.2) Site 1.3) Type 1.4) Number of frames in the files (assumed to be 1) 1.5) Duration of the frame files.

2) UNIX timestamp for directory modification time.

3) Number of files that that match the above pattern in the directory.

4) List of time range or segments [start, stop)

We store the cache for each site and frameType combination as a dictionary where the keys are (directory, duration) tuples and the values are segment lists.

Since the cache file is already coalesced we do not have to call the coalesce method on the segment lists.