Fork me on GitHub

Changeset 451 in svn


Ignore:
Timestamp:
Jul 3, 2009, 6:24:18 PM (15 years ago)
Author:
Xavier Rouby
Message:

input file type identification bug solved ; as in Delphes.cpp in earlier versions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Examples/Convertors_Only.cpp

    r443 r451  
    173173  cout <<"**        ####### Start conversion to TRoot format ########        **"<< endl;
    174174
    175   if(line.length() == 1+line.find_last_of(".hep"))
     175  if(line.rfind(".hepmc") < line.length())
     176    {
     177      cout <<"**                HepMC ASCII file format detected                 **"<<endl;
     178      cout <<"**                  This can take several minutes                  **"<< endl;
     179      HepMCConverter converter(inputFileList,outputfilename,DET.PDGtable,DET.NEvents);
     180    }
     181  else if(line.rfind(".hep") < line.length())
    176182    {
    177183      cout <<"**                 StdHEP file format detected                     **"<<endl;
    178184      cout <<"**                This can take several minutes                    **"<< endl;
    179       STDHEPConverter converter(inputFileList,outputfilename,DET.PDGtable);//case ntpl file in input list
    180     }
    181   else if(line.length() == 1+line.find_last_of(".lhe"))
     185      STDHEPConverter converter(inputFileList,outputfilename,DET.PDGtable,DET.NEvents);
     186    }
     187  else if(line.rfind(".lhe") < line.length())
    182188    {
    183189      cout <<"**                   LHEF file format detected                     **"<<endl;
    184190      cout <<"**                 This can take several minutes                   **"<< endl;
    185       LHEFConverter converter(inputFileList,outputfilename,DET.PDGtable);//case ntpl file in input list
    186     }
    187   else if(line.length() == 1+line.find_last_of(".root"))
     191      LHEFConverter converter(inputFileList,outputfilename,DET.PDGtable,DET.NEvents);
     192    }
     193  else if(line.rfind(".root") < line.length())
    188194    {
    189195      cout <<"**                   h2root file format detected                   **"<<endl;
    190196      cout <<"**                  This can take several minutes                  **"<< endl;
    191       HEPEVTConverter converter(inputFileList,outputfilename,DET.PDGtable);//case ntpl file in input list
    192     }
    193   else if(line.length() == 1+line.find_last_of(".hepmc"))
    194     {
    195       cout <<"**                HepMC ASCII file format detected                 **"<<endl;
    196       cout <<"**                  This can take several minutes                  **"<< endl;
    197       HepMCConverter converter(inputFileList,outputfilename,DET.PDGtable);
     197      HEPEVTConverter converter(inputFileList,outputfilename,DET.PDGtable,DET.NEvents);
    198198    }
    199199  else {
Note: See TracChangeset for help on using the changeset viewer.