Cuts.fhh

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #ifndef RIVET_Cuts_FHH
00003 #define RIVET_Cuts_FHH
00004 
00005 #include "Rivet/Rivet.hh"
00006 
00007 namespace Rivet {
00008 
00009   /// Forward declaration
00010   class Cuts;
00011 
00012   /// Comparison operations. We're being clear about the <= and >= equality aspects
00013   /// since these will actually be implemented as inclusive binary cuts with EQUAL
00014   /// being translated into a matched "back-to-back" pair of inequalities.
00015   enum Comparison {
00016     LESS_EQ, MORE_EQ, EQUAL
00017   };
00018 
00019   
00020   /// String representations of the comparison enum values.
00021   inline const string toString(const Comparison& c) {
00022     switch(c) {
00023     case LESS_EQ:
00024       return "<=";
00025     case MORE_EQ:
00026       return ">=";
00027     case EQUAL:
00028       return "==";
00029     }
00030     return "";
00031   }
00032 
00033   /// Forward declare the ability to stream a Cuts object.
00034   ostream& operator<<(ostream& os, const Cuts& cuts);
00035 
00036   /// Method to write a Comparison to a stream.
00037   inline ostream& operator<<(ostream& os, const Comparison& comp) {
00038     os << toString(comp);
00039     return os;
00040   }
00041     
00042 }
00043 
00044 #endif