class gdsStorage : public gdsDataObject Class to store a diagnostics data.
| | filetype file type for save and restore
|
| | gdsDataObjectPtr (auto) pointer to a data object object |
| | gdsObjectList list of pointers to data objects |
| | prm_iterator iterator for paramters |
| | const_prm_iterator const iterator for paramters |
| | data_iterator iterator for data objects |
| | const_data_iterator const iterator for data objects |
| | ioflags set for describing the save/restore flags |
| | ioEverything set of all save/restore flags |
| | ioExtended set of all save/restore flags, except io_images |
| | ioStandard standard set of save/restore flags: io_parameters, io_results, io_settings |
| | ioParamOnly set of save/restore flags only including io_parameters |
| | mux Mutex to protect storage object in MT environment */ |
| | creator Name of the great maker |
| | date date of object creation |
| | objects list of pointers to data objects |
| | operator >> (std::istream&, gdsStorage&) Input operator. |
| | operator << (std::ostream&, gdsStorage&) Output operator. |
| | gdsStorage () Default constructor. |
| | ~gdsStorage () Destructor. |
| | gdsStorage (const string& Creator, const string& Date, const string& Comment = "") Constructor. |
| | gdsStorage (string filename, ioflags restoreflags = ioExtended, filetype FileType = LigoLW_XML) Constructor. |
| | operator ! () const Not operator. |
| | fsave (string filename, ioflags saveflags = ioStandard, filetype FileType = LigoLW_XML) File save function. |
| | frestore (string filename, ioflags restoreflags = ioExtended, filetype FileType = LigoLW_XML) File restore function. |
| | errmsg () const File error function. |
| | isTempFile (const string& filename) Temporary file query function. |
| | registerTempFile (const string& filename) Temporary file register function. |
| | unregisterTempFile (const string& filename) Temporary file unregister function. |
| | addParameter (const string& objname, gdsParameter& prm, bool copy = true) Add a parameter. |
| | addParameter (gdsParameter& prm, bool copy = true) Add a parameter. |
| | addData (gdsDataObject& dat, bool copy = true) Add a data object. |
| | eraseParameter (const string& objname, const string& prmname) Remove a parameter. |
| | eraseParameter (const string& prmname) Remove a parameter. |
| | eraseData (const string& objname) Remove a data object. |
| | findParameter (const string& objname, const string& prmname) const Find a parameter. |
| | findParameter (const string& prmname) const Find a parameter. |
| | findData (const string& objname) const Find a data object. |
| | newChannel (const string& objname, tainsec_t start, double dt, bool cmplx = false, bool memmap = false) Sets up a channel data object. |
| | allocateChannelMem (const string& objname, int length) Allocates memory for channel data. |
| | notifyChannelMem (const string& objname, bool error = false) Notification of memory initialization. |
| | lockData (const string& objname, bool write = false) Lock data object. |
| | trylockData (const string& objname, bool write = false) Trylock data object. |
| | unlockData (gdsDataObject* dat) Unlock data object. |
| | tempnames : public std vector<string> storage of temprary file names |
| | attrtype attribute list of an XML tag |
| | tempfilemux mutex to access temporary file storage |
| | tempfiles temporary file storage |
| | XML_fini XML termination flag |
| | XML_init XML initialization flag; |
| | XML_Skip skip level: if >0 XML elements are skipped |
| | XML_Key XML key |
| | XML_Key2 XML 2nd key |
| | XML_Param pointer to current parameter object for XML read |
| | XML_Obj pointer to current data object for XML read |
| | XML_fast determines if fast decoding of is present |
| | XML_Error XML error string |
| | fwriteXML (std::ostream& os) write XML header |
| | fwriteBinary (std::ostream& os) write binary data |
| | ffixRef (int XML_Length) fix self references |
| | startElement (const string& elName, const attrtype& atts) XML start element handler |
| | endElement (const string& elName) XML end element handler |
| | textHandler (std::stringstream& text) XML text element handler |
This class is used to store diagnostics data. A storage object contains a list of data objects which have both data and parameters associated with them. Additionally, a parameter can be stored in global context. Every data object is characterized by its name which must be unique. Every parameter is characterized by its name and an associated data object (if it isn't in global context). The paramter name has to be unique within its context.MT safe: All public methods of the storage object are multi-thread safe and can be called from independently running tasks. Direct access to its public data member should be avoided and should always guared by the mutex of the storage object.
friend std::ostream& operator << (std::ostream&, gdsStorage&)
gdsStorage - class
typedef data_storage_ptr gdsDataObjectPtr
typedef std::vector <gdsDataObjectPtr> gdsObjectList
typedef gdsDataObject::gdsParameterList::iterator prm_iterator
typedef gdsDataObject::gdsParameterList::const_iterator const_prm_iterator
typedef gdsObjectList::iterator data_iterator
typedef gdsObjectList::const_iterator const_data_iterator
enum filetype
typedef std::set <objflag, std::less<objflag> > ioflags
static const ioflags ioEverything
static const ioflags ioExtended
static const ioflags ioStandard
static const ioflags ioParamOnly
mutable recursivemutex mux
string creator
string date
gdsObjectList objects
gdsStorage()
virtual ~gdsStorage()
gdsStorage(const string& Creator, const string& Date, const string& Comment = "")
Date - data/time string
Comment - comment string for describing storage object
explicit gdsStorage(string filename, ioflags restoreflags = ioExtended, filetype FileType = LigoLW_XML)
restoreflags - specifies what to restore
filetype - specifies the filetype
bool operator ! () const
virtual bool fsave(string filename, ioflags saveflags = ioStandard, filetype FileType = LigoLW_XML)
saveflags - specifies what to save
filetype - specifies the filetype
virtual bool frestore(string filename, ioflags restoreflags = ioExtended, filetype FileType = LigoLW_XML)
restoreflags - specifies what to restore
filetype - specifies the filetype
string errmsg() const
static bool isTempFile(const string& filename)
static void registerTempFile(const string& filename)
static void unregisterTempFile(const string& filename)
virtual bool addParameter(const string& objname, gdsParameter& prm, bool copy = true)
prm - parameter object
copy - copy object if true, otherwise transfer ownership
virtual bool addParameter(gdsParameter& prm, bool copy = true)
copy - copy object if true, otherwise transfer ownership
virtual bool addData(gdsDataObject& dat, bool copy = true)
copy - copy object if true, otherwise transfer ownership
virtual bool eraseParameter(const string& objname, const string& prmname)
prmname - name of parameter
virtual bool eraseParameter(const string& prmname)
virtual bool eraseData(const string& objname)
virtual gdsParameter* findParameter(const string& objname, const string& prmname) const
objname - name of data object
virtual gdsParameter* findParameter(const string& prmname) const
virtual gdsDataObject* findData(const string& objname) const
virtual gdsDataObject* newChannel(const string& objname, tainsec_t start, double dt, bool cmplx = false, bool memmap = false)
start - time of first data point (GPS nsec)
dt - spacing of data points (sec)
cmplx - true if time series is down-converted
virtual float* allocateChannelMem(const string& objname, int length)
len - number of data points
virtual void notifyChannelMem(const string& objname, bool error = false)
error - can be used to set the error flag
gdsDataObject* lockData(const string& objname, bool write = false)
write - if true locks for exclusive use
gdsDataObject* trylockData(const string& objname, bool write = false)
write - if true locks for exclusive use
void unlockData(gdsDataObject* dat)
class tempnames: public std vector<string>
typedef std::map <string, stringcase> attrtype
static mutex tempfilemux
static tempnames tempfiles
bool XML_fini
bool XML_init
int XML_Skip
string XML_Key
string XML_Key2
gdsParameter* XML_Param
gdsDataObject* XML_Obj
bool XML_fast
string XML_Error
void fwriteXML(std::ostream& os)
bool fwriteBinary(std::ostream& os)
int ffixRef(int XML_Length)
virtual void startElement(const string& elName, const attrtype& atts)
virtual void endElement(const string& elName)
virtual void textHandler(std::stringstream& text)
alphabetic index hierarchy of classes
Please send questions and comments to sigg_d@ligo-wa.caltech.edu
generated by doc++