CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Clusterizer1DCommons.h
Go to the documentation of this file.
1 #ifndef _Clusterizer1DCommons_H_
2 #define _Clusterizer1DCommons_H_
3 
5 
6 namespace Clusterizer1DCommons
7 {
8 // typedef Clusterizer1DCommons::Cluster1D Cluster1D;
9 inline double square ( const double a )
10 {
11  return a*a;
12 }
13 
14 template <class T>
16 {
17  bool operator() ( const Cluster1D<T> & c1,
18  const Cluster1D<T> & c2 )
19  {
20  return ( c1.position().value() < c2.position().value() );
21  };
22 };
23 
24 template <class T>
25 void add
26  ( const std::vector < const T * > & source,
27  std::vector < const T * > & dest )
28 {
29  for ( typename std::vector< const T * >::const_iterator i=source.begin();
30  i!=source.end() ; ++i )
31  {
32  dest.push_back ( *i );
33  };
34 }
35 
36 } // namespace Clusterizer1DCommons
37 
38 #endif
int i
Definition: DBlmapReader.cc:9
void add(const std::vector< const T * > &source, std::vector< const T * > &dest)
bool operator()(const Cluster1D< T > &c1, const Cluster1D< T > &c2)
Measurement1D position() const
Definition: Cluster1D.h:55
double value() const
Definition: Measurement1D.h:28
double a
Definition: hdecay.h:121
double square(const double a)
static std::string const source
Definition: EdmProvDump.cc:43