In file trend/ReadTrend.hh:

class ReadTrend

ReadTrend class reads in one or more trends and returns requested statistical fields as TSeries

Inheritance:


Public Classes

enum TrendType
Enumerate trend types
enum typeID
Enumerated data fields

Public Fields

typedef std::vector <std::string> string_vect
Vector of channel names or trend type names
typedef std::vector <TSeries> tseries_vect
Vector of time series
typedef std::vector <typeID> type_vect
Vector of data field IDs

Public Methods

ReadTrend (void)
Default constructor.
ReadTrend (const char* dir, const char* prefix=0, const char* postfix=0, TrendType Type=kMinute)
Data constructor.
int getMaxSeries (const char* chan, const Time& t0, Interval dT, TSeries* Max)
Get the maximum values from the specified trend.
int getSeries (const char* chan, const Time& t0, Interval dT, TSeries* Avg, TSeries* Err=0)
Get ean and error time series.
int getSeries (const string_vect& chan, const string_vect& field, const Time& t0, Interval dT, tseries_vect& Data)
get Statistics time series.
int getSeries (const string_vect& chan, const type_vect& field, const Time& t0, Interval dT, tseries_vect& Data)
get Statistics time series.
void setDirectory (const FrameDir& fd)
Set file name search pattern
void setDirectory (const std::string& dir, const std::string& prefix, const std::string& postfix)
Set file name search pattern
void setMonitor (const char* mon)
Set file name search pattern
void setType (TrendType Typ)
Set the trend type.
void setDebug (void)
Set the debug flag to print a lot of debugging information
void expunge (void)
expunge frame directory.

Documentation

ReadTrend class reads in one or more trends and returns requested statistical fields as TSeries. The trend files to be read in are found from a framedir directory built from all files matching the format <directory>/<prefix>*<postfix>. The directory, prefix and postfix may be specified explicitly, or a monitor name may be specified in which case, the file name fields are derived from the monitor name and local defaults. The following statistical values can be extracted from the trend frames:
Name Contents
count Number of points in average
error Error on the mean
max Maximum value
mean Mean value.
min Minimum value
sigma Standard deviation
enum TrendType
Enumerate trend types

enum typeID
Enumerated data fields

typedef std::vector <std::string> string_vect
Vector of channel names or trend type names

typedef std::vector <TSeries> tseries_vect
Vector of time series

typedef std::vector <typeID> type_vect
Vector of data field IDs

ReadTrend(void)
Construct a null trend reader.

ReadTrend(const char* dir, const char* prefix=0, const char* postfix=0, TrendType Type=kMinute)
Construct a trend reader object, specifying the file prefix and postfix.
Parameters:
dir - A name or RE specifying the directory(ies) containing the minute trends.
prefix - Trend file name prefix.
Type - Trend type

int getMaxSeries(const char* chan, const Time& t0, Interval dT, TSeries* Max)
Get a Time series containing the maximum values for each trend increments for the specified channel.

int getSeries(const char* chan, const Time& t0, Interval dT, TSeries* Avg, TSeries* Err=0)
Get the mean value and optionally the error on the mean for a specified channel and time interval.
Parameters:
chan - Channel name
t0 - Start time.
dT - Time interval.
Avg - Average value time series.
Err - Error time series.

int getSeries(const string_vect& chan, const string_vect& field, const Time& t0, Interval dT, tseries_vect& Data)
Get a time series of one or more statistical quantities.
Parameters:
chan - Vector of channel names.
field - Vector of field names.
t0 - Start time.
dT - Time interval.
Data - Vector of time series to receive data.

int getSeries(const string_vect& chan, const type_vect& field, const Time& t0, Interval dT, tseries_vect& Data)
Get time series of one or more statistical quantities extracted from channels in a trend frame. The number of Channel/Quantity pairs is arbitrary. The error codes are as reported by Dacc::fillData().
Returns:
Error code
Parameters:
chan - Vector of channel names.
field - Vector of field IDs.
t0 - Start time.
dT - Time interval.
Data - Vector of time series to receive data.

void setDirectory(const FrameDir& fd)
Set file name search pattern
Parameters:
dir - Directory name pattern.
prefix - prefix string.
postfix - postfix string.

void setDirectory(const std::string& dir, const std::string& prefix, const std::string& postfix)
Specify file name search pattern. The file search look for all files of the form <dir>/<prefix>*<postfix>
Parameters:
dir - Directory name pattern.
prefix - prefix string.
postfix - postfix string.

void setMonitor(const char* mon)
Specify file name search pattern for appropriate data. setMonitor sets the file names as follows:
<directory> $DMTRENDOUT
<prefix> <site>-<monitor>_[TM]-
<postfix> -<duration>.gwf
Parameters:
mon - Monitor name.

void setType(TrendType Typ)
Set the trend type.
Parameters:
Typ - Trend type code.

void setDebug(void)
Set the debug flag to print a lot of debugging information

void expunge(void)
Remove all file name entries from the frame directory.


This class has no child classes.
Author:
J. Zweizig
Version:
1.2; Last modified: September 10, 2003

alphabetic index hierarchy of classes


Please send questions and comments to zweizig_j@ligo.caltech.edu


generated by doc++