ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RunToTimePg.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file RunToTimePg.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef PDBCALPG_RUNTOTIMEPG_H
4 #define PDBCALPG_RUNTOTIMEPG_H
5 
6 #include <pdbcalbase/RunToTime.h>
7 
8 #include <phool/PHTimeStamp.h> // for PHTimeStamp
9 
10 #include <map>
11 #include <string>
12 
13 namespace odbc
14 {
15 class Connection;
16 }
17 
18 class RunToTimePg : public RunToTime
19 {
20  protected:
21  RunToTimePg();
22 
23  public:
24  virtual ~RunToTimePg();
25 
27  {
28  return mySpecificCopy;
29  }
30 
31  PHTimeStamp *getBeginTime(const int runNumber);
32  PHTimeStamp *getEndTime(const int runNumber);
33  int getRunNumber(const PHTimeStamp &ts);
34  int DisconnectDB();
35  static int Register();
36 
37  private:
38  PHTimeStamp *getTime(const int runNumber, const std::string &what);
39  int GetConnection();
41  std::map<const int, PHTimeStamp *> beginruntimes;
42  std::map<const int, PHTimeStamp *> endruntimes;
43  odbc::Connection *con;
44 };
45 
46 #endif // PDBCALPG_RUNTOTIMEPG_H