CMS 3D CMS Logo

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

#include <RecoIdealGeometry.h>

Public Member Functions

const std::vector< DetId > & detIds () const
 
bool insert (DetId id, const std::vector< double > &trans, const std::vector< double > &rot, const std::vector< double > &pars)
 
bool insert (DetId id, const std::vector< double > &trans, const std::vector< double > &rot, const std::vector< double > &pars, const std::vector< std::string > &spars)
 
 RecoIdealGeometry ()
 
std::vector< double >
::const_iterator 
rotEnd (size_t ind) const
 
std::vector< double >
::const_iterator 
rotStart (size_t ind) const
 
std::vector< double >
::const_iterator 
shapeEnd (size_t ind) const
 
std::vector< double >
::const_iterator 
shapeStart (size_t ind) const
 
size_t size ()
 
std::vector< std::string >
::const_iterator 
strEnd (size_t ind) const
 
std::vector< std::string >
::const_iterator 
strStart (size_t ind) const
 
std::vector< double >
::const_iterator 
tranEnd (size_t ind) const
 
std::vector< double >
::const_iterator 
tranStart (size_t ind) const
 
 ~RecoIdealGeometry ()
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

std::vector< DetIdpDetIds
 
std::vector< int > pNumShapeParms
 
std::vector< double > pPars
 
std::vector< int > pParsIndex
 
std::vector< int > sNumsParms
 
std::vector< int > sParsIndex
 
std::vector< std::string > strPars
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

Definition at line 28 of file RecoIdealGeometry.h.

Constructor & Destructor Documentation

RecoIdealGeometry::RecoIdealGeometry ( )
inline

Definition at line 30 of file RecoIdealGeometry.h.

30 {}
RecoIdealGeometry::~RecoIdealGeometry ( )
inline

Definition at line 31 of file RecoIdealGeometry.h.

31 {}

Member Function Documentation

const std::vector<DetId>& RecoIdealGeometry::detIds ( ) const
inline
bool RecoIdealGeometry::insert ( DetId  id,
const std::vector< double > &  trans,
const std::vector< double > &  rot,
const std::vector< double > &  pars 
)
inline

Definition at line 33 of file RecoIdealGeometry.h.

References filterCSVwithJSON::copy, pDetIds, pNumShapeParms, pPars, and pParsIndex.

Referenced by BeautifulSoup.PageElement::_invert(), SequenceTypes.Schedule::_replaceIfHeldDirectly(), CSCGeometryParsFromDD::build(), ME0GeometryParsFromDD::buildChamber(), GEMGeometryParsFromDD::buildChamber(), ME0GeometryParsFromDD::buildEtaPartition(), GEMGeometryParsFromDD::buildEtaPartition(), RPCGeometryParsFromDD::buildGeometry(), ME0GeometryParsFromDD::buildLayer(), GEMGeometryParsFromDD::buildSuperChamber(), DTGeometryParsFromDD::insertChamber(), DTGeometryParsFromDD::insertLayer(), and DTGeometryParsFromDD::insertSuperLayer().

36  {
37  if (trans.size() != 3 || rot.size() != 9)
38  return false;
39  pDetIds.push_back(id);
40  pNumShapeParms.push_back(pars.size()); // number of shape specific parameters.
41  pParsIndex.push_back(pPars.size()); // start of this guys "blob"
42  pPars.reserve(pPars.size() + trans.size() + rot.size() + pars.size());
43  std::copy(trans.begin(), trans.end(), std::back_inserter(pPars));
44  std::copy(rot.begin(), rot.end(), std::back_inserter(pPars));
45  std::copy(pars.begin(), pars.end(), std::back_inserter(pPars));
46  return true;
47  }
std::vector< int > pNumShapeParms
std::vector< DetId > pDetIds
std::vector< int > pParsIndex
std::vector< double > pPars
bool RecoIdealGeometry::insert ( DetId  id,
const std::vector< double > &  trans,
const std::vector< double > &  rot,
const std::vector< double > &  pars,
const std::vector< std::string > &  spars 
)
inline

Definition at line 49 of file RecoIdealGeometry.h.

References filterCSVwithJSON::copy, pDetIds, pNumShapeParms, pPars, pParsIndex, sNumsParms, sParsIndex, and strPars.

Referenced by BeautifulSoup.PageElement::_invert(), and SequenceTypes.Schedule::_replaceIfHeldDirectly().

53  {
54  if (trans.size() != 3 || rot.size() != 9)
55  return false;
56  pDetIds.push_back(id);
57  pNumShapeParms.push_back(pars.size()); // number of shape specific parameters.
58  pParsIndex.push_back(pPars.size()); // start of this guys "blob"
59  pPars.reserve(pPars.size() + trans.size() + rot.size() + pars.size());
60  std::copy(trans.begin(), trans.end(), std::back_inserter(pPars));
61  std::copy(rot.begin(), rot.end(), std::back_inserter(pPars));
62  std::copy(pars.begin(), pars.end(), std::back_inserter(pPars));
63 
64  sNumsParms.push_back(spars.size());
65  sParsIndex.push_back(strPars.size());
66  strPars.reserve(strPars.size() + spars.size());
67  std::copy(spars.begin(), spars.end(), std::back_inserter(strPars));
68  return true;
69  }
std::vector< int > pNumShapeParms
std::vector< DetId > pDetIds
std::vector< int > pParsIndex
std::vector< int > sNumsParms
std::vector< double > pPars
std::vector< std::string > strPars
std::vector< int > sParsIndex
std::vector<double>::const_iterator RecoIdealGeometry::rotEnd ( size_t  ind) const
inline

Definition at line 93 of file RecoIdealGeometry.h.

References pPars, and pParsIndex.

Referenced by CSCGeometryBuilder::build().

93 { return pPars.begin() + pParsIndex[ind] + 3 + 9; }
std::vector< int > pParsIndex
std::vector< double > pPars
std::vector<double>::const_iterator RecoIdealGeometry::rotStart ( size_t  ind) const
inline
template<class Archive >
void RecoIdealGeometry::serialize ( Archive &  ar,
const unsigned int  version 
)
private
std::vector<double>::const_iterator RecoIdealGeometry::shapeEnd ( size_t  ind) const
inline

Definition at line 97 of file RecoIdealGeometry.h.

References pNumShapeParms, pPars, and pParsIndex.

Referenced by RPCGeometryBuilderFromCondDB::build(), CSCGeometryBuilder::build(), and GEMGeometryBuilderFromCondDB::buildEtaPartition().

97  {
98  return pPars.begin() + pParsIndex[ind] + 3 + 9 + pNumShapeParms[ind];
99  }
std::vector< int > pNumShapeParms
std::vector< int > pParsIndex
std::vector< double > pPars
std::vector<double>::const_iterator RecoIdealGeometry::shapeStart ( size_t  ind) const
inline
size_t RecoIdealGeometry::size ( void  )
inline

Definition at line 71 of file RecoIdealGeometry.h.

References cms::cuda::assert(), pDetIds, pNumShapeParms, and pParsIndex.

Referenced by ntupleDataFormat._Collection::__iter__(), and ntupleDataFormat._Collection::__len__().

71  {
72  assert((pDetIds.size() == pNumShapeParms.size()) && (pNumShapeParms.size() == pParsIndex.size()));
73  return pDetIds.size();
74  }
std::vector< int > pNumShapeParms
std::vector< DetId > pDetIds
assert(be >=bs)
std::vector< int > pParsIndex
std::vector<std::string>::const_iterator RecoIdealGeometry::strEnd ( size_t  ind) const
inline

Definition at line 103 of file RecoIdealGeometry.h.

References sNumsParms, sParsIndex, and strPars.

103  {
104  return strPars.begin() + sParsIndex[ind] + sNumsParms[ind];
105  }
std::vector< int > sNumsParms
std::vector< std::string > strPars
std::vector< int > sParsIndex
std::vector<std::string>::const_iterator RecoIdealGeometry::strStart ( size_t  ind) const
inline

Definition at line 101 of file RecoIdealGeometry.h.

References sParsIndex, and strPars.

Referenced by ME0GeometryBuilderFromCondDB::build(), RPCGeometryBuilderFromCondDB::build(), and GEMGeometryBuilderFromCondDB::buildEtaPartition().

101 { return strPars.begin() + sParsIndex[ind]; }
std::vector< std::string > strPars
std::vector< int > sParsIndex
std::vector<double>::const_iterator RecoIdealGeometry::tranEnd ( size_t  ind) const
inline

Definition at line 89 of file RecoIdealGeometry.h.

References pPars, and pParsIndex.

Referenced by CSCGeometryBuilder::build().

89 { return pPars.begin() + pParsIndex[ind] + 3; }
std::vector< int > pParsIndex
std::vector< double > pPars
std::vector<double>::const_iterator RecoIdealGeometry::tranStart ( size_t  ind) const
inline

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 121 of file RecoIdealGeometry.h.

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 121 of file RecoIdealGeometry.h.

Member Data Documentation

std::vector<DetId> RecoIdealGeometry::pDetIds
private

Definition at line 109 of file RecoIdealGeometry.h.

Referenced by detIds(), insert(), and size().

std::vector<int> RecoIdealGeometry::pNumShapeParms
private

Definition at line 115 of file RecoIdealGeometry.h.

Referenced by insert(), shapeEnd(), and size().

std::vector<double> RecoIdealGeometry::pPars
private

Definition at line 111 of file RecoIdealGeometry.h.

Referenced by insert(), rotEnd(), rotStart(), shapeEnd(), shapeStart(), tranEnd(), and tranStart().

std::vector<int> RecoIdealGeometry::pParsIndex
private

Definition at line 114 of file RecoIdealGeometry.h.

Referenced by insert(), rotEnd(), rotStart(), shapeEnd(), shapeStart(), size(), tranEnd(), and tranStart().

std::vector<int> RecoIdealGeometry::sNumsParms
private

Definition at line 119 of file RecoIdealGeometry.h.

Referenced by insert(), and strEnd().

std::vector<int> RecoIdealGeometry::sParsIndex
private

Definition at line 118 of file RecoIdealGeometry.h.

Referenced by insert(), strEnd(), and strStart().

std::vector<std::string> RecoIdealGeometry::strPars
private

Definition at line 117 of file RecoIdealGeometry.h.

Referenced by insert(), strEnd(), and strStart().