#include #include #include #include #include #include void Usage(const char* prog){ COMETLog("Usage: "< Text file containing list of root files, one per line\n" ); } bool ReadInputFiles(const char* listfile,std::vector& input_files); bool CheckOneFile(const std::string& filename); int main(int argc,char** argv){ COMET::ICOMETLog::Configure(); typedef std::vector FileList; FileList input_files; for (;;) { char c = getopt(argc, argv, "h?I:"); std::stringstream stream; if(optarg) stream.str(optarg); if (c<0) break; switch (c) { case 'I': { if(!ReadInputFiles(optarg,input_files)){ return 1; } continue; } case 'h':case '?': Usage(argv[0]); return 0; default: COMETError("Unknown option: "<& input_files){ std::ifstream listfile(listfile_name); if(!listfile){ COMETError("Cannot open input text file: "<TestBit(TFile::kRecovered)){ file_is_good=false; } COMETLog(checked++<<") "<Close(); return file_is_good; }