diff --git a/examples/benchmarks/ana_benchmark.cc b/examples/benchmarks/ana_benchmark.cc index 3eab581..e5c0ca4 100644 --- a/examples/benchmarks/ana_benchmark.cc +++ b/examples/benchmarks/ana_benchmark.cc @@ -33,7 +33,7 @@ int main(int argc, char** argv) { //sprintf(outputFile,"%s",argv[2]); } else { std::cout << " *** please provide a file name..." << std::endl; - exit(0); + exit(1); } hipo::reader reader; diff --git a/examples/builder.cc b/examples/builder.cc index 9d7609e..53d4fb8 100644 --- a/examples/builder.cc +++ b/examples/builder.cc @@ -24,7 +24,7 @@ int main(int argc, char** argv) { //sprintf(outputFile,"%s",argv[2]); } else { std::cout << " *** please provide a file name..." << std::endl; - exit(0); + exit(1); } hipo::reader reader; diff --git a/examples/histograms.cc b/examples/histograms.cc index 0656c92..4bb173d 100644 --- a/examples/histograms.cc +++ b/examples/histograms.cc @@ -193,7 +193,7 @@ int main(int argc, char** argv) { //sprintf(outputFile,"%s",argv[2]); } else { std::cout << " *** please provide a file name..." << std::endl; - exit(0); + exit(1); } //example3(inputFile); diff --git a/examples/readEvents.cc b/examples/readEvents.cc index 045084d..ff13337 100644 --- a/examples/readEvents.cc +++ b/examples/readEvents.cc @@ -24,7 +24,7 @@ int main(int argc, char** argv) { //sprintf(outputFile,"%s",argv[2]); } else { std::cout << " *** please provide a file name..." << std::endl; - exit(0); + exit(1); } hipo::reader reader; diff --git a/examples/readFile.cc b/examples/readFile.cc index a0f2e8d..2c73c8d 100644 --- a/examples/readFile.cc +++ b/examples/readFile.cc @@ -30,7 +30,7 @@ int main(int argc, char** argv) { //sprintf(outputFile,"%s",argv[2]); } else { std::cout << " *** please provide a file name..." << std::endl; - exit(0); + exit(1); } hipo::reader reader; diff --git a/examples/readFileDebug.cc b/examples/readFileDebug.cc index bd1a6cf..227af56 100644 --- a/examples/readFileDebug.cc +++ b/examples/readFileDebug.cc @@ -136,7 +136,7 @@ int main(int argc, char** argv) { //sprintf(outputFile,"%s",argv[2]); } else { std::cout << " *** please provide a file name..." << std::endl; - exit(0); + exit(1); } diff --git a/examples/readFileTags.cc b/examples/readFileTags.cc index 9b98a39..912b29a 100644 --- a/examples/readFileTags.cc +++ b/examples/readFileTags.cc @@ -111,7 +111,7 @@ int main(int argc, char** argv) { //sprintf(outputFile,"%s",argv[2]); } else { std::cout << " *** please provide a file name..." << std::endl; - exit(0); + exit(1); } hipo::reader reader; diff --git a/examples/readFusion.cc b/examples/readFusion.cc index 97f48e7..af065f9 100644 --- a/examples/readFusion.cc +++ b/examples/readFusion.cc @@ -29,7 +29,7 @@ int main(int argc, char** argv) { //sprintf(outputFile,"%s",argv[2]); } else { std::cout << " *** please provide a file name..." << std::endl; - exit(0); + exit(1); } hipo::fusion fusion; diff --git a/examples/readHist.cc b/examples/readHist.cc index af34a17..cfb9151 100644 --- a/examples/readHist.cc +++ b/examples/readHist.cc @@ -31,7 +31,7 @@ int main(int argc, char** argv) { //sprintf(outputFile,"%s",argv[2]); } else { std::cout << " *** please provide a file name..." << std::endl; - exit(0); + exit(1); } hipo::reader reader; diff --git a/examples/readJson.cc b/examples/readJson.cc index 5f1d1f7..7d12d0d 100644 --- a/examples/readJson.cc +++ b/examples/readJson.cc @@ -31,7 +31,7 @@ int main(int argc, char** argv) { //sprintf(outputFile,"%s",argv[2]); } else { std::cout << " *** please provide a file name..." << std::endl; - exit(0); + exit(1); } hipo::reader reader; diff --git a/examples/root/benchmark.cc b/examples/root/benchmark.cc index 19b8b20..64c0b7c 100644 --- a/examples/root/benchmark.cc +++ b/examples/root/benchmark.cc @@ -42,7 +42,7 @@ int main(int argc, char** argv) { //sprintf(outputFile,"%s",argv[2]); } else { std::cout << " *** please provide a file name..." << std::endl; - exit(0); + exit(1); } diff --git a/examples/root/converter.cc b/examples/root/converter.cc index 3d3dd16..2c695d7 100644 --- a/examples/root/converter.cc +++ b/examples/root/converter.cc @@ -44,7 +44,7 @@ int main(int argc, char** argv) { //sprintf(outputFile,"%s",argv[2]); } else { std::cout << " *** please provide a file name..." << std::endl; - exit(0); + exit(1); } convert(inputFile); diff --git a/examples/root/hist2root.cc b/examples/root/hist2root.cc index f53613b..f2cc162 100644 --- a/examples/root/hist2root.cc +++ b/examples/root/hist2root.cc @@ -45,7 +45,7 @@ int main(int argc, char** argv) { sprintf(outputFile,"%s.root",argv[1]); } else { std::cout << " *** please provide a file name..." << std::endl; - exit(0); + exit(1); } diff --git a/examples/showFile.cc b/examples/showFile.cc index 71c1b56..c6a0829 100644 --- a/examples/showFile.cc +++ b/examples/showFile.cc @@ -32,7 +32,7 @@ int main(int argc, char** argv) { //sprintf(outputFile,"%s",argv[2]); } else { std::cout << " *** please provide a file name..." << std::endl; - exit(0); + exit(1); } hipo::reader reader; diff --git a/examples/writeEvents.cc b/examples/writeEvents.cc index 8a45c41..9cd3a78 100644 --- a/examples/writeEvents.cc +++ b/examples/writeEvents.cc @@ -22,7 +22,7 @@ int main(int argc, char** argv) { //sprintf(outputFile,"%s",argv[2]); } else { std::cout << " *** please provide a file name..." << std::endl; - exit(0); + exit(1); } char outputFile[256]; diff --git a/extensions/coda/translate.cc b/extensions/coda/translate.cc index da72d98..1e4c843 100644 --- a/extensions/coda/translate.cc +++ b/extensions/coda/translate.cc @@ -48,7 +48,7 @@ int main(int argc, char** argv){ //sprintf(outputFile,"%s",argv[2]); } else { std::cout << " *** please provide a file name..." << std::endl; - exit(0); + exit(1); } //bank.show(); diff --git a/extensions/dc/cmdparser.hpp b/extensions/dc/cmdparser.hpp index 0421928..76d85ea 100644 --- a/extensions/dc/cmdparser.hpp +++ b/extensions/dc/cmdparser.hpp @@ -336,7 +336,7 @@ namespace cli { args.output << this->usage(); //#pragma warning(push) //#pragma warning(disable: 4702) - exit(0); + exit(1); return false; //#pragma warning(pop) }), "", true); diff --git a/extensions/dc/denoise.cc b/extensions/dc/denoise.cc index bc654c2..6ff576a 100644 --- a/extensions/dc/denoise.cc +++ b/extensions/dc/denoise.cc @@ -157,7 +157,7 @@ std::cout << std::endl; /*char inputFile[256]; if(argc>1) { sprintf(inputFile,"%s",argv[1]);} else { - std::cout << " *** please provide a file name..." << std::endl;exit(0); + std::cout << " *** please provide a file name..." << std::endl;exit(1); }*/ chamber.setRows(112); diff --git a/extensions/dc/denoise2.cc b/extensions/dc/denoise2.cc index d34cbc3..b6640e4 100644 --- a/extensions/dc/denoise2.cc +++ b/extensions/dc/denoise2.cc @@ -156,7 +156,7 @@ std::cout << std::endl; /*char inputFile[256]; if(argc>1) { sprintf(inputFile,"%s",argv[1]);} else { - std::cout << " *** please provide a file name..." << std::endl;exit(0); + std::cout << " *** please provide a file name..." << std::endl;exit(1); }*/ chamber.setRows(112); diff --git a/extensions/machine/analyze.cc b/extensions/machine/analyze.cc index 5910b15..08cc956 100644 --- a/extensions/machine/analyze.cc +++ b/extensions/machine/analyze.cc @@ -32,7 +32,7 @@ int main(int argc, char** argv){ //sprintf(outputFile,"%s",argv[2]); } else { std::cout << " *** please provide a file name..." << std::endl; - exit(0); + exit(1); } hipo::reader reader; diff --git a/extensions/machine/main.cc b/extensions/machine/main.cc index 192deb9..f5634d0 100644 --- a/extensions/machine/main.cc +++ b/extensions/machine/main.cc @@ -57,7 +57,7 @@ int main(int argc, char** argv){ //sprintf(outputFile,"%s",argv[2]); } else { std::cout << " *** please provide a file name..." << std::endl; - exit(0); + exit(1); } hipo::reader reader; diff --git a/hipo4/dictionary.h b/hipo4/dictionary.h index 1e112de..92ad824 100644 --- a/hipo4/dictionary.h +++ b/hipo4/dictionary.h @@ -156,7 +156,7 @@ class schema { schema &getSchema(const char *name){ if(factory.count(name)==0){ printf("\n\nhipo::dictionary (ERROR) schema {%s} does not exist... exiting\n\n",name); - exit(0); + exit(1); } return factory[name]; } diff --git a/hipo4/reader.cpp b/hipo4/reader.cpp index 1b77386..3de6ce2 100644 --- a/hipo4/reader.cpp +++ b/hipo4/reader.cpp @@ -291,7 +291,7 @@ std::vector reader::getBanks(std::vector names){ if(inputStream.is_open()==false){ printf("\n\nhipo::reader (ERROR) file is not open.... exiting...\n\n"); - exit(0); + exit(1); } long position = header.headerLength*4; hipo::record dictRecord; @@ -322,7 +322,7 @@ std::vector reader::getBanks(std::vector names){ void reader::readDictionary(hipo::dictionary &dict){ if(inputStream.is_open()==false){ printf("\n\nhipo::reader (ERROR) file is not open.... exiting...\n\n"); - exit(0); + exit(1); } long position = header.headerLength*4; hipo::record dictRecord; diff --git a/hipo4/utils.cpp b/hipo4/utils.cpp index 19d733e..d13606d 100644 --- a/hipo4/utils.cpp +++ b/hipo4/utils.cpp @@ -119,7 +119,7 @@ namespace hipo { file_header.append(" char inputFile[256];\n\n" ); file_header.append(" if(argc>1) {\n sprintf(inputFile,\"%s\",argv[1]);\n } else {\n " ); file_header.append(" std::cout << \" *** please provide a file name...\" << std::endl;\n" ); - file_header.append(" exit(0);\n }\n\n"); + file_header.append(" exit(1);\n }\n\n"); file_header.append(" hipo::reader reader;\n"); file_header.append(" reader.open(inputFile);\n\n" ); return file_header;