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
start
Definition: start.py:1
cond::persistency::RunInfoEditor::insert
void insert(cond::Time_t runNumber, const boost::posix_time::ptime &start, const boost::posix_time::ptime &end)
Definition: RunInfoEditor.cc:49
cond::persistency::RunInfoEditor::m_session
std::shared_ptr< SessionImpl > m_session
Definition: RunInfoEditor.h:62
convertSQLiteXML.runNumber
runNumber
Definition: convertSQLiteXML.py:91
cond::persistency::RunInfoEditor::init
void init()
Definition: RunInfoEditor.cc:32
cond::persistency::RunInfoEditor::getLastInserted
cond::Time_t getLastInserted()
Definition: RunInfoEditor.cc:40
cond::persistency::RunInfoEditor::flush
size_t flush()
Definition: RunInfoEditor.cc:63
mps_fire.end
end
Definition: mps_fire.py:242
cond::persistency::RunInfoEditor::m_data
std::shared_ptr< RunInfoEditorData > m_data
Definition: RunInfoEditor.h:61
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
cond
Definition: plugin.cc:23
Time.h
cond::Time_t
unsigned long long Time_t
Definition: Time.h:14
cond::persistency::RunInfoEditor
Definition: RunInfoEditor.h:28
cond::persistency::RunInfoEditor::checkTransaction
void checkTransaction(const std::string &ctx)
Definition: RunInfoEditor.cc:103
cond::persistency::RunInfoEditor::insertNew
void insertNew(cond::Time_t runNumber, const boost::posix_time::ptime &start, const boost::posix_time::ptime &end)
Definition: RunInfoEditor.cc:56
cond::persistency::RunInfoEditor::operator=
RunInfoEditor & operator=(const RunInfoEditor &rhs)
Definition: RunInfoEditor.cc:26
Types.h
cond::persistency::RunInfoEditor::RunInfoEditor
RunInfoEditor()
Definition: RunInfoEditor.cc:19