class FrWriter DMT frame writer API.
FrWriter methods are used to create frames from TSeries objects and other data. THe FrWriter API is used as follows. A frame writer is created and then opened with the open() method. Any TSeries that are to be written to all output frames are introoduced to the frame writer with the addChannel() function. For each frame to be written user must build the frame with buildFrame(), add any additional TSeries data with addSeries() or other data using the FrameCPP API and the frame pointer from getFrame() and write it out with writeFrame(). After all frames have been written, the frame writer is closed with close() and/or deleted.A sample code segment is shown below.
TSeries ts(Now(), Interval(1./16384.), 16384, Sine(1000.0)); FrWriter fw("TestFrame", -1); fw.buildFrame(ts.getStartTime(), Interval(1.0)); fw.addRawSeries("Sine_1kHz", ts); fw.addHistory("FrWriterExample", Now(), "FrWriter usage example"); fw.addWriterHistory(); fw.open("TestFrame.gwf", true); fw.writeFrame(); fw.close();The above code creates a frame in file "TestFrame.F" with a frame ID of "TestFrame" and a run number of -1. A single time raw data channel named "Sine_1kHz" with a 1kHz sine wave is written to the frame. History records are written describing the program used (specified explicitly with addHistory()) and the FrWriter version (specified by addWriterHistory()). The negative run number specified in the constructor indicates that the frame contains Monte Carlo geenrated data.
FrWriter(const char* Name, int Run)
Current - run number.
~FrWriter(void)
void setDebug(int debug=0)
void addChannel(const char* Name, TSeries** TSptr=0)
TSptr - Address of TSeries pointer.
void rmChannel(const char* Name)
int open(const char* File, bool toc=false)
tco - If true, write a table of contents.
int open(FrameCPP::OFrameStream* writer)
void close(void)
void erase(void)
int writeFrame(void)
int buildFrame(const Time& Start=Time(0), const Interval& dT=0.0)
dT - Frame length.
void addFrequencySeries(const char* Name, const FSeries& fs)
FS - FSeries containing pre-processed data.
void addHistory(const std::string& Name, const Time& t, const std::string& cmt)
t - Time of post processing.
cmt - Additional comments.
void addProcData(const std::string& Name, const std::string& comment, int type, int subtype, const Time& Start, const Time& End, double fShift, double fPhase, double fRange, double bw, FrVectRef& vect)
comment - FrProcData comment.
type - FrProcData type code
subtype - FrProcData subtype code
Start - Start time.
End - End time.
fShift - Heterodyne frequency
fPhase - Heterodyne phase
fRange - Frequency range
bw - Bandwidth
FrVectRef - Vector reference.
void addProcSeries(const char* Name, const TSeries& TS)
TS - Time series containing pre-processed data.
void addRawSeries(const char* Name, const TSeries& TS)
TS - Time series containing Adc data.
void addSimEvent(const char* Name, const char* Comment, const char* Inputs, const Time& GPSMax, Interval before, Interval after, float Amp, const std::vector< std::pair<std::string, float> >& v)
Comment - Description of event
Inputs - Description of input data
GPSMax - GPS time of event maximum
before - Interval before maximum
after - Interval after maximum
Amp - Event amplitude
v - Other parameter values.
void addSimSeries(const char* Name, const TSeries& TS)
TS - Time series containing simulated data.
void addSeries(const char* Name, const TSeries& TS)
TS - Time series containing Adc data.
void addSpectrum(const char* Name, const FSpectrum& sp)
sp - FSpectrum containing pre-processed data.
void addStatic(FrStatDataRef& s)
void addStatic(const std::string& Name, unsigned long version, const Time& GpsStart, const Time& GpsEnd, void* det, const FSeries& fs)
version - Static data version.
GpsStart - Start of data validity.
GpsEnd - End of data validity.
det - Pointer to FrDetector for this FSeries.
fs - FSeries containing pre-processed data.
void addStatic(const std::string& Name, unsigned long version, const Time& GpsStart, const Time& GpsEnd, void* det, const TSeries& ts)
version - Static data version.
GpsStart - Start of data validity.
GpsEnd - End of data validity.
det - Pointer to FrDetector for this TSeries.
ts - TSeries containing pre-processed data.
void* addStdDetector(const std::string& iName)
void addWriterHistory(void)
int getDebug(void) const
const char* getFile(void) const
const FrameCPP::FrameH* getFrame(void) const
std::string getFrameID(void) const
Time getTime(void) const
bool is_open(void) const
std::ostream& list(std::ostream& out) const
void setCompress(FrVectRef::compression_mode cmode)
void setName(const std::string& name)
void setRunID(int run)
void copyDetectors(const FrameCPP::FrameH& f)
void copyHistory(const FrameCPP::FrameH& f)
void copyAuxData(const FrameCPP::FrameH& f)
void addRawAdc(const FrameCPP::FrameH& f, const char* Name)
Name - Name of adc to be copied.
void addRawAdc(const FrameCPP::FrAdcData& adc)
alphabetic index hierarchy of classes
Please send questions and comments to zweizig_j@ligo.caltech.edu
generated by doc++