Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | List of all members
KM3NETDAQ::JEventTable Class Reference

Event table. More...

#include <JEventTable.hh>

Inheritance diagram for KM3NETDAQ::JEventTable:
std::map< std::string, JDAQStateMachine::ev_daq_event * >

Public Types

typedef std::map< std::string,
JDAQStateMachine::ev_daq_event * > 
JMap_t
 

Public Member Functions

 JEventTable ()
 Default constructor. More...
 
void insert (const JNET::JTag &tag, JDAQEvent_t &event)
 Insert entry in table. More...
 
void replace (const JNET::JTag &oldTag, const JNET::JTag &newTag, JDAQEvent_t &event)
 Replace entry in table. More...
 
const_iterator find (const JNET::JTag &tag, const std::string &event_name) const
 Find entry. More...
 

Static Public Member Functions

static std::string getKey (const JNET::JTag &tag, const CHSM::event &event)
 Get key for a given tag and event. More...
 
static std::string getKey (const JNET::JTag &tag, const std::string &event_name)
 Get key for a given tag and event name. More...
 

Detailed Description

Event table.

This class consists of a STL map<key,value> in which the key corresponds to the unique combination of a ControlHost tag and an event name. The associated value points to the corresponding event.

Definition at line 32 of file JEventTable.hh.

Member Typedef Documentation

typedef std::map<std::string, JDAQStateMachine::ev_daq_event*> KM3NETDAQ::JEventTable::JMap_t

Definition at line 37 of file JEventTable.hh.

Constructor & Destructor Documentation

KM3NETDAQ::JEventTable::JEventTable ( )
inline

Default constructor.

Definition at line 43 of file JEventTable.hh.

43  :
44  JMap_t()
45  {}
std::map< std::string, JDAQStateMachine::ev_daq_event * > JMap_t
Definition: JEventTable.hh:37

Member Function Documentation

static std::string KM3NETDAQ::JEventTable::getKey ( const JNET::JTag tag,
const CHSM::event &  event 
)
inlinestatic

Get key for a given tag and event.

Parameters
tagtag
eventevent
Returns
key

Definition at line 55 of file JEventTable.hh.

56  {
57  return getKey(tag, event.name());
58  }
Structure to store the ToT mean and standard deviation of the hits produced by a nanobeacon in a sour...
static std::string getKey(const JNET::JTag &tag, const CHSM::event &event)
Get key for a given tag and event.
Definition: JEventTable.hh:55
static std::string KM3NETDAQ::JEventTable::getKey ( const JNET::JTag tag,
const std::string &  event_name 
)
inlinestatic

Get key for a given tag and event name.

Parameters
tagtag
event_nameevent name
Returns
key

Definition at line 68 of file JEventTable.hh.

69  {
70  return tag.toString() + getTokenDelimeter() + event_name;
71  }
char getTokenDelimeter()
Get the token delimeter for command messages.
std::string toString() const
Convert tag to string.
Definition: JTag.hh:167
void KM3NETDAQ::JEventTable::insert ( const JNET::JTag tag,
JDAQEvent_t event 
)
inline

Insert entry in table.

Parameters
tagtag
eventevent

Definition at line 80 of file JEventTable.hh.

81  {
82  JMap_t::insert(make_pair(getKey(tag,event), &event));
83  }
Structure to store the ToT mean and standard deviation of the hits produced by a nanobeacon in a sour...
static std::string getKey(const JNET::JTag &tag, const CHSM::event &event)
Get key for a given tag and event.
Definition: JEventTable.hh:55
void KM3NETDAQ::JEventTable::replace ( const JNET::JTag oldTag,
const JNET::JTag newTag,
JDAQEvent_t event 
)
inline

Replace entry in table.

Parameters
oldTagold tag
newTagnew tag
eventevent

Definition at line 93 of file JEventTable.hh.

96  {
97  iterator i = JMap_t::find(getKey(oldTag,event));
98 
99  if (i != this->end())
100  this->erase(i);
101 
102  insert(newTag, event);
103  }
Structure to store the ToT mean and standard deviation of the hits produced by a nanobeacon in a sour...
void insert(const JNET::JTag &tag, JDAQEvent_t &event)
Insert entry in table.
Definition: JEventTable.hh:80
static std::string getKey(const JNET::JTag &tag, const CHSM::event &event)
Get key for a given tag and event.
Definition: JEventTable.hh:55
const_iterator KM3NETDAQ::JEventTable::find ( const JNET::JTag tag,
const std::string &  event_name 
) const
inline

Find entry.

Parameters
tagtag
event_nameevent name

Definition at line 112 of file JEventTable.hh.

113  {
114  return JMap_t::find(getKey(tag,event_name));
115  }
static std::string getKey(const JNET::JTag &tag, const CHSM::event &event)
Get key for a given tag and event.
Definition: JEventTable.hh:55

The documentation for this class was generated from the following file: