Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • classes/DelphesSTDHEPReader.cc

    rb55dc12 rcab38f6  
    7777  fInputFile = inputFile;
    7878  xdrstdio_create(fInputXDR, inputFile, XDR_DECODE);
     79  ReadFileHeader();
    7980}
    8081
     
    106107  SkipBytes(4);
    107108
    108   if(fBlockType == FILEHEADER)
    109   {
    110     ReadFileHeader();
    111   }
    112   else if(fBlockType == EVENTTABLE)
     109  if(fBlockType == EVENTTABLE)
    113110  {
    114111    ReadEventTable();
     
    180177  u_int i;
    181178  enum STDHEPVersion {UNKNOWN, V1, V2, V21} version;
     179
     180  xdr_int(fInputXDR, &fBlockType);
     181  if (fBlockType != FILEHEADER)
     182  {
     183    throw runtime_error("Header block not found. File is probably corrupted.");
     184  }
     185
     186  SkipBytes(4);
    182187
    183188  // version
Note: See TracChangeset for help on using the changeset viewer.