Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:19:33

0001 #ifndef FUN4ALL_DBINTERFACE_H
0002 #define FUN4ALL_DBINTERFACE_H
0003 
0004 #include <fun4all/SubsysReco.h>
0005 
0006 #include <map>
0007 #include <string>
0008 
0009 class FROG;
0010 class ODBCInterface;
0011 namespace odbc
0012 {
0013   class Connection;
0014   class Statement;
0015 }  // namespace odbc
0016 
0017 class DBInterface : public SubsysReco
0018 {
0019  public:
0020   static DBInterface *instance();
0021 
0022   ~DBInterface() override;
0023 
0024   int process_event(PHCompositeNode *) override;
0025 
0026   /// Called at the end of all processing.
0027   int End(PHCompositeNode *) override;
0028 
0029   void Print(const std::string & /*what*/ = "ALL") const override;
0030 
0031   odbc::Connection *getDBConnection(const std::string &dbname);
0032   odbc::Statement *getStatement(const std::string &dbname);
0033   std::string location(const std::string &logical_name);
0034   
0035  private:
0036 
0037   DBInterface(const std::string &name = "DBInterface");
0038   static DBInterface *__instance;
0039   ODBCInterface *m_ODBC{nullptr};
0040   FROG *fr {nullptr};
0041 };
0042 
0043 #endif