CMS 3D CMS Logo

Classes | Public Types | Public Member Functions | Private Attributes

AlignmentSurfaceDeformations Class Reference

#include <AlignmentSurfaceDeformations.h>

List of all members.

Classes

struct  Item

Public Types

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

Public Member Functions

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

Private Attributes

ItemVector m_items
std::vector< align::Scalarm_parameters

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/29 10:09:35
Revision:
1.1

(last update by

Author:
mussgill

)

Definition at line 18 of file AlignmentSurfaceDeformations.h.


Member Typedef Documentation

Definition at line 27 of file AlignmentSurfaceDeformations.h.

Definition at line 28 of file AlignmentSurfaceDeformations.h.

Definition at line 29 of file AlignmentSurfaceDeformations.h.


Constructor & Destructor Documentation

AlignmentSurfaceDeformations::AlignmentSurfaceDeformations ( ) [inline]

Definition at line 31 of file AlignmentSurfaceDeformations.h.

{ }
virtual AlignmentSurfaceDeformations::~AlignmentSurfaceDeformations ( ) [inline, virtual]

Definition at line 32 of file AlignmentSurfaceDeformations.h.

{ }

Member Function Documentation

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

Add a new item.

Definition at line 38 of file AlignmentSurfaceDeformations.h.

References filterCSVwithJSON::copy, AlignmentSurfaceDeformations::Item::m_index, m_items, m_parameters, AlignmentSurfaceDeformations::Item::m_parametrizationType, and AlignmentSurfaceDeformations::Item::m_rawId.

Referenced by Alignable::surfaceDeformations().

                                                                               {

    Item item;
    item.m_rawId = rawId;
    item.m_parametrizationType = type;
    item.m_index = m_parameters.size();
    m_items.push_back(item);

    m_parameters.reserve(m_parameters.size() + parameters.size());
    std::copy(parameters.begin(), parameters.end(), std::back_inserter(m_parameters));

    return true;
  }
bool AlignmentSurfaceDeformations::empty ( ) const [inline]

Test of empty vector without having to look into internals:

Definition at line 35 of file AlignmentSurfaceDeformations.h.

References m_items.

{ return m_items.empty(); }
const ItemVector& AlignmentSurfaceDeformations::items ( ) const [inline]

Get vector of all items.

Definition at line 53 of file AlignmentSurfaceDeformations.h.

References m_items.

Referenced by GeometryAligner::attachSurfaceDeformations().

{return m_items; }
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 57 of file AlignmentSurfaceDeformations.h.

References getHLTprescales::index, m_items, and m_parameters.

Referenced by GeometryAligner::attachSurfaceDeformations().

                                                               {
    ParametersConstIteratorPair pair;
    pair.first  = m_parameters.begin() + m_items[index].m_index;
    if (index<m_items.size()-1) {
      pair.second = m_parameters.begin() + m_items[index+1].m_index;
    } else {
      pair.second = m_parameters.end();
    }
    return pair;
  }

Member Data Documentation

Definition at line 71 of file AlignmentSurfaceDeformations.h.

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

Definition at line 70 of file AlignmentSurfaceDeformations.h.

Referenced by add(), and parameters().