CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends
AlignmentSurfaceDeformations Class Reference

#include <AlignmentSurfaceDeformations.h>

Classes

struct  Item
 

Public Types

typedef std::vector< ItemItemVector
 
typedef std::vector< align::Scalar >::const_iterator ParametersConstIterator
 
typedef std::pair< ParametersConstIterator, ParametersConstIteratorParametersConstIteratorPair
 

Public Member Functions

bool add (align::ID rawId, int type, const std::vector< align::Scalar > &parameters)
 Add a new item. More...
 
 AlignmentSurfaceDeformations ()
 
bool empty () const
 Test of empty vector without having to look into internals: More...
 
const ItemVectoritems () const
 Get vector of all items. More...
 
ParametersConstIteratorPair parameters (size_t index) const
 
virtual ~AlignmentSurfaceDeformations ()
 

Private Member Functions

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

Private Attributes

ItemVector m_items
 
std::vector< align::Scalarm_parameters
 

Friends

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

Detailed Description

Class for DB storage of surface deformation parameters. The actual parameters for all detector IDs are stored inside one big vector. Access is provided via a pair of iterators for this vector.

Date
2010/10/26 20:41:07
Revision
1.1

(last update by

Author
flucke

)

Definition at line 20 of file AlignmentSurfaceDeformations.h.

Member Typedef Documentation

◆ ItemVector

Definition at line 30 of file AlignmentSurfaceDeformations.h.

◆ ParametersConstIterator

Definition at line 31 of file AlignmentSurfaceDeformations.h.

◆ ParametersConstIteratorPair

Definition at line 32 of file AlignmentSurfaceDeformations.h.

Constructor & Destructor Documentation

◆ AlignmentSurfaceDeformations()

AlignmentSurfaceDeformations::AlignmentSurfaceDeformations ( )
inline

Definition at line 34 of file AlignmentSurfaceDeformations.h.

34 {}

◆ ~AlignmentSurfaceDeformations()

virtual AlignmentSurfaceDeformations::~AlignmentSurfaceDeformations ( )
inlinevirtual

Definition at line 35 of file AlignmentSurfaceDeformations.h.

35 {}

Member Function Documentation

◆ add()

bool AlignmentSurfaceDeformations::add ( align::ID  rawId,
int  type,
const std::vector< align::Scalar > &  parameters 
)
inline

Add a new item.

Definition at line 41 of file AlignmentSurfaceDeformations.h.

References filterCSVwithJSON::copy, B2GTnPMonitor_cfi::item, m_items, m_parameters, parameters(), and nano_mu_digi_cff::rawId.

Referenced by CreateIdealTkAlRecords::alignToGT(), counter.Counter::register(), SequenceTypes._TaskBase::remove(), and SequenceTypes._TaskBase::replace().

41  {
42  Item item;
43  item.m_rawId = rawId;
44  item.m_parametrizationType = type;
45  item.m_index = m_parameters.size();
46  m_items.push_back(item);
47 
48  m_parameters.reserve(m_parameters.size() + parameters.size());
49  std::copy(parameters.begin(), parameters.end(), std::back_inserter(m_parameters));
50 
51  return true;
52  }
ParametersConstIteratorPair parameters(size_t index) const
std::vector< align::Scalar > m_parameters

◆ empty()

bool AlignmentSurfaceDeformations::empty ( ) const
inline

Test of empty vector without having to look into internals:

Definition at line 38 of file AlignmentSurfaceDeformations.h.

References m_items.

Referenced by MTDDigiGeometryESModule::produce().

38 { return m_items.empty(); }

◆ items()

const ItemVector& AlignmentSurfaceDeformations::items ( ) const
inline

◆ parameters()

ParametersConstIteratorPair AlignmentSurfaceDeformations::parameters ( size_t  index) const
inline

Get a pair of iterators for the item at given index. The iterators can be used to access the actual parameters for that item

Definition at line 59 of file AlignmentSurfaceDeformations.h.

References m_items, and m_parameters.

Referenced by add(), CreateIdealTkAlRecords::alignToGT(), and GeometryAligner::attachSurfaceDeformations().

59  {
61  pair.first = m_parameters.begin() + m_items[index].m_index;
62  if (index < m_items.size() - 1) {
63  pair.second = m_parameters.begin() + m_items[index + 1].m_index;
64  } else {
65  pair.second = m_parameters.end();
66  }
67  return pair;
68  }
std::vector< align::Scalar > m_parameters
std::pair< ParametersConstIterator, ParametersConstIterator > ParametersConstIteratorPair

◆ serialize()

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

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 74 of file AlignmentSurfaceDeformations.h.

◆ cond::serialization::access

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

Definition at line 74 of file AlignmentSurfaceDeformations.h.

Member Data Documentation

◆ m_items

ItemVector AlignmentSurfaceDeformations::m_items
private

Definition at line 72 of file AlignmentSurfaceDeformations.h.

Referenced by add(), empty(), items(), and parameters().

◆ m_parameters

std::vector<align::Scalar> AlignmentSurfaceDeformations::m_parameters
private

Definition at line 71 of file AlignmentSurfaceDeformations.h.

Referenced by add(), and parameters().