Index: trunk/Delphes.cpp
===================================================================
--- trunk/Delphes.cpp	(revision 191)
+++ trunk/Delphes.cpp	(revision 212)
@@ -66,5 +66,59 @@
     exit(1);
   }
-  
+ 
+cout << endl << endl;
+
+cout <<"*********************************************************************"<< endl;
+cout <<"*********************************************************************"<< endl;
+cout <<"**                                                                 **"<< endl;
+cout <<"**                            Welcome to                           **"<< endl;
+cout <<"**                                                                 **"<< endl;
+cout <<"**                                                                 **"<< endl;
+cout <<"**     .ddddddd-            lL             hH                      **"<< endl;
+cout <<"**     -Dd` `dD:           Ll             hH`                      **"<< endl;
+cout <<"**     dDd   dDd    eeee.  lL  .pp+pp    Hh+hhh`   -eeee- `sssss   **"<< endl;
+cout <<"**    -Dd   `DD   ee. ee  Ll   .Pp. PP   Hh. HH.  ee. ee  sSs      **"<< endl;
+cout <<"**    dD`   dDd  eEeee:   lL.  pP.  pP  hH   hH` eEeee:` -sSSSs.   **"<< endl;
+cout <<"**   .Dd  :dd    eE.     LlL   PpppPP   Hh  Hh   eE         sSS    **"<< endl;
+cout <<"**   dddddd:.     eee+:  lL.  pp.      hh.  hh    eee+  sssssS     **"<< endl;
+cout <<"**                            Pp                                   **"<< endl;
+cout <<"**                                                                 **"<< endl;
+cout <<"**           Delphes, a framework for the fast simulation          **"<< endl;
+cout <<"**                 of a  generic collider experiment               **"<< endl;
+cout <<"**                                                                 **"<< endl;
+cout <<"**                --- Version 1.3beta of Delphes ---               **"<< endl;
+cout <<"**               Last date of change: 29 January 2009              **"<< endl;
+cout <<"**                                                                 **"<< endl;
+cout <<"**                                                                 **"<< endl;
+cout <<"**     This package uses:                                          **"<< endl;
+cout <<"**     ------------------                                          **"<< endl;
+cout <<"**     FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210] **"<< endl;
+cout <<"**     Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2]  **"<< endl;
+cout <<"**     FROG:                                                       **"<< endl;
+cout <<"**                                                                 **"<< endl;
+cout <<"**-----------------------------------------------------------------**"<< endl;
+cout <<"**                                                                 **"<< endl;
+cout <<"**   Main authors:                                                 **"<< endl;
+cout <<"**   -------------                                                 **"<< endl;
+cout <<"**                                                                 **"<< endl;
+cout <<"**              SÃ©verine Ovyn               Xavier Rouby           **"<< endl;
+cout <<"**       severine.ovyn@uclouvain.be      xavier.rouby@cern         **"<< endl;
+cout <<"**       Center for Particle Physics and Phenomenology (CP3)       **"<< endl;
+cout <<"**       Universite Catholique de Louvain (UCL)                    **"<< endl;
+cout <<"**       Louvain-la-Neuve, Belgium                                 **"<< endl;
+cout <<"**                                                                 **"<< endl;
+cout <<"**-----------------------------------------------------------------**"<< endl;
+cout <<"**                                                                 **"<< endl;
+cout <<"**   Former Delphes versions and documentation can be found on :   **"<< endl;
+cout <<"**               http://www.fynu.ucl.ac.be/delphes.html            **"<< endl;
+cout <<"**                                                                 **"<< endl;
+cout <<"**                                                                 **"<< endl;
+cout <<"**   Disclaimer: this program is a beta version of Delphes and     **"<< endl;
+cout <<"** therefore comes without guarantees. Beware of errors and please **"<< endl;
+cout <<"**        give us your feedbacks about potential bugs              **"<< endl;
+cout <<"**                                                                 **"<< endl;
+cout <<"*********************************************************************"<< endl;
+cout <<"*********************************************************************"<< endl;
+ 
 // 1. ********** initialisation ***********
 
@@ -94,10 +148,19 @@
   //read the datacard input file
   string DetDatacard("");
-  if(argc>=4)  DetDatacard =argv[3];
+  if(argc>=4)DetDatacard =argv[3];
   
   //Smearing information
   RESOLution *DET = new RESOLution();
+  cout <<"**                                                                 **"<< endl;
+  cout <<"**        ####### Start reading DETECTOR parameters #######        **"<< endl;
+  cout << left  << setw(40) <<"**        Opening configuration card: "<<""
+       << left  << setw(20) << DetDatacard                            <<""
+       << right << setw(9) <<" **"<<""<<endl;
   DET->ReadDataCard(DetDatacard);
   DET->Logfile(LogName);
+  cout << left  << setw(42) <<"**        Parameters summarised in file: "<<""
+       << left  << setw(20) << LogName                            <<""
+       << right << setw(7) <<"**"<<""<<endl;
+  cout <<"**                                                                 **"<< endl;
   
   //read the trigger input file
@@ -109,4 +172,12 @@
   TRIGT->TriggerCardReader(TrigDatacard.c_str());
   TRIGT->PrintTriggerTable(LogName);
+  if(DET->FLAG_trigger == 1)
+    {
+      cout <<"**        ########### Start reading TRIGGER card ##########        **"<< endl;
+      cout << left  << setw(40) <<"**        Opening configuration card: "<<""
+           << left  << setw(20) << TrigDatacard                            <<""
+           << right << setw(9) <<" **"<<""<<endl;
+      cout <<"**                                                                 **"<< endl;
+    }
   
   //Propagation of tracks in the B field
@@ -121,31 +192,35 @@
   // data converters
   DataConverter *converter=0;
-  
+  cout <<"**                                                                 **"<<endl;
+  cout <<"**        ####### Start convertion to TRoot format ########        **"<< endl;
+
   if(strstr(line.c_str(),".hep"))
     {                           
-      cout<<"#**********************************************************************"<<endl;
-      cout<<"#**********         StdHEP file format detected           *************"<<endl;
-      cout<<"#***********     Starting convertion to TRoot format     **************"<<endl;
-      cout<<"#**********************************************************************"<<endl;
+      cout <<"**                 StdHEP file format detected                     **"<<endl;
+      cout <<"**                This can take several minutes                    **"<< endl;
       converter = new STDHEPConverter(inputFileList,outputfilename);//case ntpl file in input list
     }
   else if(strstr(line.c_str(),".lhe"))
     {
-      cout<<"#**********************************************************************"<<endl;
-      cout<<"#***********          LHEF file format detected            ************"<<endl;
-      cout<<"#***********     Starting convertion to TRoot format       ************"<<endl;
-      cout<<"#**********************************************************************"<<endl;
+      cout <<"**                   LHEF file format detected                     **"<<endl;
+      cout <<"**                 This can take several minutes                   **"<< endl;
       converter = new LHEFConverter(inputFileList,outputfilename);//case ntpl file in input list
     }
   else if(strstr(line.c_str(),".root"))
     {
-      cout<<"#**********************************************************************"<<endl;
-      cout<<"#**********         h2root file format detected           *************"<<endl;
-      cout<<"#**********     Starting convertion to TRoot format       *************"<<endl;
-      cout<<"#**********************************************************************"<<endl;
+      cout <<"**                   h2root file format detected                   **"<<endl;
+      cout <<"**                  This can take several minutes                  **"<< endl;
       converter = new HEPEVTConverter(inputFileList,outputfilename);//case ntpl file in input list
     }
-  else { cout << "***  " << line.c_str() << "\n***  file format not identified\n***  Exiting\n"; return -1;};
-  
+  else {
+      cout << left  << setw(4) <<"**  "<<""
+           << left  << setw(63) << line.c_str() <<""
+           << right << setw(2) <<"**"<<endl;
+      cout <<"**             File format not identified --  Exiting...           **"<< endl;
+      cout <<"**                                                                 **"<< endl;
+      cout <<"*********************************************************************"<< endl;
+      return -1;};
+  cout <<"**                       Exiting conversion...                     **"<< endl;
+
   TChain chain("GEN");
   chain.Add(outputfilename.c_str());
@@ -196,5 +271,10 @@
 // 2. ********** Loop over all events ***********
   Long64_t entry, allEntries = treeReader->GetEntries();
-  cout << "** The input list contains " << allEntries << " events" << endl;
+  cout <<"**                                                                 **"<<endl;
+  cout <<"**        ####### Start fast detector simulation ########          **"<< endl;
+  cout << left  << setw(52) <<"**              Total number of events to run: "<<""
+       << left  << setw(15) << allEntries <<""
+       << right << setw(2) <<"**"<<endl;
+
   loopwatch.Start();
 
@@ -205,5 +285,9 @@
       treeReader->ReadEntry(entry);
       treeWriter->Clear();
-      if((entry % 100) == 0 && entry > 0 )  cout << "** Processing element # " << entry << endl;
+      if((entry % 100) == 0 && entry > 0 ){
+         cout << left  << setw(52) <<"**              Processing element # "<<""
+              << left  << setw(15) << entry <<""
+              << right << setw(2) <<"**"<<endl;
+      }
       
       electron.clear();
@@ -384,5 +468,9 @@
       treeWriter->Fill();
     } // 2. Loop over all events ('for' loop)
-  
+ 
+  cout <<"**                                                                 **"<< endl;
+  cout <<"**                 Exiting detector simulation...                  **"<< endl;
+
+ 
   treeWriter->Write();
   delete treeWriter;
@@ -391,9 +479,12 @@
 
  
-// 3. ********** Trigger  & Frog ***********
+  // 3. ********** Trigger  & Frog ***********
   // 3.1 ************ running the trigger in case the FLAG trigger is put to 1 in the datacard
   triggerwatch.Start();
   if(DET->FLAG_trigger == 1)
     {
+       cout <<"**                                                                 **"<<endl;
+       cout <<"**        ########### Start Trigger selection ###########          **"<< endl;
+
       // input
       TChain chainT("Analysis");
@@ -414,5 +505,4 @@
  
       Long64_t entryT, allEntriesT = treeReaderT->GetEntries();
-      cout << "** Trigger: the 'Analysis' tree contains " << allEntriesT << " events" << endl;
       // loop on all entries
       for(entryT = 0; entryT < allEntriesT; ++entryT) {
@@ -422,4 +512,5 @@
           treeWriterT->Fill();
       } // loop on all entries
+      cout <<"**                 Exiting trigger simulation...                   **"<< endl;
       
       treeWriterT->Write();
@@ -433,4 +524,7 @@
   if(DET->FLAG_frog == 1)
     {
+      cout <<"**                                                                 **"<<endl;
+      cout <<"**        ################## Start FROG #################          **"<< endl;
+
       FrogDisplay *FROG = new FrogDisplay();
       FROG->BuidEvents(outputfilename,DET->NEvents_Frog);
@@ -443,16 +537,52 @@
 
 // 4. ********** End & Exit ***********
-  cout << "** Exiting..." << endl;
+
   globalwatch.Stop();
-  cout << "** Time report for " << allEntries << " events.\n";
-  cout << " +  Time (s): \tCPU \t real"<< endl;
-  cout << " +  Global:  \t" << globalwatch.CpuTime() << " \t " << globalwatch.RealTime() << endl;
-  cout << " +  Events:  \t" << loopwatch.CpuTime() << " \t " << loopwatch.RealTime() << endl;
+  cout <<"**                                                                 **"<< endl;
+  cout <<"**        ################## Time report #################         **"<< endl;
+  cout << left  << setw(32) <<"**              Time report for "<<""
+              << left  << setw(15) << allEntries <<""
+              << right << setw(22) <<"events         **"<<endl;
+  cout <<"**                                                                 **"<< endl;
+  cout << left  << setw(10) <<"**"<<""
+       << left  << setw(15) <<"Time (s):"<<""
+       << right << setw(15) <<"CPU"<<""
+       << right << setw(15) <<"Real"<<""
+       << right << setw(14)  <<"**"<<endl;
+  cout << left  << setw(10) <<"**"<<""
+       << left  << setw(15) <<" +  Global:"<<""
+       << right << setw(15) <<globalwatch.CpuTime()<<""
+       << right << setw(15) <<globalwatch.RealTime()<<""
+       << right << setw(14)  <<"**"<<endl;
+  cout << left  << setw(10) <<"**"<<""
+       << left  << setw(15) <<" +  Events:"<<""
+       << right << setw(15) <<loopwatch.CpuTime()<<""
+       << right << setw(15) <<loopwatch.RealTime()<<""
+       << right << setw(14)  <<"**"<<endl;
   if(DET->FLAG_trigger == 1)
-  cout << " +  Trigger: \t" << triggerwatch.CpuTime() << " \t " << triggerwatch.RealTime() << endl;
+    {
+     cout << left  << setw(10) <<"**"<<""
+          << left  << setw(15) <<" +  Trigger:"<<""
+          << right << setw(15) <<triggerwatch.CpuTime()<<""
+          << right << setw(15) <<triggerwatch.RealTime()<<""
+          << right << setw(14)  <<"**"<<endl;
+    }
   if(DET->FLAG_frog == 1)
-  cout << " +  Frog:    \t" << frogwatch.CpuTime() << " \t " << frogwatch.RealTime() << endl;
-
-  
+    {
+     cout << left  << setw(10) <<"**"<<""
+          << left  << setw(15) <<" +  Frog:"<<""
+          << right << setw(15) <<frogwatch.CpuTime()<<""
+          << right << setw(15) <<frogwatch.RealTime()<<""
+          << right << setw(14)  <<"**"<<endl;
+
+    }
+  
+   cout <<"**                                                                 **"<< endl;
+   cout <<"**                        Exiting Delphes ...                      **"<< endl;
+   cout <<"**                                                                 **"<< endl;
+   cout <<"*********************************************************************"<< endl;
+   cout <<"*********************************************************************"<< endl;
+
+
   delete treeReader;
   delete DET;
