24 sprintf(runlist,
"RunList.txt");
25 sprintf(rawlist,
"rawFileList.txt");
29 vector<string> vRunFile;
30 ifstream frunlist(runlist);
31 while(frunlist >> str){
32 vRunFile.push_back(str);
35 strtmp.erase(0,strtmp.find(
"_")+1);
36 strtmp.erase(strtmp.find(
"."),4);
38 sscanf(strtmp.c_str(),
"%d", &iRun);
45 vector<string> vRawFile;
46 vector<string> vRawFileInput;
47 ifstream frawlist(rawlist);
48 while(frawlist >> str){
49 vRawFile.push_back(str);
52 string::size_type i1 = str.find(
"run_");
53 strtmp = str.substr(i1+4, 7);
55 sscanf(strtmp.c_str(),
"%d", &iRun);
56 vRawRun.push_back(iRun);
60 string::size_type i2 = str.find(
"All_");
61 strtmp2 = str.substr(0, i2+8);
62 string strtmp3 = strtmp2 +
"*.raw";
63 vRawFileInput.push_back(strtmp3);
68 ofstream fout(
"job.txt");
69 for(
unsigned i=0; i<vRun.size(); i++){
71 for(
unsigned k=0; k<vRawRun.size(); k++){
73 if(vRun[i] == vRawRun[k]){ index = k;
break;}
76 fout <<
"raw_evt_filter.exe " << vRunFile[i] <<
" \"" << vRawFileInput[index] <<
"\"" << endl;
78 cout <<
"can not find raw file for " << vRunFile[i] << endl;
sprintf(cut,"kal_costheta0_em>-0.93&&kal_costheta0_em<0.93&&kal_pxy0_em>=0.05+%d*0.1&&kal_pxy0_em<0.15+%d*0.1&&NGch>=2", j, j)