Fork me on GitHub

Changeset 245 in svn


Ignore:
Timestamp:
Feb 5, 2009, 2:09:47 PM (16 years ago)
Author:
severine ovyn
Message:

OK for error message

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/HEPEVTConverter.cc

    r220 r245  
    128128    if(!it_deque->second)
    129129    {
    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;
    131133    }
    132134  }
     
    147149  if(!infile.is_open())
    148150    {
    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;
    150154      exit(1);
    151155    }
     
    156160      infile >> buffer;
    157161        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          }
    159169        else checking_the_file.close();
    160170
     
    214224    }
    215225  treeWriter->Write();
    216   cout << "** Exiting..." << endl;
    217226 
    218227  delete treeWriter;
  • trunk/src/LHEFConverter.cc

    r219 r245  
    8686  string filename;
    8787  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;
    8991      exit(1);
    9092  }
     
    9597      if(!infile.good()) break;
    9698        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;
    98105        else checking_the_file.close();
    99106
     
    101108      LHEF::Reader *inputReader = new LHEF::Reader(filename);
    102109     
    103       cout << "** Calculating number of events to process. Please wait..." << endl;
    104110      Long64_t allEntries = inputReader->getNumberOfEvents();
    105       cout << "** Input file contains " << allEntries << " events" << endl;
    106111     
    107112      if(allEntries > 0) {
     
    119124  treeWriter->Write();
    120125 
    121   cout << "** Exiting..." << endl;
    122126 
    123127  delete treeWriter;
  • trunk/src/STDHEPConverter.cc

    r220 r245  
    101101  if(!infile.is_open())
    102102    {
    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
    104107      exit(1);
    105108    }
     
    109112      if(!infile.good()) break;
    110113        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           }
    112121        else checking_the_file.close();
    113122     
     
    116125      if(ierr != 0)
    117126        {
    118           cerr << "** ERROR: Can't open file for input" << endl;
     127          cerr <<"**                ERROR: Can't open file for input                 **"<<endl;
    119128          break;
    120129        }
    121130     
    122131      Long64_t allEntries = nevt;
    123       cout << "** Input file contains " << allEntries << " entries" << endl;
    124132     
    125133      if(allEntries > 0)
     
    134142              if(ierr != 0)
    135143                {
    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;
    137147                  break;
    138148                }
     
    162172            }
    163173        }
     174      StdHepXdrEnd(istr);
    164175    }
    165176  treeWriter->Write();
    166   cout << "** Exiting..." << endl;
    167177 
    168178  delete treeWriter;
    169   StdHepXdrEnd(istr);
    170179
    171180}
Note: See TracChangeset for help on using the changeset viewer.