46 tup = getTuple(dataset, 0);
56 tup = getTuple(dataset, 1);
58 if ( 0 ==
strcmp(buf,
"-") )
69 tup = getTuple(dataset, 2);
70 size_t ncols = getNfields(tup);
73 for (
size_t col=0; col<
ncols; ++col) {
82 tup = getTuple(dataset, 3);
84 for (
size_t col=0; col <
ncols; ++col) {
93 fData.reserve(nrows * ncols);
100 for(
size_t col = 0; col <
ncols; ++col) {
106 long value = strtol(buf, 0, 10);
116 double value = strtod(buf, 0);
121 mf::LogError(
"DBDataset") <<
"First column has wrong type real." <<
"\n";
122 throw cet::exception(
"DBDataset") <<
"First column has wrong type real.";
126 fData.emplace_back(std::make_unique<std::string>(buf));
130 mf::LogError(
"DBDataset") <<
"First column has wrong type text." <<
"\n";
131 throw cet::exception(
"DBDataset") <<
"First column has wrong type text.";
137 if(s ==
"true" || s ==
"True" || s ==
"TRUE" || s ==
"1")
139 else if(s ==
"false" || s ==
"False" || s ==
"FALSE" || s ==
"0")
142 mf::LogError(
"DBDataset") <<
"Unknown string representation of boolean " << s <<
"\n";
143 throw cet::exception(
"DBDataset") <<
"Unknown string representation of boolean " << s
150 mf::LogError(
"DBDataset") <<
"First column has wrong type boolean." <<
"\n";
151 throw cet::exception(
"DBDataset") <<
"First column has wrong type boolean.";
157 <<
": " << buf <<
"\n";
166 releaseDataset(dataset);
const unsigned int kNUMBER_HEADER_ROWS
std::variant< long, double, std::unique_ptr< std::string > > value_type
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
std::vector< std::string > fColNames
std::vector< std::string > fColTypes
std::vector< value_type > fData
void err(const char *fmt,...)
const unsigned int kBUFFER_SIZE
std::vector< DBChannelID_t > fChannels
int strcmp(const String &s1, const String &s2)
static IOVTimeStamp GetFromString(const std::string &ts)
static IOVTimeStamp MaxTimeStamp()
cet::coded_exception< error, detail::translate > exception