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

Definition at line 30 of file AlignmentSurfaceDeformations.h.

Definition at line 31 of file AlignmentSurfaceDeformations.h.

Definition at line 32 of file AlignmentSurfaceDeformations.h.

Constructor & Destructor Documentation

AlignmentSurfaceDeformations::AlignmentSurfaceDeformations ( )
inline

Definition at line 34 of file AlignmentSurfaceDeformations.h.

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

Definition at line 35 of file AlignmentSurfaceDeformations.h.

35 {}

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 41 of file AlignmentSurfaceDeformations.h.

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

Referenced by CreateIdealTkAlRecords::alignToGT(), counter.Counter::register(), SequenceTypes.Task::remove(), and SequenceTypes.Task::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  }
type
Definition: HCALResponse.h:21
std::vector< align::Scalar > m_parameters
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 Vispa.Gui.VispaWidget.TextField::setAutosizeFont(), and Vispa.Gui.VispaWidget.TextField::setAutotruncate().

38 { 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 59 of file AlignmentSurfaceDeformations.h.

References m_items, and m_parameters.

Referenced by CreateIdealTkAlRecords::alignToGT(), GeometryAligner::attachSurfaceDeformations(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::inputTags(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::properties(), and Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::recursePSetProperties().

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
template<class Archive >
void AlignmentSurfaceDeformations::serialize ( Archive &  ar,
const unsigned int  version 
)
private

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 74 of file AlignmentSurfaceDeformations.h.

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

Definition at line 74 of file AlignmentSurfaceDeformations.h.

Member Data Documentation

ItemVector AlignmentSurfaceDeformations::m_items
private

Definition at line 72 of file AlignmentSurfaceDeformations.h.

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

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

Definition at line 71 of file AlignmentSurfaceDeformations.h.

Referenced by add(), and parameters().