![]() |
![]() |
Enumerations | |
enum | Type { kBowedSurface = 1, kTwoBowedSurfaces } |
Functions | |
SurfaceDeformation * | create (int type, const std::vector< double > ¶ms) |
Definition at line 20 of file SurfaceDeformationFactory.h.
{ // rigid body has no deformations! kRigidBody = 0, kBowedSurface = 1, // BowedSurfaceDeformation kTwoBowedSurfaces // TwoBowedSurfacesDeformation };
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).
(last update by
)
Definition at line 16 of file SurfaceDeformationFactory.cc.
References Exception, AlignmentParametersFactory::kBowedSurface, AlignmentParametersFactory::kTwoBowedSurfaces, TwoBowedSurfacesDeformation::maxParameterSize(), BowedSurfaceDeformation::maxParameterSize(), BowedSurfaceDeformation::minParameterSize(), and TwoBowedSurfacesDeformation::minParameterSize().
Referenced by edm::eventsetup::ComponentFactory< T >::addTo(), GeometryAligner::attachSurfaceDeformations(), CtfSpecialSeedGenerator::beginRun(), cond::buildTechnologyProxy(), edm::Schedule::changeModule(), RecoBTag::checkCreateDirectory(), 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(), RunManager::initG4(), LHEProducer::LHEProducer(), reco::tau::RecoTauMVAHelper::loadDiscriminantPlugins(), edm::makeInput(), edm::PresenceFactory::makePresence(), edm::VectorInputSourceFactory::makeVectorInputSource(), edm::Factory::makeWorker(), ora::ContainerSchema::mappingForDependentClass(), PFTauMVAInputDiscriminantTranslator::PFTauMVAInputDiscriminantTranslator(), TrajectoryCleanerESProducer::produce(), TrajectoryFilterESProducer::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(), PhysicsTools::MVAComputer::setup(), edmplugin::PluginFactory< R *(Arg)>::tryToCreate(), edmplugin::PluginFactory< R *(Arg1, Arg2)>::tryToCreate(), edmplugin::PluginFactory< R *(void)>::tryToCreate(), TStorageFactoryFile::TStorageFactoryFile(), 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; }