CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TkTrackingRegionsMargin.h
Go to the documentation of this file.
1 #ifndef TkTrackingRegionsMargin_H
2 #define TkTrackingRegionsMargin_H
3 
6 #include <utility>
7 #include <iostream>
8 
9 template <class T> class TkTrackingRegionsMargin : public std::pair<T,T> {
10 public:
11 
13 
14  TkTrackingRegionsMargin(const T & aLeft, const T & aRight)
15  : std::pair<T,T> (aLeft,aRight) { }
16 
17  TkTrackingRegionsMargin( const std::pair<T,T> & aPair)
18  : std::pair<T,T> (aPair) { }
19 
20  const T & left() const { return this->first; }
21  const T & right() const { return this->second; }
22 
23  void operator += ( const T & v) { add(v,v); }
24  void add( const T & addLeft, const T & addRight) {
25  this->first += addLeft;
26  this->second += addRight;
27  }
28 };
29 
30 template <class T> std::ostream & operator<< (
31  std::ostream& out, const TkTrackingRegionsMargin<T> & m)
32 {
33  return out << "("<<m.left()<<","<<m.right()<<")";
34 }
35 #endif
36 
void add(const T &addLeft, const T &addRight)
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
U second(std::pair< T, U > const &p)
TkTrackingRegionsMargin(const std::pair< T, T > &aPair)
TkTrackingRegionsMargin(const T &aLeft, const T &aRight)
bool first
Definition: L1TdeRCT.cc:79
tuple out
Definition: dbtoconf.py:99
long double T
mathSSE::Vec4< T > v