CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions
TrackerParametersFromDD Class Reference

#include <TrackerParametersFromDD.h>

Public Member Functions

bool build (const DDCompactView *, PTrackerParameters &)
 
 TrackerParametersFromDD ()
 
virtual ~TrackerParametersFromDD ()
 

Private Member Functions

void putOne (int, std::vector< int > &, PTrackerParameters &)
 

Detailed Description

Definition at line 9 of file TrackerParametersFromDD.h.

Constructor & Destructor Documentation

TrackerParametersFromDD::TrackerParametersFromDD ( )
inline

Definition at line 11 of file TrackerParametersFromDD.h.

11 {}
virtual TrackerParametersFromDD::~TrackerParametersFromDD ( )
inlinevirtual

Definition at line 12 of file TrackerParametersFromDD.h.

12 {}

Member Function Documentation

bool TrackerParametersFromDD::build ( const DDCompactView cvp,
PTrackerParameters ptp 
)

Definition at line 8 of file TrackerParametersFromDD.cc.

References DDVectorGetter::check(), dbl_to_int(), DDVectorGetter::get(), mergeVDriftHistosByStation::name, putOne(), AlCaHLTBitMon_QueryRunRegistry::string, and PTrackerParameters::vpars.

Referenced by PTrackerParametersDBBuilder::beginRun(), and TrackerParametersESModule::produce().

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 }
std::vector< int > vpars
void putOne(int, std::vector< int > &, PTrackerParameters &)
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.cc:4
bool check(const std::string &)
std::vector< double > get(const std::string &)
void TrackerParametersFromDD::putOne ( int  subdet,
std::vector< int > &  vpars,
PTrackerParameters ptp 
)
private

Definition at line 30 of file TrackerParametersFromDD.cc.

References PTrackerParameters::Item::id, PTrackerParameters::vitems, and PTrackerParameters::Item::vpars.

Referenced by build().

31 {
33  item.id = subdet;
34  item.vpars = vpars;
35  ptp.vitems.push_back( item );
36 }
std::vector< Item > vitems
std::vector< int > vpars