CMS 3D CMS Logo

RunInfoEditor.h
Go to the documentation of this file.
1 #ifndef CondCore_CondDB_RunInfoEditor_h
2 #define CondCore_CondDB_RunInfoEditor_h
3 //
4 // Package: CondDB
5 // Class : RunInfoEditor
6 //
10 //
11 // Author: Giacomo Govi
12 // Created: March 2017
13 //
14 
17 //
18 #include <boost/date_time/posix_time/posix_time.hpp>
19 
20 namespace cond {
21 
22  namespace persistency {
23 
24  class SessionImpl;
25  class RunInfoEditorData;
26 
27  // value semantics...
28  class RunInfoEditor {
29  public:
30  RunInfoEditor();
31  // ctor
32  explicit RunInfoEditor(const std::shared_ptr<SessionImpl>& session);
33 
34  //
35  RunInfoEditor(const RunInfoEditor& rhs);
36 
37  //
39 
40  //
41  void init();
42 
43  //
45 
46  // register an insertion.
47  void insert(cond::Time_t runNumber, const boost::posix_time::ptime& start, const boost::posix_time::ptime& end);
48 
49  // register a new insertion.
51  const boost::posix_time::ptime& start,
52  const boost::posix_time::ptime& end);
53 
54  // execute the update/intert queries and reset the buffer
55  size_t flush();
56 
57  private:
58  void checkTransaction(const std::string& ctx);
59 
60  private:
61  std::shared_ptr<RunInfoEditorData> m_data;
62  std::shared_ptr<SessionImpl> m_session;
63  };
64 
65  } // namespace persistency
66 } // namespace cond
67 
68 #endif
Definition: start.py:1
void insert(cond::Time_t runNumber, const boost::posix_time::ptime &start, const boost::posix_time::ptime &end)
void insertNew(cond::Time_t runNumber, const boost::posix_time::ptime &start, const boost::posix_time::ptime &end)
RunInfoEditor & operator=(const RunInfoEditor &rhs)
unsigned long long Time_t
Definition: Time.h:14
void checkTransaction(const std::string &ctx)
std::shared_ptr< RunInfoEditorData > m_data
Definition: RunInfoEditor.h:61
std::shared_ptr< SessionImpl > m_session
Definition: RunInfoEditor.h:62