00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #include <iostream>
00011 #include <string>
00012 #include <sstream>
00013
00014 #include "HepPDT/defs.h"
00015 #include "HepPDT/TableBuilder.hh"
00016
00017 namespace HepPDT {
00018
00019 namespace detail {
00020 bool getPythiaid( int & id, const std::string & pdline )
00021 {
00022 int sl = pdline.length();
00023 id = 0;
00024
00025 if( sl < 30 ) return false;
00026
00027 std::string stars = pdline.substr(1,2);
00028 std::string kfline = pdline.substr(0,10);
00029 if( stars == "**" || kfline == " KF" ) return false;
00030
00031 std::string firstc = pdline.substr(0,1);
00032 if( firstc == " " ){
00033 std::istringstream var1( pdline.substr(0,10).c_str() );
00034 var1 >> id;
00035 return true;
00036 } else {
00037 return false;
00038 }
00039 }
00040 }
00041
00042 }