Fork me on GitHub

Changeset 344 in svn


Ignore:
Timestamp:
Apr 28, 2009, 1:07:51 AM (16 years ago)
Author:
Xavier Rouby
Message:

correctly identify hepmc datafiles and complains about them

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Delphes.cpp

    r321 r344  
    255255  cout <<"**        ####### Start convertion to TRoot format ########        **"<< endl;
    256256 
    257   if(strstr(line.c_str(),".hep"))
     257  if(line.length() == 1+line.find_last_of(".hep"))
    258258    {                           
    259259      cout <<"**                 StdHEP file format detected                     **"<<endl;
     
    261261      converter = new STDHEPConverter(inputFileList,outputfilename);//case ntpl file in input list
    262262    }
    263   else if(strstr(line.c_str(),".lhe"))
     263  else if(line.length() == 1+line.find_last_of(".lhe"))
    264264    {
    265265      cout <<"**                   LHEF file format detected                     **"<<endl;
     
    267267      converter = new LHEFConverter(inputFileList,outputfilename);//case ntpl file in input list
    268268    }
    269   else if(strstr(line.c_str(),".root"))
     269  else if(line.length() == 1+line.find_last_of(".root"))
    270270    {
    271271      cout <<"**                   h2root file format detected                   **"<<endl;
    272272      cout <<"**                  This can take several minutes                  **"<< endl;
    273273      converter = new HEPEVTConverter(inputFileList,outputfilename);//case ntpl file in input list
     274    }
     275  else if(line.length() == 1+line.find_last_of(".hepmc"))
     276    {
     277      cout <<"**                   hepmc file format detected                    **"<<endl;
     278      cout <<"**               Delphes can not yet used this format              **"<<endl;
     279        return -1;
    274280    }
    275281  else {
Note: See TracChangeset for help on using the changeset viewer.