CMS 3D CMS Logo

TrackerParametersFromDD.cc
Go to the documentation of this file.
6 
7 bool
10 {
11  for( int subdet = 1; subdet <= 6; ++subdet )
12  {
13  std::stringstream sstm;
14  sstm << "Subdetector" << subdet;
15  std::string name = sstm.str();
16 
17  if( DDVectorGetter::check( name ))
18  {
19  std::vector<int> subdetPars = dbl_to_int( DDVectorGetter::get( name ));
20  putOne( subdet, subdetPars, ptp );
21  }
22  }
23 
24  ptp.vpars = dbl_to_int( DDVectorGetter::get( "vPars" ));
25 
26  return true;
27 }
28 
29 void
30 TrackerParametersFromDD::putOne( int subdet, std::vector<int> & vpars, PTrackerParameters& ptp )
31 {
33  item.id = subdet;
34  item.vpars = vpars;
35  ptp.vitems.push_back( item );
36 }
std::vector< int > vpars
void putOne(int, std::vector< int > &, PTrackerParameters &)
std::vector< Item > vitems
type of data representation of DDCompactView
Definition: DDCompactView.h:90
std::vector< int > dbl_to_int(const std::vector< double > &vecdbl)
Converts a std::vector of doubles to a std::vector of int.
Definition: DDutils.h:7
std::vector< int > vpars
bool check(const std::string &)
std::vector< double > get(const std::string &)
bool build(const DDCompactView *, PTrackerParameters &)