00001 // ===================================================================== 00002 // $Id: TPrintCurrentWorkingDirectoryCommand.cc,v 1.4 2004/03/07 10:30:28 goiwai Exp $ 00003 // $Name: CLDAQ-1-14-03 $ 00004 // $Log: TPrintCurrentWorkingDirectoryCommand.cc,v $ 00005 // Revision 1.4 2004/03/07 10:30:28 goiwai 00006 // ROOTに組みこむためのおまじないマクロを埋めこみました。 00007 // 全てにおいて完全に動作するわけではありません。 00008 // 00009 // Revision 1.3 2003/10/06 17:02:37 goiwai 00010 // *** empty log message *** 00011 // 00012 // Revision 1.2 2003/07/30 16:17:31 goiwai 00013 // ファイルにコミットログをつけることにしました. 00014 // 00015 // ===================================================================== 00016 #include "TPrintCurrentWorkingDirectoryCommand.hh" 00017 #include "TRunManager.hh" 00018 #include "TUserInterface.hh" 00019 00020 static const Tstring _name = "pwd"; 00021 static const Tstring _desc = "print the absolute pathname of the current working directory."; 00022 00023 TPrintCurrentWorkingDirectoryCommand::TPrintCurrentWorkingDirectoryCommand( TRunManager* manager ) 00024 : TCommand( manager, _name, _desc ) 00025 {;} 00026 00027 TPrintCurrentWorkingDirectoryCommand::~TPrintCurrentWorkingDirectoryCommand() 00028 {;} 00029 00030 Tvoid TPrintCurrentWorkingDirectoryCommand::Execute( const TstringList& arguments ) 00031 { 00032 TUserInterface* ui = theRunManager -> GetUserInterface(); 00033 static const Tstring head = "TPrintCurrentWorkingDirectoryCommand::Execute: "; 00034 if ( ui ) { 00035 Tcout << ui -> GetCurrentWorkingDirectory() << Tendl; 00036 } else { 00037 Tcerr << head << "UserInterface doesn't exist." << Tendl; 00038 } 00039 return; 00040 } 00041 00042 #ifdef __CLDAQ_ROOT_DLL 00043 ClassImp(TPrintCurrentWorkingDirectoryCommand) 00044 #endif