--- quicklook/tracker/flight/src/FTrkScanQLook_EXPERT.cc 2006/06/01 15:23:13 1.2 +++ quicklook/tracker/flight/src/FTrkScanQLook_EXPERT.cc 2006/08/14 10:04:19 1.10 @@ -2,10 +2,10 @@ * FTrkScanQLook_EXPERT.cc * * autor: D.Fedele - * version 2.0 + * version v1r09 * Parameters: * file - the path to the root file to analyze - * outdir - total path of output file + * outDir - total path of output file * event - the number of the single event to analyze * DSPprint - the number of a particular DSP to draw (0 don't draw) * format - extension of output file (pdf,ps,gif,jpg) @@ -24,10 +24,10 @@ printf("\t file: path of the root file to analyze (give at least this parameter) \n"); printf("\nOPTIONS:\n"); printf("\t -v be verbose \n"); - printf("\t -outdir: output directory [default = ./] \n"); - printf("\t -format: format of the output file (without .) [default = pdf] \n"); + printf("\t -outDir: path of the output directory [default = ./] (with or without final '/')\n"); + printf("\t -format: format of the output file (without .) [default = pdf] (accepted formats: pdf, ps, png, jpg, gif)\n"); printf("\nExamples:\n\tFTrkScanQLook_EXPERT /home/pamela/filesfromyoda/DW_xxxxxx_yyyy.root \n\n"); - printf("\tFTrkScanQLook_EXPERT /home/pamela/filesfromyoda/DW_xxxxxx_yyyy.root -v -outdir ~/tmp/\n\n"); + printf("\tFTrkScanQLook_EXPERT /home/pamela/filesfromyoda/DW_xxxxxx_yyyy.root -v -outDir ~/tmp/\n\n"); } int main(int argc, char* argv[]){ @@ -62,9 +62,9 @@ if ( !strcmp(argv[i],"-v") || !strcmp(argv[i],"--verbose") ) beverbose = true; - if (!strcmp(argv[i], "-outdir")){ + if (!strcmp(argv[i], "-outDir")){ if (++i >= argc || !strcmp(argv[i],"-v") || !strcmp(argv[i], "-format")){ - printf( "\n-outdir needs arguments. \n"); + printf( "\n-outDir needs arguments. \n"); usage(); return(0); } @@ -74,7 +74,7 @@ } } if (!strcmp(argv[i], "-format")){ - if (++i >= argc || !strcmp(argv[i],"-v") || !strcmp(argv[i], "-outdir")){ + if (++i >= argc || !strcmp(argv[i],"-v") || !strcmp(argv[i], "-outDir")){ printf( "\n-format needs arguments. \n"); usage(); return(0); @@ -84,6 +84,12 @@ continue; } } + + if( strcmp(argv[i], "-format") && strcmp(argv[i], "-outDir") && strcmp(argv[i],"-v") && strcmp(argv[i],"--verbose")){ + printf( "\n------>Warning: WRONG OPTIONS!\n"); + usage(); + return(0); + } } } } @@ -100,7 +106,6 @@ printf("\n Welcome to FTrkScanQLook! \n\n"); // FTrkScanQLook_EXPERT(FILE,OUTDIR,2,0,FORMAT); - FTrkScanQLook_EXPERT(FILE,OUTDIR,3,0,FORMAT); // if ( !beverbose ) close(nul); return(0);