lcdd/src
diff -N G4StoreMessenger.cc
--- G4StoreMessenger.cc 22 Sep 2005 23:40:09 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,80 +0,0 @@
-#include "G4StoreMessenger.hh"
-
-#include "G4StoreManager.hh"
-#include "StringUtil.hh"
-
-#include <iostream>
-#include <sstream>
-
-
-G4StoreMessenger::G4StoreMessenger(G4StoreManager* mgr)
-{
- m_mgr = mgr;
-
- defineCommands();
-}
-
-G4StoreMessenger::~G4StoreMessenger()
-{
- delete m_storesDir;
- delete m_printCmd;
-}
-
-void G4StoreMessenger::SetNewValue(G4UIcommand* cmd, G4String newVals)
-{
- std::istringstream is ( ( const char* ) newVals );
-
- std::string s;
- is >> s;
-
- s = StringUtil::toLower( s );
-
- if ( cmd == m_printCmd ) {
-
- if ( s == "region" || s == "regions" ) {
- m_mgr->dumpRegionStore( G4cout );
- }
- else if ( s == "lv" ) {
- m_mgr->dumpLogicalVolumeStore( G4cout );
- }
- else if ( s == "pv" ) {
- m_mgr->dumpPhysicalVolumeStore( G4cout );
- }
- else if ( s == "solid" || s == "solids" ) {
- m_mgr->dumpSolidStore( G4cout );
- }
- else if ( s == "material" || s == "mat" || s == "materials" ) {
- m_mgr->dumpMaterialStore( G4cout );
- }
- else {
-
- G4cout << "Dumping all Geant4 Stores..." << G4endl << G4endl;
-
- m_mgr->dumpRegionStore( G4cout );
- m_mgr->dumpLogicalVolumeStore( G4cout );
- m_mgr->dumpPhysicalVolumeStore( G4cout );
- m_mgr->dumpSolidStore( G4cout );
- m_mgr->dumpMaterialStore( G4cout );
-
- }
- }
- else {
- G4cout << "Unknown command!" << G4endl;
- }
-}
-
-void G4StoreMessenger::defineCommands()
-{
- G4UIparameter* p;
-
- // stores dir
- m_storesDir = new G4UIdirectory( "/stores/" );
- m_storesDir->SetGuidance( "Geant4 internal object store inspection commands." );
-
- // print a store
- m_printCmd = new G4UIcommand( "/stores/print", this );
- m_printCmd->SetGuidance( "Print contents of Geant4 store." );
- m_printCmd->SetGuidance( "Parameter is one of these: region, lv, pv, material, or solid." );
- p = new G4UIparameter( "StoreName", 's', true );
- m_printCmd->SetParameter( p );
-}