/*********************************************************************** ** ** ** /----------------------------------------------\ ** ** | Delphes, a framework for the fast simulation | ** ** | of a generic collider experiment | ** ** \----------------------------------------------/ ** ** ** ** ** ** This package uses: ** ** ------------------ ** ** FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210] ** ** Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2] ** ** FROG: [hep-ex/0901.2718v1] ** ** ** ** ------------------------------------------------------------------ ** ** ** ** Main authors: ** ** ------------- ** ** ** ** Severine Ovyn Xavier Rouby ** ** severine.ovyn@uclouvain.be xavier.rouby@cern ** ** ** ** Center for Particle Physics and Phenomenology (CP3) ** ** Universite catholique de Louvain (UCL) ** ** Louvain-la-Neuve, Belgium ** ** ** ** Copyright (C) 2008-2009, ** ** All rights reserved. ** ** ** ***********************************************************************/ /// \file Convertors_Only.cpp /// \brief Executable for Convertors #include "TChain.h" #include "TApplication.h" #include "TStopwatch.h" #include "TFile.h" #include "ExRootTreeReader.h" #include "ExRootTreeWriter.h" #include "ExRootTreeBranch.h" #include "ExRootProgressBar.h" #include "DataConverter.h" #include "HEPEVTConverter.h" #include "LHEFConverter.h" #include "STDHEPConverter.h" #include "SmearUtil.h" #include "CaloUtil.h" #include "BFieldProp.h" #include "TriggerUtil.h" #include "VeryForward.h" #include "JetsUtil.h" #include "FrogUtil.h" #include #include using namespace std; //------------------------------------------------------------------------------ void todo(string filename) { ifstream infile(filename.c_str()); cout << "** TODO list ..." << endl; while(infile.good()) { string temp; getline(infile,temp); cout << "*" << temp << endl; } cout << "** done...\n"; } //------------------------------------------------------------------------------ int main(int argc, char *argv[]) { int appargc = 2; char *appName= new char[20]; char *appOpt= new char[20]; sprintf(appName,"Convertors"); sprintf(appOpt,"-b"); char *appargv[] = {appName,appOpt}; TApplication app(appName, &appargc, appargv); delete [] appName; delete [] appOpt; if(argc != 3) { cout << " Usage: " << argv[0] << " input_file output_file " << endl; cout << " input_list - list of files in Ntpl, StdHep of LHEF format," << endl; cout << " output_file - output file." << endl; 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.4beta of Delphes --- **"<< endl; cout <<"** Last date of change: 9 February 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: [hep-ex/0901.2718v1] **"<< 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 *********** srand (time (NULL)); /* Initialisation du générateur */ TStopwatch globalwatch, loopwatch, triggerwatch, frogwatch; globalwatch.Start(); //read the output TROOT file string inputFileList(argv[1]), outputfilename(argv[2]); if(outputfilename.find(".root") > outputfilename.length()) { cout <<"** ERROR: 'output_file' should be a .root file. Exiting... **"<< endl; exit(1); } TFile *outputFile = TFile::Open(outputfilename.c_str(), "RECREATE"); // Creates the file, but should be closed just after outputFile->Close(); string line; ifstream infile(inputFileList.c_str()); infile >> line; // the first line determines the type of input files // data converters DataConverter *converter=NULL; cout <<"** **"<