9#ifndef _Belle2_RCCallback_hh
10#define _Belle2_RCCallback_hh
12#include "daq/slc/runcontrol/RCState.h"
13#include "daq/slc/runcontrol/RCConfig.h"
15#include <daq/slc/nsm/NSMCallback.h>
27 friend class RCMonitor;
36 virtual void boot(
const std::string& ,
const DBObject&) {}
37 virtual void load(
const DBObject&,
const std::string& ) {}
38 virtual void start(
int ,
int ) {}
39 virtual void stop() {}
40 virtual void recover(
const DBObject&,
const std::string& ) {}
41 virtual bool resume(
int ) {
return true; }
42 virtual bool pause() {
return true; }
43 virtual void abort() {}
44 virtual void monitor() {}
45 virtual std::string dbdump();
52 virtual void initialize(
const DBObject&) {}
53 virtual void configure(
const DBObject&) {}
54 void dump(
bool isstart);
57 const NSMNode& getRuncontrol()
const {
return m_runcontrol; }
58 void setState(
const RCState& state);
59 void setRCConfig(
const std::string& rcconfig) { m_rcconfig_org = rcconfig; }
60 void setDBTable(
const std::string& table) { m_table = table; }
61 void setDBFile(
const std::string& file) { m_file = file; }
62 const std::string& getDBTable()
const {
return m_table; }
63 void setAutoReply(
bool auto_reply) { m_auto = auto_reply; }
64 void setDB(
DBInterface* db,
const std::string& table);
66 void setProvider(
const std::string& host,
int port)
68 m_provider_host = host;
69 m_provider_port = port;
71 DBObject& getDBObject() {
return m_obj; }
72 void setRunNumbers(
int expno,
int runno)
77 int getExpNumber()
const {
return m_expno; }
78 int getRunNumber()
const {
return m_runno; }
79 void setRunTypeRecord(
const std::string& runtype) { m_runtype_record = runtype; }
80 const std::string& getRunTypeRecord()
const {
return m_runtype_record; }
83 void dbload(
int length,
const char* data);
86 DBObject dbload(
const std::string& path);
87 void configure_raw(
int length,
const char* data);
96 std::string m_rcconfig;
97 std::string m_rcconfig_org;
98 std::string m_provider_host;
103 std::string m_runtype_record;
110 inline void RCCallback::setDB(
DBInterface* db,
const std::string& table)
Abstract base class for different kinds of events.