[Rivet-svn] r3042 - trunk/include/Rivet

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Mon Apr 4 16:47:34 BST 2011


Author: hoeth
Date: Mon Apr  4 16:47:34 2011
New Revision: 3042

Log:
fix incompatibility between HepMC and boost that surfaced with gcc-4.6. There is probably more in the bag; same file.

Modified:
   trunk/include/Rivet/RivetHepMC.hh

Modified: trunk/include/Rivet/RivetHepMC.hh
==============================================================================
--- trunk/include/Rivet/RivetHepMC.hh	Mon Apr  4 15:10:16 2011	(r3041)
+++ trunk/include/Rivet/RivetHepMC.hh	Mon Apr  4 16:47:34 2011	(r3042)
@@ -27,6 +27,13 @@
     assert(ge);
     return particles(*ge);
   }
+//  inline std::pair<GenEvent::particle_const_iterator, GenEvent::particle_const_iterator> particles(const GenEvent& ge) {
+//    return make_pair(ge.particles_begin(), ge.particles_end());
+//  }
+//  inline std::pair<GenEvent::particle_const_iterator, GenEvent::particle_const_iterator> particles(const GenEvent* ge) {
+//    assert(ge);
+//    return particles(*ge);
+//  }
 
 
   inline vector<GenVertex*> vertices(const GenEvent& ge) {
@@ -40,23 +47,22 @@
     assert(ge);
     return vertices(*ge);
   }
+//  inline std::pair<GenEvent::vertex_const_iterator, GenEvent::vertex_const_iterator> vertices(const GenEvent& ge) {
+//    return make_pair(ge.vertices_begin(), ge.vertices_end());
+//  }
+//  inline std::pair<GenEvent::vertex_const_iterator, GenEvent::vertex_const_iterator> vertices(const GenEvent* ge) {
+//    assert(ge);
+//    return vertices(*ge);
+//  }
 
 
-  inline const vector<GenParticle*> particles_in(const GenVertex* gv) {
-    vector<GenParticle*> rtn;
-    for (GenVertex::particles_in_const_iterator pi = gv->particles_in_const_begin(); pi != gv->particles_in_const_end(); ++pi) {
-      rtn.push_back(*pi);
-    }
-    return rtn;
+  inline const std::pair<GenVertex::particles_in_const_iterator, GenVertex::particles_in_const_iterator> particles_in(const GenVertex* gv) {
+    return make_pair(gv->particles_in_const_begin(), gv->particles_in_const_end());
   }
 
 
-  inline const vector<GenParticle*> particles_out(const GenVertex* gv) {
-    vector<GenParticle*> rtn;
-    for (GenVertex::particles_out_const_iterator pi = gv->particles_out_const_begin(); pi != gv->particles_out_const_end(); ++pi) {
-      rtn.push_back(*pi);
-    }
-    return rtn;
+  inline const std::pair<GenVertex::particles_out_const_iterator, GenVertex::particles_out_const_iterator> particles_out(const GenVertex* gv) {
+    return make_pair(gv->particles_out_const_begin(), gv->particles_out_const_end());
   }
 
 
@@ -67,6 +73,9 @@
     }
     return rtn;
   }
+//  inline std::pair<GenVertex::particle_iterator, GenVertex::particle_iterator> particles(GenVertex* gv, HepMC::IteratorRange range=HepMC::relatives) {
+//    return make_pair(gv->particles_begin(range), gv->particles_end(range));
+//  }
 
 
 }


More information about the Rivet-svn mailing list