/[PAMELA software]/yoda/techmodel/techmodelreader.cpp
ViewVC logotype

Diff of /yoda/techmodel/techmodelreader.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4.0.8.2 by kusanagi, Tue Apr 4 13:23:42 2006 UTC revision 5.0 by kusanagi, Mon Aug 29 09:46:13 2005 UTC
# Line 55  int main(int argc, char* argv[]) { Line 55  int main(int argc, char* argv[]) {
55      string pathDir(outDir);      string pathDir(outDir);
56    
57      string pathLog = nomeFileLog;      string pathLog = nomeFileLog;
58        bool ANALIZE = false;
59      //---------------- Log4cxx configuration-----------------------------------------------      //---------------- Log4cxx configuration-----------------------------------------------
60      //Define the configuration file to be used on log4cxx      //Define the configuration file to be used on log4cxx
61      PropertyConfigurator::configure(pathDir + "/log4cxx.conf");      PropertyConfigurator::configure(pathDir + "/log4cxx.conf");
# Line 81  int main(int argc, char* argv[]) { Line 82  int main(int argc, char* argv[]) {
82    if (argc < 2){    if (argc < 2){
83      //logger->info(_T("You have forgotten the file name."));      //logger->info(_T("You have forgotten the file name."));
84      cout << "You have forgotten the file name. \n";      cout << "You have forgotten the file name. \n";
85      cout << "Try '-help' for more information. \n";      cout << "Try '--help' for more information. \n";
86      exit(1);      exit(1);
87    }      }  
88        
89    if (!strcmp(argv[1], "-help")){    if (!strcmp(argv[1], "--help")){
90          cout << "Usage: yoda FILE [OPTION] \n";          cout << "Usage: yoda FILE [OPTION] \n";
91          cout << "\t -help              print this help and exit \n";          cout << "\t --help              print this help and exit \n";
92          cout << "\t -p                  maximum number of packets to process [default all] \n";          cout << "\t -p                  maximum number of packets to process [default all] \n";
93            cout << "\t -analize            generate pre-defined analisys files (gif/text) inside the unpacking directory\n";
94          exit(1);          exit(1);
95    }    }
96    
   if (!strcmp(argv[1], "-version")){  
         cout << GetVersionInfo() << "\n";  
         exit(1);  
   }  
     
97    ifstream from (argv[1]);    ifstream from (argv[1]);
98    if (!from) {    if (!from) {
99      //logger->info(_T("The file does not exist."));      //logger->info(_T("The file does not exist."));
# Line 108  int main(int argc, char* argv[]) { Line 105  int main(int argc, char* argv[]) {
105      if (!strcmp(argv[i], "-p")){      if (!strcmp(argv[i], "-p")){
106          if (++i >= argc){          if (++i >= argc){
107              cerr << "-p needs arguments. \n";              cerr << "-p needs arguments. \n";
108              cout << "Try '-help' for more information. \n";              cout << "Try '--help' for more information. \n";
109              exit(1);              exit(1);
110          }          }
111          if (isdigit(*argv[i])) {          if (isdigit(*argv[i])) {
# Line 116  int main(int argc, char* argv[]) { Line 113  int main(int argc, char* argv[]) {
113          } else {          } else {
114              //logger->info(_T("The file does not exist."));              //logger->info(_T("The file does not exist."));
115              cerr << "-p needs a integer value. \n";              cerr << "-p needs a integer value. \n";
116              cout << "Try '-help' for more information. \n";              cout << "Try '--help' for more information. \n";
117              exit(1);              exit(1);
118          }          }
119      }      }
120    
121      if (!maxPackets){      if (!maxPackets){
122          cout << "Try '-help' for more information. \n";          cout << "Try '--help' for more information. \n";
123          exit(1);          exit(1);
124      }      }
125    
126        if (!strcmp(argv[i], "-analize")) ANALIZE = true;
127        
128    }    }
129        
130        
# Line 169  int main(int argc, char* argv[]) { Line 167  int main(int argc, char* argv[]) {
167    //Momentarly suspended the save      //Momentarly suspended the save  
168    //system(command.c_str());    //system(command.c_str());
169  }  }
   
 /**  
  * Get a string with the version info of the algorithm.  
  */  
 const char* GetVersionInfo(void) const {  
   return "$Id$";  
 }  

Legend:
Removed from v.4.0.8.2  
changed lines
  Added in v.5.0

  ViewVC Help
Powered by ViewVC 1.1.23