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 |
*/ |
*/ |
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 |
/** |
/** |