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