Fork me on GitHub

Changeset 50 in svn for trunk/src/SmearUtil.cc


Ignore:
Timestamp:
Nov 20, 2008, 1:21:22 PM (16 years ago)
Author:
severine ovyn
Message:

version from file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/SmearUtil.cc

    r49 r50  
    197197
    198198void RESOLution::Logfile(string LogName) {
    199 //void RESOLution::Logfile(string outputfilename) {
    200 
     199 
    201200  ofstream f_out(LogName.c_str());
    202201 
    203202  f_out<<"#*********************************************************************"<<"\n";
    204203  f_out<<"#                                                                    *"<<"\n";
    205   f_out<<"#                  ---- DELPHES release 1.0 ----                     *"<<"\n";
     204 
     205  string temp_string;
     206  istringstream curstring;
     207  ifstream fichier_a_lire("VERSION");
     208  if(fichier_a_lire.good()) {
     209  string Version;
     210  while (getline(fichier_a_lire,temp_string)) {
     211    curstring.str(temp_string);
     212    curstring >> Version;}
     213    f_out<<"#"<< right << setw(39) <<"---- DELPHES release "<<Version<< left <<" ----                     *"<<"\n";
     214   
     215  }
     216  else { f_out<<"#                ---- DELPHES release not defined ----               *"<<"\n";}
     217 
    206218  f_out<<"#                                                                    *"<<"\n";
    207219  f_out<<"#        A Fast Simulator for general purpose LHC detector           *"<<"\n";
Note: See TracChangeset for help on using the changeset viewer.