Classes | Enumerations | Functions
nutools::dbi Namespace Reference

Classes

class  Column
 
class  ColumnDef
 
class  DBIService
 Simple service to provide a RunHistory configured to the right run. More...
 
class  Row
 
class  Table
 
class  Util
 

Enumerations

enum  ColType {
  kAutoIncr =0x1, kBool =0x2, kIntLike =0x4, kFloatLike =0x8,
  kString =0x10, kTimeStamp =0x20, kDateStamp =0x40
}
 
enum  DataType { kNone =1, kMCOnly =2, kDataOnly =4, kNDataType }
 
enum  DBTableType {
  kGenericTable, kConditionsTable, kUnstructuredConditionsTable, kHardwareTable,
  kNTableType
}
 
enum  DataSource {
  kDAQ, kDCS, kOffline, kUnknownSource,
  kNDataSources
}
 

Functions

std::ostream & operator<< (std::ostream &stream, const Column &col)
 
std::ostream & operator<< (std::ostream &stream, const Row &row)
 
std::ostream & operator<< (std::ostream &stream, const Table &t)
 

Enumeration Type Documentation

Enumerator
kAutoIncr 
kBool 
kIntLike 
kFloatLike 
kString 
kTimeStamp 
kDateStamp 

Definition at line 15 of file Column.h.

Enumerator
kDAQ 
kDCS 
kOffline 
kUnknownSource 
kNDataSources 

Definition at line 33 of file Table.h.

Enumerator
kNone 
kMCOnly 
kDataOnly 
kNDataType 

Definition at line 6 of file DataType.h.

Enumerator
kGenericTable 
kConditionsTable 
kUnstructuredConditionsTable 
kHardwareTable 
kNTableType 

Definition at line 25 of file Table.h.

Function Documentation

std::ostream& nutools::dbi::operator<< ( std::ostream &  stream,
const Row row 
)
inline

Definition at line 82 of file Row.h.

References nutools::dbi::Row::fCol, MECModelEnuComparisons::i, and runNovaSAM::stream.

82  {
83  for (unsigned int i=0; i<row.fCol.size(); ++i) {
84  stream << row.fCol[i];
85  if (i < row.fCol.size()-1)
86  stream << ", ";
87  }
88  return stream;
89  }
std::ostream& nutools::dbi::operator<< ( std::ostream &  stream,
const Column col 
)
inline

Definition at line 152 of file Column.h.

References nutools::dbi::Column::fType, nutools::dbi::Column::fValue, kBool, kDateStamp, kString, kTimeStamp, and runNovaSAM::stream.

152  {
153  if (!col.fValue) {
154  stream << "NULL";
155  }
156  else {
157  if (col.fType == kBool) {
158  if (col.fValue[0] == '1')
159  stream << "true";
160  else
161  stream << "false";
162  }
163  else {
164  bool needsQuotes = (col.fType == kString ||
165  col.fType == kTimeStamp ||
166  col.fType == kDateStamp );
167  if (needsQuotes) stream << "\'";
168  stream << col.fValue;
169  if (needsQuotes) stream << "\'";
170  }
171  }
172  return stream;
173  }
Int_t col[ntarg]
Definition: Style.C:29
std::ostream& nutools::dbi::operator<< ( std::ostream &  stream,
const Table t 
)
inline

Definition at line 414 of file Table.h.

References allTimeWatchdog::endl, nutools::dbi::Table::fRow, calib::j, and runNovaSAM::stream.

414  {
415  for (unsigned int j=0; j<t.fRow.size(); ++j) {
416  stream << t.fRow[j] << std::endl;
417  }
418  return stream;
419  }
const double j
Definition: BetheBloch.cxx:29