@@ -105,7 +105,7 @@ int main( int argc, char **argv )
std::cout<<"If the option -O is used, when merging TTree, the basket size is re-optimized"<<std::endl;
std::cout<<"If the option -v is used, explicitly set the verbosity level;\n"\
" 0 request no output, 99 is the default"<<std::endl;
std::cout<<"If the option -m is used, the execution will be parallelized in multiple processes\n"<<std::endl;
std::cout<<"If the option -m is used, the execution will be parallelized in multiple processes\n"<<std::endl;
std::cout<<"If the option -n is used, hadd will open at most 'maxopenedfiles' at once, use 0\n"
" to request to use the system maximum."<<std::endl;
std::cout<<"If the option -cachesize is used, hadd will resize (or disable if 0) the\n"
...
...
@@ -168,28 +168,30 @@ int main( int argc, char **argv )
}elseif(strcmp(argv[a],"-O")==0){
reoptimize=kTRUE;
++ffirst;
}elseif(strcmp(argv[a],"-j")==0){
}elseif(strcmp(argv[a],"-j")==0){
// If the number of processes is not specified, use the default.
if(a+1!=argc&&argv[a+1][0]!='-'){
if(a+1!=argc&&argv[a+1][0]!='-'){
// number of processes specified
Long_trequest=1;
for(char*c=argv[a+1];*c!='\0';++c){
for(char*c=argv[a+1];*c!='\0';++c){
if(!isdigit(*c)){
// Wrong number of Processes. Use the default:
std::cerr<<"Error: could not parse the number of processes to run in parallel passed after -j: "<<argv[a+1]<<". We will use the system maximum.\n";
std::cerr<<"Error: could not parse the number of processes to run in parallel passed after -j: "
<<argv[a+1]<<". We will use the system maximum.\n";
request=0;
break;
}
}
if(request==1){
request=strtol(argv[a+1],0,10);
request=strtol(argv[a+1],0,10);
if(request<kMaxLong&&request>=0){
nProcesses=(Int_t)request;
++a;
++ffirst;
std::cout<<"Parallelizing with "<<nProcesses<<" processes.\n";
std::cout<<"Parallelizing with "<<nProcesses<<" processes.\n";
}else{
std::cerr<<"Error: could not parse the number of processes to use passed after -j: "<<argv[a+1]<<". We will use the default value (number of logical cores).\n";
std::cerr<<"Error: could not parse the number of processes to use passed after -j: "<<argv[a+1]
<<". We will use the default value (number of logical cores).\n";
}
}
}
...
...
@@ -341,7 +343,7 @@ int main( int argc, char **argv )