#include <framedir.hh>
Public Types | |
| typedef Time::ulong_t | gps_t |
| typedef std::map< gps_t, ffDataSeries > | dmap_t |
| typedef ffDataConstIter | file_iterator |
| typedef dmap_t::const_iterator | series_iterator |
Public Member Functions | |
| virtual | ~FrameDir (void) |
| FrameDir () | |
| FrameDir (const char *dir, bool delayed=false) | |
| file_iterator | find (const Time &t) const throw (NoData) |
| file_iterator | getStart (gps_t time) const |
| file_iterator | getLast (gps_t time) const |
| int | getDebug (void) const |
| file_iterator | begin (void) const |
| file_iterator | end (void) const |
| series_iterator | beginSeries (void) const |
| series_iterator | endSeries (void) const |
| int | sizeSeries () const |
| int | size () const |
| bool | empty () const |
| void | add (const char *dir, bool delayed=false) |
| void | addFile (const char *File, unsigned int Cont=0) throw (BadFile) |
| void | clear (void) |
| void | erase (gps_t time) |
| void | setDebug (int Level) |
| bool | read (const char *File) |
| bool | write (const char *File, bool Longlist=false, gps_t Start=0, gps_t Stop=0, bool SupHead=false) |
| bool | write (std::ostream &Os, bool Longlist=false, gps_t Start=0, gps_t Stop=0, bool SupHead=false) |
| std::ostream & | operator<< (std::ostream &Os) |
Static Public Member Functions | |
| static bool | parseName (const char *File, gps_t &time, gps_t &tlen, char *pre=0, char *post=0) |
ffData object indexed by the starting GPS time. The data in the ffData structure are set as follows: FrEndOfFile structure. | typedef Time::ulong_t FrameDir::gps_t |
GPS time data type.
| typedef std::map<gps_t, ffDataSeries> FrameDir::dmap_t |
Directory map data type.
Iterator provides sequential access to the data on the files in the directory. brief File data iterator.
| typedef dmap_t::const_iterator FrameDir::series_iterator |
Iterator provides sequential access to the series data. brief Series data iterator.
| virtual FrameDir::~FrameDir | ( | void | ) | [virtual] |
| FrameDir::FrameDir | ( | ) |
Construct an empty frame directory. brief Empty directory constructor.
| FrameDir::FrameDir | ( | const char * | dir, | |
| bool | delayed = false | |||
| ) | [explicit] |
Construct a Frame directory and fill it with data from files matching the specified specification. The frame file specification may contain wild-cards in the file name but not in the directory name. brief Construct and fill a directory.
| dir | Frame file specification. | |
| delayed | Check files when needed, otherwise do it after add. |
| file_iterator FrameDir::find | ( | const Time & | t | ) | const throw (NoData) |
Get the data for the file that covers time t. brief Get file data by time.
| file_iterator FrameDir::getStart | ( | gps_t | time | ) | const |
Get the iterator of the first period on or after the specified time. brief find the next data segment.
| time | Begin time for search. |
| file_iterator FrameDir::getLast | ( | gps_t | time | ) | const |
Get the iterator of the first period after the specified time. brief Find the end of the next data segment.
| time | Begin time for search. |
| int FrameDir::getDebug | ( | void | ) | const [inline] |
Get the specified debug level. brief Find the end of the n.
| file_iterator FrameDir::begin | ( | void | ) | const |
Get a file_iterator pointing the first (earliest) frame file entry in the directory. brief Get a iterator pointing to the sequential beginning.
| file_iterator FrameDir::end | ( | void | ) | const |
Get a file_iterator pointing the end of the frame file directory. brief Get a iterator pointing to the directory end.
| series_iterator FrameDir::beginSeries | ( | void | ) | const |
Get a series_iterator pointing the first series entry in the directory. brief Get a iterator pointing to the beginning of the series.
| series_iterator FrameDir::endSeries | ( | void | ) | const |
Get a series_iterator pointing the end of the series. brief Get a iterator pointing to the end.
| int FrameDir::sizeSeries | ( | ) | const |
Returns the number of entries in the series list. brief Number of series entries.
| int FrameDir::size | ( | ) | const |
Returns the number of files in the FrameDir list. brief Number of file entries.
| bool FrameDir::empty | ( | ) | const [inline] |
Returns true if there are no entries in the FrameDir list. brief Empty list?.
| void FrameDir::add | ( | const char * | dir, | |
| bool | delayed = false | |||
| ) |
Add all the specified frame files to the Frame Directory. The File specification can contain one or more wild cards in the File name but not in the directory name. brief Add one or more frame files.
| dir | File name(s) to be added to the FrameDir. | |
| delayed | Check files when needed, otherwise do it after add. |
| void FrameDir::addFile | ( | const char * | File, | |
| unsigned int | Cont = 0 | |||
| ) | throw (BadFile) |
Add a single file to the frame directory. The file name must not contain wild-cards and must conform to the LIGO frame file naming standard i.e. the name must have the following form: "<directory>/<ifo-name>-<start-gps>[-<nsec>][.<extension>]". To allow backward compatibility, the data length and extension may be omitted. The continuation number can be used to specify a series of frame files that cover a continueous duration, have the same length, path prefix and extension. This only works for file that provide the data length in their name. The continuation number specficies the number of additional files beyond the first one. brief Add a file to the FrameDir.
| File | Name of file to be added to the list. | |
| Cont | Additional files following in series. |
| void FrameDir::clear | ( | void | ) |
Delete all file descriptors from the FrameDir list. brief Delete all entries.
| void FrameDir::erase | ( | gps_t | time | ) |
Delete the frame series descriptor for the specified time. brief Delete a frame file entry.
| time | GPS time of start of |
| void FrameDir::setDebug | ( | int | Level | ) | [inline] |
Set the debug printout threshold to a specified level. brief Set debug level.
| Level | New debug printout level. |
| bool FrameDir::read | ( | const char * | File | ) |
Read a list of frame files from a text file. brief Read list file.
| File | Name of file to be read. |
| bool FrameDir::write | ( | const char * | File, | |
| bool | Longlist = false, |
|||
| gps_t | Start = 0, |
|||
| gps_t | Stop = 0, |
|||
| bool | SupHead = false | |||
| ) |
Write the list of frame files to a text file. brief Write list file.
| File | Name of file to be written. | |
| Longlist | If true, prints one file per line. | |
| Start | Start time (GPS). | |
| Stop | Stop time (GPS). | |
| SupHead | If true, suppresses file:// head. |
| bool FrameDir::write | ( | std::ostream & | Os, | |
| bool | Longlist = false, |
|||
| gps_t | Start = 0, |
|||
| gps_t | Stop = 0, |
|||
| bool | SupHead = false | |||
| ) |
Write the list of frame files to a text file. brief Write list file.
| Os | std::ostream to be written to. | |
| Longlist | If true, prints one file per line. | |
| Start | Start time (GPS). | |
| Stop | Stop time (GPS). | |
| SupHead | If true, suppresses file:// head. |
| std::ostream& FrameDir::operator<< | ( | std::ostream & | Os | ) |
Write the list of frame files to an output stream. brief Write list to stream.
| Os | Output stream |
| static bool FrameDir::parseName | ( | const char * | File, | |
| gps_t & | time, | |||
| gps_t & | tlen, | |||
| char * | pre = 0, |
|||
| char * | post = 0 | |||
| ) | [static] |
Parse a frame file name. brief Parse frame file name
| File | File name. | |
| time | GPS time of frame. | |
| tlen | Duration of frame. | |
| pre | File name prefix (includes last dash). | |
| post | File name postfix. |
1.5.4