Adds columns specific to the service being logged.
66 if ((desc.size() == 0) && (dataFormat.size() == 0))
75 (desc.size() == dataFormat.size()+1) ||
76 (desc.size() == dataFormat.size()+2)
86 out->
Warn(
"Table description '" +
fTableDesc +
"' exceeds 68 chars... truncated.");
90 for (
unsigned int i=0;
i<dataFormat.size();
i++)
92 string name = desc[
i+1].name;
93 if (name.length() > 68)
95 out->
Warn(
"Column name '" + name +
"' exceeds 68 chars... truncated.");
96 name = name.substr(0, 68);
99 string comment = desc[
i+1].comment;
100 if (comment.length() + name.length() > 71)
102 out->
Warn(
"Column '" + name +
" / " + comment +
"' exceeds 68 chars... truncated.");
103 comment = comment.substr(0,68);
106 string unit = desc[
i+1].unit;
107 if (unit.length() > 68)
109 out->
Warn(
"Unit '" + name +
"' exceeds 68 chars... truncated.");
110 unit = comment.substr(0,68);
114 if ((boost::iequals(unit,
"text") || boost::iequals(unit,
"string")) && p!=string::npos)
116 out->
Info(
"Column '" + name +
"' detected to be an ascii string (FITS format 'A').");
127 str <<
"Expected " << dataFormat.size() <<
" descriptions of columns, got " << (int)(desc.size())-1 <<
" for service: ";
133 out->
Warn(str.str());
138 for (
unsigned int i=0;
i<dataFormat.size();
i++)
vector< string > fDataFormats
the data format of the data columns
A struct which stores a name, a unit and a comment.
int Warn(const std::string &str)
int Info(const std::string &str)
vector< Description > fDataColDesc
the vector of data column names