18#include <TVirtualMC.h>
20#include <fairmq/DeviceRunner.h>
21#include <boost/program_options.hpp>
24#include <fairmq/Channel.h>
27#include <fairlogger/Logger.h>
28#include <fairmq/Parts.h>
29#include <fairmq/TransportFactory.h>
30#include <TStopwatch.h>
45#include "rapidjson/document.h"
46#include "rapidjson/stringbuffer.h"
47#include "rapidjson/filereadstream.h"
59 LOG(info) <<
pid <<
" caught signal " << signal <<
" from source " << signal_info->si_pid;
60 auto groupid = getpgrp();
68 kill(groupid, signal);
81 while ((cpid = wait(&status))) {
105 auto factory = fair::mq::TransportFactory::CreateTransportFactory(transport);
106 auto channel = fair::mq::Channel{
"o2sim-primserv-info",
"req", factory};
116 auto vmc = TVirtualMC::GetMC();
118 if (app ==
nullptr) {
119 LOG(warning) <<
"no vmc application found at this stage";
132 using namespace fair::mq::hooks;
135 fair::mq::DeviceRunner runner{argc, argv};
137 runner.AddHook<SetCustomCmdLineOptions>([](DeviceRunner&
r) {
138 boost::program_options::options_description customOptions(
"Custom options");
140 r.fConfig.AddToCmdLineOptions(customOptions);
143 runner.AddHook<InstantiateDevice>([](DeviceRunner&
r) {
144 r.fDevice = std::unique_ptr<fair::mq::Device>{
getDevice(
r.fConfig)};
148 }
catch (std::exception&
e) {
149 LOG(
error) <<
"Unhandled exception reached the top of main: " <<
e.what()
150 <<
", application will now exit";
153 LOG(
error) <<
"Non-exception instance being thrown. Please make sure you use std::runtime_exception() instead. "
154 <<
"Application will now exit.";
167KernelSetup initSim(std::string transport, std::string primaddress, std::string primstatusaddress, std::string mergeraddress,
int workerID)
169 auto factory = fair::mq::TransportFactory::CreateTransportFactory(transport);
170 auto primchannel =
new fair::mq::Channel{
"primary-get",
"req", factory};
171 primchannel->Connect(primaddress);
172 primchannel->Validate();
174 auto prim_status_channel =
new fair::mq::Channel{
"o2sim-primserv-info",
"req", factory};
175 prim_status_channel->Connect(primstatusaddress);
176 prim_status_channel->Validate();
178 auto datachannel =
new fair::mq::Channel{
"simdata",
"push", factory};
179 datachannel->Connect(mergeraddress);
180 datachannel->Validate();
181 datachannel->GetSocket().SetLinger(-1);
188 return KernelSetup{sim, primchannel, datachannel, prim_status_channel, workerID};
203 auto affinity = getenv(
"ALICE_CPUAFFINITY");
210 thread = pthread_self();
214 CPU_SET(cpuid, &cpuset);
216 auto s = pthread_setaffinity_np(thread,
sizeof(cpu_set_t), &cpuset);
218 LOG(warning) <<
"FAILED TO SET PTHREAD AFFINITY";
222 s = pthread_getaffinity_np(thread,
sizeof(cpu_set_t), &cpuset);
224 LOG(warning) <<
"FAILED TO GET PTHREAD AFFINITY";
227 for (
int j = 0;
j < CPU_SETSIZE;
j++) {
228 if (CPU_ISSET(
j, &cpuset)) {
229 LOG(info) <<
"ENABLED CPU " <<
j;
233 LOG(warn) <<
"CPU AFFINITY NOT IMPLEMENTED ON APPLE";
240 static bool initialized =
false;
241 static fair::mq::Channel channel;
245 static auto factory = fair::mq::TransportFactory::CreateTransportFactory(
"zeromq");
246 channel = fair::mq::Channel{
"o2sim-control",
"sub", factory};
247 auto controlsocketname = getenv(
"ALICE_O2SIMCONTROL");
248 channel.Connect(std::string(controlsocketname));
252 std::unique_ptr<fair::mq::Message> reply(channel.NewMessage());
254 doLogInfo(workerID,
"Listening for master control input");
255 if (channel.Receive(reply) > 0) {
256 auto data = reply->GetData();
257 auto size = reply->GetSize();
259 std::string command(
reinterpret_cast<char const*
>(
data),
size);
260 doLogInfo(workerID,
"Received control message: " + command);
265 doLogInfo(workerID,
"Stop asked, shutting down");
270 doLogInfo(workerID,
"No control input received ");
283 std::shared_ptr<fair::mq::TransportFactory>
factory;
287 std::vector<std::unique_ptr<fair::mq::Channel>>
data;
295 if (!owner->Connect(
address) || !owner->Validate()) {
296 LOG(fatal) <<
"Could not connect channel " <<
name <<
" of a transport thread to " <<
address;
305 hooks.fetchChunk =
nullptr;
306 hooks.dataChannel =
nullptr;
317 hooks.fetchChunk = [serveraddress]() -> std::unique_ptr<o2::data::PrimaryChunk> {
327 if (fetched.status == Status::Work) {
328 return std::move(fetched.chunk);
330 if (fetched.status == Status::Stop) {
337 hooks.dataChannel = [mergeraddress]() -> fair::mq::Channel* {
338 thread_local fair::mq::Channel* channel =
nullptr;
340 std::unique_ptr<fair::mq::Channel> owner;
342 channel->GetSocket().SetLinger(-1);
350[[noreturn]]
void runMT(std::string
const& serveraddress, std::string
const& mergeraddress, fair::mq::Channel& pubchannel)
356 std::thread([&pubchannel]() {
358 std::unique_ptr<fair::mq::Message>
msg(collectorchannel.NewMessage());
360 if (collectorchannel.Receive(
msg) > 0) {
361 std::string text(
reinterpret_cast<char const*
>(
msg->GetData()),
msg->GetSize());
369 constexpr int kEventBlock = 100000;
370 auto vmc = TVirtualMC::GetMC();
380 vmc->ProcessRun(kEventBlock);
382 LOG(fatal) <<
"No transport thread asked for work in this run; Geant4 did not start it";
386 if (conf.asService()) {
387 LOG(info) <<
"IN SERVICE MODE WAITING";
393 LOG(info) <<
"FINISHING";
402int main(
int argc,
char* argv[])
406 struct sigaction act;
407 memset(&act, 0,
sizeof act);
408 sigemptyset(&act.sa_mask);
410 act.sa_flags = SA_SIGINFO;
412 std::vector<int> handledsignals = {SIGTERM, SIGINT, SIGQUIT, SIGSEGV, SIGBUS, SIGFPE, SIGABRT};
414 for (
auto s : handledsignals) {
415 if (sigaction(
s, &act,
nullptr)) {
416 LOG(
error) <<
"Could not install signal handler for " <<
s;
423 fair::Logger::OnFatal([] {
throw fair::FatalException(
"Fatal error occured. Exiting without core dump..."); });
428 bpo::options_description desc{
"Options"};
431 (
"control",
"control type")
433 (
"config-key",
"config key")
434 (
"mq-config",bpo::value<std::string>(),
"path to FairMQ config")
435 (
"severity",
"log severity");
437 bpo::variables_map vm;
438 bpo::store(parse_command_line(argc, argv, desc), vm);
441 std::string FMQconfig;
442 if (vm.count(
"mq-config")) {
443 FMQconfig = vm[
"mq-config"].as<std::string>();
446 auto internalfork = getenv(
"ALICE_SIMFORKINTERNAL");
448 int driverPID = getppid();
451 if (FMQconfig.empty()) {
452 throw std::runtime_error(
"This should never be called without FairMQ config.");
455 FILE* fp = fopen(FMQconfig.c_str(),
"r");
456 constexpr unsigned short usmax = std::numeric_limits<unsigned short>::max() - 1;
457 char readBuffer[usmax];
458 rapidjson::FileReadStream is(fp, readBuffer,
sizeof(readBuffer));
459 rapidjson::Document
d;
464 std::string serveraddress;
465 std::string mergeraddress;
466 std::string serverstatus_address;
469 auto& options =
d[
"fairMQOptions"];
470 assert(options.IsObject());
473 if (
s ==
"devices") {
474 assert(
option->value.IsArray());
475 auto devices =
option->value.GetArray();
476 for (
auto&
device : devices) {
478 if (
s ==
"primary-server") {
480 auto sockets = (
channels[0])[
"sockets"].GetArray();
481 auto address = (sockets[0])[
"address"].GetString();
483 sockets = (
channels[1])[
"sockets"].GetArray();
484 address = (sockets[0])[
"address"].GetString();
485 serverstatus_address =
address;
487 if (
s ==
"hitmerger") {
490 s = channel[
"name"].GetString();
491 if (
s ==
"simdata") {
492 auto sockets = channel[
"sockets"].GetArray();
493 auto address = (sockets[0])[
"address"].GetString();
502 LOG(info) <<
"Parsed primary server address " << serveraddress;
503 LOG(info) <<
"Parsed primary server status address " << serverstatus_address;
504 LOG(info) <<
"Parsed merger address " << mergeraddress;
505 if (serveraddress.empty() || mergeraddress.empty()) {
506 throw std::runtime_error(
"Could not determine server or merger URLs.");
514 const bool mtMode = getenv(
"ALICE_O2SIM_MT") !=
nullptr;
516 ROOT::EnableThreadSafety();
520 std::unique_ptr<FairRunSim> simrun;
522 if (!
initializeSim(
"zeromq", serverstatus_address, simrun)) {
523 LOG(
error) <<
"Could not initialize simulation";
530 runMT(serveraddress, mergeraddress, pubchannel);
534 unsigned int nworkers = std::max(1u, std::thread::hardware_concurrency() / 2);
535 auto f = getenv(
"ALICE_NSIMWORKERS");
537 nworkers =
static_cast<unsigned int>(std::stoi(
f));
539 LOG(info) <<
"Running with " << nworkers <<
" sim workers ";
544 for (
auto i = 0u;
i < nworkers; ++
i) {
546 auto pid = (
i == nworkers - 1) ? 0 : fork();
550 prctl(PR_SET_PDEATHSIG, SIGTERM);
559 auto collectAndPubThreadFunction = [driverPID, &pubchannel]() {
561 std::unique_ptr<fair::mq::Message>
msg(collectorchannel.NewMessage());
564 if (collectorchannel.Receive(
msg) > 0) {
567 std::string text(
reinterpret_cast<char const*
>(
data),
size);
573 if (
i == nworkers - 1) {
574 std::vector<std::thread> threads;
575 threads.push_back(std::thread(collectAndPubThreadFunction));
576 threads.back().detach();
586 auto kernelSetup =
initSim(
"zeromq", serveraddress, serverstatus_address, mergeraddress,
i);
588 std::stringstream worker;
589 worker <<
"WORKER" <<
i;
598 if (conf.asService()) {
599 LOG(info) <<
"IN SERVICE MODE WAITING";
606 LOG(info) <<
"FINISHING";
612 delete kernelSetup.primchannel;
613 delete kernelSetup.primstatuschannel;
614 delete kernelSetup.datachannel;
616 if (
i == nworkers - 1) {
619 while ((cpid = wait(&status)) != -1) {
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error s
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char e
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events d
configStandalone Reconstruction rec_tpc multiplier for the combined cluster track error during track following area in cm for the search of for z only used if decrease removal by when above this local occupancy rowx Shift of TPC revert cluster flag edge bit distance to edge exceeds this ZOffset for secondary multiple of radius max P of electron K BB bands crossing max P of electron p BB bands crossing max P of electron d BB bands crossing max P of electron t BB bands crossing min accepted dEdxMaxTPC of the track Additive extra cluster error for Y2 if edge flag set Additive extra cluster error for Y2 if single set Additive extra cluster error for Y2 if or single set Additive extra cluster error for Z2 if or single set Extra errors to add to track when crossing depending on addErrorsCECrossing Inner portion of y range in sector that is not used in searching for extrapolated track candidates factor2YS for track merging factor2K for track merging Margin in cm of Y position when rejecting edge clusters based on uncorrected track Y Max fraction of shared clusters for tracklet Except pad from cluster finding if total number of charges in a fragment is above this Except pad from cluster finding if number of consecutive charges in a fragment is above this Threshold where a timebin is considered disabling the noisy pad check for that pad Treat signal above this minimum as saturated Smoothing factor for the exponential Highly Ionising Particle tail filter Number of timebins to use for the averaging Add additional custom track errors when crossing relative as fraction of Do N fit passes in final fit of< 0:reject at max -n hits") AddOptionRTC(rejectIFCLowRadiusCluster, uint8_t, 1, "", 0, "Reject clusters that get the IFC mask error during refit") AddOptionRTC(dEdxTruncLow, uint8_t, 2, "", 0, "Low truncation threshold, fraction of 128") AddOptionRTC(dEdxTruncHigh, uint8_t, 77, "", 0, "High truncation threshold, fraction of 128") AddOptionRTC(extrapolationTracking, int8_t, 1, "", 0, "Enable Extrapolation Tracking(prolong tracks to adjacent sectors to find short segments)") AddOptionRTC(disableRefitAttachment, uint8_t, 0, "", 0, "Bitmask to disable certain attachment steps during refit(1:attachment, 2:propagation, 4:loop following, 8:mirroring)") AddOptionRTC(rejectionStrategy, uint8_t, o2::gpu::GPUSettings::RejectionStrategyA, "", 0, "Enable rejection of TPC clusters for compression(0=no, 1=strategy A, 2=strategy B)") AddOptionRTC(mergeLoopersAfterburner, uint8_t, 1, "", 0, "Run afterburner for additional looper merging") AddOptionRTC(compressionTypeMask, uint8_t, o2::gpu::GPUSettings::CompressionFull, "", 0, "TPC Compression mode bits(1=truncate charge/width LSB, 2=differences, 4=track-model)") AddOptionRTC(compressionSortOrder, uint8_t, o2::gpu::GPUSettings::SortTime, "", 0, "Sort order of TPC compression(0=time, 1=pad, 2=Z-time-pad, 3=Z-pad-time, 4=no sorting(use incoming order))") AddOptionRTC(sigBitsCharge, uint8_t, 4, "", 0, "Number of significant bits for TPC cluster charge in compression mode 1") AddOptionRTC(sigBitsWidth, uint8_t, 3, "", 0, "Number of significant bits for TPC cluster width in compression mode 1") AddOptionRTC(dropLoopers, uint8_t, 0, "", 0, "Drop looping tracks starting from second loop") AddOptionRTC(mergerInterpolateErrors, uint8_t, 1, "", 0, "Use interpolation instead of extrapolation for chi2 based cluster rejection") AddOptionRTC(mergerInterpolateRejectAlsoOnCurrentPosition, uint8_t, 1, "", 0, "When using mergerInterpolateErrors, reject based on chi2 twice computed with interpolated and current track position starting from NDF > mergerNonInterpolateRejectMinNDF Merge tracks accross the central electrode Enable PID response Add sub threshold clusters in TPC dEdx computation OR mask of TPC flags that will reject the cluster in alternative dEdx Reject edge clusters based on uncorrected track Y during track fit Increase decrease removal by when on this number of pads from the edge h configStandalone Reconstruction rec_trd Max chi2 for TRD tracklets to be matched to a track Chi2 cut for strict matching mode Number of sigmas for ITS TPC track time error estimate Addition to search road around track prolongation along Y in cm Optimal tracklet rphi resolution in maximum chi2 per attached tracklet for TRD tracks take into account the full likelihood of the slope including exponential tails Tracks with less attached tracklets are discarded after the tracking Post trigger Pile up integration time in BCs fits all iterations but the last one in projections Use material lookup table for TPC refit Apply workarounds to avoid cyclic merge should not be needed tpc dyn configStandalone Processing proc_rtc Replace constant variables static by constexpr expressions Compile RTC in deterministic with NO_FAST_MATH flags and GPUCA_DETERMINISTIC_MODE define Use RTC to optimize GPU code h configStandalone Processing proc_rtctech Use a file lock to serialize access to the cache folder Print launch bounds used for RTC code as debugging for exit after Allow RTC with slave GPUReconstruction instances with optConstexpr and optSpecialcode Maximum number of RTC cache files per backend in the cache the oldest are Prepend RTC compilation commands by this string Load a parameter object containing the launch bounds from a file h configStandalone Processing proc_param TPC Cluster Z Error Parameterization h configStandalone Processing settings for neural network proc_nn std::string Specify inference device(cpu(default), rocm, cuda)") AddOption(nnInferenceDeviceId
configStandalone Reconstruction rec_tpc multiplier for the combined cluster track error during track following area in cm for the search of for z only used if decrease removal by when above this local occupancy rowx Shift of TPC revert cluster flag edge bit distance to edge exceeds this ZOffset for secondary multiple of radius max P of electron K BB bands crossing max P of electron p BB bands crossing max P of electron d BB bands crossing max P of electron t BB bands crossing min accepted dEdxMaxTPC of the track Additive extra cluster error for Y2 if edge flag set Additive extra cluster error for Y2 if single set Additive extra cluster error for Y2 if or single set Additive extra cluster error for Z2 if or single set Extra errors to add to track when crossing depending on addErrorsCECrossing Inner portion of y range in sector that is not used in searching for extrapolated track candidates factor2YS for track merging factor2K for track merging Margin in cm of Y position when rejecting edge clusters based on uncorrected track Y Max fraction of shared clusters for tracklet Except pad from cluster finding if total number of charges in a fragment is above this Except pad from cluster finding if number of consecutive charges in a fragment is above this Threshold where a timebin is considered disabling the noisy pad check for that pad Treat signal above this minimum as saturated Smoothing factor for the exponential Highly Ionising Particle tail filter Number of timebins to use for the averaging Add additional custom track errors when crossing relative as fraction of Do N fit passes in final fit of< 0:reject at max -n hits") AddOptionRTC(rejectIFCLowRadiusCluster, uint8_t, 1, "", 0, "Reject clusters that get the IFC mask error during refit") AddOptionRTC(dEdxTruncLow, uint8_t, 2, "", 0, "Low truncation threshold, fraction of 128") AddOptionRTC(dEdxTruncHigh, uint8_t, 77, "", 0, "High truncation threshold, fraction of 128") AddOptionRTC(extrapolationTracking, int8_t, 1, "", 0, "Enable Extrapolation Tracking(prolong tracks to adjacent sectors to find short segments)") AddOptionRTC(disableRefitAttachment, uint8_t, 0, "", 0, "Bitmask to disable certain attachment steps during refit(1:attachment, 2:propagation, 4:loop following, 8:mirroring)") AddOptionRTC(rejectionStrategy, uint8_t, o2::gpu::GPUSettings::RejectionStrategyA, "", 0, "Enable rejection of TPC clusters for compression(0=no, 1=strategy A, 2=strategy B)") AddOptionRTC(mergeLoopersAfterburner, uint8_t, 1, "", 0, "Run afterburner for additional looper merging") AddOptionRTC(compressionTypeMask, uint8_t, o2::gpu::GPUSettings::CompressionFull, "", 0, "TPC Compression mode bits(1=truncate charge/width LSB, 2=differences, 4=track-model)") AddOptionRTC(compressionSortOrder, uint8_t, o2::gpu::GPUSettings::SortTime, "", 0, "Sort order of TPC compression(0=time, 1=pad, 2=Z-time-pad, 3=Z-pad-time, 4=no sorting(use incoming order))") AddOptionRTC(sigBitsCharge, uint8_t, 4, "", 0, "Number of significant bits for TPC cluster charge in compression mode 1") AddOptionRTC(sigBitsWidth, uint8_t, 3, "", 0, "Number of significant bits for TPC cluster width in compression mode 1") AddOptionRTC(dropLoopers, uint8_t, 0, "", 0, "Drop looping tracks starting from second loop") AddOptionRTC(mergerInterpolateErrors, uint8_t, 1, "", 0, "Use interpolation instead of extrapolation for chi2 based cluster rejection") AddOptionRTC(mergerInterpolateRejectAlsoOnCurrentPosition, uint8_t, 1, "", 0, "When using mergerInterpolateErrors, reject based on chi2 twice computed with interpolated and current track position starting from NDF > mergerNonInterpolateRejectMinNDF Merge tracks accross the central electrode Enable PID response Add sub threshold clusters in TPC dEdx computation OR mask of TPC flags that will reject the cluster in alternative dEdx Reject edge clusters based on uncorrected track Y during track fit Increase decrease removal by when on this number of pads from the edge h configStandalone Reconstruction rec_trd Max chi2 for TRD tracklets to be matched to a track Chi2 cut for strict matching mode Number of sigmas for ITS TPC track time error estimate Addition to search road around track prolongation along Y in cm Optimal tracklet rphi resolution in maximum chi2 per attached tracklet for TRD tracks take into account the full likelihood of the slope including exponential tails Tracks with less attached tracklets are discarded after the tracking Post trigger Pile up integration time in BCs fits all iterations but the last one in projections Use material lookup table for TPC refit Apply workarounds to avoid cyclic merge should not be needed tpc dyn configStandalone Processing proc_rtc Replace constant variables static by constexpr expressions Compile RTC in deterministic with NO_FAST_MATH flags and GPUCA_DETERMINISTIC_MODE define Use RTC to optimize GPU code h configStandalone Processing proc_rtctech Use a file lock to serialize access to the cache folder Print launch bounds used for RTC code as debugging option
char error[CURL_ERROR_SIZE]
std::vector< int > gChildProcesses
void sigaction_handler(int signal, siginfo_t *signal_info, void *)
KernelSetup initSim(std::string transport, std::string primaddress, std::string primstatusaddress, std::string mergeraddress, int workerID)
void pinToCPU(unsigned int cpuid)
void CustomCleanup(void *data, void *hint)
fair::mq::Channel * makeWorkerChannel(std::unique_ptr< fair::mq::Channel > &owner, char const *name, char const *type, std::string const &address)
bool initializeSim(std::string transport, std::string address, std::unique_ptr< FairRunSim > &simptr)
bool waitForControlInput(int workerID)
void installMTWorkerHooks(std::string const &serveraddress, std::string const &mergeraddress)
std::atomic< int > gChunkRequests
int initAndRunDevice(int argc, char *argv[])
int runSim(KernelSetup setup)
o2::devices::O2SimDevice * getDevice()
void runMT(std::string const &serveraddress, std::string const &mergeraddress, fair::mq::Channel &pubchannel)
std::atomic< bool > gServerDone
void addCustomOptions(bpo::options_description &options)
std::atomic< int > gNextWorkerID
void doLogInfo(int workerID, std::string const &message)
void SetLogVerbosityLevel(const char *verbosity)
static FairLogger * GetLogger()
static SimConfig & Instance()
static bool initSim(fair::mq::Channel &channel, std::unique_ptr< FairRunSim > &simptr)
bool Kernel(int workerID, fair::mq::Channel &requestchannel, fair::mq::Channel &dataoutchannel, fair::mq::Channel *statuschannel=nullptr)
static FetchedChunk fetchChunk(int workerID, fair::mq::Channel &requestchannel)
requests one chunk of primaries from the server on the given channel
ChunkStatus
outcome of asking the primary server for work
GLuint GLuint64EXT address
GLuint const GLchar * name
GLint GLint GLsizei GLint GLenum GLenum type
bool parseSimReconfigFromString(std::string const &argumentstring, SimReconfigData &config)
std::string simStatusString(std::string const &origin, std::string const &topic, std::string const &message)
std::string getPublishAddress(std::string const &base, int pid=getpid())
bool publishMessage(fair::mq::Channel &channel, std::string const &message)
fair::mq::Channel createPUBChannel(std::string const &address, std::string const &type="pub")
void ensureStaticTLSReserve(char *argv[], unsigned long reserve=Geant4StaticTLSReserve)
std::string to_string(gsl::span< T, Size > span)
fair::mq::Channel * datachannel
o2::devices::O2SimDevice * sim
fair::mq::Channel * primstatuschannel
fair::mq::Channel * primchannel
std::unique_ptr< fair::mq::Channel > request
std::shared_ptr< fair::mq::TransportFactory > factory
std::vector< std::unique_ptr< fair::mq::Channel > > data
static MTWorkerHooks & instance()
TODO: Make this a base class of SimConfigData?
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"
std::vector< ChannelData > channels
uint64_t const void const *restrict const msg