CMS 3D CMS Logo

Enumerations | Functions

SurfaceDeformationFactory Namespace Reference

Enumerations

enum  Type { kBowedSurface = 1, kTwoBowedSurfaces }

Functions

SurfaceDeformationcreate (int type, const std::vector< double > &params)
Type surfaceDeformationType (const std::string &typeString)
 convert string to 'Type' - exception if string is not known

Enumeration Type Documentation

Enumerator:
kBowedSurface 
kTwoBowedSurfaces 

Definition at line 21 of file SurfaceDeformationFactory.h.

            { 
    // rigid body has no deformations! kRigidBody = 0,
    kBowedSurface = 1, // BowedSurfaceDeformation
    kTwoBowedSurfaces  // TwoBowedSurfacesDeformation
  };

Function Documentation

SurfaceDeformation * SurfaceDeformationFactory::create ( int  type,
const std::vector< double > &  params 
)

Create an instance of the concrete implementations of the 'SurfaceDeformation' interface First argument 'type' must match one of the enums defined above and the size of 'params' must match the expectation of the concrete type (exception otherwise).

Definition at line 30 of file SurfaceDeformationFactory.cc.

References Exception, AlignmentParametersFactory::kBowedSurface, AlignmentParametersFactory::kTwoBowedSurfaces, TwoBowedSurfacesDeformation::maxParameterSize(), BowedSurfaceDeformation::maxParameterSize(), BowedSurfaceDeformation::minParameterSize(), and TwoBowedSurfacesDeformation::minParameterSize().

Referenced by AlignableModifier::addDeformation(), edm::eventsetup::ComponentFactory< T >::addTo(), GeometryAligner::attachSurfaceDeformations(), EgammaHLTRegionalPixelSeedGeneratorProducers::beginRun(), CtfSpecialSeedGenerator::beginRun(), cond::buildTechnologyProxy(), edm::Schedule::changeModule(), RecoBTag::checkCreateDirectory(), CombinedSeedComparitor::CombinedSeedComparitor(), CombinedTrajectoryFactory::CombinedTrajectoryFactory(), CompositeLogicalTrajectoryFilter::CompositeLogicalTrajectoryFilter(), CompositeTrajectoryFilter::CompositeTrajectoryFilter(), CompositeTSG::CompositeTSG(), edmplugin::PluginFactory< R *(Arg1, Arg2)>::create(), edmplugin::PluginFactory< R *(Arg)>::create(), edmplugin::PluginFactory< R *(void)>::create(), edm::serviceregistry::ServicesManager::createServices(), createWatchers(), CSCSegmentBuilder::CSCSegmentBuilder(), ora::ContainerSchema::extend(), edm::serviceregistry::ServicesManager::fillListOfMakers(), TSGFromOrderedHits::init(), RunManager::initG4(), TStorageFactoryFile::Initialize(), LHEProducer::LHEProducer(), reco::tau::RecoTauMVAHelper::loadDiscriminantPlugins(), edm::makeInput(), edm::PresenceFactory::makePresence(), edm::VectorInputSourceFactory::makeVectorInputSource(), edm::Factory::makeWorker(), ora::ContainerSchema::mappingForDependentClass(), PFTauMVAInputDiscriminantTranslator::PFTauMVAInputDiscriminantTranslator(), TrajectoryFilterESProducer::produce(), TrajectoryCleanerESProducer::produce(), NavigationSchoolESProducer::produce(), CandidateProducer< TColl, CColl, Selector, Conv, Creator, Init >::produce(), DetIdAssociatorESProducer::produce(), gen::Pythia6Hadronizer::Pythia6Hadronizer(), SiStripClusterInfo::reclusterize(), RecoTauCleanerImpl< Prod >::RecoTauCleanerImpl(), RecoTauPiZeroProducer::RecoTauPiZeroProducer(), RecoTauProducer::RecoTauProducer(), SeedFilter::SeedFilter(), PhysicsTools::MVAComputer::setup(), edmplugin::PluginFactory< R *(Arg)>::tryToCreate(), edmplugin::PluginFactory< R *(Arg1, Arg2)>::tryToCreate(), edmplugin::PluginFactory< R *(void)>::tryToCreate(), TSGSmart::TSGSmart(), and edm::eventsetup::validateEventSetupParameters().

{
  switch(type) {
  case kBowedSurface:
    {
      if (params.size() <= BowedSurfaceDeformation::maxParameterSize() &&
          params.size() >= BowedSurfaceDeformation::minParameterSize()) {
        return new BowedSurfaceDeformation(params);
      } else {
        break;
      }
    }
  case kTwoBowedSurfaces:
    {
      if (params.size() <= TwoBowedSurfacesDeformation::maxParameterSize() &&
          params.size() >= TwoBowedSurfacesDeformation::minParameterSize()) {
        return new TwoBowedSurfacesDeformation(params);
      } else {
        break;
      }
    }
  }

  throw cms::Exception("BadInput") << "SurfaceDeformationFactory::create: "
                                   << "Unknown SurfaceDeformation type " << type << " (need "
                                   << kBowedSurface << " or " << kTwoBowedSurfaces 
                                   << ") or params.size() (" << params.size()
                                   << ") does not match.\n";
  
  return 0;
}
SurfaceDeformationFactory::Type SurfaceDeformationFactory::surfaceDeformationType ( const std::string &  typeString)

convert string to 'Type' - exception if string is not known

Author:
: Gero Flucke date : October 2010
Revision:
1.2
Date:
2011/02/11 10:57:40

(last update by

Author:
flucke

)

Definition at line 18 of file SurfaceDeformationFactory.cc.

References Exception, AlignmentParametersFactory::kBowedSurface, and AlignmentParametersFactory::kTwoBowedSurfaces.

Referenced by AlignableModifier::addDeformation().

{
  if      (typeString == "BowedSurface")     return kBowedSurface;
  else if (typeString == "TwoBowedSurfaces") return kTwoBowedSurfaces;
  else {
    throw cms::Exception("BadInput") << "SurfaceDeformationFactory::surfaceDeformationType: "
                                     << "Unknown SurfaceDeformation type " << typeString
                                     << " (must be 'BowedSurface' or 'TwoBowedSurfaces'.\n";
    return kBowedSurface; // not reached, to please the compiler
  }
}