hepmc - Diff between revs 263 and 264
Subversion Repositories:
| Rev 263 | Rev 264 | |||
|---|---|---|---|---|
| Line 157... | Line 157... | |||
| 157 | m_vertex_barcodes.swap( other.m_vertex_barcodes ); | 157 | m_vertex_barcodes.swap( other.m_vertex_barcodes ); | |
| 158 | m_particle_barcodes.swap( other.m_particle_barcodes ); | 158 | m_particle_barcodes.swap( other.m_particle_barcodes ); | |
| 159 | std::swap(m_heavy_ion , other.m_heavy_ion ); | 159 | std::swap(m_heavy_ion , other.m_heavy_ion ); | |
| 160 | std::swap(m_pdf_info , other.m_pdf_info ); | 160 | std::swap(m_pdf_info , other.m_pdf_info ); | |
| 161 | // must now adjust GenVertex back pointers | 161 | // must now adjust GenVertex back pointers | |
| 162 | for ( GenEvent::vertex_const_iterator v = vertices_begin(); | - | ||
| 163 | v != vertices_end(); ++v ) { | - | ||
| 164 | // if v previously pointed to another GenEvent, | - | ||
| 165 | // remove it from that GenEvent's list | - | ||
| 166 | if ( (*v)->parent_event() && (*v)->parent_event() != this ) { | - | ||
| 167 | bool remove_status = (*v)->parent_event()->remove_vertex( (*v) ); | - | ||
| 168 | if ( !remove_status ) { | - | ||
| 169 | std::cerr << "GenEvent::swap ERROR " | - | ||
| 170 | << "GenVertex::parent_event points to \n" | - | ||
| 171 | << "an event that does not point back to the " | - | ||
| 172 | << "GenVertex. \n This probably indicates a deeper " | - | ||
| 173 | << "problem. " << std::endl; | - | ||
| 174 | } | - | ||
| 175 | } | - | ||
| 176 | (*v)->set_parent_event_( this ); | - | ||
| - | 162 | for ( GenEvent::vertex_const_iterator vthis = vertices_begin(); | ||
| - | 163 | vthis != vertices_end(); ++vthis ) { | ||
| - | 164 | (*vthis)->change_parent_event_( this ); | ||
| - | 165 | } | ||
| - | 166 | for ( GenEvent::vertex_const_iterator voth = other.vertices_begin(); | ||
| - | 167 | voth != other.vertices_end(); ++voth ) { | ||
| - | 168 | (*voth)->change_parent_event_( &other ); | ||
| 177 | } | 169 | } | |
| 178 | } | 170 | } | |
| 179 | 171 | |||
| 180 | GenEvent::~GenEvent() | 172 | GenEvent::~GenEvent() | |
| 181 | { | 173 | { | |
