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 
31  RunInfoEditor();
32  // ctor
33  explicit RunInfoEditor( const std::shared_ptr<SessionImpl>& session );
34 
35  //
36  RunInfoEditor( const RunInfoEditor& rhs );
37 
38  //
39  RunInfoEditor& operator=( const RunInfoEditor& rhs );
40 
41  //
42  void init();
43 
44  //
46 
47  // register an insertion.
48  void insert( cond::Time_t runNumber, const boost::posix_time::ptime& start, const boost::posix_time::ptime& end );
49 
50  // register a new insertion.
51  void insertNew( cond::Time_t runNumber, const boost::posix_time::ptime& start, const boost::posix_time::ptime& end );
52 
53  // execute the update/intert queries and reset the buffer
54  size_t flush();
55 
56  private:
57  void checkTransaction( const std::string& ctx );
58 
59  private:
60  std::shared_ptr<RunInfoEditorData> m_data;
61  std::shared_ptr<SessionImpl> m_session;
62 
63  };
64 
65  }
66 }
67 
68 #endif
69 
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:16
#define end
Definition: vmac.h:37
void checkTransaction(const std::string &ctx)
std::shared_ptr< RunInfoEditorData > m_data
Definition: RunInfoEditor.h:60
Definition: plugin.cc:24
std::shared_ptr< SessionImpl > m_session
Definition: RunInfoEditor.h:61