Projection.fhh
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #ifndef Rivet_Projection_FHH 00003 #define Rivet_Projection_FHH 00004 00005 #include "Rivet/Cmp.fhh" 00006 00007 00008 namespace Rivet { 00009 class Projection; 00010 typedef Projection* ProjectionPtr; 00011 typedef const Projection* ConstProjectionPtr; 00012 } 00013 00014 00015 namespace std { 00016 00017 /// This is the function called when comparing two (const) pointers to Rivet::Projection. 00018 template <> 00019 struct less<const Rivet::Projection*> 00020 : public binary_function<const Rivet::Projection*, const Rivet::Projection*, bool> { 00021 bool operator()(const Rivet::Projection* x, const Rivet::Projection* y) const; 00022 }; 00023 00024 } 00025 00026 00027 namespace Rivet { 00028 00029 /// Convenience method for casting to a const Projection reference. 00030 template <typename PROJ> 00031 inline const PROJ& pcast(const Projection& p) { 00032 return dynamic_cast<const PROJ&>(p); 00033 } 00034 00035 00036 /// Convenience method for casting to a const Projection pointer. 00037 template <typename PROJ> 00038 inline const PROJ* pcast(const Projection* p) { 00039 return dynamic_cast<const PROJ*>(p); 00040 } 00041 00042 } 00043 00044 #endif Generated on Fri Dec 21 2012 15:03:42 for The Rivet MC analysis system by ![]() |