CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 More...
 

Enumeration Type Documentation

Enumerator
kBowedSurface 
kTwoBowedSurfaces 

Definition at line 18 of file SurfaceDeformationFactory.h.

18  {
19  // rigid body has no deformations! kRigidBody = 0,
20  kBowedSurface = 1, // BowedSurfaceDeformation
21  kTwoBowedSurfaces // TwoBowedSurfacesDeformation
22  };

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 27 of file SurfaceDeformationFactory.cc.

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

Referenced by AlignableModifier::addDeformation(), edm::eventsetup::ComponentFactory< T >::addTo(), AlignmentProducer::AlignmentProducer(), GeometryAligner::attachSurfaceDeformations(), HLTTauDQMPathPlotter::bookHistograms(), cond::buildTechnologyProxy(), RecoBTag::checkCreateDirectory(), CombinedHitTripletGenerator::CombinedHitTripletGenerator(), CombinedMultiHitGenerator::CombinedMultiHitGenerator(), CombinedSeedComparitor::CombinedSeedComparitor(), CombinedTrajectoryFactory::CombinedTrajectoryFactory(), CompositeLogicalTrajectoryFilter::CompositeLogicalTrajectoryFilter(), CompositeTrajectoryFilter::CompositeTrajectoryFilter(), CompositeTSG::CompositeTSG(), edmplugin::PluginFactory< R *(Args...)>::create(), TrackerGeometryCompare::createROOTGeometry(), edm::serviceregistry::ServicesManager::createServices(), createWatchers(), CSCSegmentBuilder::CSCSegmentBuilder(), CtfSpecialSeedGenerator::CtfSpecialSeedGenerator(), DTDigitizer::DTDigitizer(), EgammaHLTRegionalPixelSeedGeneratorProducers::EgammaHLTRegionalPixelSeedGeneratorProducers(), ora::ContainerSchema::extend(), edm::serviceregistry::ServicesManager::fillListOfMakers(), edm::Factory::findMaker(), LumiCorrectionParam::getCorrection(), RunManagerMT::initG4(), RunManager::initG4(), TStorageFactoryFile::Initialize(), LHEProducer::LHEProducer(), edm::makeInput(), edm::PresenceFactory::makePresence(), edm::VectorInputSourceFactory::makeVectorInputSource(), ora::ContainerSchema::mappingForDependentClass(), PFRecHitCreatorBase::PFRecHitCreatorBase(), PFRecHitProducer::PFRecHitProducer(), PFRecoTauChargedHadronProducer::PFRecoTauChargedHadronProducer(), PFTauMVAInputDiscriminantTranslator::PFTauMVAInputDiscriminantTranslator(), PixelTrackReconstruction::PixelTrackReconstruction(), PixelTripletHLTGenerator::PixelTripletHLTGenerator(), l1t::Stage2Layer2JetAlgorithmFirmwareImp1::processEvent(), CSCChannelMapperESProducer::produce(), CSCIndexerESProducer::produce(), NavigationSchoolESProducer::produce(), TrajectoryCleanerESProducer::produce(), DetIdAssociatorESProducer::produce(), CandidateProducer< TColl, CColl, Selector, Conv, Creator, Init >::produce(), RecoTauCleanerImpl< Prod >::RecoTauCleanerImpl(), RecoTauPiZeroProducer::RecoTauPiZeroProducer(), RecoTauProducer::RecoTauProducer(), SeedFilter::SeedFilter(), SeedForPhotonConversionFromQuadruplets::SeedForPhotonConversionFromQuadruplets(), SeedGeneratorFromRegionHitsEDProducer::SeedGeneratorFromRegionHitsEDProducer(), edmplugin::PluginFactory< R *(Args...)>::tryToCreate(), TSGFromL1Muon::TSGFromL1Muon(), TSGFromOrderedHits::TSGFromOrderedHits(), TSGSmart::TSGSmart(), and edm::eventsetup::validateEventSetupParameters().

28 {
29  switch(type) {
30  case kBowedSurface:
31  {
32  if (params.size() <= BowedSurfaceDeformation::maxParameterSize() &&
33  params.size() >= BowedSurfaceDeformation::minParameterSize()) {
34  return new BowedSurfaceDeformation(params);
35  } else {
36  break;
37  }
38  }
39  case kTwoBowedSurfaces:
40  {
41  if (params.size() <= TwoBowedSurfacesDeformation::maxParameterSize() &&
43  return new TwoBowedSurfacesDeformation(params);
44  } else {
45  break;
46  }
47  }
48  }
49 
50  throw cms::Exception("BadInput") << "SurfaceDeformationFactory::create: "
51  << "Unknown SurfaceDeformation type " << type << " (need "
52  << kBowedSurface << " or " << kTwoBowedSurfaces
53  << ") or params.size() (" << params.size()
54  << ") does not match.\n";
55 
56  return 0;
57 }
type
Definition: HCALResponse.h:21
static unsigned int minParameterSize()
minimum size of vector that is accepted by constructor from vector
static unsigned int minParameterSize()
minimum size of vector that is accepted by constructor from vector
static unsigned int maxParameterSize()
maximum size of vector that is accepted by constructor from vector
static unsigned int maxParameterSize()
maximum size of vector that is accepted by constructor from vector
SurfaceDeformationFactory::Type SurfaceDeformationFactory::surfaceDeformationType ( const std::string &  typeString)

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

Author
: Gero Flucke date : October 2010

Definition at line 15 of file SurfaceDeformationFactory.cc.

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

Referenced by AlignableModifier::addDeformation().

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