ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PgPostCalBankIterator.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PgPostCalBankIterator.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef PDBCALPG_PGPOSTCALBANKITERATOR_H
4 #define PDBCALPG_PGPOSTCALBANKITERATOR_H
5 
6 #include <pdbcalbase/PdbBankID.h>
7 #include <pdbcalbase/PdbCalBankIterator.h>
8 
9 #include <phool/PHTimeStamp.h>
10 
11 #include <ctime>
12 #include <map>
13 #include <iostream>
14 #include <string>
15 
16 class PdbCalBank;
17 class PgPostApplication;
18 class PgPostBankManager;
19 class TSQLResultSet;
20 class TSQLStatement;
21 
23 {
24  public:
26  virtual ~PgPostCalBankIterator();
27 
28  virtual bool init(const std::string& fulldbname, const PdbBankID& bankid);
29 
30  virtual bool isValid() const;
31 
32  virtual void print(std::ostream& os = std::cout) const;
33 
34  virtual void setBankID(const PdbBankID& id);
35 
36  virtual void setEndValTimeLimits(const PHTimeStamp& min = PHTimeStamp(0),
38 
39  virtual void setInsertTimeLimits(const PHTimeStamp& min = PHTimeStamp(0),
41 
42  virtual void setStartValTimeLimits(const PHTimeStamp& min = PHTimeStamp(0),
44 
45  virtual PdbCalBank* next();
46 
47  private:
48  class ValPeriod
49  {
50  public:
53  : start_(min)
54  , end_(max)
55  {
56  }
57 
58  time_t start() const { return start_.getTics(); }
59  time_t end() const { return end_.getTics(); }
60 
61  private:
64  };
65 
66  typedef std::map<std::string, ValPeriod> TimeMap;
68 
71  std::string fDBName;
72  std::string fTableName;
73  bool fIsValid;
75  TSQLStatement* fSQLStatement;
76  TSQLResultSet* fSQLResultSet;
77 };
78 
79 #endif