CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Types | Public Member Functions | Private Attributes
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,
ParametersConstIterator
ParametersConstIteratorPair
 

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 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/26 20:41:07
Revision:
1.1

(last update by

Author:
flucke

)

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.

31 { }
virtual AlignmentSurfaceDeformations::~AlignmentSurfaceDeformations ( )
inlinevirtual

Definition at line 32 of file AlignmentSurfaceDeformations.h.

32 { }

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().

38  {
39 
40  Item item;
41  item.m_rawId = rawId;
42  item.m_parametrizationType = type;
43  item.m_index = m_parameters.size();
44  m_items.push_back(item);
45 
46  m_parameters.reserve(m_parameters.size() + parameters.size());
47  std::copy(parameters.begin(), parameters.end(), std::back_inserter(m_parameters));
48 
49  return true;
50  }
type
Definition: HCALResponse.h:21
std::vector< align::Scalar > m_parameters
ParametersConstIteratorPair parameters(size_t index) const
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.

Referenced by Vispa.Gui.VispaWidget.TextField::setAutosizeFont(), and Vispa.Gui.VispaWidget.TextField::setAutotruncate().

35 { return m_items.empty(); }
const ItemVector& AlignmentSurfaceDeformations::items ( ) const
inline
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(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::inputTags(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::properties(), and Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::recursePSetProperties().

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

Member Data Documentation

ItemVector AlignmentSurfaceDeformations::m_items
private

Definition at line 71 of file AlignmentSurfaceDeformations.h.

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

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

Definition at line 70 of file AlignmentSurfaceDeformations.h.

Referenced by add(), and parameters().