ivutils
Loading...
Searching...
No Matches
FileRecorder Class Reference

This class records fields to the binary file. More...

#include <detector.h>

Inheritance diagram for FileRecorder:
Collaboration diagram for FileRecorder:

Public Member Functions

void SetBytesSize (size_t bs) override
 size of one record in bytes
 
void SetRecordingFileNode (int node) override
 set node which records file (in parallel regime file can be recorded only from one node)
 
void Flush () override
 if data is recorded to file, flush data from buffer to disc
 
int StartRecord (int it) override
 Start recording.
 
virtual int SetTextHeader (const std::string &head_) override
 Set slice (frame) text header .
 
- Public Member Functions inherited from FieldsRecorder
 FieldsRecorder (const std::string &fn, int bin_format_=DATAFILE_BIN_FORMAT::BIN_RAW)
 Sets file name and binary format for recording, one of DATAFILE_BIN_FORMAT.
 
void SetSize (size_t sz)
 number of points where field is recorded
 
virtual void record (int node)
 set node which process data for current point (used for Fourier-on-fly)
 
virtual void SetTypes (int argtype, int outtype, std::vector< std::string > *columns=nullptr)
 set using space coordinates, output fields and names for them
 
virtual void SetFrequencyRange (vec_type fmin, vec_type fmax, vec_type df, bool use_lambda_=false)
 set frequency range for recorders that perform Fourieron-fly transformation
 
virtual bool active ()
 returns false if this recorder is not working
 
virtual void SetExtra (const std::string &extra_)
 set extra string which will be written in the text file, used in text recorders only
 
- Public Member Functions inherited from apComponent
void InitComponent (const apComponent &other, const std::vector< int > &p_id=std::vector< int >())
 borrow settings from other component
 
virtual void DumpOther (const apComponent *comp, bool lim=false)
 dump some component using dumper
 
virtual void DumpOther (int flags, const apComponent *comp, bool lim=false)
 dump some component using dumper and checking bit flags
 
virtual void Dump (bool lim=false)
 dump itself using dumper
 
- Public Member Functions inherited from restorer
int save_data (FILE *f)
 save data to the file
 
int load_data (FILE *f)
 read data from the file
 
int save_data (const char *fname)
 save data to the file
 
int load_data (const char *fname)
 read data from the file
 

Additional Inherited Members

- Protected Types inherited from apComponent
typedef std::set< apComponent * > registry_t
 name used in dump and runlog files
 
- Protected Member Functions inherited from apComponent
virtual void AddDefaultTimers (const std::vector< int > &p_id)
 connect internal timers hierarchy from log to external timers p_id
 
void start (int id)
 start timers
 
void stop (int id, int force=0)
 stop timers
 
- Protected Attributes inherited from FieldsRecorder
std::string fname
 file name
 
int wf
 if first bit is turned on, then recorded fields values are assumed to be zero
 
size_t rec_size
 number of fields per point
 
size_t bytes_size
 sizeof(vec_type)*rec_size

 
size_t vnum
 number of points where fields are recorded
 
int bin_format
 binary format flag for large files
 
- Protected Attributes inherited from apComponent
int ut
 if information about this object will be dumped
 
std::string name
 if timers will be used
 

Detailed Description

This class records fields to the binary file.

After calculation this binary file can be used to plot fields history.

Member Function Documentation

◆ SetTextHeader()

virtual int FileRecorder::SetTextHeader ( const std::string &  head_)
inlineoverridevirtual

Set slice (frame) text header .

Supported by QPLT format. The information will be used while writing the next slice header.

Reimplemented from FieldsRecorder.

◆ StartRecord()

int FileRecorder::StartRecord ( int  it)
overridevirtual

Start recording.

Parameters
ititeration from which recording is started (not zero if record is continuing after restarting the numerical experiment, it<0 means refreshing old file).

Implements FieldsRecorder.


The documentation for this class was generated from the following file: