hepmc - Diff between revs 5 and 65
Subversion Repositories:
| Rev 5 | Rev 65 | |||
|---|---|---|---|---|
| Line 24... | Line 24... | |||
| 24 | // Print Methods // | 24 | // Print Methods // | |
| 25 | /////////////////// | 25 | /////////////////// | |
| 26 | 26 | |||
| 27 | void HEPEVT_Wrapper::print_hepevt( std::ostream& ostr ) | 27 | void HEPEVT_Wrapper::print_hepevt( std::ostream& ostr ) | |
| 28 | { | 28 | { | |
| 29 | // dumps the content of this HEPEVT event to ostr (Width is 80) | - | ||
| - | 29 | /// dumps the content of this HEPEVT event to ostr (Width is 80) | ||
| 30 | ostr << "________________________________________" | 30 | ostr << "________________________________________" | |
| 31 | << "________________________________________" << std::endl; | 31 | << "________________________________________" << std::endl; | |
| 32 | ostr << "***** HEPEVT Common Event#: " | 32 | ostr << "***** HEPEVT Common Event#: " | |
| 33 | << event_number() | 33 | << event_number() | |
| 34 | << ", " << number_entries() << " particles (max " | 34 | << ", " << number_entries() << " particles (max " | |
| Line 65... | Line 65... | |||
| 65 | ostr << outline << std::endl; | 65 | ostr << outline << std::endl; | |
| 66 | } | 66 | } | |
| 67 | 67 | |||
| 68 | void HEPEVT_Wrapper::print_hepevt_particle( int i, std::ostream& ostr ) | 68 | void HEPEVT_Wrapper::print_hepevt_particle( int i, std::ostream& ostr ) | |
| 69 | { | 69 | { | |
| 70 | // dumps the content HEPEVT particle entry i (Width is 120) | - | ||
| 71 | // here i is the C array index (i.e. it starts at 0 ... whereas the | - | ||
| 72 | // fortran array index starts at 1) So if there's 100 particles, the | - | ||
| 73 | // last valid index is 100-1=99 | - | ||
| - | 70 | /// dumps the content HEPEVT particle entry i (Width is 120) | ||
| - | 71 | /// here i is the C array index (i.e. it starts at 0 ... whereas the | ||
| - | 72 | /// fortran array index starts at 1) So if there's 100 particles, the | ||
| - | 73 | /// last valid index is 100-1=99 | ||
| 74 | char outline[81]; | 74 | char outline[81]; | |
| 75 | sprintf( outline, | 75 | sprintf( outline, | |
| 76 | "%4d %+4d %4d %4d (%9.3g, %9.3g, %9.3g, %9.3g, %9.3g)" | 76 | "%4d %+4d %4d %4d (%9.3g, %9.3g, %9.3g, %9.3g, %9.3g)" | |
| 77 | ,i, status(i), first_parent(i), first_child(i), | 77 | ,i, status(i), first_parent(i), first_child(i), | |
| 78 | px(i), py(i), pz(i), e(i), m(i) ); | 78 | px(i), py(i), pz(i), e(i), m(i) ); | |
| Line 85... | Line 85... | |||
| 85 | } | 85 | } | |
| 86 | 86 | |||
| 87 | 87 | |||
| 88 | bool HEPEVT_Wrapper::check_hepevt_consistency( std::ostream& os ) | 88 | bool HEPEVT_Wrapper::check_hepevt_consistency( std::ostream& os ) | |
| 89 | { | 89 | { | |
| 90 | // This method inspects the HEPEVT common block and looks for | - | ||
| 91 | // inconsistencies in the mother/daughter pointers | - | ||
| - | 90 | /// This method inspects the HEPEVT common block and looks for | ||
| - | 91 | /// inconsistencies in the mother/daughter pointers | ||
| 92 | bool isConsistent=true; | 92 | bool isConsistent=true; | |
| 93 | char header[81]; | 93 | char header[81]; | |
| 94 | sprintf( header, | 94 | sprintf( header, | |
| 95 | "\n\n\t**** WARNINGInconsistent HEPEVT input, Event %10d ****" | 95 | "\n\n\t**** WARNINGInconsistent HEPEVT input, Event %10d ****" | |
| 96 | , HEPEVT_Wrapper::event_number() ); | 96 | , HEPEVT_Wrapper::event_number() ); | |
