Belle II Software  release-08-01-10
ERecoMasterCallback.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 #ifndef _Belle2_RFMasterCallback_h
9 #define _Belle2_RFMasterCallback_h
10 
11 #include <daq/slc/runcontrol/RCState.h>
12 #include <daq/slc/runcontrol/RCCallback.h>
13 
14 #include <daq/slc/nsm/NSMData.h>
15 #include <daq/slc/base/ConfigFile.h>
16 #include <daq/slc/base/StringUtil.h>
17 
18 #include <vector>
19 
20 namespace Belle2 {
26  class ERecoRunControlCallback;
27 
29 
30  public:
32  virtual ~ERecoMasterCallback() {}
33 
34  public:
35  void initialize(const DBObject& obj) override;
36  void configure(const DBObject& obj) override;
37  void monitor() override;
38  void ok(const char* node, const char* data) override;
39  void error(const char* node, const char* data) override;
40  void load(const DBObject& obj, const std::string& runtype) override;
41  void start(int expno, int runno) override;
42  void stop() override;
43  void recover(const DBObject& obj, const std::string& runtype) override;
44  bool resume(int subno) override;
45  bool pause() override;
46  void abort() override;
47  bool perform(NSMCommunicator& com) override;
48 
49  public:
50  void setState(NSMNode& node, const RCState& state);
51  void setCallback(ERecoRunControlCallback* callback) { m_callback = callback; }
52  void addData(const std::string& dataname, const std::string& format);
53 
54  private:
55  ERecoRunControlCallback* m_callback;
56  StringList m_dataname;
57  typedef std::vector<NSMNode> NSMNodeList;
58  NSMNodeList m_nodes;
59  NSMNode m_rcnode;
60  std::string m_script;
61  };
62 
64 }
65 
66 #endif
Abstract base class for different kinds of events.