CMS 3D CMS Logo

ToString.h

Go to the documentation of this file.
00001 
00002 #ifndef TOSTR_H
00003 #define TOSTR_H
00004 #include <sstream>
00005 #include <iostream>
00006 template <class T> std::string toString(const T& aT) {
00007         std::ostringstream oss;
00008         oss << aT;
00009         return oss.str();
00010 }
00011 
00012 template <class T> std::string toString(const std::pair<T, T>& aT) {
00013         std::ostringstream oss;
00014         oss << "(" << aT.first << ", " << aT.second << ")";
00015         return oss.str();
00016 }
00017 
00018 
00019 #endif /*TOSTR_H */
00020 

Generated on Tue Jun 9 17:44:41 2009 for CMSSW by  doxygen 1.5.4