test
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 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,
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 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 31 of file AlignmentSurfaceDeformations.h.

Definition at line 32 of file AlignmentSurfaceDeformations.h.

Definition at line 33 of file AlignmentSurfaceDeformations.h.

Constructor & Destructor Documentation

AlignmentSurfaceDeformations::AlignmentSurfaceDeformations ( )
inline

Definition at line 35 of file AlignmentSurfaceDeformations.h.

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

Definition at line 36 of file AlignmentSurfaceDeformations.h.

36 { }

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 42 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 counter.Counter::register(), and Alignable::surfaceDeformations().

42  {
43 
44  Item item;
45  item.m_rawId = rawId;
46  item.m_parametrizationType = type;
47  item.m_index = m_parameters.size();
48  m_items.push_back(item);
49 
50  m_parameters.reserve(m_parameters.size() + parameters.size());
51  std::copy(parameters.begin(), parameters.end(), std::back_inserter(m_parameters));
52 
53  return true;
54  }
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 39 of file AlignmentSurfaceDeformations.h.

References m_items.

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

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

Get vector of all items.

Definition at line 57 of file AlignmentSurfaceDeformations.h.

References m_items.

Referenced by GeometryAligner::attachSurfaceDeformations(), and python.rootplot.core.Options::kwarg_list().

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

References cmsHarvester::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().

61  {
63  pair.first = m_parameters.begin() + m_items[index].m_index;
64  if (index<m_items.size()-1) {
65  pair.second = m_parameters.begin() + m_items[index+1].m_index;
66  } else {
67  pair.second = m_parameters.end();
68  }
69  return pair;
70  }
std::pair< ParametersConstIterator, ParametersConstIterator > ParametersConstIteratorPair
std::vector< align::Scalar > m_parameters
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 77 of file AlignmentSurfaceDeformations.h.

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

Definition at line 77 of file AlignmentSurfaceDeformations.h.

Member Data Documentation

ItemVector AlignmentSurfaceDeformations::m_items
private

Definition at line 75 of file AlignmentSurfaceDeformations.h.

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

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

Definition at line 74 of file AlignmentSurfaceDeformations.h.

Referenced by add(), and parameters().