1#ifndef __JRUNCONTROL__JEVENTTABLE__
2#define __JRUNCONTROL__JEVENTTABLE__
36 public std::map<std::string, JDAQStateMachine::ev_daq_event*>
58 static std::string
getKey(
const JTag& tag,
const CHSM::event& event)
60 return getKey(tag, event.name());
71 static std::string
getKey(
const JTag& tag,
const std::string& event_name)
85 JMap_t::insert(make_pair(
getKey(tag,event), &event));
102 if (i != this->end()) {
116 const_iterator
find(
const JTag& tag,
const std::string& event_name)
const
118 return JMap_t::find(
getKey(tag,event_name));
136 for (JEventTable::const_iterator i = event_table.begin(); i != event_table.end(); ++i) {
138 string key = i->first;
141 if (pos != string::npos) {
JSubscriptionList & add(const JSubscription &subscription)
Add subscription.
std::string toString() const
Convert tag to string.
void insert(const JTag &tag, JDAQEvent_t &event)
Insert entry in table.
void replace(const JTag &oldTag, const JTag &newTag, JDAQEvent_t &event)
Replace entry in table.
const_iterator find(const JTag &tag, const std::string &event_name) const
Find entry.
std::map< std::string, JDAQStateMachine::ev_daq_event * > JMap_t
static std::string getKey(const JTag &tag, const std::string &event_name)
Get key for a given tag and event name.
static std::string getKey(const JTag &tag, const CHSM::event &event)
Get key for a given tag and event.
JEventTable()
Default constructor.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
KM3NeT DAQ data structures and auxiliaries.
JSubscriptionList getSubscription(const JEventTable &event_table)
Convert event table to ControlHost subscription.
static const std::string TOKEN_DELIMETER
JDAQStateMachine::ev_daq_event JDAQEvent_t
Type definition of a DAQ event.
char getTokenDelimeter()
Get the token delimeter for command messages.
Auxiliary class for all subscription.