CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ConfigurableVertexReconstructor.cc
Go to the documentation of this file.
4 
5 using namespace std;
6 
7 namespace {
8  void errorNoReconstructor( const string & finder )
9  {
10  edm::LogError ( "ConfigurableVertexReconstructor") << "got no reconstructor for \""
11  << finder << "\"";
12  map < string, AbstractConfReconstructor * > valid =
14  cout << " Valid reconstructors are:";
15  for ( map < string, AbstractConfReconstructor * >::const_iterator i=valid.begin();
16  i!=valid.end() ; ++i )
17  {
18  if ( i->second ) cout << " " << i->first;
19  }
20  cout << endl;
21  throw std::string ( finder + " not available!" );
22  }
23 }
24 
26  const edm::ParameterSet & p ) : theRector ( 0 )
27 {
28  string finder=p.getParameter<string>("finder");
30  if (!theRector)
31  {
32  errorNoReconstructor ( finder );
33  }
34  theRector->configure ( p );
35  // theRector = theRector->clone();
36  // theRector = new ReconstructorFromFitter ( KalmanVertexFitter() );
37 }
38 
40 {
41 // delete theRector;
42 }
43 
46  theRector ( o.theRector->clone() )
47 {}
48 
49 
51 {
52  return new ConfigurableVertexReconstructor ( *this );
53 }
54 
55 vector < TransientVertex > ConfigurableVertexReconstructor::vertices (
56  const std::vector < reco::TransientTrack > & prims,
57  const std::vector < reco::TransientTrack > & secs,
58  const reco::BeamSpot & s ) const
59 {
60  return theRector->vertices ( prims, secs, s );
61 }
62 
63 vector < TransientVertex > ConfigurableVertexReconstructor::vertices (
64  const std::vector < reco::TransientTrack > & t,
65  const reco::BeamSpot & s ) const
66 {
67  return theRector->vertices ( t, s );
68 }
69 
70 vector < TransientVertex > ConfigurableVertexReconstructor::vertices (
71  const std::vector < reco::TransientTrack > & t ) const
72 {
73  return theRector->vertices ( t );
74 }
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
AbstractConfReconstructor * get(const std::string &)
virtual std::vector< TransientVertex > vertices(const std::vector< reco::TransientTrack > &) const =0
static VertexRecoManager & Instance()
std::vector< TransientVertex > vertices(const std::vector< reco::TransientTrack > &) const
ConfigurableVertexReconstructor(const edm::ParameterSet &)
tuple cout
Definition: gather_cfg.py:121
AbstractConfReconstructor * clone() const =0
ConfigurableVertexReconstructor * clone() const