CMS 3D CMS Logo

Public Member Functions | Private Attributes

MultiMetricsUpdator Class Reference

#include <MultiMetricsUpdator.h>

Inheritance diagram for MultiMetricsUpdator:
KalmanAlignmentMetricsUpdator

List of all members.

Public Member Functions

virtual const std::vector
< Alignable * > 
additionalAlignables (const std::vector< Alignable * > &alignables)
virtual const std::vector
< Alignable * > 
alignables (void) const
 MultiMetricsUpdator (const edm::ParameterSet &config)
virtual void update (const std::vector< Alignable * > &alignables)
virtual ~MultiMetricsUpdator (void)

Private Attributes

std::vector
< SimpleMetricsUpdator * > 
theMetricsUpdators

Detailed Description

Definition at line 11 of file MultiMetricsUpdator.h.


Constructor & Destructor Documentation

MultiMetricsUpdator::MultiMetricsUpdator ( const edm::ParameterSet config)

Definition at line 11 of file MultiMetricsUpdator.cc.

References edm::ParameterSet::getParameter(), and theMetricsUpdators.

                                                                         : KalmanAlignmentMetricsUpdator( config )
{
  std::vector<std::string> strConfig = config.getParameter< std::vector<std::string> >( "Configurations" );
  std::vector<std::string>::iterator itConfig;
  for ( itConfig = strConfig.begin(); itConfig != strConfig.end(); ++itConfig )
  {
    edm::ParameterSet updatorConfig = config.getParameter<edm::ParameterSet>( *itConfig );
    theMetricsUpdators.push_back( new SimpleMetricsUpdator( updatorConfig ) );
  }


  edm::LogInfo("Alignment") << "@SUB=MultiMetricsUpdator::MultiMetricsUpdator "
                            << "\nInstance of MultiMetricsUpdator created.";;
}
MultiMetricsUpdator::~MultiMetricsUpdator ( void  ) [virtual]

Definition at line 27 of file MultiMetricsUpdator.cc.

References theMetricsUpdators.

{
  std::vector< SimpleMetricsUpdator* >::const_iterator it;

  for ( it = theMetricsUpdators.begin(); it != theMetricsUpdators.end(); ++it )
    delete *it;
}

Member Function Documentation

const std::vector< Alignable * > MultiMetricsUpdator::additionalAlignables ( const std::vector< Alignable * > &  alignables) [virtual]

Implements KalmanAlignmentMetricsUpdator.

Definition at line 47 of file MultiMetricsUpdator.cc.

References query::result, and theMetricsUpdators.

{
  std::set< Alignable* > alignableSet;

  std::vector< SimpleMetricsUpdator* >::const_iterator it;
  for ( it = theMetricsUpdators.begin(); it != theMetricsUpdators.end(); ++it )
  {
    const std::vector< Alignable* > additional = (*it)->additionalAlignables( alignables );
    alignableSet.insert( additional.begin(), additional.end() );
  }

  std::vector< Alignable* > result;
  result.insert( result.end(), alignableSet.begin(), alignableSet.end() );
  return result;
}
const std::vector< Alignable * > MultiMetricsUpdator::alignables ( void  ) const [virtual]

Implements KalmanAlignmentMetricsUpdator.

Definition at line 65 of file MultiMetricsUpdator.cc.

References query::result, and theMetricsUpdators.

{
  std::set< Alignable* > alignableSet;

  std::vector< SimpleMetricsUpdator* >::const_iterator it;
  for ( it = theMetricsUpdators.begin(); it != theMetricsUpdators.end(); ++it )
  {
    const std::vector< Alignable* > alignables = (*it)->alignables();
    alignableSet.insert( alignables.begin(), alignables.end() );
  }

  std::vector< Alignable* > result;
  result.insert( result.end(), alignableSet.begin(), alignableSet.end() );
  return result;
}
void MultiMetricsUpdator::update ( const std::vector< Alignable * > &  alignables) [virtual]

Implements KalmanAlignmentMetricsUpdator.

Definition at line 36 of file MultiMetricsUpdator.cc.

References theMetricsUpdators.

{
  std::vector< SimpleMetricsUpdator* >::const_iterator it;
  for ( it = theMetricsUpdators.begin(); it != theMetricsUpdators.end(); ++it )
  {
    (*it)->update( alignables );
  }
}

Member Data Documentation