CommandQueue.cc

Go to the documentation of this file.
00001 // $Header: /cvs/lcd/slic/src/CommandQueue.cc,v 1.2 2007/04/27 01:54:34 jeremy Exp $
00002 
00003 #include "CommandQueue.hh"
00004 
00005 // geant4
00006 #include "G4UImanager.hh"
00007 
00008 namespace slic
00009 {
00010   void CommandQueue::printOut() 
00011   {
00012     log() << LOG::always << LOG::done;
00013     log() << LOG::always << "************************" << LOG::done;
00014     log() << LOG::always << "* Geant4 Command Queue *" << LOG::done;
00015     log() << LOG::always << "************************" << LOG::done;
00016     for ( CmdVecType::iterator iter = cmdsBegin();
00017           iter != cmdsEnd();
00018           iter++ ) {
00019       log() << LOG::always << *iter << LOG::done;
00020     }
00021     log() << LOG::always << LOG::done;
00022   }
00023 
00024   void CommandQueue::execute()
00025   {
00026     for ( CmdVecType::iterator iter = cmdsBegin();
00027           iter != cmdsEnd();
00028           iter++ ) {
00029       std::string cmd = *iter;
00030       G4UImanager::GetUIpointer()->ApplyCommand( cmd );
00031     }    
00032   }
00033 
00034   CommandQueue::CmdVecType::iterator CommandQueue::find(const std::string& str)
00035   {
00036     CmdVecType::iterator iter = m_commands.begin();
00037     for ( ;
00038           iter != m_commands.end();
00039           iter++ ) {
00040       if ( (*iter).find(str) != std::string::npos ) {
00041         break;
00042       }
00043     }
00044     return iter;
00045   }
00046 }

Generated on Thu Nov 15 15:24:15 2007 for Simulator for the Linear Collider by  doxygen 1.5.4