artdaq  v3_09_01
Commandable.cc
1 
2 #include "artdaq/Application/Commandable.hh"
3 #include "artdaq/DAQdata/Globals.hh"
4 
5 #define TRACE_NAME (app_name + "_CommandableInterface").c_str() // definition with variable should be after includes (which may or may not have TLOG/TRACE statements)
6 
7 // ELF 3/22/18:
8 // We may want to separate these onto different levels later,
9 // but I think the TRACE_NAME separation is enough for now...
10 #define TLVL_INIT TLVL_INFO
11 #define TLVL_STOP TLVL_INFO
12 #define TLVL_STATUS TLVL_TRACE
13 #define TLVL_START TLVL_INFO
14 #define TLVL_PAUSE TLVL_INFO
15 #define TLVL_RESUME TLVL_INFO
16 #define TLVL_SHUTDOWN TLVL_INFO
17 #define TLVL_ROLLOVER TLVL_INFO
18 #define TLVL_SOFT_INIT TLVL_INFO
19 #define TLVL_REINIT TLVL_INFO
20 #define TLVL_INRUN_FAILURE TLVL_INFO
21 #define TLVL_LEGAL_COMMANDS TLVL_INFO
22 
24  : fsm_(*this)
25 
26 {}
27 
28 // **********************************************************************
29 // *** The following methods implement the externally available commands.
30 // **********************************************************************
31 
32 bool artdaq::Commandable::initialize(fhicl::ParameterSet const& pset, uint64_t timeout, uint64_t timestamp)
33 {
34  std::lock_guard<std::mutex> lk(primary_mutex_);
35  external_request_status_ = true;
36  report_string_ = "All is OK.";
37 
38  SetMFModuleName("Initializing");
39 
40  TLOG(TLVL_INIT) << "Initialize transition started";
41  auto start_time = std::chrono::steady_clock::now();
42  std::string initialState = fsm_.getState().getName();
43  fsm_.init(pset, timeout, timestamp);
44  if (external_request_status_)
45  {
46  std::string finalState = fsm_.getState().getName();
47 
48  SetMFModuleName(finalState);
49  TLOG(TLVL_DEBUG)
50  << "States before and after an init transition: "
51  << initialState << " and " << finalState << ". Transition Duration: " << TimeUtils::GetElapsedTime(start_time) << " s.";
52  }
53  if (metricMan && metricMan->Initialized())
54  {
55  metricMan->sendMetric("DAQ Transition Time", TimeUtils::GetElapsedTime(start_time), "s", 4, artdaq::MetricMode::Accumulate);
56  }
57 
58  TLOG(TLVL_INIT) << "Initialize transition complete";
59  return (external_request_status_);
60 }
61 
62 bool artdaq::Commandable::start(art::RunID id, uint64_t timeout, uint64_t timestamp)
63 {
64  std::lock_guard<std::mutex> lk(primary_mutex_);
65  external_request_status_ = true;
66  report_string_ = "All is OK.";
67 
68  SetMFModuleName("Starting");
69 
70  TLOG(TLVL_START) << "Start transition started";
71  auto start_time = std::chrono::steady_clock::now();
72  std::string initialState = fsm_.getState().getName();
73  fsm_.start(id, timeout, timestamp);
74  if (external_request_status_)
75  {
76  std::string finalState = fsm_.getState().getName();
77 
78  SetMFModuleName(finalState);
79  TLOG(TLVL_DEBUG)
80  << "States before and after a start transition: "
81  << initialState << " and " << finalState << ". Transition Duration: " << TimeUtils::GetElapsedTime(start_time) << " s.";
82  }
83  if (metricMan && metricMan->Initialized())
84  {
85  metricMan->sendMetric("DAQ Transition Time", TimeUtils::GetElapsedTime(start_time), "s", 4, artdaq::MetricMode::Accumulate);
86  }
87 
88  TLOG(TLVL_START) << "Start transition complete";
89  return (external_request_status_);
90 }
91 
92 bool artdaq::Commandable::stop(uint64_t timeout, uint64_t timestamp)
93 {
94  std::lock_guard<std::mutex> lk(primary_mutex_);
95  external_request_status_ = true;
96  report_string_ = "All is OK.";
97 
98  SetMFModuleName("Stopping");
99 
100  TLOG(TLVL_STOP) << "Stop transition started";
101  auto start_time = std::chrono::steady_clock::now();
102  std::string initialState = fsm_.getState().getName();
103  fsm_.stop(timeout, timestamp);
104  if (external_request_status_)
105  {
106  std::string finalState = fsm_.getState().getName();
107 
108  SetMFModuleName(finalState);
109  TLOG(TLVL_DEBUG)
110  << "States before and after a stop transition: "
111  << initialState << " and " << finalState << ". Transition Duration: " << TimeUtils::GetElapsedTime(start_time) << " s.";
112  }
113  if (metricMan && metricMan->Initialized())
114  {
115  metricMan->sendMetric("DAQ Transition Time", TimeUtils::GetElapsedTime(start_time), "s", 4, artdaq::MetricMode::Accumulate);
116  }
117 
118  TLOG(TLVL_STOP) << "Stop transition complete";
119  return (external_request_status_);
120 }
121 
122 bool artdaq::Commandable::pause(uint64_t timeout, uint64_t timestamp)
123 {
124  std::lock_guard<std::mutex> lk(primary_mutex_);
125  external_request_status_ = true;
126  report_string_ = "All is OK.";
127 
128  SetMFModuleName("Pausing");
129 
130  TLOG(TLVL_PAUSE) << "Pause transition started";
131  auto start_time = std::chrono::steady_clock::now();
132  std::string initialState = fsm_.getState().getName();
133  fsm_.pause(timeout, timestamp);
134  if (external_request_status_)
135  {
136  std::string finalState = fsm_.getState().getName();
137 
138  SetMFModuleName(finalState);
139  TLOG(TLVL_DEBUG)
140  << "States before and after a pause transition: "
141  << initialState << " and " << finalState << ". Transition Duration: " << TimeUtils::GetElapsedTime(start_time) << " s.";
142  }
143  if (metricMan && metricMan->Initialized())
144  {
145  metricMan->sendMetric("DAQ Transition Time", TimeUtils::GetElapsedTime(start_time), "s", 4, artdaq::MetricMode::Accumulate);
146  }
147 
148  TLOG(TLVL_PAUSE) << "Pause transition complete";
149  return (external_request_status_);
150 }
151 
152 bool artdaq::Commandable::resume(uint64_t timeout, uint64_t timestamp)
153 {
154  std::lock_guard<std::mutex> lk(primary_mutex_);
155  external_request_status_ = true;
156  report_string_ = "All is OK.";
157 
158  SetMFModuleName("Resuming");
159 
160  TLOG(TLVL_RESUME) << "Resume transition started";
161  auto start_time = std::chrono::steady_clock::now();
162  std::string initialState = fsm_.getState().getName();
163  fsm_.resume(timeout, timestamp);
164  if (external_request_status_)
165  {
166  std::string finalState = fsm_.getState().getName();
167  SetMFModuleName(finalState);
168  TLOG(TLVL_DEBUG)
169  << "States before and after a resume transition: "
170  << initialState << " and " << finalState << ". Transition Duration: " << TimeUtils::GetElapsedTime(start_time) << " s.";
171  }
172  if (metricMan && metricMan->Initialized())
173  {
174  metricMan->sendMetric("DAQ Transition Time", TimeUtils::GetElapsedTime(start_time), "s", 4, artdaq::MetricMode::Accumulate);
175  }
176 
177  TLOG(TLVL_RESUME) << "Resume transition complete";
178  return (external_request_status_);
179 }
180 
181 bool artdaq::Commandable::shutdown(uint64_t timeout)
182 {
183  std::lock_guard<std::mutex> lk(primary_mutex_);
184  external_request_status_ = true;
185  report_string_ = "All is OK.";
186  SetMFModuleName("Shutting Down");
187 
188  TLOG(TLVL_SHUTDOWN) << "Shutdown transition started";
189  auto start_time = std::chrono::steady_clock::now();
190  std::string initialState = fsm_.getState().getName();
191  fsm_.shutdown(timeout);
192  if (external_request_status_)
193  {
194  std::string finalState = fsm_.getState().getName();
195  SetMFModuleName(finalState);
196  TLOG(TLVL_DEBUG)
197  << "States before and after a shutdown transition: "
198  << initialState << " and " << finalState << ". Transition Duration: " << TimeUtils::GetElapsedTime(start_time) << " s.";
199  }
200  if (metricMan && metricMan->Initialized())
201  {
202  metricMan->sendMetric("DAQ Transition Time", TimeUtils::GetElapsedTime(start_time), "s", 4, artdaq::MetricMode::Accumulate);
203  }
204 
205  TLOG(TLVL_SHUTDOWN) << "Shutdown transition complete";
206  return (external_request_status_);
207 }
208 
209 bool artdaq::Commandable::soft_initialize(fhicl::ParameterSet const& pset, uint64_t timeout, uint64_t timestamp)
210 {
211  std::lock_guard<std::mutex> lk(primary_mutex_);
212  external_request_status_ = true;
213  report_string_ = "All is OK.";
214 
215  SetMFModuleName("Soft_initializing");
216 
217  TLOG(TLVL_SOFT_INIT) << "Soft_initialize transition started";
218  auto start_time = std::chrono::steady_clock::now();
219  std::string initialState = fsm_.getState().getName();
220  fsm_.soft_init(pset, timeout, timestamp);
221  if (external_request_status_)
222  {
223  std::string finalState = fsm_.getState().getName();
224 
225  SetMFModuleName(finalState);
226  TLOG(TLVL_DEBUG)
227  << "States before and after a soft_init transition: "
228  << initialState << " and " << finalState << ". Transition Duration: " << TimeUtils::GetElapsedTime(start_time) << " s.";
229  }
230  if (metricMan && metricMan->Initialized())
231  {
232  metricMan->sendMetric("DAQ Transition Time", TimeUtils::GetElapsedTime(start_time), "s", 4, artdaq::MetricMode::Accumulate);
233  }
234 
235  TLOG(TLVL_SOFT_INIT) << "Soft_initialize transition complete";
236  return (external_request_status_);
237 }
238 
239 bool artdaq::Commandable::reinitialize(fhicl::ParameterSet const& pset, uint64_t timeout, uint64_t timestamp)
240 {
241  std::lock_guard<std::mutex> lk(primary_mutex_);
242  external_request_status_ = true;
243  report_string_ = "All is OK.";
244 
245  SetMFModuleName("Reinitializing");
246 
247  TLOG(TLVL_REINIT) << "Reinitialize transition started";
248  auto start_time = std::chrono::steady_clock::now();
249  std::string initialState = fsm_.getState().getName();
250  fsm_.reinit(pset, timeout, timestamp);
251  if (external_request_status_)
252  {
253  std::string finalState = fsm_.getState().getName();
254 
255  SetMFModuleName(finalState);
256  TLOG(TLVL_DEBUG)
257  << "States before and after a reinit transition: "
258  << initialState << " and " << finalState << ". Transition Duration: " << TimeUtils::GetElapsedTime(start_time) << " s.";
259  }
260  if (metricMan && metricMan->Initialized())
261  {
262  metricMan->sendMetric("DAQ Transition Time", TimeUtils::GetElapsedTime(start_time), "s", 4, artdaq::MetricMode::Accumulate);
263  }
264 
265  TLOG(TLVL_REINIT) << "Reinitialize transition complete";
266  return (external_request_status_);
267 }
268 
270 {
271  std::lock_guard<std::mutex> lk(primary_mutex_);
272  external_request_status_ = true;
273  report_string_ = "An error condition was reported while running.";
274 
275  SetMFModuleName("Failing");
276 
277  TLOG(TLVL_INRUN_FAILURE) << "In_Run_Failure transition started";
278  auto start_time = std::chrono::steady_clock::now();
279  std::string initialState = fsm_.getState().getName();
280  fsm_.in_run_failure();
281  if (external_request_status_)
282  {
283  std::string finalState = fsm_.getState().getName();
284 
285  SetMFModuleName(finalState);
286  TLOG(TLVL_DEBUG)
287  << "States before and after an in_run_failure transition: "
288  << initialState << " and " << finalState << ". Transition Duration: " << TimeUtils::GetElapsedTime(start_time) << " s.";
289  }
290  if (metricMan && metricMan->Initialized())
291  {
292  metricMan->sendMetric("DAQ Transition Time", TimeUtils::GetElapsedTime(start_time), "s", 4, artdaq::MetricMode::Accumulate);
293  }
294 
295  TLOG(TLVL_INRUN_FAILURE) << "in_run_failure complete";
296  return (external_request_status_);
297 }
298 
299 std::string artdaq::Commandable::status() const
300 {
301  std::lock_guard<std::mutex> lk(primary_mutex_);
302  TLOG(TLVL_STATUS) << "Status command started";
303  std::string currentState = this->current_state();
304  if (currentState == "InRunError")
305  {
306  return "Error";
307  }
308  TLOG(TLVL_STATUS) << "Status command complete";
309  return currentState;
310 }
311 
312 std::vector<std::string> artdaq::Commandable::legal_commands() const
313 {
314  std::lock_guard<std::mutex> lk(primary_mutex_);
315  TLOG(TLVL_LEGAL_COMMANDS) << "legal_commands started";
316  std::string currentState = this->current_state();
317 
318  if (currentState == "Ready")
319  {
320  return {"init", "soft_init", "start", "shutdown"};
321  }
322  if (currentState == "Running")
323  {
324  // 12-May-2015, KAB: in_run_failure is also possible, but it
325  // shouldn't be requested externally.
326  return {"pause", "stop"};
327  }
328  if (currentState == "Paused")
329  {
330  return {"resume", "stop"};
331  }
332  if (currentState == "InRunError")
333  {
334  return {"pause", "stop"};
335  }
336 
337  // Booted and Error
338  TLOG(TLVL_LEGAL_COMMANDS) << "legal_commands complete";
339  return {"init", "shutdown"};
340 }
341 
342 // *******************************************************************
343 // *** The following methods implement the state machine operations.
344 // *******************************************************************
345 
346 bool artdaq::Commandable::do_initialize(fhicl::ParameterSet const& /*unused*/, uint64_t /*unused*/, uint64_t /*unused*/)
347 {
348  TLOG(TLVL_DEBUG) << "do_initialize called.";
349  external_request_status_ = true;
350  return external_request_status_;
351 }
352 
353 bool artdaq::Commandable::do_start(art::RunID /*unused*/, uint64_t /*unused*/, uint64_t /*unused*/)
354 {
355  TLOG(TLVL_DEBUG) << "do_start called.";
356  external_request_status_ = true;
357  return external_request_status_;
358 }
359 
360 bool artdaq::Commandable::do_stop(uint64_t /*unused*/, uint64_t /*unused*/)
361 {
362  TLOG(TLVL_DEBUG) << "do_stop called.";
363  external_request_status_ = true;
364  return external_request_status_;
365 }
366 
367 bool artdaq::Commandable::do_pause(uint64_t /*unused*/, uint64_t /*unused*/)
368 {
369  TLOG(TLVL_DEBUG) << "do_pause called.";
370  external_request_status_ = true;
371  return external_request_status_;
372 }
373 
374 bool artdaq::Commandable::do_resume(uint64_t /*unused*/, uint64_t /*unused*/)
375 {
376  TLOG(TLVL_DEBUG) << "do_resume called.";
377  external_request_status_ = true;
378  return external_request_status_;
379 }
380 
381 bool artdaq::Commandable::do_shutdown(uint64_t /*unused*/)
382 {
383  TLOG(TLVL_DEBUG) << "do_shutdown called.";
384  external_request_status_ = true;
385  return external_request_status_;
386 }
387 
388 bool artdaq::Commandable::do_reinitialize(fhicl::ParameterSet const& /*unused*/, uint64_t /*unused*/, uint64_t /*unused*/)
389 {
390  TLOG(TLVL_DEBUG) << "do_reinitialize called.";
391  external_request_status_ = true;
392  return external_request_status_;
393 }
394 
395 bool artdaq::Commandable::do_soft_initialize(fhicl::ParameterSet const& /*unused*/, uint64_t /*unused*/, uint64_t /*unused*/)
396 {
397  TLOG(TLVL_DEBUG) << "do_soft_initialize called.";
398  external_request_status_ = true;
399  return external_request_status_;
400 }
401 
402 void artdaq::Commandable::badTransition(const std::string& trans)
403 {
404  std::string currentState = this->current_state();
405  if (currentState == "InRunError")
406  {
407  currentState = "Error";
408  }
409 
410  report_string_ = "An invalid transition (";
411  report_string_.append(trans);
412  report_string_.append(") was requested; transition not allowed from this process's current state of \"");
413  report_string_.append(currentState);
414  report_string_.append("\"");
415 
416  TLOG(TLVL_WARNING) << report_string_;
417 
418  external_request_status_ = false;
419 }
420 
422 {
423  TLOG(TLVL_DEBUG) << "BootedEnter called.";
424 }
425 
427 {
428  TLOG(TLVL_DEBUG) << "InRunExit called.";
429 }
430 
431 std::string artdaq::Commandable::do_trace_get(std::string const& name)
432 {
433  TLOG(TLVL_DEBUG) << "Getting masks for name " << name;
434  std::ostringstream ss;
435  if (name == "ALL")
436  {
437  unsigned ii = 0;
438  unsigned ee = traceControl_p->num_namLvlTblEnts;
439  for (ii = 0; ii < ee; ++ii)
440  {
441  if (traceNamLvls_p[ii].name[0] != 0) // NOLINT(cppcoreguidelines-pro-bounds-pointer-arithmetic)
442  {
443  ss << traceNamLvls_p[ii].name << " " << std::hex << std::showbase << traceNamLvls_p[ii].M << " " << traceNamLvls_p[ii].S << " " << traceNamLvls_p[ii].T << " " << std::endl; // NOLINT(cppcoreguidelines-pro-bounds-pointer-arithmetic)
444  }
445  }
446  }
447  else
448  {
449  unsigned ii = 0;
450  unsigned ee = traceControl_p->num_namLvlTblEnts;
451  for (ii = 0; ii < ee; ++ii)
452  {
453  if ((traceNamLvls_p[ii].name[0] != 0) && TMATCHCMP(name.c_str(), traceNamLvls_p[ii].name)) // NOLINT(cppcoreguidelines-pro-bounds-pointer-arithmetic)
454  {
455  break;
456  }
457  }
458  if (ii == ee)
459  {
460  return "";
461  }
462 
463  ss << std::hex << traceNamLvls_p[ii].M << " " << traceNamLvls_p[ii].S << " " << traceNamLvls_p[ii].T; // NOLINT(cppcoreguidelines-pro-bounds-pointer-arithmetic)
464  }
465  return ss.str();
466 }
467 
468 bool artdaq::Commandable::do_trace_set(std::string const& name, std::string const& type, std::string const& mask_in_string_form)
469 {
470  TLOG(TLVL_DEBUG) << "Setting msk " << type << " for name " << name << " to " << mask_in_string_form;
471  auto mask = static_cast<uint64_t>(std::stoull(mask_in_string_form, nullptr, 0));
472  TLOG(TLVL_DEBUG) << "Mask has been converted to " << mask;
473 
474  if (name != "ALL")
475  {
476  if (!type.empty())
477  {
478  switch (type[0])
479  {
480  case 'M':
481  TRACE_CNTL("lvlmsknM", name.c_str(), mask);
482  break;
483  case 'S':
484  TRACE_CNTL("lvlmsknS", name.c_str(), mask);
485  break;
486  case 'T':
487  TRACE_CNTL("lvlmsknT", name.c_str(), mask);
488  break;
489  }
490  }
491  else
492  {
493  TLOG(TLVL_ERROR) << "Cannot set mask: no type specified!";
494  }
495  }
496  else
497  {
498  if (!type.empty())
499  {
500  switch (type[0])
501  {
502  case 'M':
503  TRACE_CNTL("lvlmskMg", mask);
504  break;
505  case 'S':
506  TRACE_CNTL("lvlmskSg", mask);
507  break;
508  case 'T':
509  TRACE_CNTL("lvlmskTg", mask);
510  break;
511  }
512  }
513  else
514  {
515  TLOG(TLVL_ERROR) << "Cannot set mask: no type specified!";
516  }
517  }
518  return true;
519 }
520 
521 bool artdaq::Commandable::do_meta_command(std::string const& cmd, std::string const& arg)
522 {
523  TLOG(TLVL_DEBUG) << "Meta-Command called: cmd=" << cmd << ", arg=" << arg;
524  return true;
525 }
526 
527 bool artdaq::Commandable::do_rollover_subrun(uint64_t /*unused*/, uint32_t /*unused*/)
528 {
529  TLOG(TLVL_DEBUG) << "do_rollover_subrun called.";
530  external_request_status_ = true;
531  return external_request_status_;
532 }
533 
534 bool artdaq::Commandable::do_add_config_archive_entry(std::string const& key, std::string const& value)
535 {
536  TLOG(TLVL_DEBUG) << "do_add_config_archive_entry called: key=" << key << ", value=" << value;
537  return true;
538 }
539 
541 {
542  TLOG(TLVL_DEBUG) << "do_clear_config_archive called.";
543  external_request_status_ = true;
544  return external_request_status_;
545 }
546 
547 // *********************
548 // *** Utility methods.
549 // *********************
550 
552 {
553  std::string fullStateName = (const_cast<Commandable*>(this))->fsm_.getState().getName(); // NOLINT(cppcoreguidelines-pro-type-const-cast)
554  size_t pos = fullStateName.rfind("::");
555  if (pos != std::string::npos)
556  {
557  return fullStateName.substr(pos + 2);
558  }
559 
560  return fullStateName;
561 }
virtual bool do_add_config_archive_entry(std::string const &, std::string const &)
Add the specified key-value pair to the configuration archive list.
Definition: Commandable.cc:534
bool initialize(fhicl::ParameterSet const &pset, uint64_t timeout, uint64_t timestamp)
Processes the initialize request.
Definition: Commandable.cc:32
virtual bool do_start(art::RunID, uint64_t, uint64_t)
Perform the start transition.
Definition: Commandable.cc:353
Commandable is the base class for all artdaq components which implement the artdaq state machine...
Definition: Commandable.hh:20
virtual bool do_clear_config_archive()
Clears the configuration archive list.
Definition: Commandable.cc:540
virtual void badTransition(const std::string &trans)
This function is called when an attempt is made to call an illegal transition.
Definition: Commandable.cc:402
virtual void InRunExit()
Perform actions upon leaving the InRun state.
Definition: Commandable.cc:426
virtual bool do_pause(uint64_t, uint64_t)
Perform the pause transition.
Definition: Commandable.cc:367
bool reinitialize(fhicl::ParameterSet const &pset, uint64_t timeout, uint64_t timestamp)
Processes the reinitialize request.
Definition: Commandable.cc:239
std::string current_state() const
Return the name of the current state.
Definition: Commandable.cc:551
virtual void BootedEnter()
Perform actions upon entering the Booted state.
Definition: Commandable.cc:421
std::string status() const
Returns the current state of the Commandable.
Definition: Commandable.cc:299
virtual bool do_shutdown(uint64_t)
Perform the shutdown transition.
Definition: Commandable.cc:381
virtual bool do_soft_initialize(fhicl::ParameterSet const &, uint64_t, uint64_t)
Perform the soft_initialize transition.
Definition: Commandable.cc:395
virtual bool do_trace_set(std::string const &name, std::string const &type, std::string const &mask_in_string_form)
Set the given TRACE mask for the given TRACE name.
Definition: Commandable.cc:468
bool resume(uint64_t timeout, uint64_t timestamp)
Processes the resume transition.
Definition: Commandable.cc:152
bool pause(uint64_t timeout, uint64_t timestamp)
Processes the pause transition.
Definition: Commandable.cc:122
virtual bool do_stop(uint64_t, uint64_t)
Perform the stop transition.
Definition: Commandable.cc:360
bool in_run_failure()
Actions taken when the in_run_failure state is set.
Definition: Commandable.cc:269
std::vector< std::string > legal_commands() const
Get the legal transition commands from the current state.
Definition: Commandable.cc:312
bool soft_initialize(fhicl::ParameterSet const &pset, uint64_t timeout, uint64_t timestamp)
Processes the soft-initialize request.
Definition: Commandable.cc:209
virtual bool do_resume(uint64_t, uint64_t)
Perform the resume transition.
Definition: Commandable.cc:374
bool start(art::RunID id, uint64_t timeout, uint64_t timestamp)
Processes the start transition.
Definition: Commandable.cc:62
virtual bool do_reinitialize(fhicl::ParameterSet const &, uint64_t, uint64_t)
Perform the reinitialize transition.
Definition: Commandable.cc:388
virtual std::string do_trace_get(std::string const &name)
Get the TRACE mask for the given TRACE name If name is &quot;ALL&quot;, then all TRACE masks will be printed...
Definition: Commandable.cc:431
virtual bool do_meta_command(std::string const &cmd, std::string const &args)
Run a module-defined command with the given parameter string.
Definition: Commandable.cc:521
bool stop(uint64_t timeout, uint64_t timestamp)
Processes the stop transition.
Definition: Commandable.cc:92
virtual bool do_rollover_subrun(uint64_t eventNum, uint32_t subrunNum)
Perform the rollover_subrun transition.
Definition: Commandable.cc:527
virtual bool do_initialize(fhicl::ParameterSet const &, uint64_t, uint64_t)
Perform the initialize transition.
Definition: Commandable.cc:346
bool shutdown(uint64_t timeout)
Processes the shutdown transition.
Definition: Commandable.cc:181