Rivet.hh

Go to the documentation of this file.
00001 #ifndef RIVET_Rivet_H
00002 #define RIVET_Rivet_H
00003 
00004 #include <typeinfo>
00005 #include <set>
00006 #include <list>
00007 #include <map>
00008 #include <utility>
00009 #include <string>
00010 #include <sstream>
00011 #include <vector>
00012 #include <stdexcept>
00013 #include <iostream>
00014 #include <iomanip>
00015 #include <cmath>
00016 #include <limits>
00017 #include <cassert>
00018 
00019 /// This is the main namespace in which all Rivet classes are defined.
00020 namespace Rivet {
00021 
00022   // Convenient imports of common STL classes and functions.
00023   using std::set;
00024   using std::map;
00025   using std::multimap;
00026   using std::type_info;
00027   using std::string;
00028   using std::stringstream;
00029   using std::less;
00030   using std::list;
00031   using std::vector;
00032   using std::pair;
00033   using std::make_pair;
00034   using std::runtime_error;
00035   using std::min;
00036   using std::max;
00037   using std::numeric_limits;
00038   using std::ostream;
00039   using std::istream;
00040   using std::cout;
00041   using std::cin;
00042   using std::cerr;
00043   using std::setw;
00044   using std::endl;
00045 
00046   /// A sensible default maximum value of rapidity for Rivet analyses to use.
00047   const double MaxRapidity = 100000.0;
00048 
00049   /// A pre-defined value of pi.
00050   const double PI = 4*atan(1);
00051 
00052   /// Convenient function for streaming out vectors of any streamable object.
00053   template<typename T>
00054   inline std::ostream& operator<<(std::ostream& os, const std::vector<T>& vec) {
00055     os << "[ ";
00056     for (typename std::vector<T>::const_iterator i = vec.begin(); i != vec.end(); ++i) {
00057       os << *i << " ";
00058     }
00059     os << "]";
00060     return os;
00061   }
00062 
00063 }
00064 
00065 #endif