32 #ifdef G4MULTITHREADED
42 G4VisCommandMultithreadingActionOnEventQueueFull::G4VisCommandMultithreadingActionOnEventQueueFull()
45 fpCommand =
new G4UIcmdWithAString(
"/vis/multithreading/actionOnEventQueueFull",
this);
46 fpCommand->SetGuidance(
"When event queue for drawing gets full:");
47 fpCommand->SetGuidance(
"wait: event processing waits for vis manager to catch up.");
48 fpCommand->SetGuidance(
"discard: events are discarded for drawing.");
49 fpCommand->SetCandidates(
"wait discard");
50 fpCommand->SetParameterName (
"wait", omitable =
true);
51 fpCommand->SetDefaultValue (
"wait");
54 G4VisCommandMultithreadingActionOnEventQueueFull::~G4VisCommandMultithreadingActionOnEventQueueFull()
64 void G4VisCommandMultithreadingActionOnEventQueueFull::SetNewValue(
G4UIcommand*,
G4String newValue)
68 if (newValue ==
"wait") {
69 fpVisManager->SetWaitOnEventQueueFull(
true);
71 fpVisManager->SetWaitOnEventQueueFull(
false);
76 "When event queue for drawing is full,";
77 if (fpVisManager->GetWaitOnEventQueueFull()) {
78 G4cout <<
" event processing will wait";
80 G4cout <<
" events will be discarded for drawing";
88 G4VisCommandMultithreadingMaxEventQueueSize::G4VisCommandMultithreadingMaxEventQueueSize()
92 fpCommand->SetGuidance
93 (
"Defines maximum event queue size. N <=0 means \"unlimited\".");
94 fpCommand->SetGuidance
95 (
"If adding an event to the visualisation event queue would cause the"
96 " queue size to exceed this value:");
97 fpCommand->SetGuidance
98 (
" if actionOnEventQueueFull==wait the worker threads are paused for a short"
99 " time to give the visualisation manager a chance to catch up.");
100 fpCommand->SetGuidance
101 (
" if actionOnEventQueueFull==discard the event is discarded for drawing.");
102 fpCommand->SetParameterName (
"maxSize", omitable =
true);
103 fpCommand->SetDefaultValue (100);
106 G4VisCommandMultithreadingMaxEventQueueSize::~G4VisCommandMultithreadingMaxEventQueueSize()
116 void G4VisCommandMultithreadingMaxEventQueueSize::SetNewValue(
G4UIcommand*,
G4String newValue)
120 G4int maxEventQueueSize = fpCommand->GetNewIntValue(newValue);
121 fpVisManager->SetMaxEventQueueSize(maxEventQueueSize);
125 "Maximum event queue size has been set to "
126 << fpVisManager->GetMaxEventQueueSize()
G4GLOB_DLL std::ostream G4cout