/[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 1.7 by kusanagi, Tue Sep 21 20:24:33 2004 UTC revision 2.1 by kusanagi, Fri Dec 3 22:08:01 2004 UTC
# Line 20  extern "C" { Line 20  extern "C" {
20  }  }
21    
22    
23    
24  using namespace pamela;  using namespace pamela;
25  using namespace log4cxx;  using namespace log4cxx;
26  using namespace std;  using namespace std;
# Line 36  int main(int argc, char* argv[]) { Line 37  int main(int argc, char* argv[]) {
37      DIR *dirp;      DIR *dirp;
38      string pathDir((char*)getenv("YODA_DATA"));      string pathDir((char*)getenv("YODA_DATA"));
39      string pathLog = nomeFileLog;      string pathLog = nomeFileLog;
40        bool ANALIZE = false;
41      //---------------- Log4cxx configuration-----------------------------------------------      //---------------- Log4cxx configuration-----------------------------------------------
42      //Define the configuration file to be used on log4cxx      //Define the configuration file to be used on log4cxx
43      PropertyConfigurator::configure(pathDir + "/log4cxx.conf");      PropertyConfigurator::configure(pathDir + "/log4cxx.conf");
# Line 71  int main(int argc, char* argv[]) { Line 72  int main(int argc, char* argv[]) {
72          cout << "Usage: yoda FILE [OPTION] \n";          cout << "Usage: yoda FILE [OPTION] \n";
73          cout << "\t --help              print this help and exit \n";          cout << "\t --help              print this help and exit \n";
74          cout << "\t -p                  maximum number of packets to process [default all] \n";          cout << "\t -p                  maximum number of packets to process [default all] \n";
75            cout << "\t -analize            generate pre-defined analisys files (gif/text) inside the unpacking directory\n";
76          exit(1);          exit(1);
77    }    }
78    
# Line 102  int main(int argc, char* argv[]) { Line 104  int main(int argc, char* argv[]) {
104          cout << "Try '--help' for more information. \n";          cout << "Try '--help' for more information. \n";
105          exit(1);          exit(1);
106      }      }
107    
108        if (!strcmp(argv[i], "-analize")) ANALIZE = true;
109        
110    }    }
111        
112        
# Line 118  int main(int argc, char* argv[]) { Line 123  int main(int argc, char* argv[]) {
123      time ( &rawtime );      time ( &rawtime );
124      timeinfo = localtime ( &rawtime );      timeinfo = localtime ( &rawtime );
125            
126      oss.flush();      oss.str("");
127      oss << "<-------------------------------START UNPACKING------------------------------->\n"      oss << "<-------------------------------START UNPACKING------------------------------->\n"
128          << " Starting the program at: " << asctime (timeinfo) << " Opening file: " << argv[1];          << " Starting the program at: " << asctime (timeinfo) << " Opening file: " << argv[1];
129      logger->info(oss.str().c_str());      logger->info(oss.str().c_str());
# Line 131  int main(int argc, char* argv[]) { Line 136  int main(int argc, char* argv[]) {
136    TechmodelPamelaRun Run(argv[1]);    TechmodelPamelaRun Run(argv[1]);
137    reader->Init(&Run);    reader->Init(&Run);
138    
139     oss.flush();     oss.str("");
140     oss << "Init successul ok" << asctime (timeinfo);     oss << "Init successul ok" << asctime (timeinfo);
141     logger->debug(oss.str().c_str());     logger->debug(oss.str().c_str());
142    
# Line 141  int main(int argc, char* argv[]) { Line 146  int main(int argc, char* argv[]) {
146    
147    logger->info("<-------------------------------END UNPACKING------------------------------->\n");    logger->info("<-------------------------------END UNPACKING------------------------------->\n");
148    
   std::string command;  
   command = "mv " + pathLog + "  " + pathDir + "/" + Run.GetRun() + "/YodaLog.txt";  
149    //Momentarly suspended the save      //Momentarly suspended the save  
150    //system(command.c_str());    //system(command.c_str());
151  }  }

Legend:
Removed from v.1.7  
changed lines
  Added in v.2.1

  ViewVC Help
Powered by ViewVC 1.1.23