Jpp
Classes | Public Member Functions | Public Attributes | Static Public Attributes | Protected Types | Protected Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
KM3NETDAQ::JDataWriter Class Reference

Runcontrol client to write data to disk. More...

Inheritance diagram for KM3NETDAQ::JDataWriter:
KM3NETDAQ::JDAQClient JDAQStateMachine KM3NETDAQ::JDAQClient_t JDAQCHSM

Classes

struct  JRunDB
 Map run number to trigger parameters. More...
 
struct  JValue_t
 Auxiliary data structure for I/O of trigger parameters. More...
 

Public Member Functions

 JDataWriter (const std::string &name, const std::string &server, const std::string &hostname, JLogger *logger, const int level, const std::string &path)
 Constructor. More...
 
virtual void actionInit (int length, const char *buffer)
 
virtual void actionConfigure (int length, const char *buffer)
 
virtual void actionReset (int length, const char *buffer)
 
virtual void actionQuit (int length, const char *buffer)
 
virtual void actionStart (int length, const char *buffer)
 
virtual void actionStop (int length, const char *buffer)
 
virtual void setSelect (JFileDescriptorMask &mask) const
 Set the file descriptor mask for the select call. More...
 
virtual void actionSelect (const JFileDescriptorMask &mask)
 Action method following last select call. More...
 
virtual void actionRunning ()
 This method is repeatedly called when this client machine is in state Running and the clock interval time is non-zero. More...
 
void typeout ()
 Report status of data writing. More...
 
virtual bool enter (const JArgs &args)
 Enter the state machine. More...
 
virtual bool enter ()
 Enter the state machine. More...
 
virtual bool exit ()
 Exit the state machine. More...
 
bool isRunning () const
 Check if this client is in runnig state. More...
 
void replaceEvent (const JTag &oldTag, const JTag &newTag, JDAQEvent_t &event)
 Replace tag of given event in event table. More...
 
JDAQEvent_tfindEvent (const JTag &tag, const std::string &event_name)
 Find event in event table. More...
 
void addSubscription (const JSubscription &subscription)
 Add custom subscription. More...
 
template<class T >
void addParameter (const char option, T &parameter)
 Add parameter to parser used in method enter(). More...
 
template<class T >
void addParameter (const char option, T &parameter, const T &value)
 Add parameter to parser used in method enter(). More...
 
void setSelect ()
 Set the file descriptor mask for the select call. More...
 
virtual void actionInput (int length, const char *buffer)
 This method is called at ev_input. More...
 
virtual bool filter (const JTag &tag, int length, const char *buffer)
 Filter message. More...
 
virtual void actionTagged (const JTag &tag, int length, const char *buffer)
 This method is called when a custom tag is encountered. More...
 
void run ()
 Run as run control client following command messages via JNET::JControlHost. More...
 
void run (const int port)
 Run for ever. More...
 
void run (std::istream &in)
 Run client with commands from input stream (e.g. More...
 
void A1 (CHSM_ns_alias::event const &)
 
void A2 (CHSM_ns_alias::event const &)
 
void A3 (CHSM_ns_alias::event const &)
 
void A4 (CHSM_ns_alias::event const &)
 
void A5 (CHSM_ns_alias::event const &)
 
void A6 (CHSM_ns_alias::event const &)
 
void A7 (CHSM_ns_alias::event const &)
 
void A8 (CHSM_ns_alias::event const &)
 
void A9 (CHSM_ns_alias::event const &)
 
void A10 (CHSM_ns_alias::event const &)
 
void A11 (CHSM_ns_alias::event const &)
 
void A12 (CHSM_ns_alias::event const &)
 
void A13 (CHSM_ns_alias::event const &)
 
void A14 (CHSM_ns_alias::event const &)
 
void EAM4root (CHSM_ns_alias::state const &, CHSM_ns_alias::event const &)
 
void XAM4root (CHSM_ns_alias::state const &, CHSM_ns_alias::event const &)
 
const std::string & getName () const
 Get name of state machine. More...
 
int getDetectorID () const
 Get detector identifier. More...
 
int getRunNumber () const
 Get run number. More...
 
virtual void actionEnter ()
 Interface methods for actions corresponding to state transitions. More...
 
virtual void actionExit ()
 
virtual void actionPause (int, const char *)
 
virtual void actionContinue (int, const char *)
 
virtual void actionError ()
 
virtual void actionRecover (int, const char *)
 
const std::string & getHostname () const
 Get hostname. More...
 
const std::string & getFullName () const
 Get full name of this run control client. More...
 
const JTaggetUniqueTag () const
 Get unique tag of this run control client. More...
 
long long int getClockDelay () const
 Get total delay time. More...
 
long long int getClockInterval () const
 Get interval time. More...
 
void setClockInterval (const long long int interval_us)
 Set interval time. More...
 
void resetClock ()
 Reset clock. More...
 
int getEventNumber () const
 Get last event number. More...
 
void setEventNumber (const int event_number)
 Set last event number. More...
 

Public Attributes

JMeta meta
 meta data More...
 
JDAQStateMachine::state_root root
 
JDAQStateMachine::state_Main Main
 
JDAQStateMachine::ev_daq_event ev_daq
 
char ev_daq_param_block [sizeof(ev_daq_event::param_block)]
 
JDAQStateMachine::ev_init_event ev_init
 
char ev_init_param_block [sizeof(ev_init_event::param_block)]
 
JDAQStateMachine::ev_configure_event ev_configure
 
char ev_configure_param_block [sizeof(ev_configure_event::param_block)]
 
JDAQStateMachine::ev_start_event ev_start
 
char ev_start_param_block [sizeof(ev_start_event::param_block)]
 
JDAQStateMachine::ev_pause_event ev_pause
 
char ev_pause_param_block [sizeof(ev_pause_event::param_block)]
 
JDAQStateMachine::ev_continue_event ev_continue
 
char ev_continue_param_block [sizeof(ev_continue_event::param_block)]
 
JDAQStateMachine::ev_stop_event ev_stop
 
char ev_stop_param_block [sizeof(ev_stop_event::param_block)]
 
JDAQStateMachine::ev_reset_event ev_reset
 
char ev_reset_param_block [sizeof(ev_reset_event::param_block)]
 
JDAQStateMachine::ev_quit_event ev_quit
 
char ev_quit_param_block [sizeof(ev_quit_event::param_block)]
 
JDAQStateMachine::ev_off_event ev_off
 
char ev_off_param_block [sizeof(ev_off_event::param_block)]
 
JDAQStateMachine::ev_check_event ev_check
 
char ev_check_param_block [sizeof(ev_check_event::param_block)]
 
JDAQStateMachine::ev_input_event ev_input
 
char ev_input_param_block [sizeof(ev_input_event::param_block)]
 
JDAQStateMachine::ev_recover_event ev_recover
 
char ev_recover_param_block [sizeof(ev_recover_event::param_block)]
 
JDAQStateMachine::ev_error_event ev_error
 
char ev_error_param_block [sizeof(ev_error_event::param_block)]
 

Static Public Attributes

static const int MAXIMUM_FILE_NUMBER = 100
 maximum file number for overwrite protection. More...
 
static const int TIMEOUT_S = 1
 time out of update [s] More...
 

Protected Types

typedef void(JDAQCHSM::* action) (int, const char *)
 Type definition of action method. More...
 

Protected Attributes

JSharedPointer< JControlHostserver
 message server More...
 
JMessageLogger logger
 message logger More...
 
std::string name
 
int detector_id
 
int run_number
 
JEventTable eventTable
 event table More...
 
std::string fullname
 
JTag unique_tag
 
JTimekeeper clock
 central clock More...
 
int event_number
 number of last event More...
 

Private Member Functions

void update ()
 Update state machine. More...
 
void update (const JTag &tag, int length, const char *buffer)
 Update state machine. More...
 
void configure ()
 Configure client. More...
 
std::string getMessage (const CHSM::state &state, const CHSM::event &event) const
 Get event message. More...
 
virtual void enterState (const CHSM::state &state, const CHSM::event &event)
 Action when entering state. More...
 
virtual void actionCheck (int length, const char *buffer)
 This method is called at ev_check and reports a system check by mimicing an enter state action. More...
 
void execute (action __action, const CHSM::event &__event)
 The method to execute the action. More...
 
const CHSM::state * getState () const
 Get current state. More...
 

Private Attributes

JLANG::JSharedPointer< JControlHostdatawriter
 
std::string path
 
JEEP::JTimer timer
 
Long64_t numberOfEvents
 
long long int numberOfBytes
 
JMessageScheduler logErrorRun
 
JMessageScheduler logErrorFile
 
JMessageScheduler logErrorTag
 
JMessageScheduler logErrorState
 
std::string hostname
 host name of data server More...
 
JTreeWriter_t writer
 TTree writer. More...
 
std::vector< char > buffer
 internal buffer for incoming data More...
 
JRunDB run_db
 
JSelectReader select
 select call More...
 
JParser parser
 parser method enter() More...
 
JSubscriptionList subscription
 custom subscription More...
 
CHSM_ns_alias::state * state_ [11]
 
const CHSM_ns_alias::event * taken_ [14]
 
CHSM_ns_alias::state * target_ [14]
 

Static Private Attributes

static const int ev_daq_transitions []
 
static const int ev_init_transitions []
 
static const int ev_configure_transitions []
 
static const int ev_start_transitions []
 
static const int ev_pause_transitions []
 
static const int ev_continue_transitions []
 
static const int ev_stop_transitions []
 
static const int ev_reset_transitions []
 
static const int ev_quit_transitions []
 
static const int ev_off_transitions []
 
static const int ev_check_transitions []
 
static const int ev_input_transitions []
 
static const int ev_recover_transitions []
 
static const int ev_error_transitions []
 
static const CHSM_ns_alias::transition transition_ []
 

Detailed Description

Runcontrol client to write data to disk.

In state running, this application will write ROOT formatted data from the data filters to disk.

Definition at line 61 of file JDataWriter.cc.

Member Typedef Documentation

◆ action

typedef void(JDAQCHSM::* JDAQCHSM::action) (int, const char *)
protectedinherited

Type definition of action method.

Definition at line 152 of file JDAQCHSM.hh.

Constructor & Destructor Documentation

◆ JDataWriter()

KM3NETDAQ::JDataWriter::JDataWriter ( const std::string &  name,
const std::string &  server,
const std::string &  hostname,
JLogger logger,
const int  level,
const std::string &  path 
)
inline

Constructor.

Parameters
namename of client
servername of command message server
hostnamename of data server
loggerpointer to logger
leveldebug level
pathdefault path

Definition at line 75 of file JDataWriter.cc.

80  :
81  JDAQClient(name, server, logger, level),
82  datawriter(),
83  path (path),
85  {
87 
88  JControlHost::Throw(true);
89 
90  // map ControlHost tag to TTree writer.
91 
93  }

Member Function Documentation

◆ actionInit()

virtual void KM3NETDAQ::JDataWriter::actionInit ( int  length,
const char *  buffer 
)
inlinevirtual

Reimplemented from JDAQCHSM.

Definition at line 96 of file JDataWriter.cc.

97  {
98  using namespace std;
99  using namespace JPP;
100 
101  // start server
102 
103  try {
104 
105  datawriter.reset(new JControlHost(hostname));
106 
107  JSubscriptionList buffer;
108 
109  for (JTreeWriter_t::iterator i = writer.begin(); i != writer.end(); ++i) {
110  buffer.add(JSubscriptionAll(i->first));
111  }
112 
113  buffer.add(JSubscriptionAll(IO_TRIGGER_PARAMETERS));
114 
115  datawriter->Subscribe(buffer);
116  datawriter->SendMeAlways();
117 
118  JNoticeStream(logger) << "Established connection to " << hostname;
119  }
120  catch(const JControlHostException& exception) {
121  JErrorStream(logger) << exception;
122  }
123  }

◆ actionConfigure()

virtual void KM3NETDAQ::JDataWriter::actionConfigure ( int  length,
const char *  buffer 
)
inlinevirtual

Reimplemented from JDAQCHSM.

Definition at line 126 of file JDataWriter.cc.

127  {
128  using namespace std;
129 
130  long long int update_s = 10;
131  long long int logger_s = 5;
132 
133  JProperties properties(JEquationParameters("=", ";", "", ""));
134 
135  properties["path"] = path;
136  properties["update_s"] = update_s;
137  properties["logger_s"] = logger_s;
138 
139  properties.read(string(buffer, length));
140 
141  if (update_s <= 0) { update_s = 1; }
142  if (logger_s <= 0) { logger_s = 1; }
143 
144  setClockInterval(update_s * 1000000LL);
145 
146  JDebugStream(logger) << "Path <" << path << ">";
147  JDebugStream(logger) << "Update period [s] " << update_s;
148 
149  logErrorRun = JMessageScheduler(logger, JTimekeeper(logger_s * 1000000LL));
150  logErrorFile = JMessageScheduler(logger, JTimekeeper(logger_s * 1000000LL));
151  logErrorTag = JMessageScheduler(logger, JTimekeeper(logger_s * 1000000LL));
152  logErrorState = JMessageScheduler(logger, JTimekeeper(logger_s * 1000000LL));
153 
154  numberOfEvents = 0;
155  numberOfBytes = 0;
156  }

◆ actionReset()

virtual void KM3NETDAQ::JDataWriter::actionReset ( int  length,
const char *  buffer 
)
inlinevirtual

Reimplemented from JDAQCHSM.

Definition at line 159 of file JDataWriter.cc.

160  {
161  datawriter.reset();
162  }

◆ actionQuit()

virtual void KM3NETDAQ::JDataWriter::actionQuit ( int  length,
const char *  buffer 
)
inlinevirtual

Reimplemented from JDAQCHSM.

Definition at line 165 of file JDataWriter.cc.

166  {}

◆ actionStart()

virtual void KM3NETDAQ::JDataWriter::actionStart ( int  length,
const char *  buffer 
)
inlinevirtual

Reimplemented from JDAQCHSM.

Definition at line 169 of file JDataWriter.cc.

170  {
171  using namespace std;
172  using namespace JPP;
173 
174  JNoticeStream(logger) << string(buffer, length);
175 
176  ostringstream os;
177 
178  for (int i = 0; !writer.is_open() && i != MAXIMUM_FILE_NUMBER; ++i) {
179 
180  os.str("");
181 
182  os << getFullPath(path)
183  << "KM3NeT"
184  << "_" << FILL(8,'0') << getDetectorID()
185  << "_" << FILL(8,'0') << getRunNumber();
186 
187  if (i != 0) {
188  os << "_" << i;
189  }
190 
191  os << ".root";
192 
193  try {
194  writer.open(os.str().c_str());
195  }
196  catch(JException& exception) {
197  JErrorStream(logger) << exception;
198  }
199  }
200 
201  if (writer.is_open())
202  JNoticeStream(logger) << "Output file " << os.str();
203  else
204  JErrorStream (logger) << "File not opened " << os.str();
205 
206  numberOfEvents = 0;
207  numberOfBytes = 0;
208 
210 
211  timer.reset();
212 
213  logErrorRun .reset();
214  logErrorFile .reset();
215  logErrorTag .reset();
217 
219  }

◆ actionStop()

virtual void KM3NETDAQ::JDataWriter::actionStop ( int  length,
const char *  buffer 
)
inlinevirtual

Reimplemented from JDAQCHSM.

Definition at line 222 of file JDataWriter.cc.

223  {
224  typeout();
225 
226  if (timer.usec_wall > 0) {
227  JNoticeStream(logger) << "I/O " << (int) (numberOfBytes / timer.usec_wall) << " MB/s";
228  }
229 
230  if (!run_db.is_written(getRunNumber())) {
231  JErrorStream(logger) << "No trigger parameters written for run " << getRunNumber();
232  }
233 
234  writer.close();
235 
236  // Release resources.
237 
238  std::vector<char> null;
239 
240  this->buffer.swap(null);
241  }

◆ setSelect() [1/2]

virtual void KM3NETDAQ::JDataWriter::setSelect ( JFileDescriptorMask mask) const
inlinevirtual

Set the file descriptor mask for the select call.

This implementation does nothing but may be redefined by the derived class.

Parameters
maskfile descriptor mask

Reimplemented from KM3NETDAQ::JDAQClient.

Definition at line 244 of file JDataWriter.cc.

245  {
246  if (datawriter.is_valid()) {
247  mask.set(*datawriter);
248  }
249  }

◆ actionSelect()

virtual void KM3NETDAQ::JDataWriter::actionSelect ( const JFileDescriptorMask mask)
inlinevirtual

Action method following last select call.

This implementation does nothing but may be redefined by the derived class.

Parameters
maskfile descriptor mask

Reimplemented from KM3NETDAQ::JDAQClient.

Definition at line 252 of file JDataWriter.cc.

253  {
254  using namespace std;
255  using namespace JPP;
256 
257  if (datawriter.is_valid() && mask.has(*datawriter)) {
258 
259  try {
260 
261  JPrefix prefix;
262 
263  datawriter->WaitHead(prefix);
264 
265  timer.start();
266 
267  buffer.resize(prefix.getSize());
268 
269  datawriter->GetFullData(buffer.data(), buffer.size());
270 
271 
272  if (prefix.getTag() == IO_TRIGGER_PARAMETERS) {
273 
274  const string __str__(buffer.data(), buffer.size());
275 
276  istringstream in(__str__);
277 
278  if (!run_db.read(in)) {
279 
280  JErrorStream(logger) << "Fatal error reading trigger parameters " << __str__;
281 
282  ev_error();
283  }
284  }
285 
286 
287  if (isRunning()) {
288 
289  // Write trigger parameters for current run if not yet done
290 
292 
293  JTreeWriter_t::iterator i = writer.find(prefix.toString());
294 
295  if (i != writer.end()) {
296 
297  TFile* out = i->second->GetCurrentFile();
298 
299  if (out != NULL && out->IsOpen()) {
300 
301  JDAQPreamble preamble;
302  JDAQHeader header;
303 
304  JByteArrayReader in(buffer.data(), buffer.size());
305 
306  in >> preamble >> header;
307 
308  in.seekg(0); // rewind
309 
310  if (header.getRunNumber() == getRunNumber()) {
311 
312  const Int_t nb = i->second->copy(in);
313 
314  if (nb < (int) buffer.size() || in.tellg() != (int) buffer.size()) {
315  JWarningStream(logger) << "Inconsistency at copy of "
316  << prefix.toString() << ' '
317  << buffer.size() << ' '
318  << in.tellg() << ' '
319  << nb;
320  }
321 
322  if (prefix.getTag() == IO_EVENT)
323  numberOfEvents += 1;
324  numberOfBytes += buffer.size();
325 
326  if (prefix.getTag() == IO_EVENT && numberOfEvents == 1) {
327  typeout();
328  }
329 
330  } else {
331  JErrorStream(logErrorRun) << "Inconsistent run number "
332  << header.getRunNumber()
333  << " != "
334  << getRunNumber();
335  }
336  } else {
337  JErrorStream(logErrorFile) << "Output file not open";
338  }
339  } else {
340  if (prefix.getTag() != IO_TRIGGER_PARAMETERS) {
341  JErrorStream(logErrorTag) << "Unknown tag <" << prefix.toString() << ">, no data written";
342  }
343  }
344  } else {
345  JWarningStream(logErrorState) << "Not in running state <" << prefix.toString() << ">, no data written";
346  }
347 
348  timer.stop();
349  }
350  catch(const JControlHostException& exception) {
351  JErrorStream(logger) << exception;
352  }
353  }
354  }

◆ actionRunning()

virtual void KM3NETDAQ::JDataWriter::actionRunning ( )
inlinevirtual

This method is repeatedly called when this client machine is in state Running and the clock interval time is non-zero.

This implementation does nothing but may be redefined by the derived class. Care has to be taken so that the time needed to execute this method should be less than the specified clock interval time (see method setClockInterval()).

Reimplemented from KM3NETDAQ::JDAQClient.

Definition at line 357 of file JDataWriter.cc.

358  {
359  typeout();
360  }

◆ typeout()

void KM3NETDAQ::JDataWriter::typeout ( )
inline

Report status of data writing.

Definition at line 366 of file JDataWriter.cc.

367  {
368  std::ostringstream message;
369 
371 
372  logger.typeout(RC_LOG, message.str());
373  logger.status(message.str());
374  }

◆ enter() [1/2]

virtual bool KM3NETDAQ::JDAQClient::enter ( const JArgs args)
inlinevirtualinherited

Enter the state machine.

This overloaded method enter reproduces the constructor. All necessary input is parsed from the list of arguments. In case of an error, the state machine is not entered.

Parameters
argsarray of command line arguments
Returns
true if okay; else false

Definition at line 363 of file JDAQClient.hh.

364  {
365  using namespace std;
366 
367  string server;
368  string logger;
369  int level;
370  bool use_cout;
371 
372  try {
373 
374  parser['H'] = make_field(server) = "localhost";
375  parser['M'] = make_field(logger) = "localhost";
376  parser['d'] = make_field(level) = 0;
377  parser['c'] = make_field(use_cout);
378 
379  if (parser.read(args) != 0) {
380  return false;
381  }
382  }
383  catch(const exception &error) {
384  cerr << error.what() << endl;
385  return false;
386  }
387 
388  try {
389 
390  JLogger* out = NULL;
391 
392  if (use_cout)
393  out = new JStreamLogger(cout);
394  else
395  out = new JControlHostLogger(logger);
396 
397  this->logger = JMessageLogger(out, getName(), level);
398 
399  this->server.reset(new JControlHost(server));
400 
401  return enter();
402  }
403  catch(const JControlHostException& error) {
404  cerr << error << endl;
405  return false;
406  }
407  }

◆ enter() [2/2]

virtual bool KM3NETDAQ::JDAQClient::enter ( )
inlinevirtualinherited

Enter the state machine.

This method activates the subscription to JNET::JControlHost messages. In case of an error, the state machine is not entered.

Returns
true if okay; else false

Reimplemented in KM3NETDAQ::JDAQDriver.

Definition at line 418 of file JDAQClient.hh.

419  {
420  using namespace std;
421  using namespace JPP;
422 
423  if (server.is_valid() && logger.is_valid()) {
424 
425  const JSubscriptionList buffer = getSubscription(eventTable) + subscription;
426 
427  try {
428 
429  server->Subscribe(buffer);
430  server->SendMeAlways();
431  server->MyId(getFullName());
432 
433  JNoticeStream(logger) << "Nick name \"" << getFullName() << "\" subscription: " << buffer.toString();
434 
435  return CHSM::machine::enter();
436  }
437  catch(const JControlHostException& error) {
438  JErrorStream(logger) << error;
439  }
440 
441  } else {
442  cerr << "Message server or logger not properly initialised." << endl;
443  }
444 
445  return false;
446  }

◆ exit()

virtual bool KM3NETDAQ::JDAQClient::exit ( )
inlinevirtualinherited

Exit the state machine.

This method releases the various resources.

Returns
true if okay; else false

Definition at line 456 of file JDAQClient.hh.

457  {
458  try {
459  if (server.is_valid()) { server.reset(NULL); }
460  }
461  catch(const JControlHostException& error) {
462  }
463 
464  try {
465  if (logger.is_valid()) { logger.reset(NULL); }
466  }
467  catch(const JControlHostException& error) {
468  }
469 
470  return CHSM::machine::exit();
471  }

◆ isRunning()

bool KM3NETDAQ::JDAQClient::isRunning ( ) const
inlineinherited

Check if this client is in runnig state.

Returns
true if running; else false

Definition at line 479 of file JDAQClient.hh.

480  {
481  return Main.RunControl.Operational.Running.active();
482  }

◆ replaceEvent()

void KM3NETDAQ::JDAQClient::replaceEvent ( const JTag oldTag,
const JTag newTag,
JDAQEvent_t event 
)
inlineinherited

Replace tag of given event in event table.

Parameters
oldTagold tag
newTagnew tag
eventevent

Definition at line 492 of file JDAQClient.hh.

495  {
496  eventTable.replace(oldTag, newTag, event);
497  }

◆ findEvent()

JDAQEvent_t* KM3NETDAQ::JDAQClient::findEvent ( const JTag tag,
const std::string &  event_name 
)
inlineinherited

Find event in event table.

Parameters
tagtag
event_nameevent name
Returns
pointer to event or NULL

Definition at line 507 of file JDAQClient.hh.

508  {
509  JEventTable::const_iterator i = eventTable.find(tag, event_name);
510 
511  if (i != eventTable.end())
512  return i->second;
513  else
514  return NULL;
515  }

◆ addSubscription()

void KM3NETDAQ::JDAQClient::addSubscription ( const JSubscription subscription)
inlineinherited

Add custom subscription.

Parameters
subscriptionsubscription

Definition at line 523 of file JDAQClient.hh.

524  {
526  }

◆ addParameter() [1/2]

template<class T >
void KM3NETDAQ::JDAQClient::addParameter ( const char  option,
T &  parameter 
)
inlineinherited

Add parameter to parser used in method enter().

Parameters
optionoption
parameterparameter

Definition at line 536 of file JDAQClient.hh.

537  {
538  parser[option] = make_field(parameter);
539  }

◆ addParameter() [2/2]

template<class T >
void KM3NETDAQ::JDAQClient::addParameter ( const char  option,
T &  parameter,
const T &  value 
)
inlineinherited

Add parameter to parser used in method enter().

Parameters
optionoption
parameterparameter
valuedefault value

Definition at line 550 of file JDAQClient.hh.

551  {
552  parser[option] = make_field(parameter) = value;
553  }

◆ setSelect() [2/2]

void KM3NETDAQ::JDAQClient::setSelect ( )
inlineinherited

Set the file descriptor mask for the select call.

Definition at line 559 of file JDAQClient.hh.

560  {
561  select.reset();
562 
564 
566  }

◆ actionInput()

virtual void KM3NETDAQ::JDAQClient::actionInput ( int  length,
const char *  buffer 
)
inlinevirtualinherited

This method is called at ev_input.

Parameters
lengthlength of data
bufferpointer to data

Reimplemented from JDAQCHSM.

Reimplemented in KM3NETDAQ::DataQueue, and AcousticDataFilter.

Definition at line 606 of file JDAQClient.hh.

607  {
608  using namespace std;
609 
610  JProperties properties(JEquationParameters("=", ";", "", ""), 1);
611 
612  int level = this->logger.getLevel();
613 
614  properties["debug"] = level;
615 
616  properties.read(string(buffer, length));
617 
618  this->logger.setLevel(level);
619  }

◆ filter()

virtual bool KM3NETDAQ::JDAQClient::filter ( const JTag tag,
int  length,
const char *  buffer 
)
inlinevirtualinherited

Filter message.

The filter method can be overwritten so that a specific action is made before the corresponding message is processed by the state machine. The message is ignored if true is returned, else it is normally processed.

Parameters
tagtag
lengthnumber of characters
buffermessage
Returns
skip message or not

Definition at line 633 of file JDAQClient.hh.

634  {
635  return false;
636  }

◆ actionTagged()

virtual void KM3NETDAQ::JDAQClient::actionTagged ( const JTag tag,
int  length,
const char *  buffer 
)
inlinevirtualinherited

This method is called when a custom tag is encountered.

Parameters
tagtag
lengthlength of data
bufferpointer to data

Reimplemented in KM3NETDAQ::JDataFilter.

Definition at line 646 of file JDAQClient.hh.

647  {
648  }

◆ run() [1/3]

void KM3NETDAQ::JDAQClient::run ( )
inlineinherited

Run as run control client following command messages via JNET::JControlHost.

This method can be called once the state machine is entered. It returns when the state machine is exited. If the clock interval is non-zero, the method actionRunning() is repeatedly called when this client machine is in state Running. The file descriptor mask can be set to interrupt the timeout of the select call and clock method wait() in this calling sequence (see methods setSelect() and actionSelect()).

Definition at line 661 of file JDAQClient.hh.

662  {
663  using namespace std;
664 
665  while (active()) {
666 
667  try {
668 
669  setSelect();
670 
671  if (select(JTimeval(TIMEOUT_S,0)) > 0) {
672 
673  if (select.hasReaderMask(*server)) {
674  update();
675  }
676 
678 
679  } else {
680 
681  continue;
682  }
683 
684 
685  if (isRunning() && clock.getInterval() != 0LL) {
686 
687  long long int numberOfCalls = 0;
688 
689  clock.reset();
690 
691  do {
692 
693  ++numberOfCalls;
694 
695  setSelect();
696 
697  if (clock.wait(select.getReaderMask())) {
698 
699  if (select.hasReaderMask(*server)) {
700  update();
701  }
702 
704 
705  } else {
706 
707  try {
708  actionRunning();
709  }
710  catch(const exception& error) {
711  logger.error(error.what());
712  }
713  }
714 
715  } while (isRunning());
716 
717  if (numberOfCalls != 0) {
718  JNoticeStream(logger) << "Delay per call " << clock.getDelay() / numberOfCalls / 1000 << " ms";
719  }
720  }
721  }
722  catch(const exception& error) {
723  JErrorStream(logger) << "method run(): " << error.what();
724  }
725  }
726  }

◆ run() [2/3]

void KM3NETDAQ::JDAQClient::run ( const int  port)
inlineinherited

Run for ever.

This method can be used when the run control client is started before the run control (e.g. at boot time of the host processor). This method should be called before the state machine is entered. It launches a server which accepts a JNET::JControlHost connection from a designated application e.g. the JDAQClientStarter.cc program. The state machine is entered using the available data in the JNET::JControlHost message. After the state machine is exited, it accepts a new a JNET::JControlHost connection.

Parameters
portport number

Definition at line 741 of file JDAQClient.hh.

742  {
743  JControlHostServer local_server(port);
744 
745  for ( ; ; ) {
746 
747  JControlHost* ps = local_server.AcceptClient();
748 
749  ps->Connected();
750 
751  JNET::JPrefix prefix;
752 
753  ps->WaitHead(prefix);
754 
755  const int length = prefix.getSize();
756 
757  char* buffer = new char[length];
758 
759  ps->GetFullData(buffer, length);
760  ps->PutFullData(prefix.toString(), buffer, length);
761 
762  delete ps;
763 
764  enter(JArgs(std::string(buffer, length)));
765 
766  delete [] buffer;
767 
768  run();
769 
770  exit();
771  }
772  }

◆ run() [3/3]

void KM3NETDAQ::JDAQClient::run ( std::istream &  in)
inlineinherited

Run client with commands from input stream (e.g.

for debugging).

Example input format:

<tag> <event name>[#data];
<tag> <event name>[#data];
Parameters
ininput stream

Definition at line 786 of file JDAQClient.hh.

787  {
788  using namespace std;
789 
790  string tag;
791  string buffer;
792 
793  while (in >> tag && in >> skipws && getline(in, buffer, ';')) {
794  update(tag, buffer.length(), buffer.data());
795  }
796  }

◆ update() [1/2]

void KM3NETDAQ::JDAQClient::update ( )
inlineprivateinherited

Update state machine.

This method waits for a message from JNET::JControlHost server.

Definition at line 808 of file JDAQClient.hh.

809  {
810  JNET::JPrefix prefix;
811 
812  server->WaitHead(prefix);
813 
814  const int length = prefix.getSize();
815 
816  char* buffer = new char[length];
817 
818  server->GetFullData(buffer, length);
819 
820  update(prefix.getTag(), length, buffer);
821 
822  delete [] buffer;
823  }

◆ update() [2/2]

void KM3NETDAQ::JDAQClient::update ( const JTag tag,
int  length,
const char *  buffer 
)
inlineprivateinherited

Update state machine.

Parameters
tagtag
lengthnumber of characters
buffermessage

Definition at line 833 of file JDAQClient.hh.

834  {
835  using namespace std;
836  using namespace JPP;
837 
838  if (filter(tag, length, buffer)) {
839  return;
840  }
841 
842  if (getSubscription(eventTable)->count(JSubscriptionAny(tag)) == 0 &&
843  getSubscription(eventTable)->count(JSubscriptionAll(tag)) == 0) {
844 
845  actionTagged(tag, length, buffer);
846 
847  return;
848  }
849 
850 
851  string::size_type pos = 0;
852 
853  while (pos != (string::size_type) length && TOKEN_DELIMETER.find(*(buffer + pos)) == string::npos) {
854  ++pos;
855  }
856 
857  const JEvent_t event = JEvent_t::toValue(string(buffer, pos));
858 
859  setEventNumber(event.getNumber());
860 
861  while (pos != (string::size_type) length && TOKEN_DELIMETER.find(*(buffer + pos)) != string::npos) {
862  ++pos;
863  }
864 
865 
866  JEventTable::const_iterator i = eventTable.find(tag, event.getName());
867 
868  if (i != eventTable.end()) {
869 
870  const CHSM::state* const s0 = getState();
871 
872  if (!i->second->active()) {
873 
874  JWarningStream(logger) << "Event " << i->second->name() << " not active (" << (s0 != NULL ? s0->name() : "") << ")";
875 
876  if (server.is_valid() && s0 != NULL) {
877  server->PutFullString(RC_FAIL, getMessage(*s0, *i->second));
878  }
879  }
880 
881  // redirect all I/O
882 
883  {
885  JErrorStream error(logger);
886 
887  JRedirectStream redirect[] = { JRedirectStream(cin, JLANG::null),
888  JRedirectStream(cout, debug),
889  JRedirectStream(cerr, error) };
890 
891  if (redirect[0] &&
892  redirect[1] &&
893  redirect[2]) {
894 
895  (*(i->second))(length - pos, buffer + pos);
896  }
897  }
898 
899  const CHSM::state* const s1 = getState();
900 
901  JStatusStream(logger) << "Transition "
902  << (s0 != NULL ? s0->name() : "")
903  << "->(" << i->second->name() << ")->"
904  << (s1 != NULL ? s1->name() : "");
905  } else {
906 
907  JErrorStream(logger) << "Unknown key <" << tag << "," << event.getName() << ">";
908  }
909  }

◆ configure()

void KM3NETDAQ::JDAQClient::configure ( )
inlineprivateinherited

Configure client.

This method is used to setup the event table.

Definition at line 916 of file JDAQClient.hh.

917  {
918  }

◆ getMessage()

std::string KM3NETDAQ::JDAQClient::getMessage ( const CHSM::state &  state,
const CHSM::event &  event 
) const
inlineprivateinherited

Get event message.

Parameters
statestate
eventevent
Returns
message

Definition at line 928 of file JDAQClient.hh.

929  {
930  std::ostringstream os;
931 
932  os << getFullName()
933  << getTokenDelimeter()
934  << JEvent_t(event.name(), event_number)
935  << getTokenDelimeter()
936  << getStateName(state.name());
937 
938  return os.str();
939  }

◆ enterState()

virtual void KM3NETDAQ::JDAQClient::enterState ( const CHSM::state &  state,
const CHSM::event &  event 
)
inlineprivatevirtualinherited

Action when entering state.

This method provides for the hand shaking with the run control program.

Parameters
stateentered state
eventevent that triggered transition

Implements JDAQCHSM.

Reimplemented in KM3NETDAQ::JDAQDriver.

Definition at line 949 of file JDAQClient.hh.

950  {
951  if (server.is_valid()) {
952  server->PutFullString(RC_REPLY, getMessage(state, event));
953  }
954  }

◆ actionCheck()

virtual void KM3NETDAQ::JDAQClient::actionCheck ( int  length,
const char *  buffer 
)
inlineprivatevirtualinherited

This method is called at ev_check and reports a system check by mimicing an enter state action.

Parameters
lengthnumber of characters
buffermessage

Reimplemented from JDAQCHSM.

Definition at line 963 of file JDAQClient.hh.

964  {
965  if (Main.RunControl.Error.active()) {
966 
968 
969  } else {
970 
971  for (CHSM::parent::iterator state = Main.RunControl.Operational.begin(); state != Main.RunControl.Operational.end(); ++state) {
972 
973  if (state->active()) {
974 
975  // mimic enter state
976 
977  enterState(*state, ev_check);
978  }
979  }
980  }
981  }

◆ execute()

void KM3NETDAQ::JDAQClient::execute ( action  __action,
const CHSM::event &  __event 
)
inlineprivatevirtualinherited

The method to execute the action.

Parameters
__actionpointer to action method
__eventevent that triggered the action

Implements JDAQCHSM.

Definition at line 990 of file JDAQClient.hh.

991  {
992  try {
993 
994  const JDAQStateMachine::ev_daq_event& event = dynamic_cast<const JDAQStateMachine::ev_daq_event&>(__event);
995 
996  (this->*__action)(event->length, event->buffer);
997  }
998  catch(const std::exception& error) {
999  JErrorStream(logger) << "Error at event " << __event.name() << " \"" << error.what() << "\"; trigger ev_error.";
1000  ev_error();
1001  }
1002  }

◆ getState()

const CHSM::state* KM3NETDAQ::JDAQClient::getState ( ) const
inlineprivateinherited

Get current state.

Returns
state

Definition at line 1010 of file JDAQClient.hh.

1011  {
1012  for (CHSM::parent::const_iterator state = Main.RunControl.Operational.begin(); state != Main.RunControl.Operational.end(); ++state) {
1013  if (state->active()) {
1014  return &(*state);
1015  }
1016  }
1017 
1018  if (Main.RunControl.Error.active()) {
1019  return &Main.RunControl.Error;
1020  }
1021 
1022  return NULL;
1023  }

◆ A1()

void JDAQStateMachine::A1 ( CHSM_ns_alias::event const &  event)
inherited

Definition at line 344 of file JDAQCHSM.cc.

344 { actionError(); }

◆ A2()

void JDAQStateMachine::A2 ( CHSM_ns_alias::event const &  event)
inherited

Definition at line 346 of file JDAQCHSM.cc.

◆ A3()

void JDAQStateMachine::A3 ( CHSM_ns_alias::event const &  event)
inherited

Definition at line 348 of file JDAQCHSM.cc.

348 { JDAQCHSM::exit(); }

◆ A4()

void JDAQStateMachine::A4 ( CHSM_ns_alias::event const &  event)
inherited

Definition at line 350 of file JDAQCHSM.cc.

◆ A5()

void JDAQStateMachine::A5 ( CHSM_ns_alias::event const &  event)
inherited

Definition at line 352 of file JDAQCHSM.cc.

◆ A6()

void JDAQStateMachine::A6 ( CHSM_ns_alias::event const &  event)
inherited

Definition at line 354 of file JDAQCHSM.cc.

354  {
355 
356  std::istringstream is(std::string(ev_start->buffer, ev_start->length));
357 
358  is >> run_number >> detector_id;
359 
361 
362  }

◆ A7()

void JDAQStateMachine::A7 ( CHSM_ns_alias::event const &  event)
inherited

Definition at line 364 of file JDAQCHSM.cc.

◆ A8()

void JDAQStateMachine::A8 ( CHSM_ns_alias::event const &  event)
inherited

Definition at line 366 of file JDAQCHSM.cc.

◆ A9()

void JDAQStateMachine::A9 ( CHSM_ns_alias::event const &  event)
inherited

Definition at line 368 of file JDAQCHSM.cc.

◆ A10()

void JDAQStateMachine::A10 ( CHSM_ns_alias::event const &  event)
inherited

Definition at line 370 of file JDAQCHSM.cc.

◆ A11()

void JDAQStateMachine::A11 ( CHSM_ns_alias::event const &  event)
inherited

Definition at line 372 of file JDAQCHSM.cc.

◆ A12()

void JDAQStateMachine::A12 ( CHSM_ns_alias::event const &  event)
inherited

Definition at line 374 of file JDAQCHSM.cc.

374 { JDAQCHSM::exit(); }

◆ A13()

void JDAQStateMachine::A13 ( CHSM_ns_alias::event const &  event)
inherited

Definition at line 376 of file JDAQCHSM.cc.

◆ A14()

void JDAQStateMachine::A14 ( CHSM_ns_alias::event const &  event)
inherited

Definition at line 378 of file JDAQCHSM.cc.

◆ EAM4root()

void JDAQStateMachine::EAM4root ( CHSM_ns_alias::state const &  chsm_state_,
CHSM_ns_alias::event const &  event 
)
inherited

Definition at line 337 of file JDAQCHSM.cc.

337  {
338 #line 164 "JDAQCHSM.chsm"
339  CHSM_ns_alias::cluster const &state = (CHSM_ns_alias::cluster const&)chsm_state_; actionEnter(); }

◆ XAM4root()

void JDAQStateMachine::XAM4root ( CHSM_ns_alias::state const &  chsm_state_,
CHSM_ns_alias::event const &  event 
)
inherited

Definition at line 340 of file JDAQCHSM.cc.

340  {
341 #line 165 "JDAQCHSM.chsm"
342  CHSM_ns_alias::cluster const &state = (CHSM_ns_alias::cluster const&)chsm_state_; actionExit(); }

◆ getName()

const std::string& JDAQCHSM::getName ( ) const
inlineinherited

Get name of state machine.

Returns
name

Definition at line 89 of file JDAQCHSM.hh.

90  {
91  return name;
92  }

◆ getDetectorID()

int JDAQCHSM::getDetectorID ( ) const
inlineinherited

Get detector identifier.

Returns
detector identifier.

Definition at line 100 of file JDAQCHSM.hh.

101  {
102  return detector_id;
103  }

◆ getRunNumber()

int JDAQCHSM::getRunNumber ( ) const
inlineinherited

Get run number.

Returns
run number

Definition at line 111 of file JDAQCHSM.hh.

112  {
113  return run_number;
114  }

◆ actionEnter()

virtual void JDAQCHSM::actionEnter ( )
inlinevirtualinherited

Interface methods for actions corresponding to state transitions.

Reimplemented in KM3NETDAQ::JDataFilter, KM3NETDAQ::DataQueue, JDAQDemoClient, AcousticDataFilter, and KM3NETDAQ::MonitorRouter.

Definition at line 120 of file JDAQCHSM.hh.

120 {}

◆ actionExit()

virtual void JDAQCHSM::actionExit ( )
inlinevirtualinherited

◆ actionPause()

virtual void JDAQCHSM::actionPause ( int  ,
const char *   
)
inlinevirtualinherited

◆ actionContinue()

virtual void JDAQCHSM::actionContinue ( int  ,
const char *   
)
inlinevirtualinherited

◆ actionError()

virtual void JDAQCHSM::actionError ( )
inlinevirtualinherited

Definition at line 135 of file JDAQCHSM.hh.

135 {}

◆ actionRecover()

virtual void JDAQCHSM::actionRecover ( int  ,
const char *   
)
inlinevirtualinherited

Definition at line 136 of file JDAQCHSM.hh.

136 {}

◆ getHostname()

const std::string& KM3NETDAQ::JDAQClient_t::getHostname ( ) const
inlineinherited

Get hostname.

Returns
host name

Definition at line 108 of file JDAQClient.hh.

109  {
110  return hostname;
111  }

◆ getFullName()

const std::string& KM3NETDAQ::JDAQClient_t::getFullName ( ) const
inlineinherited

Get full name of this run control client.

Returns
full name

Definition at line 119 of file JDAQClient.hh.

120  {
121  return fullname;
122  }

◆ getUniqueTag()

const JTag& KM3NETDAQ::JDAQClient_t::getUniqueTag ( ) const
inlineinherited

Get unique tag of this run control client.

Returns
unique tag

Definition at line 130 of file JDAQClient.hh.

131  {
132  return unique_tag;
133  }

◆ getClockDelay()

long long int KM3NETDAQ::JDAQClient_t::getClockDelay ( ) const
inlineinherited

Get total delay time.

Returns
delay time [us]

Definition at line 141 of file JDAQClient.hh.

142  {
143  return clock.getDelay();
144  }

◆ getClockInterval()

long long int KM3NETDAQ::JDAQClient_t::getClockInterval ( ) const
inlineinherited

Get interval time.

Returns
interval time [us]

Definition at line 153 of file JDAQClient.hh.

154  {
155  return clock.getInterval();
156  }

◆ setClockInterval()

void KM3NETDAQ::JDAQClient_t::setClockInterval ( const long long int  interval_us)
inlineinherited

Set interval time.

Parameters
interval_usinterval time [us]

Definition at line 164 of file JDAQClient.hh.

165  {
166  clock.setInterval(interval_us);
167  }

◆ resetClock()

void KM3NETDAQ::JDAQClient_t::resetClock ( )
inlineinherited

Reset clock.

Definition at line 173 of file JDAQClient.hh.

174  {
175  clock.reset();
176  }

◆ getEventNumber()

int KM3NETDAQ::JDAQClient_t::getEventNumber ( ) const
inlineinherited

Get last event number.

Returns
event number

Definition at line 184 of file JDAQClient.hh.

185  {
186  return event_number;
187  }

◆ setEventNumber()

void KM3NETDAQ::JDAQClient_t::setEventNumber ( const int  event_number)
inlineinherited

Set last event number.

Parameters
event_numberevent number

Definition at line 195 of file JDAQClient.hh.

196  {
197  this->event_number = event_number;
198  }

Member Data Documentation

◆ meta

JMeta KM3NETDAQ::JDataWriter::meta

meta data

Definition at line 376 of file JDataWriter.cc.

◆ MAXIMUM_FILE_NUMBER

const int KM3NETDAQ::JDataWriter::MAXIMUM_FILE_NUMBER = 100
static

maximum file number for overwrite protection.

Definition at line 378 of file JDataWriter.cc.

◆ datawriter

JLANG::JSharedPointer<JControlHost> KM3NETDAQ::JDataWriter::datawriter
private

Definition at line 382 of file JDataWriter.cc.

◆ path

std::string KM3NETDAQ::JDataWriter::path
private

Definition at line 383 of file JDataWriter.cc.

◆ timer

JEEP::JTimer KM3NETDAQ::JDataWriter::timer
private

Definition at line 385 of file JDataWriter.cc.

◆ numberOfEvents

Long64_t KM3NETDAQ::JDataWriter::numberOfEvents
private

Definition at line 386 of file JDataWriter.cc.

◆ numberOfBytes

long long int KM3NETDAQ::JDataWriter::numberOfBytes
private

Definition at line 387 of file JDataWriter.cc.

◆ logErrorRun

JMessageScheduler KM3NETDAQ::JDataWriter::logErrorRun
private

Definition at line 389 of file JDataWriter.cc.

◆ logErrorFile

JMessageScheduler KM3NETDAQ::JDataWriter::logErrorFile
private

Definition at line 390 of file JDataWriter.cc.

◆ logErrorTag

JMessageScheduler KM3NETDAQ::JDataWriter::logErrorTag
private

Definition at line 391 of file JDataWriter.cc.

◆ logErrorState

JMessageScheduler KM3NETDAQ::JDataWriter::logErrorState
private

Definition at line 392 of file JDataWriter.cc.

◆ hostname

std::string KM3NETDAQ::JDataWriter::hostname
private

host name of data server

Definition at line 394 of file JDataWriter.cc.

◆ writer

JTreeWriter_t KM3NETDAQ::JDataWriter::writer
private

TTree writer.

Definition at line 395 of file JDataWriter.cc.

◆ buffer

std::vector<char> KM3NETDAQ::JDataWriter::buffer
private

internal buffer for incoming data

Definition at line 396 of file JDataWriter.cc.

◆ run_db

JRunDB KM3NETDAQ::JDataWriter::run_db
private

Definition at line 501 of file JDataWriter.cc.

◆ server

JSharedPointer<JControlHost> KM3NETDAQ::JDAQClient::server
protectedinherited

message server

Definition at line 800 of file JDAQClient.hh.

◆ logger

JMessageLogger KM3NETDAQ::JDAQClient::logger
protectedinherited

message logger

Definition at line 801 of file JDAQClient.hh.

◆ select

JSelectReader KM3NETDAQ::JDAQClient::select
privateinherited

select call

Definition at line 1026 of file JDAQClient.hh.

◆ parser

JParser KM3NETDAQ::JDAQClient::parser
privateinherited

parser method enter()

Definition at line 1027 of file JDAQClient.hh.

◆ subscription

JSubscriptionList KM3NETDAQ::JDAQClient::subscription
privateinherited

custom subscription

Definition at line 1028 of file JDAQClient.hh.

◆ root

JDAQStateMachine::state_root JDAQStateMachine::root
inherited

◆ Main

JDAQStateMachine::state_Main JDAQStateMachine::Main
inherited

◆ ev_daq_transitions

const int JDAQStateMachine::ev_daq_transitions
staticprivateinherited
Initial value:
= {
-1
}

Definition at line 216 of file JDAQCHSM.hh.

◆ ev_daq

JDAQStateMachine::ev_daq_event JDAQStateMachine::ev_daq
inherited

◆ ev_daq_param_block

char JDAQStateMachine::ev_daq_param_block[sizeof(ev_daq_event::param_block)]
inherited

Definition at line 238 of file JDAQCHSM.hh.

◆ ev_init_transitions

const int JDAQStateMachine::ev_init_transitions
staticprivateinherited
Initial value:
= {
1, -1
}

Definition at line 240 of file JDAQCHSM.hh.

◆ ev_init

JDAQStateMachine::ev_init_event JDAQStateMachine::ev_init
inherited

◆ ev_init_param_block

char JDAQStateMachine::ev_init_param_block[sizeof(ev_init_event::param_block)]
inherited

Definition at line 258 of file JDAQCHSM.hh.

◆ ev_configure_transitions

const int JDAQStateMachine::ev_configure_transitions
staticprivateinherited
Initial value:
= {
3, -1
}

Definition at line 260 of file JDAQCHSM.hh.

◆ ev_configure

JDAQStateMachine::ev_configure_event JDAQStateMachine::ev_configure
inherited

◆ ev_configure_param_block

char JDAQStateMachine::ev_configure_param_block[sizeof(ev_configure_event::param_block)]
inherited

Definition at line 278 of file JDAQCHSM.hh.

◆ ev_start_transitions

const int JDAQStateMachine::ev_start_transitions
staticprivateinherited
Initial value:
= {
5, -1
}

Definition at line 280 of file JDAQCHSM.hh.

◆ ev_start

JDAQStateMachine::ev_start_event JDAQStateMachine::ev_start
inherited

◆ ev_start_param_block

char JDAQStateMachine::ev_start_param_block[sizeof(ev_start_event::param_block)]
inherited

Definition at line 298 of file JDAQCHSM.hh.

◆ ev_pause_transitions

const int JDAQStateMachine::ev_pause_transitions
staticprivateinherited
Initial value:
= {
9, -1
}

Definition at line 300 of file JDAQCHSM.hh.

◆ ev_pause

JDAQStateMachine::ev_pause_event JDAQStateMachine::ev_pause
inherited

◆ ev_pause_param_block

char JDAQStateMachine::ev_pause_param_block[sizeof(ev_pause_event::param_block)]
inherited

Definition at line 318 of file JDAQCHSM.hh.

◆ ev_continue_transitions

const int JDAQStateMachine::ev_continue_transitions
staticprivateinherited
Initial value:
= {
7, -1
}

Definition at line 320 of file JDAQCHSM.hh.

◆ ev_continue

JDAQStateMachine::ev_continue_event JDAQStateMachine::ev_continue
inherited

◆ ev_continue_param_block

char JDAQStateMachine::ev_continue_param_block[sizeof(ev_continue_event::param_block)]
inherited

Definition at line 338 of file JDAQCHSM.hh.

◆ ev_stop_transitions

const int JDAQStateMachine::ev_stop_transitions
staticprivateinherited
Initial value:
= {
8, -1
}

Definition at line 340 of file JDAQCHSM.hh.

◆ ev_stop

JDAQStateMachine::ev_stop_event JDAQStateMachine::ev_stop
inherited

◆ ev_stop_param_block

char JDAQStateMachine::ev_stop_param_block[sizeof(ev_stop_event::param_block)]
inherited

Definition at line 358 of file JDAQCHSM.hh.

◆ ev_reset_transitions

const int JDAQStateMachine::ev_reset_transitions
staticprivateinherited
Initial value:
= {
4, -1
}

Definition at line 360 of file JDAQCHSM.hh.

◆ ev_reset

JDAQStateMachine::ev_reset_event JDAQStateMachine::ev_reset
inherited

◆ ev_reset_param_block

char JDAQStateMachine::ev_reset_param_block[sizeof(ev_reset_event::param_block)]
inherited

Definition at line 378 of file JDAQCHSM.hh.

◆ ev_quit_transitions

const int JDAQStateMachine::ev_quit_transitions
staticprivateinherited
Initial value:
= {
6, -1
}

Definition at line 380 of file JDAQCHSM.hh.

◆ ev_quit

JDAQStateMachine::ev_quit_event JDAQStateMachine::ev_quit
inherited

◆ ev_quit_param_block

char JDAQStateMachine::ev_quit_param_block[sizeof(ev_quit_event::param_block)]
inherited

Definition at line 398 of file JDAQCHSM.hh.

◆ ev_off_transitions

const int JDAQStateMachine::ev_off_transitions
staticprivateinherited
Initial value:
= {
2, 11, -1
}

Definition at line 400 of file JDAQCHSM.hh.

◆ ev_off

JDAQStateMachine::ev_off_event JDAQStateMachine::ev_off
inherited

◆ ev_off_param_block

char JDAQStateMachine::ev_off_param_block[sizeof(ev_off_event::param_block)]
inherited

Definition at line 418 of file JDAQCHSM.hh.

◆ ev_check_transitions

const int JDAQStateMachine::ev_check_transitions
staticprivateinherited
Initial value:
= {
12, -1
}

Definition at line 420 of file JDAQCHSM.hh.

◆ ev_check

JDAQStateMachine::ev_check_event JDAQStateMachine::ev_check
inherited

◆ ev_check_param_block

char JDAQStateMachine::ev_check_param_block[sizeof(ev_check_event::param_block)]
inherited

Definition at line 438 of file JDAQCHSM.hh.

◆ ev_input_transitions

const int JDAQStateMachine::ev_input_transitions
staticprivateinherited
Initial value:
= {
13, -1
}

Definition at line 440 of file JDAQCHSM.hh.

◆ ev_input

JDAQStateMachine::ev_input_event JDAQStateMachine::ev_input
inherited

◆ ev_input_param_block

char JDAQStateMachine::ev_input_param_block[sizeof(ev_input_event::param_block)]
inherited

Definition at line 458 of file JDAQCHSM.hh.

◆ ev_recover_transitions

const int JDAQStateMachine::ev_recover_transitions
staticprivateinherited
Initial value:
= {
10, -1
}

Definition at line 460 of file JDAQCHSM.hh.

◆ ev_recover

JDAQStateMachine::ev_recover_event JDAQStateMachine::ev_recover
inherited

◆ ev_recover_param_block

char JDAQStateMachine::ev_recover_param_block[sizeof(ev_recover_event::param_block)]
inherited

Definition at line 478 of file JDAQCHSM.hh.

◆ ev_error_transitions

const int JDAQStateMachine::ev_error_transitions
staticprivateinherited
Initial value:
= {
0, -1
}

Definition at line 480 of file JDAQCHSM.hh.

◆ ev_error

JDAQStateMachine::ev_error_event JDAQStateMachine::ev_error
inherited

◆ ev_error_param_block

char JDAQStateMachine::ev_error_param_block[sizeof(ev_error_event::param_block)]
inherited

Definition at line 495 of file JDAQCHSM.hh.

◆ state_

CHSM_ns_alias::state* JDAQStateMachine::state_[11]
privateinherited

Definition at line 522 of file JDAQCHSM.hh.

◆ transition_

const CHSM_ns_alias::transition JDAQStateMachine::transition_
staticprivateinherited
Initial value:
= {
{ 0, 2, 8, 0, (CHSM_ns_alias::transition::action)&JDAQStateMachine::A1 },
{ 0, 3, 4, 0, (CHSM_ns_alias::transition::action)&JDAQStateMachine::A2 },
{ 0, 3, -1, 0, (CHSM_ns_alias::transition::action)&JDAQStateMachine::A3 },
{ 0, 4, 5, 0, (CHSM_ns_alias::transition::action)&JDAQStateMachine::A4 },
{ 0, 4, 3, 0, (CHSM_ns_alias::transition::action)&JDAQStateMachine::A5 },
{ 0, 5, 7, 0, (CHSM_ns_alias::transition::action)&JDAQStateMachine::A6 },
{ 0, 5, 4, 0, (CHSM_ns_alias::transition::action)&JDAQStateMachine::A7 },
{ 0, 6, 7, 0, (CHSM_ns_alias::transition::action)&JDAQStateMachine::A8 },
{ 0, 6, 4, 0, (CHSM_ns_alias::transition::action)&JDAQStateMachine::A9 },
{ 0, 7, 6, 0, (CHSM_ns_alias::transition::action)&JDAQStateMachine::A10 },
{ 0, 8, 2, 0, (CHSM_ns_alias::transition::action)&JDAQStateMachine::A11 },
{ 0, 8, -1, 0, (CHSM_ns_alias::transition::action)&JDAQStateMachine::A12 },
{ 0, 9, -1, 0, (CHSM_ns_alias::transition::action)&JDAQStateMachine::A13 },
{ 0, 9, -1, 0, (CHSM_ns_alias::transition::action)&JDAQStateMachine::A14 },
0
}

Definition at line 523 of file JDAQCHSM.hh.

◆ taken_

const CHSM_ns_alias::event* JDAQStateMachine::taken_[14]
privateinherited

Definition at line 524 of file JDAQCHSM.hh.

◆ target_

CHSM_ns_alias::state* JDAQStateMachine::target_[14]
privateinherited

Definition at line 525 of file JDAQCHSM.hh.

◆ name

std::string JDAQCHSM::name
protectedinherited

Definition at line 165 of file JDAQCHSM.hh.

◆ detector_id

int JDAQCHSM::detector_id
protectedinherited

Definition at line 166 of file JDAQCHSM.hh.

◆ run_number

int JDAQCHSM::run_number
protectedinherited

Definition at line 167 of file JDAQCHSM.hh.

◆ TIMEOUT_S

const int KM3NETDAQ::JDAQClient_t::TIMEOUT_S = 1
staticinherited

time out of update [s]

Definition at line 61 of file JDAQClient.hh.

◆ eventTable

JEventTable KM3NETDAQ::JDAQClient_t::eventTable
protectedinherited

event table

Definition at line 202 of file JDAQClient.hh.

◆ fullname

std::string KM3NETDAQ::JDAQClient_t::fullname
protectedinherited

Definition at line 204 of file JDAQClient.hh.

◆ unique_tag

JTag KM3NETDAQ::JDAQClient_t::unique_tag
protectedinherited

Definition at line 205 of file JDAQClient.hh.

◆ clock

JTimekeeper KM3NETDAQ::JDAQClient_t::clock
protectedinherited

central clock

Definition at line 206 of file JDAQClient.hh.

◆ event_number

int KM3NETDAQ::JDAQClient_t::event_number
protectedinherited

number of last event

Definition at line 207 of file JDAQClient.hh.


The documentation for this class was generated from the following file:
JDAQCHSM::actionStart
virtual void actionStart(int, const char *)
Definition: JDAQCHSM.hh:125
JLOGGER::JDebugStream
Level specific message streamers.
Definition: JMessageStream.hh:113
JSUPPORT::JAutoTreeWriter::open
virtual void open(const char *file_name)
Open file.
Definition: JAutoTreeWriter.hh:94
KM3NETDAQ::JDataWriter::datawriter
JLANG::JSharedPointer< JControlHost > datawriter
Definition: JDataWriter.cc:382
JLOGGER::JLogger
Interface for logging messages.
Definition: JLogger.hh:22
JLOGGER::JNoticeStream
Definition: JMessageStream.hh:116
KM3NETDAQ::JDataWriter::JRunDB::read
bool read(std::istream &in)
Read trigger parameters.
Definition: JDataWriter.cc:454
JLOGGER::JMessageLogger
Message logger.
Definition: JMessageLogger.hh:53
KM3NETDAQ::RC_FAIL
static const JNET::JTag RC_FAIL
Definition: JDAQTags.hh:46
KM3NETDAQ::TOKEN_DELIMETER
static const std::string TOKEN_DELIMETER
Definition: JDAQTags.hh:36
KM3NETDAQ::JDAQClient::setSelect
void setSelect()
Set the file descriptor mask for the select call.
Definition: JDAQClient.hh:559
JDAQCHSM::actionEnter
virtual void actionEnter()
Interface methods for actions corresponding to state transitions.
Definition: JDAQCHSM.hh:120
KM3NETDAQ::JDataWriter::JRunDB::reset
void reset(const int run)
Remove all entries before given run.
Definition: JDataWriter.cc:428
KM3NETDAQ::JDAQClient::getState
const CHSM::state * getState() const
Get current state.
Definition: JDAQClient.hh:1010
JEEP::JTimer::reset
void reset()
Reset timer.
Definition: JTimer.hh:76
KM3NETDAQ::IO_EVENT
static const JNET::JTag IO_EVENT
Definition: JDAQTags.hh:66
JDAQCHSM::actionContinue
virtual void actionContinue(int, const char *)
Definition: JDAQCHSM.hh:127
JEEP::JArgs
Data structure to store command line arguments.
Definition: JArgs.hh:24
JDAQCHSM::execute
virtual void execute(action __action, const CHSM::event &__event)=0
The method to execute the action.
JDAQStateMachine::A5
void A5(CHSM_ns_alias::event const &)
Definition: JDAQCHSM.cc:352
KM3NETDAQ::JDataWriter::writer
JTreeWriter_t writer
TTree writer.
Definition: JDataWriter.cc:395
KM3NETDAQ::JDAQClient::enterState
virtual void enterState(const CHSM::state &state, const CHSM::event &event)
Action when entering state.
Definition: JDAQClient.hh:949
JDAQCHSM::actionRecover
virtual void actionRecover(int, const char *)
Definition: JDAQCHSM.hh:136
JDAQCHSM::actionReset
virtual void actionReset(int, const char *)
Definition: JDAQCHSM.hh:129
JDAQCHSM::getRunNumber
int getRunNumber() const
Get run number.
Definition: JDAQCHSM.hh:111
JNET::JPrefix
ControlHost prefix.
Definition: JPrefix.hh:31
KM3NETDAQ::JDAQClient::parser
JParser parser
parser method enter()
Definition: JDAQClient.hh:1027
JEEP::JTimekeeper::wait
void wait() const
Wait until the number of time intervals has elapsed since the last call to the reset method.
Definition: JTimekeeper.hh:145
KM3NETDAQ::JDAQClient_t::TIMEOUT_S
static const int TIMEOUT_S
time out of update [s]
Definition: JDAQClient.hh:61
JLOGGER::JMessageScheduler::reset
void reset()
Reset.
Definition: JMessageScheduler.hh:94
JDAQStateMachine::A3
void A3(CHSM_ns_alias::event const &)
Definition: JDAQCHSM.cc:348
JLOGGER::JMessageLogger::typeout
virtual void typeout(const std::string &tag, const std::string &message)
Report message.
Definition: JMessageLogger.hh:173
KM3NETDAQ::JDataWriter::run_db
JRunDB run_db
Definition: JDataWriter.cc:501
JLOGGER::JErrorStream
Definition: JMessageStream.hh:115
JDAQStateMachine::ev_check
JDAQStateMachine::ev_check_event ev_check
JNET::JSelectReader::getReaderMask
JFileDescriptorMask & getReaderMask()
Get reader mask.
Definition: JSelectReader.hh:46
JEEP::JTimer::start
void start()
Start timer.
Definition: JTimer.hh:89
KM3NETDAQ::JDAQHeader
DAQ header.
Definition: JDAQHeader.hh:24
JEEP::JTimer::usec_wall
unsigned long long usec_wall
Definition: JTimer.hh:224
KM3NETDAQ::RC_DWRITER
static const JNET::JTag RC_DWRITER
Definition: JDAQTags.hh:49
KM3NETDAQ::JDAQClient::run
void run()
Run as run control client following command messages via JNET::JControlHost.
Definition: JDAQClient.hh:661
JDAQStateMachine::ev_daq_event::param_block::length
int length
Definition: JDAQCHSM.hh:222
KM3NETDAQ::RC_REPLY
static const JNET::JTag RC_REPLY
Definition: JDAQTags.hh:45
JNET::JTag::getTag
const JTag & getTag() const
Get tag.
Definition: JTag.hh:82
std::vector< char >
KM3NETDAQ::JDataWriter::typeout
void typeout()
Report status of data writing.
Definition: JDataWriter.cc:366
event
Structure to store the ToT mean and standard deviation of the hits produced by a nanobeacon in a sour...
Definition: JVoltageOptimizer_utils.hh:26
JDAQCHSM::getName
const std::string & getName() const
Get name of state machine.
Definition: JDAQCHSM.hh:89
JLANG::null
static JNullStream null
Null I/O stream.
Definition: JNullStream.hh:51
JLOGGER::JMessageLogger::getLevel
JLevel_t getLevel()
Get debug level.
Definition: JMessageLogger.hh:117
JDAQStateMachine::state_Main::state_RunControl::Error
JDAQState Error
Definition: JDAQCHSM.hh:202
JDAQStateMachine::A6
void A6(CHSM_ns_alias::event const &)
Definition: JDAQCHSM.cc:354
KM3NETDAQ::JDAQClient_t::eventTable
JEventTable eventTable
event table
Definition: JDAQClient.hh:202
KM3NETDAQ::JDAQClient::server
JSharedPointer< JControlHost > server
message server
Definition: JDAQClient.hh:800
JNET::JSelectReader::reset
void reset()
Reset.
Definition: JSelectReader.hh:78
JROOT::putObject
bool putObject(TDirectory *dir, const T &object)
Write object to ROOT directory.
Definition: JRootFileWriter.hh:38
KM3NETDAQ::JEventTable::find
const_iterator find(const JTag &tag, const std::string &event_name) const
Find entry.
Definition: JEventTable.hh:116
KM3NETDAQ::JDAQClient::filter
virtual bool filter(const JTag &tag, int length, const char *buffer)
Filter message.
Definition: JDAQClient.hh:633
JLOGGER::JMessageLogger::setLevel
void setLevel(const int __level)
Set debug level.
Definition: JMessageLogger.hh:128
KM3NETDAQ::JDAQClient::select
JSelectReader select
select call
Definition: JDAQClient.hh:1026
KM3NETDAQ::JDAQClient::actionRunning
virtual void actionRunning()
This method is repeatedly called when this client machine is in state Running and the clock interval ...
Definition: JDAQClient.hh:596
JLOGGER::JMessageLogger::error
void error(const JMessage_t &message)
Definition: JMessageLogger.hh:184
JEEP::JTimekeeper::reset
void reset(const long long int t0)
Reset time.
Definition: JTimekeeper.hh:100
JLOGGER::JMessageLogger::status
void status(const JMessage_t &message)
Definition: JMessageLogger.hh:186
JROOT::JRootFile::getFile
TFile * getFile() const
Get file.
Definition: JRootFile.hh:65
JPP
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JAAnetToolkit.hh:37
JDAQStateMachine::state_Main::state_RunControl::state_Operational::Running
JDAQState Running
Definition: JDAQCHSM.hh:196
KM3NETDAQ::JEvent_t::toValue
static JEvent_t toValue(const std::string &buffer)
Convert string to event.
Definition: JRuncontrolToolkit.hh:116
KM3NETDAQ::JDAQClient::replaceEvent
void replaceEvent(const JTag &oldTag, const JTag &newTag, JDAQEvent_t &event)
Replace tag of given event in event table.
Definition: JDAQClient.hh:492
JDAQStateMachine::A8
void A8(CHSM_ns_alias::event const &)
Definition: JDAQCHSM.cc:366
JDAQStateMachine::ev_start
JDAQStateMachine::ev_start_event ev_start
JDAQCHSM::actionPause
virtual void actionPause(int, const char *)
Definition: JDAQCHSM.hh:126
debug
int debug
debug level
Definition: JSirene.cc:59
FILL
Auxiliary data structure for sequence of same character.
Definition: JPrint.hh:361
KM3NETDAQ::JDAQClient_t::fullname
std::string fullname
Definition: JDAQClient.hh:204
JDAQStateMachine::A2
void A2(CHSM_ns_alias::event const &)
Definition: JDAQCHSM.cc:346
KM3NETDAQ::JDAQClient::actionTagged
virtual void actionTagged(const JTag &tag, int length, const char *buffer)
This method is called when a custom tag is encountered.
Definition: JDAQClient.hh:646
JDAQCHSM::detector_id
int detector_id
Definition: JDAQCHSM.hh:166
JNET::JSelectReader::hasReaderMask
bool hasReaderMask(const JAbstractFile &file) const
Has reader file.
Definition: JSelectReader.hh:69
JEEP::getFullPath
std::string getFullPath(const std::string &path)
Get full path, i.e.
Definition: JeepToolkit.hh:126
JSUPPORT::JAutoTreeWriter::close
virtual void close()
Close file.
Definition: JAutoTreeWriter.hh:109
JLOGGER::JWarningStream
Definition: JMessageStream.hh:114
JLOGGER::JStatusStream
Definition: JMessageStream.hh:117
KM3NETDAQ::JDAQClient_t::hostname
std::string hostname
Definition: JDAQClient.hh:203
JLOGGER::JStreamLogger
Message logging based on std::ostream.
Definition: JStreamLogger.hh:22
KM3NETDAQ::JDAQClient::exit
virtual bool exit()
Exit the state machine.
Definition: JDAQClient.hh:456
KM3NETDAQ::JDataWriter::MAXIMUM_FILE_NUMBER
static const int MAXIMUM_FILE_NUMBER
maximum file number for overwrite protection.
Definition: JDataWriter.cc:378
JDAQStateMachine::A12
void A12(CHSM_ns_alias::event const &)
Definition: JDAQCHSM.cc:374
JEEP::JTimekeeper::setInterval
void setInterval(const long long int interval_us)
Set interval time.
Definition: JTimekeeper.hh:89
KM3NETDAQ::JDAQClient::enter
virtual bool enter()
Enter the state machine.
Definition: JDAQClient.hh:418
JNET::JSubscriptionList::add
JSubscriptionList & add(const JSubscription &subscription)
Add subscription.
Definition: JControlHost.hh:174
KM3NETDAQ::JDataWriter::numberOfEvents
Long64_t numberOfEvents
Definition: JDataWriter.cc:386
JDAQCHSM::actionConfigure
virtual void actionConfigure(int, const char *)
Definition: JDAQCHSM.hh:124
KM3NETDAQ::JDAQClient::isRunning
bool isRunning() const
Check if this client is in runnig state.
Definition: JDAQClient.hh:479
JLANG::JTypeList
Type list.
Definition: JTypeList.hh:22
KM3NETDAQ::JDAQClient::update
void update()
Update state machine.
Definition: JDAQClient.hh:808
JLOGGER::JMessageLogger::is_valid
bool is_valid() const
Check validity of logger object.
Definition: JMessageLogger.hh:161
JDAQCHSM::actionQuit
virtual void actionQuit(int, const char *)
Definition: JDAQCHSM.hh:130
JDAQStateMachine::A14
void A14(CHSM_ns_alias::event const &)
Definition: JDAQCHSM.cc:378
KM3NETDAQ::JDAQClient_t::unique_tag
JTag unique_tag
Definition: JDAQClient.hh:205
JLOGGER::JControlHostLogger
Message logging based on ControlHost.
Definition: JControlHostLogger.hh:26
KM3NETDAQ::JEventTable::replace
void replace(const JTag &oldTag, const JTag &newTag, JDAQEvent_t &event)
Replace entry in table.
Definition: JEventTable.hh:96
JLOGGER::JMessageLogger::reset
void reset(JLogger *__logger=NULL)
Reset logger.
Definition: JMessageLogger.hh:106
JDAQStateMachine::state_Main::RunControl
JDAQStateMachine::state_Main::state_RunControl RunControl
JDAQStateMachine::A4
void A4(CHSM_ns_alias::event const &)
Definition: JDAQCHSM.cc:350
JLANG::JThrow< JControlHost >::Throw
static void Throw(const bool option)
Enable/disable throw option.
Definition: JThrow.hh:37
JDAQStateMachine::ev_error
JDAQStateMachine::ev_error_event ev_error
JDAQStateMachine::ev_daq_event
Definition: JDAQCHSM.hh:217
KM3NETDAQ::JDataWriter::timer
JEEP::JTimer timer
Definition: JDataWriter.cc:385
JSUPPORT::JAutoTreeWriter< JNET::JTag >::iterator
map_type::iterator iterator
Definition: JAutoTreeWriter.hh:41
JDAQCHSM::getDetectorID
int getDetectorID() const
Get detector identifier.
Definition: JDAQCHSM.hh:100
KM3NETDAQ::IO_TRIGGER_PARAMETERS
static const JNET::JTag IO_TRIGGER_PARAMETERS
Definition: JDAQTags.hh:68
KM3NETDAQ::JDAQClient::subscription
JSubscriptionList subscription
custom subscription
Definition: JDAQClient.hh:1028
KM3NETDAQ::JDAQClient::logger
JMessageLogger logger
message logger
Definition: JDAQClient.hh:801
JDAQStateMachine::state_Main::state_RunControl::Operational
JDAQStateMachine::state_Main::state_RunControl::state_Operational Operational
JLANG::JEquationParameters
Simple data structure to support I/O of equations (see class JLANG::JEquation).
Definition: JEquationParameters.hh:20
JDAQCHSM::actionCheck
virtual void actionCheck(int, const char *)
Definition: JDAQCHSM.hh:132
KM3NETDAQ::RC_LOG
static const JNET::JTag RC_LOG
Definition: JDAQTags.hh:50
KM3NETDAQ::JDataWriter::path
std::string path
Definition: JDataWriter.cc:383
JDAQStateMachine::A1
void A1(CHSM_ns_alias::event const &)
Definition: JDAQCHSM.cc:344
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1954
JEEP::JTimekeeper::getInterval
long long int getInterval() const
Get interval time.
Definition: JTimekeeper.hh:67
KM3NETDAQ::JDAQClient_t::getFullName
const std::string & getFullName() const
Get full name of this run control client.
Definition: JDAQClient.hh:119
JDAQCHSM::actionError
virtual void actionError()
Definition: JDAQCHSM.hh:135
JNET::JSelectReader::setReaderMask
void setReaderMask(const JAbstractFile &file)
Set reader mask.
Definition: JSelectReader.hh:57
KM3NETDAQ::JDataWriter::JRunDB::is_written
bool is_written(const int run) const
Check if trigger parameters have been written for given run.
Definition: JDataWriter.cc:441
JEEP::JProperties
Utility class to parse parameter values.
Definition: JProperties.hh:496
JDAQStateMachine::ev_configure
JDAQStateMachine::ev_configure_event ev_configure
KM3NETDAQ::getStateName
std::string getStateName(const std::string &name)
Get name of state.
Definition: JRuncontrolToolkit.hh:591
std
Definition: jaanetDictionary.h:36
KM3NETDAQ::getSubscription
JSubscriptionList getSubscription(const JEventTable &event_table)
Convert event table to ControlHost subscription.
Definition: JEventTable.hh:129
JDAQStateMachine::ev_daq_event::param_block::buffer
const char * buffer
Definition: JDAQCHSM.hh:224
JDAQStateMachine::A13
void A13(CHSM_ns_alias::event const &)
Definition: JDAQCHSM.cc:376
JDAQStateMachine::A7
void A7(CHSM_ns_alias::event const &)
Definition: JDAQCHSM.cc:364
KM3NETDAQ::JDAQClient::getMessage
std::string getMessage(const CHSM::state &state, const CHSM::event &event) const
Get event message.
Definition: JDAQClient.hh:928
KM3NETDAQ::JDataWriter::logErrorState
JMessageScheduler logErrorState
Definition: JDataWriter.cc:392
KM3NETDAQ::RC_CMD
static const JNET::JTag RC_CMD
Definition: JDAQTags.hh:44
JEEP::JTimer::stop
void stop()
Stop timer.
Definition: JTimer.hh:113
JDAQCHSM::actionStop
virtual void actionStop(int, const char *)
Definition: JDAQCHSM.hh:128
JDAQCHSM::actionExit
virtual void actionExit()
Definition: JDAQCHSM.hh:121
KM3NETDAQ::JDataWriter::meta
JMeta meta
meta data
Definition: JDataWriter.cc:376
KM3NETDAQ::JDAQClient_t::setClockInterval
void setClockInterval(const long long int interval_us)
Set interval time.
Definition: JDAQClient.hh:164
KM3NETDAQ::JDAQClient_t::event_number
int event_number
number of last event
Definition: JDAQClient.hh:207
JDAQCHSM::run_number
int run_number
Definition: JDAQCHSM.hh:167
JDAQStateMachine::Main
JDAQStateMachine::state_Main Main
KM3NETDAQ::JDataWriter::numberOfBytes
long long int numberOfBytes
Definition: JDataWriter.cc:387
KM3NETDAQ::JDataWriter::logErrorFile
JMessageScheduler logErrorFile
Definition: JDataWriter.cc:390
KM3NETDAQ::JDataWriter::JRunDB::write
void write(const int run, TFile *file)
Write trigger parameters for given run if not yet done.
Definition: JDataWriter.cc:485
KM3NETDAQ::getTokenDelimeter
char getTokenDelimeter()
Get the token delimeter for command messages.
Definition: JRuncontrolToolkit.hh:56
KM3NETDAQ::JDataWriter::buffer
std::vector< char > buffer
internal buffer for incoming data
Definition: JDataWriter.cc:396
JNET::JTag::toString
std::string toString() const
Convert tag to string.
Definition: JTag.hh:167
KM3NETDAQ::JDAQClient::JDAQClient
JDAQClient(const std::string &name, const std::string &server, JLogger *logger, const int level)
Constructor.
Definition: JDAQClient.hh:290
KM3NETDAQ::JDataWriter::logErrorRun
JMessageScheduler logErrorRun
Definition: JDataWriter.cc:389
JSUPPORT::JAutoTreeWriter::insert
void insert()
Insert (list of) data type(s).
Definition: JAutoTreeWriter.hh:83
JDAQCHSM::actionInit
virtual void actionInit(int, const char *)
Definition: JDAQCHSM.hh:123
JNET::JPrefix::getSize
int getSize() const
Get size.
Definition: JPrefix.hh:62
JROOT::JRootFile::is_open
virtual bool is_open() const
Check is file is open.
Definition: JRootFile.hh:76
JDAQCHSM::actionInput
virtual void actionInput(int, const char *)
Definition: JDAQCHSM.hh:133
JLANG::getline
std::istream & getline(std::istream &in, JString &object)
Read string from input stream until end of line.
Definition: JString.hh:468
JDAQStateMachine::A11
void A11(CHSM_ns_alias::event const &)
Definition: JDAQCHSM.cc:372
JEEP::JTimekeeper::getDelay
long long int getDelay() const
Get total delay time.
Definition: JTimekeeper.hh:78
JDAQStateMachine::A10
void A10(CHSM_ns_alias::event const &)
Definition: JDAQCHSM.cc:370
KM3NETDAQ::JDAQClient_t::clock
JTimekeeper clock
central clock
Definition: JDAQClient.hh:206
JDAQCHSM::name
std::string name
Definition: JDAQCHSM.hh:165
KM3NETDAQ::JDAQPreamble
DAQ preamble.
Definition: JDAQPreamble.hh:39
KM3NETDAQ::JDAQClient::actionSelect
virtual void actionSelect(const JFileDescriptorMask &mask)
Action method following last select call.
Definition: JDAQClient.hh:585
JPARSER::JParser::read
int read(const int argc, const char *const argv[])
Parse the program's command line options.
Definition: JParser.hh:1791
KM3NETDAQ::JDataWriter::logErrorTag
JMessageScheduler logErrorTag
Definition: JDataWriter.cc:391
KM3NETDAQ::JDAQClient_t::setEventNumber
void setEventNumber(const int event_number)
Set last event number.
Definition: JDAQClient.hh:195
KM3NETDAQ::JDataWriter::hostname
std::string hostname
host name of data server
Definition: JDataWriter.cc:394
JDAQStateMachine::A9
void A9(CHSM_ns_alias::event const &)
Definition: JDAQCHSM.cc:368