Fork me on GitHub

Changeset 418 in svn for trunk/Delphes.cpp


Ignore:
Timestamp:
May 28, 2009, 10:49:19 AM (15 years ago)
Author:
Xavier Rouby
Message:

bug removed on bad inputfile identification ; Nevent implemented in DetectorCard

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Delphes.cpp

    r416 r418  
    207207  cout <<"**                                                                 **"<<endl;
    208208  cout <<"**        ####### Start conversion to TRoot format ########        **"<< endl;
    209  
    210   if(line.length() == 1+line.find_last_of(".hep"))
     209 
     210  if(line.rfind(".hepmc") < line.length())
     211    {
     212      cout <<"**                HepMC ASCII file format detected                 **"<<endl;
     213      cout <<"**                  This can take several minutes                  **"<< endl;
     214      HepMCConverter converter(inputFileList,outputfilename,DET->PDGtable,DET->NEvents);
     215    }
     216  else if(line.rfind(".hep") < line.length())
    211217    {                           
    212218      cout <<"**                 StdHEP file format detected                     **"<<endl;
    213219      cout <<"**                This can take several minutes                    **"<< endl;
    214       STDHEPConverter converter(inputFileList,outputfilename,DET->PDGtable);//case ntpl file in input list
    215     }
    216   else if(line.length() == 1+line.find_last_of(".lhe"))
     220      STDHEPConverter converter(inputFileList,outputfilename,DET->PDGtable,DET->NEvents);
     221    }
     222  else if(line.rfind(".lhe") < line.length())
    217223    {
    218224      cout <<"**                   LHEF file format detected                     **"<<endl;
    219225      cout <<"**                 This can take several minutes                   **"<< endl;
    220       LHEFConverter converter(inputFileList,outputfilename,DET->PDGtable);//case ntpl file in input list
    221     }
    222   else if(line.length() == 1+line.find_last_of(".root"))
     226      LHEFConverter converter(inputFileList,outputfilename,DET->PDGtable,DET->NEvents);
     227    }
     228  else if(line.rfind(".root") < line.length())
    223229    {
    224230      cout <<"**                   h2root file format detected                   **"<<endl;
    225231      cout <<"**                  This can take several minutes                  **"<< endl;
    226       HEPEVTConverter converter(inputFileList,outputfilename,DET->PDGtable);//case ntpl file in input list
    227     }
    228   else if(line.length() == 1+line.find_last_of(".hepmc"))
     232      HEPEVTConverter converter(inputFileList,outputfilename,DET->PDGtable,DET->NEvents);
     233    }
     234  else if(line.rfind(".hepmc") < line.length())
    229235    {
    230236      cout <<"**                HepMC ASCII file format detected                 **"<<endl;
    231237      cout <<"**                  This can take several minutes                  **"<< endl;
    232       HepMCConverter converter(inputFileList,outputfilename,DET->PDGtable);
     238      HepMCConverter converter(inputFileList,outputfilename,DET->PDGtable,DET->NEvents);
    233239    }
    234240  else {
Note: See TracChangeset for help on using the changeset viewer.