SLIC  6.1.1
Simulation for the Linear Collider (SLIC) - Geant4 simulation application
CommandQueue.cc
Go to the documentation of this file.
1 #include "CommandQueue.hh"
2 
3 // Geant4
4 #include "G4UImanager.hh"
5 
6 namespace slic {
8  log() << LOG::always << "************************" << LOG::done;
9  log() << LOG::always << "* Geant4 Command Queue *" << LOG::done;
10  log() << LOG::always << "************************" << LOG::done;
11  for (CommandVectorType::iterator iter = cmdsBegin(); iter != cmdsEnd(); iter++) {
12  log() << LOG::always << *iter << LOG::done;
13  }
14  log() << LOG::always << LOG::done;
15 }
16 
18  for (CommandVectorType::iterator iter = cmdsBegin(); iter != cmdsEnd(); iter++) {
19  std::string cmd = *iter;
20  G4UImanager::GetUIpointer()->ApplyCommand(cmd);
21  }
22 }
23 
24 CommandQueue::CommandVectorType::iterator CommandQueue::find(const std::string& str) {
25  CommandVectorType::iterator iter = m_commands.begin();
26  for (; iter != m_commands.end(); iter++) {
27  if ((*iter).find(str) != std::string::npos) {
28  break;
29  }
30  }
31  return iter;
32 }
33 }
CommandVectorType::iterator find(const std::string &command)
Definition: CommandQueue.cc:24
CommandVectorType::iterator cmdsBegin()
Definition: CommandQueue.hh:61
CommandVectorType::iterator cmdsEnd()
Definition: CommandQueue.hh:69
CommandVectorType m_commands
Definition: CommandQueue.hh:98
LogStream & log()
Definition: Module.hh:99
@ always
Definition: LogStream.hh:33
@ done
Definition: LogStream.hh:26