--------------------------------------------------------------------
| 653 | |
| 654 | // -------------------------------------------------------------------- |
| 655 | G4String G4RunMessenger::GetCurrentValue(G4UIcommand* command) |
| 656 | { |
| 657 | G4String cv; |
| 658 | |
| 659 | if (command == verboseCmd) { |
| 660 | cv = verboseCmd->ConvertToString(runManager->GetVerboseLevel()); |
| 661 | } |
| 662 | else if (command == printProgCmd) { |
| 663 | cv = printProgCmd->ConvertToString(runManager->GetPrintProgress()); |
| 664 | } |
| 665 | else if (command == randDirCmd) { |
| 666 | cv = runManager->GetRandomNumberStoreDir(); |
| 667 | } |
| 668 | else if (command == randEvtCmd) { |
| 669 | cv = randEvtCmd->ConvertToString(runManager->GetFlagRandomNumberStatusToG4Event()); |
| 670 | } |
| 671 | else if (command == nThreadsCmd) { |
| 672 | G4RunManager::RMType rmType = runManager->GetRunManagerType(); |
| 673 | if (rmType == G4RunManager::masterRM) { |
| 674 | cv = nThreadsCmd->ConvertToString( |
| 675 | static_cast<G4MTRunManager*>(runManager)->GetNumberOfThreads()); |
| 676 | } |
| 677 | else if (rmType == G4RunManager::sequentialRM) { |
| 678 | cv = "0"; |
| 679 | } |
| 680 | } |
| 681 | else if (command == evModCmd) { |
| 682 | G4RunManager::RMType rmType = runManager->GetRunManagerType(); |
| 683 | if (rmType == G4RunManager::masterRM) { |
| 684 | cv = evModCmd->ConvertToString(static_cast<G4MTRunManager*>(runManager)->GetEventModulo()) |
| 685 | + " " + evModCmd->ConvertToString(G4MTRunManager::SeedOncePerCommunication()); |
| 686 | } |
| 687 | else if (rmType == G4RunManager::sequentialRM) { |
| 688 | G4cout << "*** /run/eventModulo command is valid only in MT mode." << G4endl; |
| 689 | } |
| 690 | } |
| 691 | |
| 692 | return cv; |
| 693 | } |
nothing calls this directly
no test coverage detected