Changeset 245 in svn
- Timestamp:
- Feb 5, 2009, 2:09:47 PM (16 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/HEPEVTConverter.cc
r220 r245 128 128 if(!it_deque->second) 129 129 { 130 cout << "** WARNING: cannot get branch '" << it_deque->first << "'" << endl; 130 cerr << left << setw(40) <<"** WARNING: cannot get branch: "<<"" 131 << left << setw(20) << it_deque->first <<"" 132 << right << setw(9) <<" **"<<""<<endl; 131 133 } 132 134 } … … 147 149 if(!infile.is_open()) 148 150 { 149 cerr << "** ERROR: Can't open '" << inputFileList << "' for input" << endl; 151 cerr << left << setw(30) <<"** ERROR: Can't open "<<"" 152 << left << setw(20) << inputFileList <<"" 153 << right << setw(19) <<"for input **"<<""<<endl; 150 154 exit(1); 151 155 } … … 156 160 infile >> buffer; 157 161 ifstream checking_the_file(buffer.c_str()); 158 if(!checking_the_file.good()) { cout << buffer << ": file not found\n"; continue;} 162 if(!checking_the_file.good()) 163 { 164 cerr << left << setw(30) <<"** ERROR: Can't find file "<<"" 165 << left << setw(20) << buffer <<"" 166 << right << setw(19) <<"for input **"<<""<<endl; 167 continue; 168 } 159 169 else checking_the_file.close(); 160 170 … … 214 224 } 215 225 treeWriter->Write(); 216 cout << "** Exiting..." << endl;217 226 218 227 delete treeWriter; -
trunk/src/LHEFConverter.cc
r219 r245 86 86 string filename; 87 87 if(!infile.is_open()) { 88 cerr << "** ERROR: Can't open '" << inputFileList << "' for input" << endl; 88 cerr << left << setw(30) <<"** ERROR: Can't open "<<"" 89 << left << setw(20) << inputFileList <<"" 90 << right << setw(19) <<"for input **"<<""<<endl; 89 91 exit(1); 90 92 } … … 95 97 if(!infile.good()) break; 96 98 ifstream checking_the_file(filename.c_str()); 97 if(!checking_the_file.good()) { cout << filename << ": file not found\n"; continue;} 99 if(!checking_the_file.good()) 100 { 101 cerr << left << setw(30) <<"** ERROR: Can't find file "<<"" 102 << left << setw(20) << filename <<"" 103 << right << setw(19) <<"for input **"<<""<<endl; 104 continue; 98 105 else checking_the_file.close(); 99 106 … … 101 108 LHEF::Reader *inputReader = new LHEF::Reader(filename); 102 109 103 cout << "** Calculating number of events to process. Please wait..." << endl;104 110 Long64_t allEntries = inputReader->getNumberOfEvents(); 105 cout << "** Input file contains " << allEntries << " events" << endl;106 111 107 112 if(allEntries > 0) { … … 119 124 treeWriter->Write(); 120 125 121 cout << "** Exiting..." << endl;122 126 123 127 delete treeWriter; -
trunk/src/STDHEPConverter.cc
r220 r245 101 101 if(!infile.is_open()) 102 102 { 103 cerr << "** ERROR: Can't open '" << inputFileList << "' for input" << endl; 103 cerr << left << setw(30) <<"** ERROR: Can't open "<<"" 104 << left << setw(20) << inputFileList <<"" 105 << right << setw(19) <<"for input **"<<""<<endl; 106 104 107 exit(1); 105 108 } … … 109 112 if(!infile.good()) break; 110 113 ifstream checking_the_file(filename.c_str()); 111 if(!checking_the_file.good()) { cout << filename << ": file not found\n"; continue;} 114 if(!checking_the_file.good()) 115 { 116 cerr << left << setw(30) <<"** ERROR: Can't find file "<<"" 117 << left << setw(20) << filename <<"" 118 << right << setw(19) <<"for input **"<<""<<endl; 119 continue; 120 } 112 121 else checking_the_file.close(); 113 122 … … 116 125 if(ierr != 0) 117 126 { 118 cerr << "** ERROR: Can't open file for input" <<endl;127 cerr <<"** ERROR: Can't open file for input **"<<endl; 119 128 break; 120 129 } 121 130 122 131 Long64_t allEntries = nevt; 123 cout << "** Input file contains " << allEntries << " entries" << endl;124 132 125 133 if(allEntries > 0) … … 134 142 if(ierr != 0) 135 143 { 136 cerr << "** ERROR: Unexpected end of file after " << entry << " entries" << endl; 144 cerr << left << setw(49) <<"** ERROR: Unexpected end of file after"<<"" 145 << left << setw(10) << entry <<"" 146 << right << setw(10) <<"entries **"<<""<<endl; 137 147 break; 138 148 } … … 162 172 } 163 173 } 174 StdHepXdrEnd(istr); 164 175 } 165 176 treeWriter->Write(); 166 cout << "** Exiting..." << endl;167 177 168 178 delete treeWriter; 169 StdHepXdrEnd(istr);170 179 171 180 }
Note:
See TracChangeset
for help on using the changeset viewer.