// $Id$ // // File: DEPICS_factory.cc // Created: Sat Sep 23 EDT 2006 // Creator: davidl (on Darwin swire-b241.jlab.org 8.7.0 powerpc) // #include #include "DEPICS_factory.h" //------------------ // toString //------------------ const string DEPICS_factory::toString(void) { // Ensure our Get method has been called so _data is up to date Get(); if(_data.size()<=0)return string(); // don't print anything if we have no data! // Produce nicely formatted ASCII for janadump. printheader(" name: value: time:"); for(unsigned int i=0; i<_data.size(); i++){ DEPICS *epics = _data[i]; char str[256]; sprintf(str, "%s", ctime((time_t*)&epics->time)); str[strlen(str)-1] = 0; printnewrow(); printcol("%s", epics->name.c_str()); printcol("%s", epics->value.c_str()); printcol("%s", str); printrow(); } return _table; }