3 #define TRACEMF_USE_VERBATIM 1
4 #include "otsdaq/ARTDAQSupervisor/ARTDAQSupervisor.hh"
6 #include "artdaq-core/Utilities/configureMessageFacility.hh"
7 #include "artdaq/BuildInfo/GetPackageBuildInfo.hh"
8 #include "artdaq/DAQdata/Globals.hh"
9 #include "artdaq/ExternalComms/MakeCommanderPlugin.hh"
10 #include "cetlib_except/exception.h"
11 #include "fhiclcpp/make_ParameterSet.h"
12 #include "otsdaq/ARTDAQSupervisor/ARTDAQSupervisorTRACEController.h"
14 #include "artdaq-core/Utilities/ExceptionHandler.hh"
16 #include <boost/exception/all.hpp>
17 #include <boost/filesystem.hpp>
26 #define FAKE_CONFIG_NAME "ots_config"
27 #define DAQINTERFACE_PORT \
28 std::atoi(__ENV__("ARTDAQ_BASE_PORT")) + \
29 (partition_ * std::atoi(__ENV__("ARTDAQ_PORTS_PER_PARTITION")))
32 static std::unordered_map<int, struct sigaction> old_actions =
33 std::unordered_map<int, struct sigaction>();
34 static bool sighandler_init =
false;
35 static void signal_handler(
int signum)
38 #if TRACE_REVNUM < 1459
39 TRACE_STREAMER(TLVL_ERROR, &(
"ARTDAQsupervisor")[0], 0, 0, 0)
41 TRACE_STREAMER(TLVL_ERROR, TLOG2(
"ARTDAQsupervisor", 0), 0)
43 <<
"A signal of type " << signum
44 <<
" was caught by ARTDAQSupervisor. Shutting down DAQInterface, "
45 "then proceeding with default handlers!";
51 pthread_sigmask(SIG_UNBLOCK, NULL, &set);
52 pthread_sigmask(SIG_UNBLOCK, &set, NULL);
54 #if TRACE_REVNUM < 1459
55 TRACE_STREAMER(TLVL_ERROR, &(
"ARTDAQsupervisor")[0], 0, 0, 0)
57 TRACE_STREAMER(TLVL_ERROR, TLOG2(
"ARTDAQsupervisor", 0), 0)
59 <<
"Calling default signal handler";
62 sigaction(signum, &old_actions[signum], NULL);
63 kill(getpid(), signum);
69 sigaction(SIGINT, &old_actions[SIGINT], NULL);
70 kill(getpid(), SIGINT);
76 static std::mutex sighandler_mutex;
77 std::unique_lock<std::mutex> lk(sighandler_mutex);
81 sighandler_init =
true;
83 std::vector<int> signals = {
94 for(
auto signal : signals)
96 struct sigaction old_action;
97 sigaction(signal, NULL, &old_action);
101 if(old_action.sa_handler != SIG_IGN)
103 struct sigaction action;
104 action.sa_handler = signal_handler;
105 sigemptyset(&action.sa_mask);
106 for(
auto sigblk : signals)
108 sigaddset(&action.sa_mask, sigblk);
114 sigaction(signal, &action, NULL);
115 old_actions[signal] = old_action;
122 ARTDAQSupervisor::ARTDAQSupervisor(xdaq::ApplicationStub* stub)
124 , daqinterface_ptr_(NULL)
125 , partition_(getSupervisorProperty(
"partition", 0))
126 , daqinterface_state_(
"notrunning")
127 , runner_thread_(nullptr)
129 __SUP_COUT__ <<
"Constructor." << __E__;
132 init_sighandler(
this);
139 auto settings_file = __ENV__(
"DAQINTERFACE_SETTINGS");
140 std::ofstream o(settings_file, std::ios::trunc);
142 setenv(
"DAQINTERFACE_PARTITION_NUMBER", std::to_string(partition_).c_str(), 1);
143 auto logfileName = std::string(__ENV__(
"OTSDAQ_LOG_DIR")) +
144 "/DAQInteface/DAQInterface_partition" +
145 std::to_string(partition_) +
".log";
146 setenv(
"DAQINTERFACE_LOGFILE", logfileName.c_str(), 1);
148 o <<
"log_directory: "
149 << getSupervisorProperty(
"log_directory", std::string(__ENV__(
"OTSDAQ_LOG_DIR")))
153 const std::string record_directory = getSupervisorProperty(
154 "record_directory", ARTDAQTableBase::ARTDAQ_FCL_PATH +
"/run_records/");
155 mkdir(record_directory.c_str(), 0755);
156 o <<
"record_directory: " << record_directory << std::endl;
159 o <<
"package_hashes_to_save: "
160 << getSupervisorProperty(
"package_hashes_to_save",
"[artdaq]") << std::endl;
162 __SUP_COUT__ <<
"Use spack is " << getSupervisorProperty(
"use_spack",
false)
163 <<
", spack_root is "
164 << getSupervisorProperty(
"spack_root_for_bash_scripts",
"NOT SET")
165 <<
", productsdir is "
166 << getSupervisorProperty(
"productsdir_for_bash_scripts",
"NOT SET")
168 if(getSupervisorProperty(
"use_spack",
false))
170 o <<
"spack_root_for_bash_scripts: "
171 << getSupervisorProperty(
"spack_root_for_bash_scripts",
172 std::string(__ENV__(
"SPACK_ROOT")))
177 o <<
"productsdir_for_bash_scripts: "
178 << getSupervisorProperty(
"productsdir_for_bash_scripts",
179 std::string(__ENV__(
"OTS_PRODUCTS")))
182 o <<
"boardreader timeout: " << getSupervisorProperty(
"boardreader_timeout", 30)
184 o <<
"eventbuilder timeout: " << getSupervisorProperty(
"eventbuilder_timeout", 30)
186 o <<
"datalogger timeout: " << getSupervisorProperty(
"datalogger_timeout", 30)
188 o <<
"dispatcher timeout: " << getSupervisorProperty(
"dispatcher_timeout", 30)
191 if(!getSupervisorProperty(
"advanced_memory_usage",
false))
193 o <<
"max_fragment_size_bytes: "
194 << getSupervisorProperty(
"max_fragment_size_bytes", 1048576) << std::endl;
196 o <<
"transfer_plugin_to_use: "
197 << getSupervisorProperty(
"transfer_plugin_to_use",
"Autodetect") << std::endl;
198 o <<
"all_events_to_all_dispatchers: " << std::boolalpha
199 << getSupervisorProperty(
"all_events_to_all_dispatchers",
true) << std::endl;
200 o <<
"data_directory_override: "
201 << getSupervisorProperty(
"data_directory_override",
202 std::string(__ENV__(
"ARTDAQ_OUTPUT_DIR")))
204 o <<
"max_configurations_to_list: "
205 << getSupervisorProperty(
"max_configurations_to_list", 10) << std::endl;
206 o <<
"disable_unique_rootfile_labels: "
207 << getSupervisorProperty(
"disable_unique_rootfile_labels",
false) << std::endl;
208 o <<
"use_messageviewer: " << std::boolalpha
209 << getSupervisorProperty(
"use_messageviewer",
false) << std::endl;
210 o <<
"use_messagefacility: " << std::boolalpha
211 << getSupervisorProperty(
"use_messagefacility",
true) << std::endl;
212 o <<
"fake_messagefacility: " << std::boolalpha
213 << getSupervisorProperty(
"fake_messagefacility",
false) << std::endl;
214 o <<
"kill_existing_processes: " << std::boolalpha
215 << getSupervisorProperty(
"kill_existing_processes",
true) << std::endl;
216 o <<
"advanced_memory_usage: " << std::boolalpha
217 << getSupervisorProperty(
"advanced_memory_usage",
false) << std::endl;
218 o <<
"strict_fragment_id_mode: " << std::boolalpha
219 << getSupervisorProperty(
"strict_fragment_id_mode",
false) << std::endl;
220 o <<
"disable_private_network_bookkeeping: " << std::boolalpha
221 << getSupervisorProperty(
"disable_private_network_bookkeeping",
false) << std::endl;
222 o <<
"allowed_processors: " << getSupervisorProperty(
"allowed_processors",
"0-255")
229 if(CorePropertySupervisorBase::theTRACEController_)
231 __SUP_COUT__ <<
"Destroying TRACE Controller..." << __E__;
232 delete CorePropertySupervisorBase::
234 CorePropertySupervisorBase::theTRACEController_ =
nullptr;
236 CorePropertySupervisorBase::theTRACEController_ =
239 ->setSupervisorPtr(
this);
241 __SUP_COUT__ <<
"Constructed." << __E__;
245 ARTDAQSupervisor::~ARTDAQSupervisor(
void)
247 __SUP_COUT__ <<
"Destructor." << __E__;
249 __SUP_COUT__ <<
"Destructed." << __E__;
253 void ARTDAQSupervisor::destroy(
void)
255 __SUP_COUT__ <<
"Destroying..." << __E__;
257 if(daqinterface_ptr_ != NULL)
259 __SUP_COUT__ <<
"Calling recover transition" << __E__;
260 std::lock_guard<std::recursive_mutex> lk(daqinterface_mutex_);
261 PyObject* pName = PyUnicode_FromString(
"do_recover");
262 PyObject_CallMethodObjArgs(
263 daqinterface_ptr_, pName, NULL);
265 __SUP_COUT__ <<
"Making sure that correct state has been reached" << __E__;
267 while(daqinterface_state_ !=
"stopped")
270 __SUP_COUT__ <<
"State is " << daqinterface_state_
271 <<
", waiting 1s and retrying..." << __E__;
275 Py_XDECREF(daqinterface_ptr_);
276 daqinterface_ptr_ = NULL;
284 __SUP_COUT__ <<
"Destroying TRACE Controller..." << __E__;
289 __SUP_COUT__ <<
"Destroyed." << __E__;
293 void ARTDAQSupervisor::init(
void)
297 __SUP_COUT__ <<
"Initializing..." << __E__;
299 std::lock_guard<std::recursive_mutex> lk(daqinterface_mutex_);
302 artdaq::configureMessageFacility(
"ARTDAQSupervisor");
303 __SUP_COUT__ <<
"artdaq MF configured." << __E__;
306 char* daqinterface_dir = getenv(
"ARTDAQ_DAQINTERFACE_DIR");
307 if(daqinterface_dir == NULL)
309 __SS__ <<
"ARTDAQ_DAQINTERFACE_DIR environment variable not set! This "
310 "means that DAQInterface has not been setup!"
316 __SUP_COUT__ <<
"Initializing Python" << __E__;
319 __SUP_COUT__ <<
"Adding DAQInterface directory to PYTHON_PATH" << __E__;
320 PyObject* sysPath = PySys_GetObject((
char*)
"path");
321 PyObject* programName = PyUnicode_FromString(daqinterface_dir);
322 PyList_Append(sysPath, programName);
323 Py_DECREF(programName);
325 __SUP_COUT__ <<
"Creating Module name" << __E__;
326 PyObject* pName = PyUnicode_FromString(
"rc.control.daqinterface");
329 __SUP_COUT__ <<
"Importing module" << __E__;
330 PyObject* pModule = PyImport_Import(pName);
336 __SS__ <<
"Failed to load rc.control.daqinterface" << __E__;
341 __SUP_COUT__ <<
"Loading python module dictionary" << __E__;
342 PyObject* pDict = PyModule_GetDict(pModule);
346 __SS__ <<
"Unable to load module dictionary" << __E__;
353 __SUP_COUT__ <<
"Getting DAQInterface object pointer" << __E__;
354 PyObject* di_obj_ptr = PyDict_GetItemString(pDict,
"DAQInterface");
356 __SUP_COUT__ <<
"Filling out DAQInterface args struct" << __E__;
357 PyObject* pArgs = PyTuple_New(0);
359 PyObject* kwargs = Py_BuildValue(
"{s:s, s:s, s:i, s:i, s:s, s:s}",
373 __SUP_COUT__ <<
"Calling DAQInterface Object Constructor" << __E__;
374 daqinterface_ptr_ = PyObject_Call(di_obj_ptr, pArgs, kwargs);
376 Py_DECREF(di_obj_ptr);
404 __SUP_COUT__ <<
"Initialized." << __E__;
408 void ARTDAQSupervisor::transitionConfiguring(toolbox::Event::Reference )
410 __SUP_COUT__ <<
"transitionConfiguring" << __E__;
413 if(RunControlStateMachine::getIterationIndex() == 0 &&
414 RunControlStateMachine::getSubIterationIndex() == 0)
416 thread_error_message_ =
"";
417 thread_progress_bar_.resetProgressBar(0);
418 last_thread_progress_update_ = time(0);
421 SOAPUtilities::translate(theStateMachine_.getCurrentMessage())
423 .getValue(
"ConfigurationTableGroupName"),
424 TableGroupKey(SOAPUtilities::translate(theStateMachine_.getCurrentMessage())
426 .getValue(
"ConfigurationTableGroupKey")));
428 __SUP_COUT__ <<
"Configuration table group name: " << theGroup.first
429 <<
" key: " << theGroup.second << __E__;
447 ConfigurationManager::LoadGroupType::ALL_TYPES,
450 catch(
const std::runtime_error& e)
452 __SS__ <<
"Error loading table group '" << theGroup.first <<
"("
453 << theGroup.second <<
")! \n"
454 << e.what() << __E__;
455 __SUP_COUT_ERR__ << ss.str();
459 theStateMachine_.setErrorMessage(ss.str());
460 throw toolbox::fsm::exception::Exception(
463 "ARTDAQSupervisor::transitionConfiguring" ,
470 __SS__ <<
"Unknown error loading table group '" << theGroup.first <<
"("
471 << theGroup.second <<
")!" << __E__;
472 __SUP_COUT_ERR__ << ss.str();
476 theStateMachine_.setErrorMessage(ss.str());
477 throw toolbox::fsm::exception::Exception(
480 "ARTDAQSupervisor::transitionConfiguring" ,
487 std::thread(&ARTDAQSupervisor::configuringThread,
this).detach();
489 __SUP_COUT__ <<
"Configuring thread started." << __E__;
491 RunControlStateMachine::
492 indicateIterationWork();
496 std::string errorMessage;
498 std::lock_guard<std::mutex> lock(
500 errorMessage = thread_error_message_;
502 int progress = thread_progress_bar_.
read();
503 __SUP_COUTV__(errorMessage);
504 __SUP_COUTV__(progress);
505 __SUP_COUTV__(thread_progress_bar_.
isComplete());
508 if(errorMessage ==
"" &&
509 time(0) - last_thread_progress_update_ > 600)
511 __SUP_SS__ <<
"There has been no update from the configuration thread for "
512 << (time(0) - last_thread_progress_update_)
513 <<
" seconds, assuming something is wrong and giving up! "
514 <<
"Last progress received was " << progress << __E__;
515 errorMessage = ss.str();
518 if(errorMessage !=
"")
520 __SUP_SS__ <<
"Error was caught in configuring thread: " << errorMessage
522 __SUP_COUT_ERR__ <<
"\n" << ss.str();
524 theStateMachine_.setErrorMessage(ss.str());
525 throw toolbox::fsm::exception::Exception(
528 "CoreSupervisorBase::transitionConfiguring" ,
536 RunControlStateMachine::
537 indicateIterationWork();
539 if(last_thread_progress_read_ != progress)
541 last_thread_progress_read_ = progress;
542 last_thread_progress_update_ = time(0);
549 __SUP_COUT_INFO__ <<
"Complete configuring transition!" << __E__;
550 __SUP_COUTV__(getProcessInfo_());
558 void ARTDAQSupervisor::configuringThread()
561 std::string uid = theConfigurationManager_
562 ->
getNode(ConfigurationManager::XDAQ_APPLICATION_TABLE_NAME +
563 "/" + CorePropertySupervisorBase::getSupervisorUID() +
564 "/" +
"LinkToSupervisorTable")
567 __COUT__ <<
"Supervisor uid is " << uid <<
", getting supervisor table node" << __E__;
569 const std::string mfSubject_ = supervisorClassNoNamespace_ +
"-" + uid;
573 thread_progress_bar_.
step();
575 set_thread_message_(
"ConfigGen");
577 auto info = ARTDAQTableBase::extractARTDAQInfo(
581 getSupervisorProperty(
"max_fragment_size_bytes", 8888),
582 getSupervisorProperty(
"routing_timeout_ms", 1999),
583 getSupervisorProperty(
"routing_retry_count", 12),
584 &thread_progress_bar_);
587 if(info.processes.count(ARTDAQTableBase::ARTDAQAppType::BoardReader) == 0)
589 __GEN_SS__ <<
"There must be at least one enabled BoardReader!" << __E__;
593 if(info.processes.count(ARTDAQTableBase::ARTDAQAppType::EventBuilder) == 0)
595 __GEN_SS__ <<
"There must be at least one enabled EventBuilder!" << __E__;
600 thread_progress_bar_.
step();
601 set_thread_message_(
"Writing boot.txt");
603 __GEN_COUT__ <<
"Writing boot.txt" << __E__;
605 int debugLevel = theSupervisorNode.
getNode(
"DAQInterfaceDebugLevel").
getValue<
int>();
606 std::string setupScript = theSupervisorNode.
getNode(
"DAQSetupScript").
getValue();
608 std::ofstream o(ARTDAQTableBase::ARTDAQ_FCL_PATH +
"/boot.txt", std::ios::trunc);
609 o <<
"DAQ setup script: " << setupScript << std::endl;
610 o <<
"debug level: " << debugLevel << std::endl;
613 if(info.subsystems.size() > 1)
615 for(
auto& ss : info.subsystems)
619 o <<
"Subsystem id: " << ss.first << std::endl;
620 if(ss.second.destination != 0)
622 o <<
"Subsystem destination: " << ss.second.destination << std::endl;
624 for(
auto& sss : ss.second.sources)
626 o <<
"Subsystem source: " << sss << std::endl;
628 if(ss.second.eventMode)
630 o <<
"Subsystem fragmentMode: False" << std::endl;
636 for(
auto& builder : info.processes[ARTDAQTableBase::ARTDAQAppType::EventBuilder])
638 o <<
"EventBuilder host: " << builder.hostname << std::endl;
639 o <<
"EventBuilder label: " << builder.label << std::endl;
640 label_to_proc_type_map_[builder.label] =
"EventBuilder";
641 if(builder.subsystem != 1)
643 o <<
"EventBuilder subsystem: " << builder.subsystem << std::endl;
645 if(builder.allowed_processors !=
"")
647 o <<
"EventBuilder allowed_processors" << builder.allowed_processors
652 for(
auto& logger : info.processes[ARTDAQTableBase::ARTDAQAppType::DataLogger])
654 o <<
"DataLogger host: " << logger.hostname << std::endl;
655 o <<
"DataLogger label: " << logger.label << std::endl;
656 label_to_proc_type_map_[logger.label] =
"DataLogger";
657 if(logger.subsystem != 1)
659 o <<
"DataLogger subsystem: " << logger.subsystem << std::endl;
661 if(logger.allowed_processors !=
"")
663 o <<
"DataLogger allowed_processors" << logger.allowed_processors
668 for(
auto& dispatcher : info.processes[ARTDAQTableBase::ARTDAQAppType::Dispatcher])
670 o <<
"Dispatcher host: " << dispatcher.hostname << std::endl;
671 o <<
"Dispatcher label: " << dispatcher.label << std::endl;
672 o <<
"Dispatcher port: " << dispatcher.port << std::endl;
673 label_to_proc_type_map_[dispatcher.label] =
"Dispatcher";
674 if(dispatcher.subsystem != 1)
676 o <<
"Dispatcher subsystem: " << dispatcher.subsystem << std::endl;
678 if(dispatcher.allowed_processors !=
"")
680 o <<
"Dispatcher allowed_processors" << dispatcher.allowed_processors
685 for(
auto& rmanager : info.processes[ARTDAQTableBase::ARTDAQAppType::RoutingManager])
687 o <<
"RoutingManager host: " << rmanager.hostname << std::endl;
688 o <<
"RoutingManager label: " << rmanager.label << std::endl;
689 label_to_proc_type_map_[rmanager.label] =
"RoutingManager";
690 if(rmanager.subsystem != 1)
692 o <<
"RoutingManager subsystem: " << rmanager.subsystem << std::endl;
694 if(rmanager.allowed_processors !=
"")
696 o <<
"RoutingManager allowed_processors" << rmanager.allowed_processors
703 thread_progress_bar_.
step();
704 set_thread_message_(
"Writing Fhicl Files");
706 __GEN_COUT__ <<
"Building configuration directory" << __E__;
708 boost::system::error_code ignored;
709 boost::filesystem::remove_all(ARTDAQTableBase::ARTDAQ_FCL_PATH + FAKE_CONFIG_NAME,
711 mkdir((ARTDAQTableBase::ARTDAQ_FCL_PATH + FAKE_CONFIG_NAME).c_str(), 0755);
713 for(
auto& reader : info.processes[ARTDAQTableBase::ARTDAQAppType::BoardReader])
715 symlink(ARTDAQTableBase::getFlatFHICLFilename(
716 ARTDAQTableBase::ARTDAQAppType::BoardReader, reader.label)
718 (ARTDAQTableBase::ARTDAQ_FCL_PATH + FAKE_CONFIG_NAME +
"/" +
719 reader.label +
".fcl")
722 for(
auto& builder : info.processes[ARTDAQTableBase::ARTDAQAppType::EventBuilder])
724 symlink(ARTDAQTableBase::getFlatFHICLFilename(
725 ARTDAQTableBase::ARTDAQAppType::EventBuilder, builder.label)
727 (ARTDAQTableBase::ARTDAQ_FCL_PATH + FAKE_CONFIG_NAME +
"/" +
728 builder.label +
".fcl")
731 for(
auto& logger : info.processes[ARTDAQTableBase::ARTDAQAppType::DataLogger])
733 symlink(ARTDAQTableBase::getFlatFHICLFilename(
734 ARTDAQTableBase::ARTDAQAppType::DataLogger, logger.label)
736 (ARTDAQTableBase::ARTDAQ_FCL_PATH + FAKE_CONFIG_NAME +
"/" +
737 logger.label +
".fcl")
740 for(
auto& dispatcher : info.processes[ARTDAQTableBase::ARTDAQAppType::Dispatcher])
742 symlink(ARTDAQTableBase::getFlatFHICLFilename(
743 ARTDAQTableBase::ARTDAQAppType::Dispatcher, dispatcher.label)
745 (ARTDAQTableBase::ARTDAQ_FCL_PATH + FAKE_CONFIG_NAME +
"/" +
746 dispatcher.label +
".fcl")
749 for(
auto& rmanager : info.processes[ARTDAQTableBase::ARTDAQAppType::RoutingManager])
751 symlink(ARTDAQTableBase::getFlatFHICLFilename(
752 ARTDAQTableBase::ARTDAQAppType::RoutingManager, rmanager.label)
754 (ARTDAQTableBase::ARTDAQ_FCL_PATH + FAKE_CONFIG_NAME +
"/" +
755 rmanager.label +
".fcl")
759 thread_progress_bar_.
step();
761 std::lock_guard<std::recursive_mutex> lk(daqinterface_mutex_);
763 if(daqinterface_state_ !=
"stopped" && daqinterface_state_ !=
"")
765 __GEN_SS__ <<
"Cannot configure DAQInterface because it is in the wrong state"
766 <<
" (" << daqinterface_state_ <<
" != stopped)!" << __E__;
770 set_thread_message_(
"Calling setdaqcomps");
771 __GEN_COUT__ <<
"Calling setdaqcomps" << __E__;
772 __GEN_COUT__ <<
"Status before setdaqcomps: " << daqinterface_state_ << __E__;
773 PyObject* pName1 = PyUnicode_FromString(
"setdaqcomps");
775 PyObject* readerDict = PyDict_New();
776 for(
auto& reader : info.processes[ARTDAQTableBase::ARTDAQAppType::BoardReader])
778 label_to_proc_type_map_[reader.label] =
"BoardReader";
779 PyObject* readerName = PyUnicode_FromString(reader.label.c_str());
781 int list_size = reader.allowed_processors !=
"" ? 4 : 3;
783 PyObject* readerData = PyList_New(list_size);
784 PyObject* readerHost = PyUnicode_FromString(reader.hostname.c_str());
785 PyObject* readerPort = PyUnicode_FromString(
"-1");
786 PyObject* readerSubsystem =
787 PyUnicode_FromString(std::to_string(reader.subsystem).c_str());
788 PyList_SetItem(readerData, 0, readerHost);
789 PyList_SetItem(readerData, 1, readerPort);
790 PyList_SetItem(readerData, 2, readerSubsystem);
791 if(reader.allowed_processors !=
"")
793 PyObject* readerAllowedProcessors =
794 PyUnicode_FromString(reader.allowed_processors.c_str());
795 PyList_SetItem(readerData, 3, readerAllowedProcessors);
797 PyDict_SetItem(readerDict, readerName, readerData);
800 PyObject_CallMethodObjArgs(daqinterface_ptr_, pName1, readerDict, NULL);
801 Py_DECREF(readerDict);
806 __GEN_SS__ <<
"Error calling setdaqcomps transition" << __E__;
810 __GEN_COUT__ <<
"Status after setdaqcomps: " << daqinterface_state_ << __E__;
812 thread_progress_bar_.
step();
813 set_thread_message_(
"Calling do_boot");
814 __GEN_COUT__ <<
"Calling do_boot" << __E__;
815 __GEN_COUT__ <<
"Status before boot: " << daqinterface_state_ << __E__;
816 PyObject* pName2 = PyUnicode_FromString(
"do_boot");
817 PyObject* pStateArgs1 =
818 PyUnicode_FromString((ARTDAQTableBase::ARTDAQ_FCL_PATH +
"/boot.txt").c_str());
820 PyObject_CallMethodObjArgs(daqinterface_ptr_, pName2, pStateArgs1, NULL);
825 __GEN_COUT__ <<
"Error on first boost attempt, recovering and retrying" << __E__;
827 PyObject* pName = PyUnicode_FromString(
"do_recover");
828 PyObject* res = PyObject_CallMethodObjArgs(daqinterface_ptr_, pName, NULL);
833 __GEN_SS__ <<
"Error calling recover transition!!!!" << __E__;
837 thread_progress_bar_.
step();
838 set_thread_message_(
"Calling do_boot (retry)");
839 __GEN_COUT__ <<
"Calling do_boot again" << __E__;
840 __GEN_COUT__ <<
"Status before boot: " << daqinterface_state_ << __E__;
842 PyObject_CallMethodObjArgs(daqinterface_ptr_, pName2, pStateArgs1, NULL);
847 __GEN_SS__ <<
"Error calling boot transition (2nd try)" << __E__;
853 if(daqinterface_state_ !=
"booted")
855 __GEN_SS__ <<
"DAQInterface boot transition failed! "
856 <<
"Status after boot attempt: " << daqinterface_state_ << __E__;
859 __GEN_COUT__ <<
"Status after boot: " << daqinterface_state_ << __E__;
861 thread_progress_bar_.
step();
862 set_thread_message_(
"Calling do_config");
863 __GEN_COUT__ <<
"Calling do_config" << __E__;
864 __GEN_COUT__ <<
"Status before config: " << daqinterface_state_ << __E__;
865 PyObject* pName3 = PyUnicode_FromString(
"do_config");
866 PyObject* pStateArgs2 = Py_BuildValue(
"[s]", FAKE_CONFIG_NAME);
868 PyObject_CallMethodObjArgs(daqinterface_ptr_, pName3, pStateArgs2, NULL);
873 __GEN_SS__ <<
"Error calling config transition" << __E__;
877 if(daqinterface_state_ !=
"ready")
879 __GEN_SS__ <<
"DAQInterface config transition failed!" << __E__
880 <<
"Supervisor state: \"" << daqinterface_state_ <<
"\" != \"ready\" "
884 __GEN_COUT__ <<
"Status after config: " << daqinterface_state_ << __E__;
886 set_thread_message_(
"Configured");
887 __GEN_COUT__ <<
"Configured." << __E__;
890 catch(
const std::runtime_error& e)
892 set_thread_message_(
"ERROR");
893 __SS__ <<
"Error was caught while configuring: " << e.what() << __E__;
894 __COUT_ERR__ <<
"\n" << ss.str();
895 std::lock_guard<std::mutex> lock(thread_mutex_);
896 thread_error_message_ = ss.str();
900 set_thread_message_(
"ERROR");
901 __SS__ <<
"Unknown error was caught while configuring. Please checked the logs."
903 __COUT_ERR__ <<
"\n" << ss.str();
905 artdaq::ExceptionHandler(artdaq::ExceptionHandlerRethrow::no, ss.str());
907 std::lock_guard<std::mutex> lock(thread_mutex_);
908 thread_error_message_ = ss.str();
915 set_thread_message_(
"Halting");
916 __SUP_COUT__ <<
"Halting..." << __E__;
917 std::lock_guard<std::recursive_mutex> lk(daqinterface_mutex_);
919 __SUP_COUT__ <<
"Status before halt: " << daqinterface_state_ << __E__;
921 if(daqinterface_state_ ==
"running")
924 PyObject* pName = PyUnicode_FromString(
"do_stop_running");
925 PyObject* res = PyObject_CallMethodObjArgs(daqinterface_ptr_, pName, NULL);
930 __SS__ <<
"Error calling DAQ Interface stop transition." << __E__;
935 PyObject* pName = PyUnicode_FromString(
"do_command");
936 PyObject* pArg = PyUnicode_FromString(
"Shutdown");
937 PyObject* res = PyObject_CallMethodObjArgs(daqinterface_ptr_, pName, pArg, NULL);
942 __SS__ <<
"Error calling DAQ Interface halt transition." << __E__;
947 __SUP_COUT__ <<
"Status after halt: " << daqinterface_state_ << __E__;
948 __SUP_COUT__ <<
"Halted." << __E__;
949 set_thread_message_(
"Halted");
951 catch(
const std::runtime_error& e)
953 const std::string transitionName =
"Halting";
955 if(theStateMachine_.getProvenanceStateName() ==
956 RunControlStateMachine::FAILED_STATE_NAME ||
957 theStateMachine_.getProvenanceStateName() ==
958 RunControlStateMachine::HALTED_STATE_NAME)
960 __SUP_COUT_INFO__ <<
"Error was caught while halting (but ignoring because "
961 "previous state was '"
962 << RunControlStateMachine::FAILED_STATE_NAME
963 <<
"'): " << e.what() << __E__;
967 __SUP_SS__ <<
"Error was caught while " << transitionName <<
": " << e.what()
969 __SUP_COUT_ERR__ <<
"\n" << ss.str();
970 theStateMachine_.setErrorMessage(ss.str());
971 throw toolbox::fsm::exception::Exception(
974 "ARTDAQSupervisorBase::transition" + transitionName ,
982 const std::string transitionName =
"Halting";
984 if(theStateMachine_.getProvenanceStateName() ==
985 RunControlStateMachine::FAILED_STATE_NAME ||
986 theStateMachine_.getProvenanceStateName() ==
987 RunControlStateMachine::HALTED_STATE_NAME)
989 __SUP_COUT_INFO__ <<
"Unknown error was caught while halting (but ignoring "
990 "because previous state was '"
991 << RunControlStateMachine::FAILED_STATE_NAME <<
"')." << __E__;
995 __SUP_SS__ <<
"Unknown error was caught while " << transitionName
996 <<
". Please checked the logs." << __E__;
997 __SUP_COUT_ERR__ <<
"\n" << ss.str();
998 theStateMachine_.setErrorMessage(ss.str());
1000 artdaq::ExceptionHandler(artdaq::ExceptionHandlerRethrow::no, ss.str());
1002 throw toolbox::fsm::exception::Exception(
1003 "Transition Error" ,
1005 "ARTDAQSupervisorBase::transition" + transitionName ,
1016 set_thread_message_(
"Initializing");
1017 __SUP_COUT__ <<
"Initializing..." << __E__;
1019 __SUP_COUT__ <<
"Initialized." << __E__;
1020 set_thread_message_(
"Initialized");
1022 catch(
const std::runtime_error& e)
1024 __SS__ <<
"Error was caught while Initializing: " << e.what() << __E__;
1029 __SS__ <<
"Unknown error was caught while Initializing. Please checked the logs."
1031 artdaq::ExceptionHandler(artdaq::ExceptionHandlerRethrow::no, ss.str());
1036 void ARTDAQSupervisor::transitionPausing(toolbox::Event::Reference )
1039 set_thread_message_(
"Pausing");
1040 __SUP_COUT__ <<
"Pausing..." << __E__;
1041 std::lock_guard<std::recursive_mutex> lk(daqinterface_mutex_);
1044 __SUP_COUT__ <<
"Status before pause: " << daqinterface_state_ << __E__;
1046 PyObject* pName = PyUnicode_FromString(
"do_command");
1047 PyObject* pArg = PyUnicode_FromString(
"Pause");
1048 PyObject* res = PyObject_CallMethodObjArgs(daqinterface_ptr_, pName, pArg, NULL);
1053 __SS__ <<
"Error calling DAQ Interface Pause transition." << __E__;
1058 __SUP_COUT__ <<
"Status after pause: " << daqinterface_state_ << __E__;
1060 __SUP_COUT__ <<
"Paused." << __E__;
1061 set_thread_message_(
"Paused");
1063 catch(
const std::runtime_error& e)
1065 __SS__ <<
"Error was caught while Pausing: " << e.what() << __E__;
1070 __SS__ <<
"Unknown error was caught while Pausing. Please checked the logs." << __E__;
1071 artdaq::ExceptionHandler(artdaq::ExceptionHandlerRethrow::no, ss.str());
1076 void ARTDAQSupervisor::transitionResuming(toolbox::Event::Reference )
1079 set_thread_message_(
"Resuming");
1080 __SUP_COUT__ <<
"Resuming..." << __E__;
1081 std::lock_guard<std::recursive_mutex> lk(daqinterface_mutex_);
1084 __SUP_COUT__ <<
"Status before resume: " << daqinterface_state_ << __E__;
1085 PyObject* pName = PyUnicode_FromString(
"do_command");
1086 PyObject* pArg = PyUnicode_FromString(
"Resume");
1087 PyObject* res = PyObject_CallMethodObjArgs(daqinterface_ptr_, pName, pArg, NULL);
1092 __SS__ <<
"Error calling DAQ Interface Resume transition." << __E__;
1096 __SUP_COUT__ <<
"Status after resume: " << daqinterface_state_ << __E__;
1097 __SUP_COUT__ <<
"Resumed." << __E__;
1098 set_thread_message_(
"Resumed");
1100 catch(
const std::runtime_error& e)
1102 __SS__ <<
"Error was caught while Resuming: " << e.what() << __E__;
1107 __SS__ <<
"Unknown error was caught while Resuming. Please checked the logs."
1109 artdaq::ExceptionHandler(artdaq::ExceptionHandlerRethrow::no, ss.str());
1114 void ARTDAQSupervisor::transitionStarting(toolbox::Event::Reference )
1117 __SUP_COUT__ <<
"transitionStarting" << __E__;
1120 if(RunControlStateMachine::getIterationIndex() == 0 &&
1121 RunControlStateMachine::getSubIterationIndex() == 0)
1123 thread_error_message_ =
"";
1124 thread_progress_bar_.resetProgressBar(0);
1125 last_thread_progress_update_ = time(0);
1128 std::thread(&ARTDAQSupervisor::startingThread,
this).detach();
1130 __SUP_COUT__ <<
"Starting thread started." << __E__;
1132 RunControlStateMachine::
1133 indicateIterationWork();
1137 std::string errorMessage;
1139 std::lock_guard<std::mutex> lock(
1141 errorMessage = thread_error_message_;
1143 int progress = thread_progress_bar_.
read();
1144 __SUP_COUTV__(errorMessage);
1145 __SUP_COUTV__(progress);
1146 __SUP_COUTV__(thread_progress_bar_.
isComplete());
1149 if(errorMessage ==
"" &&
1150 time(0) - last_thread_progress_update_ > 600)
1152 __SUP_SS__ <<
"There has been no update from the start thread for "
1153 << (time(0) - last_thread_progress_update_)
1154 <<
" seconds, assuming something is wrong and giving up! "
1155 <<
"Last progress received was " << progress << __E__;
1156 errorMessage = ss.str();
1159 if(errorMessage !=
"")
1161 __SUP_SS__ <<
"Error was caught in starting thread: " << errorMessage
1163 __SUP_COUT_ERR__ <<
"\n" << ss.str();
1165 theStateMachine_.setErrorMessage(ss.str());
1166 throw toolbox::fsm::exception::Exception(
1167 "Transition Error" ,
1169 "CoreSupervisorBase::transitionStarting" ,
1177 RunControlStateMachine::
1178 indicateIterationWork();
1180 if(last_thread_progress_read_ != progress)
1182 last_thread_progress_read_ = progress;
1183 last_thread_progress_update_ = time(0);
1190 __SUP_COUT_INFO__ <<
"Complete starting transition!" << __E__;
1191 __SUP_COUTV__(getProcessInfo_());
1198 catch(
const std::runtime_error& e)
1200 __SS__ <<
"Error was caught while Starting: " << e.what() << __E__;
1205 __SS__ <<
"Unknown error was caught while Starting. Please checked the logs."
1207 artdaq::ExceptionHandler(artdaq::ExceptionHandlerRethrow::no, ss.str());
1212 void ARTDAQSupervisor::startingThread()
1215 std::string uid = theConfigurationManager_
1216 ->
getNode(ConfigurationManager::XDAQ_APPLICATION_TABLE_NAME +
1217 "/" + CorePropertySupervisorBase::getSupervisorUID() +
1218 "/" +
"LinkToSupervisorTable")
1221 __COUT__ <<
"Supervisor uid is " << uid <<
", getting supervisor table node" << __E__;
1222 const std::string mfSubject_ = supervisorClassNoNamespace_ +
"-" + uid;
1223 __GEN_COUT__ <<
"Starting..." << __E__;
1224 set_thread_message_(
"Starting");
1226 thread_progress_bar_.
step();
1229 std::lock_guard<std::recursive_mutex> lk(daqinterface_mutex_);
1231 __GEN_COUT__ <<
"Status before start: " << daqinterface_state_ << __E__;
1232 auto runNumber = SOAPUtilities::translate(theStateMachine_.getCurrentMessage())
1234 .getValue(
"RunNumber");
1236 thread_progress_bar_.
step();
1238 PyObject* pName = PyUnicode_FromString(
"do_start_running");
1239 int run_number = std::stoi(runNumber);
1240 PyObject* pStateArgs = PyLong_FromLong(run_number);
1242 PyObject_CallMethodObjArgs(daqinterface_ptr_, pName, pStateArgs, NULL);
1244 thread_progress_bar_.
step();
1249 __SS__ <<
"Error calling start transition" << __E__;
1254 thread_progress_bar_.
step();
1256 __GEN_COUT__ <<
"Status after start: " << daqinterface_state_ << __E__;
1257 if(daqinterface_state_ !=
"running")
1259 __SS__ <<
"DAQInterface start transition failed!" << __E__;
1263 thread_progress_bar_.
step();
1266 set_thread_message_(
"Started");
1267 thread_progress_bar_.
step();
1269 __GEN_COUT__ <<
"Started." << __E__;
1273 catch(
const std::runtime_error& e)
1275 __SS__ <<
"Error was caught while Starting: " << e.what() << __E__;
1276 __COUT_ERR__ <<
"\n" << ss.str();
1277 std::lock_guard<std::mutex> lock(thread_mutex_);
1278 thread_error_message_ = ss.str();
1282 __SS__ <<
"Unknown error was caught while Starting. Please checked the logs."
1284 __COUT_ERR__ <<
"\n" << ss.str();
1286 artdaq::ExceptionHandler(artdaq::ExceptionHandlerRethrow::no, ss.str());
1288 std::lock_guard<std::mutex> lock(thread_mutex_);
1289 thread_error_message_ = ss.str();
1293 void ARTDAQSupervisor::transitionStopping(toolbox::Event::Reference )
1296 __SUP_COUT__ <<
"Stopping..." << __E__;
1297 set_thread_message_(
"Stopping");
1298 std::lock_guard<std::recursive_mutex> lk(daqinterface_mutex_);
1300 __SUP_COUT__ <<
"Status before stop: " << daqinterface_state_ << __E__;
1301 PyObject* pName = PyUnicode_FromString(
"do_stop_running");
1302 PyObject* res = PyObject_CallMethodObjArgs(daqinterface_ptr_, pName, NULL);
1307 __SS__ <<
"Error calling DAQ Interface stop transition." << __E__;
1311 __SUP_COUT__ <<
"Status after stop: " << daqinterface_state_ << __E__;
1312 __SUP_COUT__ <<
"Stopped." << __E__;
1313 set_thread_message_(
"Stopped");
1315 catch(
const std::runtime_error& e)
1317 __SS__ <<
"Error was caught while Stopping: " << e.what() << __E__;
1322 __SS__ <<
"Unknown error was caught while Stopping. Please checked the logs."
1324 artdaq::ExceptionHandler(artdaq::ExceptionHandlerRethrow::no, ss.str());
1329 void ots::ARTDAQSupervisor::enteringError(toolbox::Event::Reference )
1331 __SUP_COUT__ <<
"Entering error recovery state" << __E__;
1332 std::lock_guard<std::recursive_mutex> lk(daqinterface_mutex_);
1334 __SUP_COUT__ <<
"Status before error: " << daqinterface_state_ << __E__;
1336 PyObject* pName = PyUnicode_FromString(
"do_recover");
1337 PyObject* res = PyObject_CallMethodObjArgs(daqinterface_ptr_, pName, NULL);
1342 __SS__ <<
"Error calling DAQ Interface recover transition." << __E__;
1346 __SUP_COUT__ <<
"Status after error: " << daqinterface_state_ << __E__;
1347 __SUP_COUT__ <<
"EnteringError DONE." << __E__;
1351 std::vector<SupervisorInfo::SubappInfo> ots::ARTDAQSupervisor::getSubappInfo(
void)
1353 auto apps = getAndParseProcessInfo_();
1354 std::vector<SupervisorInfo::SubappInfo> output;
1355 for(
auto& app : apps)
1359 info.
name = app.label;
1360 info.detail =
"Rank " + std::to_string(app.rank) +
", subsystem " +
1361 std::to_string(app.subsystem);
1362 info.lastStatusTime = time(0);
1363 info.progress = 100;
1364 info.status = artdaqStateToOtsState(app.state);
1365 info.url =
"http://" + app.host +
":" + std::to_string(app.port) +
"/RPC2";
1366 info.class_name =
"ARTDAQ " + labelToProcType_(app.label);
1368 output.push_back(info);
1374 void ots::ARTDAQSupervisor::getDAQState_()
1377 std::lock_guard<std::recursive_mutex> lk(daqinterface_mutex_);
1379 if(daqinterface_ptr_ ==
nullptr)
1381 daqinterface_state_ =
"";
1385 PyObject* pName = PyUnicode_FromString(
"state");
1386 PyObject* pArg = PyUnicode_FromString(
"DAQInterface");
1387 PyObject* res = PyObject_CallMethodObjArgs(daqinterface_ptr_, pName, pArg, NULL);
1392 __SS__ <<
"Error calling state function" << __E__;
1396 daqinterface_state_ = std::string(PyUnicode_AsUTF8(res));
1401 std::string ots::ARTDAQSupervisor::getProcessInfo_(
void)
1404 std::lock_guard<std::recursive_mutex> lk(daqinterface_mutex_);
1406 if(daqinterface_ptr_ ==
nullptr)
1411 PyObject* pName = PyUnicode_FromString(
"artdaq_process_info");
1412 PyObject* pArg = PyUnicode_FromString(
"DAQInterface");
1413 PyObject* pArg2 = PyBool_FromLong(
true);
1415 PyObject_CallMethodObjArgs(daqinterface_ptr_, pName, pArg, pArg2, NULL);
1420 __SS__ <<
"Error calling artdaq_process_info function" << __E__;
1424 return std::string(PyUnicode_AsUTF8(res));
1428 std::string ots::ARTDAQSupervisor::artdaqStateToOtsState(std::string state)
1430 if(state ==
"nonexistant")
1431 return RunControlStateMachine::INITIAL_STATE_NAME;
1432 if(state ==
"Ready")
1433 return "Configured";
1434 if(state ==
"Running")
1435 return RunControlStateMachine::RUNNING_STATE_NAME;
1436 if(state ==
"Paused")
1437 return RunControlStateMachine::PAUSED_STATE_NAME;
1438 if(state ==
"Stopped")
1439 return RunControlStateMachine::HALTED_STATE_NAME;
1441 TLOG(TLVL_WARNING) <<
"Unrecognized state name " << state;
1442 return RunControlStateMachine::FAILED_STATE_NAME;
1445 std::string ots::ARTDAQSupervisor::labelToProcType_(std::string label)
1447 if(label_to_proc_type_map_.count(label))
1449 return label_to_proc_type_map_[label];
1455 std::list<ots::ARTDAQSupervisor::DAQInterfaceProcessInfo>
1456 ots::ARTDAQSupervisor::getAndParseProcessInfo_()
1458 std::list<ots::ARTDAQSupervisor::DAQInterfaceProcessInfo> output;
1459 auto info = getProcessInfo_();
1460 auto procs = tokenize_(info);
1469 std::regex re(
"(.*?) at ([^:]*):(\\d+) \\(subsystem (\\d+), rank (\\d+)\\): (.*)");
1471 for(
auto& proc : procs)
1474 if(std::regex_match(proc, match, re))
1476 DAQInterfaceProcessInfo info;
1478 info.label = match[1];
1479 info.host = match[2];
1480 info.port = std::stoi(match[3]);
1481 info.subsystem = std::stoi(match[4]);
1482 info.rank = std::stoi(match[5]);
1483 info.state = match[6];
1485 output.push_back(info);
1493 std::unique_ptr<artdaq::CommanderInterface>>>
1494 ots::ARTDAQSupervisor::makeCommandersFromProcessInfo()
1497 std::pair<DAQInterfaceProcessInfo, std::unique_ptr<artdaq::CommanderInterface>>>
1499 auto infos = getAndParseProcessInfo_();
1501 for(
auto& info : infos)
1503 artdaq::Commandable cm;
1504 fhicl::ParameterSet ps;
1506 ps.put<std::string>(
"commanderPluginType",
"xmlrpc");
1507 ps.put<
int>(
"id", info.port);
1508 ps.put<std::string>(
"server_url", info.host);
1510 output.emplace_back(std::make_pair<DAQInterfaceProcessInfo,
1511 std::unique_ptr<artdaq::CommanderInterface>>(
1512 std::move(info), artdaq::MakeCommanderPlugin(ps, cm)));
1519 std::list<std::string> ots::ARTDAQSupervisor::tokenize_(std::string
const& input)
1522 std::list<std::string> output;
1524 while(pos != std::string::npos && pos < input.size())
1526 auto newpos = input.find(
'\n', pos);
1527 if(newpos != std::string::npos)
1529 output.emplace_back(input, pos, newpos - pos);
1535 output.emplace_back(input, pos);
1544 void ots::ARTDAQSupervisor::daqinterfaceRunner_()
1546 TLOG(TLVL_TRACE) <<
"Runner thread starting";
1547 runner_running_ =
true;
1548 while(runner_running_)
1550 if(daqinterface_ptr_ != NULL)
1552 std::unique_lock<std::recursive_mutex> lk(daqinterface_mutex_);
1554 std::string state_before = daqinterface_state_;
1556 if(daqinterface_state_ ==
"running" || daqinterface_state_ ==
"ready" ||
1557 daqinterface_state_ ==
"booted")
1561 TLOG(TLVL_TRACE) <<
"Calling DAQInterface::check_proc_heartbeats";
1562 PyObject* pName = PyUnicode_FromString(
"check_proc_heartbeats");
1564 PyObject_CallMethodObjArgs(daqinterface_ptr_, pName, NULL);
1566 <<
"Done with DAQInterface::check_proc_heartbeats call";
1570 runner_running_ =
false;
1572 __SS__ <<
"Error calling check_proc_heartbeats function" << __E__;
1577 catch(cet::exception& ex)
1579 runner_running_ =
false;
1581 __SS__ <<
"An cet::exception occurred while calling "
1582 "check_proc_heartbeats function: "
1583 << ex.explain_self() << __E__;
1587 catch(std::exception& ex)
1589 runner_running_ =
false;
1591 __SS__ <<
"An std::exception occurred while calling "
1592 "check_proc_heartbeats function: "
1593 << ex.what() << __E__;
1599 runner_running_ =
false;
1601 __SS__ <<
"An unknown Error occurred while calling runner function"
1609 if(daqinterface_state_ != state_before)
1611 runner_running_ =
false;
1613 __SS__ <<
"DAQInterface state unexpectedly changed from "
1614 << state_before <<
" to " << daqinterface_state_
1615 <<
". Check supervisor log file for more info!" << __E__;
1627 runner_running_ =
false;
1628 TLOG(TLVL_TRACE) <<
"Runner thread complete";
1632 void ots::ARTDAQSupervisor::stop_runner_()
1634 runner_running_ =
false;
1635 if(runner_thread_ && runner_thread_->joinable())
1637 runner_thread_->join();
1638 runner_thread_.reset(
nullptr);
1643 void ots::ARTDAQSupervisor::start_runner_()
1647 std::make_unique<std::thread>(&ots::ARTDAQSupervisor::daqinterfaceRunner_,
this);
virtual void transitionHalting(toolbox::Event::Reference event) override
virtual void transitionInitializing(toolbox::Event::Reference event) override
void loadTableGroup(const std::string &tableGroupName, const TableGroupKey &tableGroupKey, bool doActivate=false, std::map< std::string, TableVersion > *groupMembers=0, ProgressBar *progressBar=0, std::string *accumulateWarnings=0, std::string *groupComment=0, std::string *groupAuthor=0, std::string *groupCreateTime=0, bool doNotLoadMember=false, std::string *groupTypeString=0, std::map< std::string, std::string > *groupAliases=0, ConfigurationManager::LoadGroupType onlyLoadIfBackboneOrContext=ConfigurationManager::LoadGroupType::ALL_TYPES, bool ignoreVersionTracking=false)
ConfigurationTree getNode(const std::string &nodeString, bool doNotThrowOnBrokenUIDLinks=false) const
"root/parent/parent/"
ConfigurationTree getNode(const std::string &nodeName, bool doNotThrowOnBrokenUIDLinks=false) const
navigating between nodes
const std::string & getValueAsString(bool returnLinkTableValue=false) const
void getValue(T &value) const
ITRACEController * theTRACEController_
only define for an app that receives a command
bool isComplete()
get functions
int read()
if stepsToComplete==0, then define any progress as 50%, thread safe
void complete()
declare complete, thread safe
void INIT_MF(const char *name)
std::string name
Also key in map.