/[PAMELA software]/yoda/event/PamelaRun.cpp
ViewVC logotype

Diff of /yoda/event/PamelaRun.cpp

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

revision 6.2 by kusanagi, Wed Mar 8 13:51:45 2006 UTC revision 6.3 by kusanagi, Tue Apr 25 10:05:28 2006 UTC
# Line 1  Line 1 
1  /** @file  /** @file
2   * $Author: kusanagi $   * $Author: kusanagi $
3   * $Date: 2006/02/15 15:47:14 $   * $Date: 2006/03/08 13:51:45 $
4   * $Revision: 6.1 $   * $Revision: 6.2 $
5   *   *
6   * Implementation of the PamelaRun class.   * Implementation of the PamelaRun class.
7   */   */
# Line 61  std::string PamelaRun::GetRunName(int ru Line 61  std::string PamelaRun::GetRunName(int ru
61   std::string::size_type pos;   std::string::size_type pos;
62    
63   pos = input.find_last_of("/");   pos = input.find_last_of("/");
  //if ((pos == std::string::npos) && !input.empty()) ;//throw Exception("Directories not allowed....");  
64   fileName = input.substr(pos+1);   fileName = input.substr(pos+1);
65   pos = fileName.find_last_of(".");   pos = fileName.find_last_of(".");
66   fileName = fileName.substr(0,pos);   fileName = fileName.substr(0,pos);
67   pathDir = pathDir + "/";   pathDir = pathDir + "/";
68   tempName = pathDir + fileName + "00";   tempName = pathDir + fileName;
  //oss << pathDir << fileName << std::setw( 2 ) << std::setfill( '0' );  
  oss.str(tempName.c_str());  
  int i = 0;  
  while (res){  
     //if ((dirp = opendir(tempName.c_str())) == NULL) {  
     if ((dirp = opendir(oss.str().c_str())) == NULL) {  
         res = 0;  
     } else {  
         closedir(dirp);  
         oss.str("");  
         oss << pathDir << fileName << std::setw( 2 ) << std::setfill( '0' ) << ++i;  
         res = 1;  
     }  
  }  
69   oss.str("");   oss.str("");
70   oss << Path << "/" << fileName << std::setw( 2 ) << std::setfill( '0' ) << i;   oss << Path << "/" << fileName;
71   UnpackPath = oss.str();   UnpackPath = oss.str();
72   oss.str("");   oss.str("");
73   oss << fileName << std::setw( 2 ) << std::setfill( '0' ) << i;   oss << fileName;
74   Run = oss.str();   Run = oss.str();
 //return (oss.str());  
75  }  }
76    
77  /**  /**

Legend:
Removed from v.6.2  
changed lines
  Added in v.6.3

  ViewVC Help
Powered by ViewVC 1.1.23