Classes | Enumerations | Functions | Variables
nova::dbi Namespace Reference

Classes

struct  APDInfo
 
class  BadChan_t
 
class  ChanInfo_t
 
class  Column
 
class  ColumnDef
 
struct  copyTraits
 
struct  copyTraits< dBCheck_t >
 
struct  copyTraits< dBColumn_t >
 
struct  copyTraits< dBRow_t >
 
struct  copyTraits< dBTable >
 
class  DataEpoch
 
class  dBCheck_t
 
class  dBColumn_t
 
class  dBRow_t
 
class  dBTable
 
struct  DQSubrunInfo
 
struct  FEBInfo
 
struct  HardwareLocation
 
class  Row
 
class  RunHistory
 
class  RunHistoryService
 Simple service to provide a RunHistory configured to the right run. More...
 
struct  Subrun
 
class  Table
 
class  Util
 

Enumerations

enum  ColType {
  kAutoIncr =0x1, kBool =0x2, kIntLike =0x4, kFloatLike =0x8,
  kString =0x10, kTimeStamp =0x20, kDateStamp =0x40
}
 
enum  DataType { kMCOnly =1, kDataOnly =2, kNDataType }
 
enum  DBTableType {
  kGenericTable, kValidityTable, kHardwareTable, kDAQTable,
  kDCSTable, kNTableType
}
 

Functions

std::ostream & operator<< (std::ostream &stream, const Column &col)
 
::std::unique_ptr< ::nova::dbi::dBTabledBTable_ (const ::std::string &uri,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
 
::std::unique_ptr< ::nova::dbi::dBTabledBTable_ (const ::std::string &uri,::xml_schema::error_handler &eh,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
 
::std::unique_ptr< ::nova::dbi::dBTabledBTable_ (const ::std::string &uri,::xercesc::DOMErrorHandler &eh,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
 
::std::unique_ptr< ::nova::dbi::dBTabledBTable_ (::std::istream &is,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
 
::std::unique_ptr< ::nova::dbi::dBTabledBTable_ (::std::istream &is,::xml_schema::error_handler &eh,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
 
::std::unique_ptr< ::nova::dbi::dBTabledBTable_ (::std::istream &is,::xercesc::DOMErrorHandler &eh,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
 
::std::unique_ptr< ::nova::dbi::dBTabledBTable_ (::std::istream &is, const ::std::string &id,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
 
::std::unique_ptr< ::nova::dbi::dBTabledBTable_ (::std::istream &is, const ::std::string &id,::xml_schema::error_handler &eh,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
 
::std::unique_ptr< ::nova::dbi::dBTabledBTable_ (::std::istream &is, const ::std::string &id,::xercesc::DOMErrorHandler &eh,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
 
::std::unique_ptr< ::nova::dbi::dBTabledBTable_ (::xercesc::InputSource &is,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
 
::std::unique_ptr< ::nova::dbi::dBTabledBTable_ (::xercesc::InputSource &is,::xml_schema::error_handler &eh,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
 
::std::unique_ptr< ::nova::dbi::dBTabledBTable_ (::xercesc::InputSource &is,::xercesc::DOMErrorHandler &eh,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
 
::std::unique_ptr< ::nova::dbi::dBTabledBTable_ (const ::xercesc::DOMDocument &d,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
 
::std::unique_ptr< ::nova::dbi::dBTabledBTable_ (::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
 
void dBTable_ (::std::ostream &os, const ::nova::dbi::dBTable &x, const ::xml_schema::namespace_infomap &m=::xml_schema::namespace_infomap(), const ::std::string &e="UTF-8",::xml_schema::flags f=0)
 
void dBTable_ (::std::ostream &os, const ::nova::dbi::dBTable &x,::xml_schema::error_handler &eh, const ::xml_schema::namespace_infomap &m=::xml_schema::namespace_infomap(), const ::std::string &e="UTF-8",::xml_schema::flags f=0)
 
void dBTable_ (::std::ostream &os, const ::nova::dbi::dBTable &x,::xercesc::DOMErrorHandler &eh, const ::xml_schema::namespace_infomap &m=::xml_schema::namespace_infomap(), const ::std::string &e="UTF-8",::xml_schema::flags f=0)
 
void dBTable_ (::xercesc::XMLFormatTarget &ft, const ::nova::dbi::dBTable &x, const ::xml_schema::namespace_infomap &m=::xml_schema::namespace_infomap(), const ::std::string &e="UTF-8",::xml_schema::flags f=0)
 
void dBTable_ (::xercesc::XMLFormatTarget &ft, const ::nova::dbi::dBTable &x,::xml_schema::error_handler &eh, const ::xml_schema::namespace_infomap &m=::xml_schema::namespace_infomap(), const ::std::string &e="UTF-8",::xml_schema::flags f=0)
 
void dBTable_ (::xercesc::XMLFormatTarget &ft, const ::nova::dbi::dBTable &x,::xercesc::DOMErrorHandler &eh, const ::xml_schema::namespace_infomap &m=::xml_schema::namespace_infomap(), const ::std::string &e="UTF-8",::xml_schema::flags f=0)
 
void dBTable_ (::xercesc::DOMDocument &d, const ::nova::dbi::dBTable &x,::xml_schema::flags f=0)
 
::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > dBTable_ (const ::nova::dbi::dBTable &x, const ::xml_schema::namespace_infomap &m=::xml_schema::namespace_infomap(),::xml_schema::flags f=0)
 
void operator<< (::xercesc::DOMElement &, const dBColumn_t &)
 
void operator<< (::xercesc::DOMElement &, const dBCheck_t &)
 
void operator<< (::xercesc::DOMElement &, const dBRow_t &)
 
void operator<< (::xercesc::DOMElement &, const dBTable &)
 
std::ostream & operator<< (std::ostream &stream, const Row &row)
 
std::ostream & operator<< (std::ostream &stream, const Table &t)
 
PGresultPerformPGQuery (std::string const &query, std::unique_ptr< Table > const &hwTable)
 
bool SortDiBlocks (RunHistory::DiBlock db1, RunHistory::DiBlock db2)
 

Variables

std::map< HardwareLocation, std::pair< FEBInfo, APDInfo > > gLocToFA
 

Enumeration Type Documentation

Enumerator
kAutoIncr 
kBool 
kIntLike 
kFloatLike 
kString 
kTimeStamp 
kDateStamp 

Definition at line 16 of file Column.h.

Enumerator
kMCOnly 
kDataOnly 
kNDataType 

Definition at line 6 of file DataType.h.

Enumerator
kGenericTable 
kValidityTable 
kHardwareTable 
kDAQTable 
kDCSTable 
kNTableType 

Definition at line 33 of file Table.h.

Function Documentation

std::unique_ptr<::nova::dbi::dBTable > nova::dbi::dBTable_ ( const ::std::string &  uri,
::xml_schema::flags  f = 0,
const ::xml_schema::properties p = ::xml_schema::properties () 
)

Definition at line 2371 of file Database.cpp.

References d, make_syst_table_plots::h, and MECModelEnuComparisons::i.

Referenced by nova::dbi::Table::CreateFromXML(), dBTable_(), nova::database::dBTable_(), and nova::dbi::dBTable::serialize().

2374  {
2375  ::xsd::cxx::xml::auto_initializer i (
2376  (f & ::xml_schema::flags::dont_initialize) == 0,
2377  (f & ::xml_schema::flags::keep_dom) == 0);
2378 
2379  ::xsd::cxx::tree::error_handler< char > h;
2380 
2381  ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
2382  ::xsd::cxx::xml::dom::parse< char > (
2383  u, h, p, f));
2384 
2385  h.throw_if_failed< ::xsd::cxx::tree::parsing< char > > ();
2386 
2387  return ::std::unique_ptr< ::nova::dbi::dBTable > (
2389  std::move (d), f | ::xml_schema::flags::own_dom, p));
2390  }
const char * p
Definition: xmltok.h:285
::std::unique_ptr< ::nova::dbi::dBTable > dBTable_(const ::std::string &uri,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
Definition: Database.cpp:2371
Float_t d
Definition: plot.C:236
std::unique_ptr<::nova::dbi::dBTable > nova::dbi::dBTable_ ( const ::std::string &  uri,
::xml_schema::error_handler eh,
::xml_schema::flags  f = 0,
const ::xml_schema::properties p = ::xml_schema::properties () 
)

Definition at line 2393 of file Database.cpp.

References d, dBTable_(), and MECModelEnuComparisons::i.

2397  {
2398  ::xsd::cxx::xml::auto_initializer i (
2399  (f & ::xml_schema::flags::dont_initialize) == 0,
2400  (f & ::xml_schema::flags::keep_dom) == 0);
2401 
2402  ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
2403  ::xsd::cxx::xml::dom::parse< char > (
2404  u, h, p, f));
2405 
2406  if (!d.get ())
2407  throw ::xsd::cxx::tree::parsing< char > ();
2408 
2409  return ::std::unique_ptr< ::nova::dbi::dBTable > (
2411  std::move (d), f | ::xml_schema::flags::own_dom, p));
2412  }
const char * p
Definition: xmltok.h:285
::std::unique_ptr< ::nova::dbi::dBTable > dBTable_(const ::std::string &uri,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
Definition: Database.cpp:2371
Float_t d
Definition: plot.C:236
std::unique_ptr<::nova::dbi::dBTable > nova::dbi::dBTable_ ( const ::std::string &  uri,
::xercesc::DOMErrorHandler &  eh,
::xml_schema::flags  f = 0,
const ::xml_schema::properties p = ::xml_schema::properties () 
)

Definition at line 2415 of file Database.cpp.

References d, and dBTable_().

2419  {
2420  ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
2421  ::xsd::cxx::xml::dom::parse< char > (
2422  u, h, p, f));
2423 
2424  if (!d.get ())
2425  throw ::xsd::cxx::tree::parsing< char > ();
2426 
2427  return ::std::unique_ptr< ::nova::dbi::dBTable > (
2429  std::move (d), f | ::xml_schema::flags::own_dom, p));
2430  }
const char * p
Definition: xmltok.h:285
::std::unique_ptr< ::nova::dbi::dBTable > dBTable_(const ::std::string &uri,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
Definition: Database.cpp:2371
Float_t d
Definition: plot.C:236
std::unique_ptr<::nova::dbi::dBTable > nova::dbi::dBTable_ ( ::std::istream &  is,
::xml_schema::flags  f = 0,
const ::xml_schema::properties p = ::xml_schema::properties () 
)

Definition at line 2433 of file Database.cpp.

References dBTable_(), MECModelEnuComparisons::i, and APDInfo::isrc.

2436  {
2437  ::xsd::cxx::xml::auto_initializer i (
2438  (f & ::xml_schema::flags::dont_initialize) == 0,
2439  (f & ::xml_schema::flags::keep_dom) == 0);
2440 
2441  ::xsd::cxx::xml::sax::std_input_source isrc (is);
2443  }
const char * p
Definition: xmltok.h:285
::std::unique_ptr< ::nova::dbi::dBTable > dBTable_(const ::std::string &uri,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
Definition: Database.cpp:2371
std::unique_ptr<::nova::dbi::dBTable > nova::dbi::dBTable_ ( ::std::istream &  is,
::xml_schema::error_handler eh,
::xml_schema::flags  f = 0,
const ::xml_schema::properties p = ::xml_schema::properties () 
)

Definition at line 2446 of file Database.cpp.

References dBTable_(), MECModelEnuComparisons::i, and APDInfo::isrc.

2450  {
2451  ::xsd::cxx::xml::auto_initializer i (
2452  (f & ::xml_schema::flags::dont_initialize) == 0,
2453  (f & ::xml_schema::flags::keep_dom) == 0);
2454 
2455  ::xsd::cxx::xml::sax::std_input_source isrc (is);
2457  }
const char * p
Definition: xmltok.h:285
::std::unique_ptr< ::nova::dbi::dBTable > dBTable_(const ::std::string &uri,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
Definition: Database.cpp:2371
std::unique_ptr<::nova::dbi::dBTable > nova::dbi::dBTable_ ( ::std::istream &  is,
::xercesc::DOMErrorHandler &  eh,
::xml_schema::flags  f = 0,
const ::xml_schema::properties p = ::xml_schema::properties () 
)

Definition at line 2460 of file Database.cpp.

References dBTable_(), and APDInfo::isrc.

2464  {
2465  ::xsd::cxx::xml::sax::std_input_source isrc (is);
2467  }
const char * p
Definition: xmltok.h:285
::std::unique_ptr< ::nova::dbi::dBTable > dBTable_(const ::std::string &uri,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
Definition: Database.cpp:2371
std::unique_ptr<::nova::dbi::dBTable > nova::dbi::dBTable_ ( ::std::istream &  is,
const ::std::string &  id,
::xml_schema::flags  f = 0,
const ::xml_schema::properties p = ::xml_schema::properties () 
)

Definition at line 2470 of file Database.cpp.

References dBTable_(), MECModelEnuComparisons::i, and APDInfo::isrc.

2474  {
2475  ::xsd::cxx::xml::auto_initializer i (
2476  (f & ::xml_schema::flags::dont_initialize) == 0,
2477  (f & ::xml_schema::flags::keep_dom) == 0);
2478 
2479  ::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
2481  }
const char * p
Definition: xmltok.h:285
::std::unique_ptr< ::nova::dbi::dBTable > dBTable_(const ::std::string &uri,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
Definition: Database.cpp:2371
std::unique_ptr<::nova::dbi::dBTable > nova::dbi::dBTable_ ( ::std::istream &  is,
const ::std::string &  id,
::xml_schema::error_handler eh,
::xml_schema::flags  f = 0,
const ::xml_schema::properties p = ::xml_schema::properties () 
)

Definition at line 2484 of file Database.cpp.

References dBTable_(), MECModelEnuComparisons::i, and APDInfo::isrc.

2489  {
2490  ::xsd::cxx::xml::auto_initializer i (
2491  (f & ::xml_schema::flags::dont_initialize) == 0,
2492  (f & ::xml_schema::flags::keep_dom) == 0);
2493 
2494  ::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
2496  }
const char * p
Definition: xmltok.h:285
::std::unique_ptr< ::nova::dbi::dBTable > dBTable_(const ::std::string &uri,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
Definition: Database.cpp:2371
std::unique_ptr<::nova::dbi::dBTable > nova::dbi::dBTable_ ( ::std::istream &  is,
const ::std::string &  id,
::xercesc::DOMErrorHandler &  eh,
::xml_schema::flags  f = 0,
const ::xml_schema::properties p = ::xml_schema::properties () 
)

Definition at line 2499 of file Database.cpp.

References dBTable_(), and APDInfo::isrc.

2504  {
2505  ::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
2507  }
const char * p
Definition: xmltok.h:285
::std::unique_ptr< ::nova::dbi::dBTable > dBTable_(const ::std::string &uri,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
Definition: Database.cpp:2371
std::unique_ptr<::nova::dbi::dBTable > nova::dbi::dBTable_ ( ::xercesc::InputSource &  is,
::xml_schema::flags  f = 0,
const ::xml_schema::properties p = ::xml_schema::properties () 
)

Definition at line 2510 of file Database.cpp.

References d, dBTable_(), and make_syst_table_plots::h.

2513  {
2514  ::xsd::cxx::tree::error_handler< char > h;
2515 
2516  ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
2517  ::xsd::cxx::xml::dom::parse< char > (
2518  i, h, p, f));
2519 
2520  h.throw_if_failed< ::xsd::cxx::tree::parsing< char > > ();
2521 
2522  return ::std::unique_ptr< ::nova::dbi::dBTable > (
2524  std::move (d), f | ::xml_schema::flags::own_dom, p));
2525  }
const char * p
Definition: xmltok.h:285
::std::unique_ptr< ::nova::dbi::dBTable > dBTable_(const ::std::string &uri,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
Definition: Database.cpp:2371
Float_t d
Definition: plot.C:236
std::unique_ptr<::nova::dbi::dBTable > nova::dbi::dBTable_ ( ::xercesc::InputSource &  is,
::xml_schema::error_handler eh,
::xml_schema::flags  f = 0,
const ::xml_schema::properties p = ::xml_schema::properties () 
)

Definition at line 2528 of file Database.cpp.

References d, and dBTable_().

2532  {
2533  ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
2534  ::xsd::cxx::xml::dom::parse< char > (
2535  i, h, p, f));
2536 
2537  if (!d.get ())
2538  throw ::xsd::cxx::tree::parsing< char > ();
2539 
2540  return ::std::unique_ptr< ::nova::dbi::dBTable > (
2542  std::move (d), f | ::xml_schema::flags::own_dom, p));
2543  }
const char * p
Definition: xmltok.h:285
::std::unique_ptr< ::nova::dbi::dBTable > dBTable_(const ::std::string &uri,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
Definition: Database.cpp:2371
Float_t d
Definition: plot.C:236
std::unique_ptr<::nova::dbi::dBTable > nova::dbi::dBTable_ ( ::xercesc::InputSource &  is,
::xercesc::DOMErrorHandler &  eh,
::xml_schema::flags  f = 0,
const ::xml_schema::properties p = ::xml_schema::properties () 
)

Definition at line 2546 of file Database.cpp.

References d, and dBTable_().

2550  {
2551  ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
2552  ::xsd::cxx::xml::dom::parse< char > (
2553  i, h, p, f));
2554 
2555  if (!d.get ())
2556  throw ::xsd::cxx::tree::parsing< char > ();
2557 
2558  return ::std::unique_ptr< ::nova::dbi::dBTable > (
2560  std::move (d), f | ::xml_schema::flags::own_dom, p));
2561  }
const char * p
Definition: xmltok.h:285
::std::unique_ptr< ::nova::dbi::dBTable > dBTable_(const ::std::string &uri,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
Definition: Database.cpp:2371
Float_t d
Definition: plot.C:236
std::unique_ptr<::nova::dbi::dBTable > nova::dbi::dBTable_ ( const ::xercesc::DOMDocument &  d,
::xml_schema::flags  f = 0,
const ::xml_schema::properties p = ::xml_schema::properties () 
)

Definition at line 2564 of file Database.cpp.

References d, dBTable_(), e, getGoodRuns4SAM::n, and r().

2567  {
2568  if (f & ::xml_schema::flags::keep_dom)
2569  {
2570  ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
2571  static_cast< ::xercesc::DOMDocument* > (doc.cloneNode (true)));
2572 
2573  return ::std::unique_ptr< ::nova::dbi::dBTable > (
2575  std::move (d), f | ::xml_schema::flags::own_dom, p));
2576  }
2577 
2578  const ::xercesc::DOMElement& e (*doc.getDocumentElement ());
2579  const ::xsd::cxx::xml::qualified_name< char > n (
2580  ::xsd::cxx::xml::dom::name< char > (e));
2581 
2582  if (n.name () == "dBTable" &&
2583  n.namespace_ () == "")
2584  {
2585  ::std::unique_ptr< ::nova::dbi::dBTable > r (
2586  ::xsd::cxx::tree::traits< ::nova::dbi::dBTable, char >::create (
2587  e, f, 0));
2588  return r;
2589  }
2590 
2591  throw ::xsd::cxx::tree::unexpected_element < char > (
2592  n.name (),
2593  n.namespace_ (),
2594  "dBTable",
2595  "");
2596  }
const char * p
Definition: xmltok.h:285
::std::unique_ptr< ::nova::dbi::dBTable > dBTable_(const ::std::string &uri,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
Definition: Database.cpp:2371
Float_t d
Definition: plot.C:236
TRandom3 r(0)
Float_t e
Definition: plot.C:35
std::unique_ptr<::nova::dbi::dBTable > nova::dbi::dBTable_ ( ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument >  d,
::xml_schema::flags  f = 0,
const ::xml_schema::properties p = ::xml_schema::properties () 
)

Definition at line 2599 of file Database.cpp.

References make_syst_table_plots::c, d, e, getGoodRuns4SAM::n, r(), and xml_schema::dom::tree_node_key.

2602  {
2603  ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > c (
2604  ((f & ::xml_schema::flags::keep_dom) &&
2605  !(f & ::xml_schema::flags::own_dom))
2606  ? static_cast< ::xercesc::DOMDocument* > (d->cloneNode (true))
2607  : 0);
2608 
2609  ::xercesc::DOMDocument& doc (c.get () ? *c : *d);
2610  const ::xercesc::DOMElement& e (*doc.getDocumentElement ());
2611 
2612  const ::xsd::cxx::xml::qualified_name< char > n (
2613  ::xsd::cxx::xml::dom::name< char > (e));
2614 
2615  if (f & ::xml_schema::flags::keep_dom)
2616  doc.setUserData (::xml_schema::dom::tree_node_key,
2617  (c.get () ? &c : &d),
2618  0);
2619 
2620  if (n.name () == "dBTable" &&
2621  n.namespace_ () == "")
2622  {
2623  ::std::unique_ptr< ::nova::dbi::dBTable > r (
2624  ::xsd::cxx::tree::traits< ::nova::dbi::dBTable, char >::create (
2625  e, f, 0));
2626  return r;
2627  }
2628 
2629  throw ::xsd::cxx::tree::unexpected_element < char > (
2630  n.name (),
2631  n.namespace_ (),
2632  "dBTable",
2633  "");
2634  }
Float_t d
Definition: plot.C:236
const XMLCh *const tree_node_key
Definition: Database.h:253
TRandom3 r(0)
Float_t e
Definition: plot.C:35
void nova::dbi::dBTable_ ( ::std::ostream &  os,
const ::nova::dbi::dBTable x,
const ::xml_schema::namespace_infomap m = ::xml_schema::namespace_infomap (),
const ::std::string &  e = "UTF-8",
::xml_schema::flags  f = 0 
)

Definition at line 2647 of file Database.cpp.

References d, dBTable_(), make_syst_table_plots::h, MECModelEnuComparisons::i, and confusionMatrixTree::t.

2652  {
2653  ::xsd::cxx::xml::auto_initializer i (
2654  (f & ::xml_schema::flags::dont_initialize) == 0);
2655 
2656  ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
2657  ::nova::dbi::dBTable_ (s, m, f));
2658 
2659  ::xsd::cxx::tree::error_handler< char > h;
2660 
2661  ::xsd::cxx::xml::dom::ostream_format_target t (o);
2662  if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
2663  {
2664  h.throw_if_failed< ::xsd::cxx::tree::serialization< char > > ();
2665  }
2666  }
::std::unique_ptr< ::nova::dbi::dBTable > dBTable_(const ::std::string &uri,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
Definition: Database.cpp:2371
const XML_Char * s
Definition: expat.h:262
Float_t d
Definition: plot.C:236
Float_t e
Definition: plot.C:35
void nova::dbi::dBTable_ ( ::std::ostream &  os,
const ::nova::dbi::dBTable x,
::xml_schema::error_handler eh,
const ::xml_schema::namespace_infomap m = ::xml_schema::namespace_infomap (),
const ::std::string &  e = "UTF-8",
::xml_schema::flags  f = 0 
)

Definition at line 2669 of file Database.cpp.

References d, dBTable_(), MECModelEnuComparisons::i, and confusionMatrixTree::t.

2675  {
2676  ::xsd::cxx::xml::auto_initializer i (
2677  (f & ::xml_schema::flags::dont_initialize) == 0);
2678 
2679  ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
2680  ::nova::dbi::dBTable_ (s, m, f));
2681  ::xsd::cxx::xml::dom::ostream_format_target t (o);
2682  if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
2683  {
2684  throw ::xsd::cxx::tree::serialization< char > ();
2685  }
2686  }
::std::unique_ptr< ::nova::dbi::dBTable > dBTable_(const ::std::string &uri,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
Definition: Database.cpp:2371
const XML_Char * s
Definition: expat.h:262
Float_t d
Definition: plot.C:236
Float_t e
Definition: plot.C:35
void nova::dbi::dBTable_ ( ::std::ostream &  os,
const ::nova::dbi::dBTable x,
::xercesc::DOMErrorHandler &  eh,
const ::xml_schema::namespace_infomap m = ::xml_schema::namespace_infomap (),
const ::std::string &  e = "UTF-8",
::xml_schema::flags  f = 0 
)

Definition at line 2689 of file Database.cpp.

References d, dBTable_(), and confusionMatrixTree::t.

2695  {
2696  ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
2697  ::nova::dbi::dBTable_ (s, m, f));
2698  ::xsd::cxx::xml::dom::ostream_format_target t (o);
2699  if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
2700  {
2701  throw ::xsd::cxx::tree::serialization< char > ();
2702  }
2703  }
::std::unique_ptr< ::nova::dbi::dBTable > dBTable_(const ::std::string &uri,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
Definition: Database.cpp:2371
const XML_Char * s
Definition: expat.h:262
Float_t d
Definition: plot.C:236
Float_t e
Definition: plot.C:35
void nova::dbi::dBTable_ ( ::xercesc::XMLFormatTarget &  ft,
const ::nova::dbi::dBTable x,
const ::xml_schema::namespace_infomap m = ::xml_schema::namespace_infomap (),
const ::std::string &  e = "UTF-8",
::xml_schema::flags  f = 0 
)

Definition at line 2706 of file Database.cpp.

References d, dBTable_(), and make_syst_table_plots::h.

2711  {
2712  ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
2713  ::nova::dbi::dBTable_ (s, m, f));
2714 
2715  ::xsd::cxx::tree::error_handler< char > h;
2716 
2717  if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
2718  {
2719  h.throw_if_failed< ::xsd::cxx::tree::serialization< char > > ();
2720  }
2721  }
::std::unique_ptr< ::nova::dbi::dBTable > dBTable_(const ::std::string &uri,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
Definition: Database.cpp:2371
const XML_Char * s
Definition: expat.h:262
Float_t d
Definition: plot.C:236
Float_t e
Definition: plot.C:35
void nova::dbi::dBTable_ ( ::xercesc::XMLFormatTarget &  ft,
const ::nova::dbi::dBTable x,
::xml_schema::error_handler eh,
const ::xml_schema::namespace_infomap m = ::xml_schema::namespace_infomap (),
const ::std::string &  e = "UTF-8",
::xml_schema::flags  f = 0 
)

Definition at line 2724 of file Database.cpp.

References d, and dBTable_().

2730  {
2731  ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
2732  ::nova::dbi::dBTable_ (s, m, f));
2733  if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
2734  {
2735  throw ::xsd::cxx::tree::serialization< char > ();
2736  }
2737  }
::std::unique_ptr< ::nova::dbi::dBTable > dBTable_(const ::std::string &uri,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
Definition: Database.cpp:2371
const XML_Char * s
Definition: expat.h:262
Float_t d
Definition: plot.C:236
Float_t e
Definition: plot.C:35
void nova::dbi::dBTable_ ( ::xercesc::XMLFormatTarget &  ft,
const ::nova::dbi::dBTable x,
::xercesc::DOMErrorHandler &  eh,
const ::xml_schema::namespace_infomap m = ::xml_schema::namespace_infomap (),
const ::std::string &  e = "UTF-8",
::xml_schema::flags  f = 0 
)

Definition at line 2740 of file Database.cpp.

References d, and dBTable_().

2746  {
2747  ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
2748  ::nova::dbi::dBTable_ (s, m, f));
2749  if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
2750  {
2751  throw ::xsd::cxx::tree::serialization< char > ();
2752  }
2753  }
::std::unique_ptr< ::nova::dbi::dBTable > dBTable_(const ::std::string &uri,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
Definition: Database.cpp:2371
const XML_Char * s
Definition: expat.h:262
Float_t d
Definition: plot.C:236
Float_t e
Definition: plot.C:35
void nova::dbi::dBTable_ ( ::xercesc::DOMDocument &  d,
const ::nova::dbi::dBTable x,
::xml_schema::flags  f = 0 
)

Definition at line 2756 of file Database.cpp.

References e, and getGoodRuns4SAM::n.

2759  {
2760  ::xercesc::DOMElement& e (*d.getDocumentElement ());
2761  const ::xsd::cxx::xml::qualified_name< char > n (
2762  ::xsd::cxx::xml::dom::name< char > (e));
2763 
2764  if (n.name () == "dBTable" &&
2765  n.namespace_ () == "")
2766  {
2767  e << s;
2768  }
2769  else
2770  {
2771  throw ::xsd::cxx::tree::unexpected_element < char > (
2772  n.name (),
2773  n.namespace_ (),
2774  "dBTable",
2775  "");
2776  }
2777  }
const XML_Char * s
Definition: expat.h:262
Float_t d
Definition: plot.C:236
Float_t e
Definition: plot.C:35
xml_schema::dom::unique_ptr<::xercesc::DOMDocument > nova::dbi::dBTable_ ( const ::nova::dbi::dBTable x,
const ::xml_schema::namespace_infomap m = ::xml_schema::namespace_infomap (),
::xml_schema::flags  f = 0 
)

Definition at line 2780 of file Database.cpp.

References d, and dBTable_().

2783  {
2784  ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
2785  ::xsd::cxx::xml::dom::serialize< char > (
2786  "dBTable",
2787  "",
2788  m, f));
2789 
2790  ::nova::dbi::dBTable_ (*d, s, f);
2791  return d;
2792  }
::std::unique_ptr< ::nova::dbi::dBTable > dBTable_(const ::std::string &uri,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
Definition: Database.cpp:2371
const XML_Char * s
Definition: expat.h:262
Float_t d
Definition: plot.C:236
std::ostream& nova::dbi::operator<< ( std::ostream &  stream,
const Row row 
)
inline

Definition at line 95 of file Row.h.

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

95  {
96  for (unsigned int i=0; i<row.fCol.size(); ++i) {
97  stream << row.fCol[i];
98  if (i < row.fCol.size()-1)
99  stream << ", ";
100  }
101  return stream;
102  }
std::ostream& nova::dbi::operator<< ( std::ostream &  stream,
const Column col 
)
inline

Definition at line 177 of file Column.h.

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

177  {
178  if (!col.fValue) {
179  stream << "NULL";
180  }
181  else {
182  if (col.fType == kBool) {
183  if (col.fValue[0] == '1')
184  stream << "true";
185  else
186  stream << "false";
187  }
188  else {
189  bool needsQuotes = (col.fType == kString ||
190  col.fType == kTimeStamp ||
191  col.fType == kDateStamp );
192  if (needsQuotes) stream << "\'";
193  stream << col.fValue;
194  if (needsQuotes) stream << "\'";
195  }
196  }
197  return stream;
198  }
Int_t col[ntarg]
Definition: Style.C:29
std::ostream& nova::dbi::operator<< ( std::ostream &  stream,
const Table t 
)
inline

Definition at line 428 of file Table.h.

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

428  {
429  for (unsigned int j=0; j<t.fRow.size(); ++j) {
430  stream << t.fRow[j] << std::endl;
431  }
432  return stream;
433  }
const double j
Definition: BetheBloch.cxx:29
void nova::dbi::operator<< ( ::xercesc::DOMElement &  e,
const dBColumn_t i 
)

Definition at line 2795 of file Database.cpp.

References a, om::cerr, nova::dbi::dBColumn_t::colType(), allTimeWatchdog::endl, nova::dbi::dBColumn_t::fKeyColumn(), nova::dbi::dBColumn_t::fKeyTable(), nova::dbi::dBColumn_t::hasName(), MECModelEnuComparisons::i, nova::dbi::dBColumn_t::name(), nova::dbi::dBColumn_t::null(), nova::dbi::dBColumn_t::tolerance(), and nova::dbi::dBColumn_t::value().

2796  {
2797  e << static_cast< const ::xml_schema::type& > (i);
2798 
2799  // name
2800  //
2801  {
2802  ::xercesc::DOMAttr& a (
2803  ::xsd::cxx::xml::dom::create_attribute (
2804  "name",
2805  e));
2806 
2807  if (! i.hasName ()) {
2808  std::cerr << "WARNING: attempting to serialize a dBColumn_t with an empty name field!" << std::endl;
2809  }
2810  a << i.name ();
2811  }
2812 
2813  // colType
2814  //
2815  if (i.colType ())
2816  {
2817  ::xercesc::DOMAttr& a (
2818  ::xsd::cxx::xml::dom::create_attribute (
2819  "colType",
2820  e));
2821 
2822  a << *i.colType ();
2823  }
2824 
2825  // value
2826  //
2827  if (i.value ())
2828  {
2829  ::xercesc::DOMAttr& a (
2830  ::xsd::cxx::xml::dom::create_attribute (
2831  "value",
2832  e));
2833 
2834  a << *i.value ();
2835  }
2836 
2837  // null
2838  //
2839  if (i.null ())
2840  {
2841  ::xercesc::DOMAttr& a (
2842  ::xsd::cxx::xml::dom::create_attribute (
2843  "null",
2844  e));
2845 
2846  a << *i.null ();
2847  }
2848 
2849  // fKeyTable
2850  //
2851  if (i.fKeyTable ())
2852  {
2853  ::xercesc::DOMAttr& a (
2854  ::xsd::cxx::xml::dom::create_attribute (
2855  "fKeyTable",
2856  e));
2857 
2858  a << *i.fKeyTable ();
2859  }
2860 
2861  // fKeyColumn
2862  //
2863  if (i.fKeyColumn ())
2864  {
2865  ::xercesc::DOMAttr& a (
2866  ::xsd::cxx::xml::dom::create_attribute (
2867  "fKeyColumn",
2868  e));
2869 
2870  a << *i.fKeyColumn ();
2871  }
2872 
2873  // tolerance
2874  //
2875  if (i.tolerance ())
2876  {
2877  ::xercesc::DOMAttr& a (
2878  ::xsd::cxx::xml::dom::create_attribute (
2879  "tolerance",
2880  e));
2881 
2882  a << *i.tolerance ();
2883  }
2884  }
OStream cerr
Definition: OStream.cxx:7
const double a
Float_t e
Definition: plot.C:35
void nova::dbi::operator<< ( ::xercesc::DOMElement &  e,
const dBCheck_t i 
)

Definition at line 2887 of file Database.cpp.

References a, om::cerr, nova::dbi::dBCheck_t::constraint(), allTimeWatchdog::endl, nova::dbi::dBCheck_t::hasConstraint(), and MECModelEnuComparisons::i.

2888  {
2889  e << static_cast< const ::xml_schema::type& > (i);
2890 
2891  // constraint
2892  //
2893  {
2894  ::xercesc::DOMAttr& a (
2895  ::xsd::cxx::xml::dom::create_attribute (
2896  "constraint",
2897  e));
2898 
2899  if (! i.hasConstraint ()) {
2900  std::cerr << "WARNING: attempting to serialize a dBCheck_t with an empty constraint field!" << std::endl;
2901  }
2902  a << i.constraint ();
2903  }
2904  }
OStream cerr
Definition: OStream.cxx:7
const double a
Float_t e
Definition: plot.C:35
void nova::dbi::operator<< ( ::xercesc::DOMElement &  e,
const dBRow_t i 
)

Definition at line 2907 of file Database.cpp.

References b, nova::dbi::dBRow_t::dBCol(), MECModelEnuComparisons::i, and getGoodRuns4SAM::n.

2908  {
2909  e << static_cast< const ::xml_schema::type& > (i);
2910 
2911  // dBCol
2912  //
2913  for (dBRow_t::dBCol_const_iterator
2914  b (i.dBCol ().begin ()), n (i.dBCol ().end ());
2915  b != n; ++b)
2916  {
2917  ::xercesc::DOMElement& s (
2918  ::xsd::cxx::xml::dom::create_element (
2919  "dBCol",
2920  e));
2921 
2922  s << *b;
2923  }
2924  }
const XML_Char * s
Definition: expat.h:262
const hit & b
Definition: hits.cxx:21
Float_t e
Definition: plot.C:35
void nova::dbi::operator<< ( ::xercesc::DOMElement &  e,
const dBTable i 
)

Definition at line 2927 of file Database.cpp.

References a, nova::dbi::dBTable::addInsertTime(), nova::dbi::dBTable::addInsertUser(), nova::dbi::dBTable::addUpdateTime(), nova::dbi::dBTable::addUpdateUser(), b, om::cerr, nova::dbi::dBTable::creationDate(), nova::dbi::dBTable::dBCheck(), nova::dbi::dBTable::dBColumn(), nova::dbi::dBTable::dbHost(), nova::dbi::dBTable::dbName(), nova::dbi::dBTable::dBPKey(), nova::dbi::dBTable::dbPort(), nova::dbi::dBTable::dBRow(), nova::dbi::dBTable::dbType(), nova::dbi::dBTable::dBUnique(), allTimeWatchdog::endl, nova::dbi::dBTable::hasDbHost(), nova::dbi::dBTable::hasDbName(), nova::dbi::dBTable::hasTableName(), MECModelEnuComparisons::i, nova::dbi::dBTable::ignoreDB(), nova::dbi::dBTable::maintainer(), getGoodRuns4SAM::n, nova::dbi::dBTable::schema(), nova::dbi::dBTable::tableName(), nova::dbi::dBTable::tableType(), and nova::dbi::dBTable::xmlOverDB().

2928  {
2929  e << static_cast< const ::xml_schema::type& > (i);
2930 
2931  // dBColumn
2932  //
2933  for (dBTable::dBColumn_const_iterator
2934  b (i.dBColumn ().begin ()), n (i.dBColumn ().end ());
2935  b != n; ++b)
2936  {
2937  ::xercesc::DOMElement& s (
2938  ::xsd::cxx::xml::dom::create_element (
2939  "dBColumn",
2940  e));
2941 
2942  s << *b;
2943  }
2944 
2945  // dBPKey
2946  //
2947  if (i.dBPKey ())
2948  {
2949  ::xercesc::DOMElement& s (
2950  ::xsd::cxx::xml::dom::create_element (
2951  "dBPKey",
2952  e));
2953 
2954  s << *i.dBPKey ();
2955  }
2956 
2957  // dBUnique
2958  //
2959  for (dBTable::dBUnique_const_iterator
2960  b (i.dBUnique ().begin ()), n (i.dBUnique ().end ());
2961  b != n; ++b)
2962  {
2963  ::xercesc::DOMElement& s (
2964  ::xsd::cxx::xml::dom::create_element (
2965  "dBUnique",
2966  e));
2967 
2968  s << *b;
2969  }
2970 
2971  // dBCheck
2972  //
2973  for (dBTable::dBCheck_const_iterator
2974  b (i.dBCheck ().begin ()), n (i.dBCheck ().end ());
2975  b != n; ++b)
2976  {
2977  ::xercesc::DOMElement& s (
2978  ::xsd::cxx::xml::dom::create_element (
2979  "dBCheck",
2980  e));
2981 
2982  s << *b;
2983  }
2984 
2985  // dBRow
2986  //
2987  for (dBTable::dBRow_const_iterator
2988  b (i.dBRow ().begin ()), n (i.dBRow ().end ());
2989  b != n; ++b)
2990  {
2991  ::xercesc::DOMElement& s (
2992  ::xsd::cxx::xml::dom::create_element (
2993  "dBRow",
2994  e));
2995 
2996  s << *b;
2997  }
2998 
2999  // tableName
3000  //
3001  {
3002  ::xercesc::DOMAttr& a (
3003  ::xsd::cxx::xml::dom::create_attribute (
3004  "tableName",
3005  e));
3006 
3007  if (! i.hasTableName ()) {
3008  std::cerr << "WARNING: attempting to serialize a dBTable with an empty tableName field!" << std::endl;
3009  }
3010  a << i.tableName ();
3011  }
3012 
3013  // dbHost
3014  //
3015  {
3016  ::xercesc::DOMAttr& a (
3017  ::xsd::cxx::xml::dom::create_attribute (
3018  "dbHost",
3019  e));
3020 
3021  if (! i.hasDbHost ()) {
3022  std::cerr << "WARNING: attempting to serialize a dBTable with an empty dbHost field!" << std::endl;
3023  }
3024  a << i.dbHost ();
3025  }
3026 
3027  // dbName
3028  //
3029  {
3030  ::xercesc::DOMAttr& a (
3031  ::xsd::cxx::xml::dom::create_attribute (
3032  "dbName",
3033  e));
3034 
3035  if (! i.hasDbName ()) {
3036  std::cerr << "WARNING: attempting to serialize a dBTable with an empty dbName field!" << std::endl;
3037  }
3038  a << i.dbName ();
3039  }
3040 
3041  // dbType
3042  //
3043  if (i.dbType ())
3044  {
3045  ::xercesc::DOMAttr& a (
3046  ::xsd::cxx::xml::dom::create_attribute (
3047  "dbType",
3048  e));
3049 
3050  a << *i.dbType ();
3051  }
3052 
3053  // dbPort
3054  //
3055  if (i.dbPort ())
3056  {
3057  ::xercesc::DOMAttr& a (
3058  ::xsd::cxx::xml::dom::create_attribute (
3059  "dbPort",
3060  e));
3061 
3062  a << *i.dbPort ();
3063  }
3064 
3065  // tableType
3066  //
3067  if (i.tableType ())
3068  {
3069  ::xercesc::DOMAttr& a (
3070  ::xsd::cxx::xml::dom::create_attribute (
3071  "tableType",
3072  e));
3073 
3074  a << *i.tableType ();
3075  }
3076 
3077  // creationDate
3078  //
3079  if (i.creationDate ())
3080  {
3081  ::xercesc::DOMAttr& a (
3082  ::xsd::cxx::xml::dom::create_attribute (
3083  "creationDate",
3084  e));
3085 
3086  a << *i.creationDate ();
3087  }
3088 
3089  // maintainer
3090  //
3091  if (i.maintainer ())
3092  {
3093  ::xercesc::DOMAttr& a (
3094  ::xsd::cxx::xml::dom::create_attribute (
3095  "maintainer",
3096  e));
3097 
3098  a << *i.maintainer ();
3099  }
3100 
3101  // xmlOverDB
3102  //
3103  if (i.xmlOverDB ())
3104  {
3105  ::xercesc::DOMAttr& a (
3106  ::xsd::cxx::xml::dom::create_attribute (
3107  "xmlOverDB",
3108  e));
3109 
3110  a << *i.xmlOverDB ();
3111  }
3112 
3113  // ignoreDB
3114  //
3115  if (i.ignoreDB ())
3116  {
3117  ::xercesc::DOMAttr& a (
3118  ::xsd::cxx::xml::dom::create_attribute (
3119  "ignoreDB",
3120  e));
3121 
3122  a << *i.ignoreDB ();
3123  }
3124 
3125  // addInsertTime
3126  //
3127  if (i.addInsertTime ())
3128  {
3129  ::xercesc::DOMAttr& a (
3130  ::xsd::cxx::xml::dom::create_attribute (
3131  "addInsertTime",
3132  e));
3133 
3134  a << *i.addInsertTime ();
3135  }
3136 
3137  // addInsertUser
3138  //
3139  if (i.addInsertUser ())
3140  {
3141  ::xercesc::DOMAttr& a (
3142  ::xsd::cxx::xml::dom::create_attribute (
3143  "addInsertUser",
3144  e));
3145 
3146  a << *i.addInsertUser ();
3147  }
3148 
3149  // addUpdateTime
3150  //
3151  if (i.addUpdateTime ())
3152  {
3153  ::xercesc::DOMAttr& a (
3154  ::xsd::cxx::xml::dom::create_attribute (
3155  "addUpdateTime",
3156  e));
3157 
3158  a << *i.addUpdateTime ();
3159  }
3160 
3161  // addUpdateUser
3162  //
3163  if (i.addUpdateUser ())
3164  {
3165  ::xercesc::DOMAttr& a (
3166  ::xsd::cxx::xml::dom::create_attribute (
3167  "addUpdateUser",
3168  e));
3169 
3170  a << *i.addUpdateUser ();
3171  }
3172 
3173  // schema
3174  //
3175  if (i.schema ())
3176  {
3177  ::xercesc::DOMAttr& a (
3178  ::xsd::cxx::xml::dom::create_attribute (
3179  "schema",
3180  e));
3181 
3182  a << *i.schema ();
3183  }
3184  }
OStream cerr
Definition: OStream.cxx:7
const XML_Char * s
Definition: expat.h:262
const double a
const hit & b
Definition: hits.cxx:21
Float_t e
Definition: plot.C:35
PGresult* nova::dbi::PerformPGQuery ( std::string const &  query,
std::unique_ptr< Table > const &  hwTable 
)

Definition at line 36 of file RunHistory.cxx.

References LOG_DEBUG, LOG_WARNING, and febshutoff_auto::query.

Referenced by nova::dbi::RunHistory::PullAPDInfoFromDB(), and nova::dbi::RunHistory::PullFEBInfoFromDB().

38  {
39  bool gotConnection = hwTable->GetConnection();
40 
41  if (!gotConnection) {
42  LOG_WARNING("RunHistory") << "Failed to connect to hardware database! "
43  << "Failed to load hardware info.";
44  return nullptr;
45  }
46  LOG_DEBUG("RunHistory") << "about to execute query\n"
47  << query;
48 
49  PGresult *res = nullptr;
50 
51  if (hwTable->ExecuteSQL(query,res)) {
52  if (PQresultStatus(res) != PGRES_TUPLES_OK) {
53  LOG_WARNING("RunHistory") << "Query failed: " << query;
54  PQclear(res);
55  hwTable->CloseConnection();
56  return nullptr;
57  }
58  } // end if the query worked
59  else {
60  LOG_WARNING("RunHistory") << "SQL error, failed query: " << query;
61  PQclear(res);
62  hwTable->CloseConnection();
63  return nullptr;
64  }
65 
66  LOG_DEBUG("RunHistory") << "query returned " << PQntuples(res) << " rows";
67 
68  return res;
69  }
#define LOG_DEBUG(stream)
Definition: Messenger.h:149
pg_result PGresult
Definition: Table.h:25
#define LOG_WARNING(category)
bool nova::dbi::SortDiBlocks ( RunHistory::DiBlock  db1,
RunHistory::DiBlock  db2 
)

Definition at line 72 of file RunHistory.cxx.

References nova::dbi::RunHistory::DiBlock::num.

Referenced by nova::dbi::RunHistory::LoadDAQRunHistory().

73  {
74  return (db1.num < db2.num);
75  }

Variable Documentation

std::map<HardwareLocation, std::pair<FEBInfo, APDInfo> > nova::dbi::gLocToFA

Definition at line 32 of file RunHistory.cxx.

Referenced by nova::dbi::RunHistory::MapHardwareToLocation().