Projection.fhh
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #ifndef Rivet_Projection_FHH 00003 #define Rivet_Projection_FHH 00004 00005 /// @todo Is there a reason that this stuff can't go into Projection.hh? 00006 00007 #include "Rivet/Config/RivetCommon.hh" 00008 #include "Rivet/Cmp.fhh" 00009 00010 00011 namespace Rivet { 00012 class Projection; 00013 typedef Projection* ProjectionPtr; 00014 typedef const Projection* ConstProjectionPtr; 00015 } 00016 00017 00018 namespace std { 00019 00020 /// This is the function called when comparing two (const) pointers to Rivet::Projection. 00021 template <> 00022 struct less<const Rivet::Projection*> 00023 : public binary_function<const Rivet::Projection*, const Rivet::Projection*, bool> { 00024 bool operator()(const Rivet::Projection* x, const Rivet::Projection* y) const; 00025 }; 00026 00027 } 00028 00029 00030 namespace Rivet { 00031 00032 /// Convenience method for casting to a const Projection reference. 00033 template <typename PROJ> 00034 inline const PROJ& pcast(const Projection& p) { 00035 return dynamic_cast<const PROJ&>(p); 00036 } 00037 00038 00039 /// Convenience method for casting to a const Projection pointer. 00040 template <typename PROJ> 00041 inline const PROJ* pcast(const Projection* p) { 00042 return dynamic_cast<const PROJ*>(p); 00043 } 00044 00045 } 00046 00047 #endif Generated on Thu Mar 10 2016 08:29:52 for The Rivet MC analysis system by ![]() |