32 return std::shared_ptr<IDetector>(clone);
44 const std::shared_ptr<ParameterMap> &map) {
45 return std::make_shared<Instrument>(base, map);
57 std::shared_ptr<const IDetector> det_sptr = std::dynamic_pointer_cast<const IDetector>(base);
62 std::shared_ptr<const Instrument> inst_sptr = std::dynamic_pointer_cast<const Instrument>(base);
77 return std::make_shared<StructuredDetector>(sd, map);
81 return std::make_shared<RectangularDetector>(rd, map);
83 const auto *gd =
dynamic_cast<const GridDetector *
>(base.get());
85 return std::make_shared<GridDetector>(gd, map);
87 const auto *ac =
dynamic_cast<const CompAssembly *
>(base.get());
89 return std::make_shared<CompAssembly>(ac, map);
92 return std::make_shared<ObjCompAssembly>(oac, map);
94 const auto *oc =
dynamic_cast<const ObjComponent *
>(base.get());
96 return std::make_shared<ObjComponent>(oc, map);
98 const auto *cc =
dynamic_cast<const IComponent *
>(base.get());
100 return std::make_shared<Component>(cc, map);
Class for Assembly of geometric components.
GridDetector is a type of CompAssembly, an assembly of components.
base class for Geometric IComponent
Interface class for detector objects.
virtual IDetector * cloneParameterized(const ParameterMap *map) const =0
Create a cloned instance with a parameter map applied.
Class for Assembly of geometric components.
Object Component class, this class brings together the physical attributes of the component to the po...
static std::shared_ptr< IComponent > create(const std::shared_ptr< const IComponent > &base, const ParameterMap *map)
Create a parameterized component from the given base component and ParameterMap.
static std::shared_ptr< Instrument > createInstrument(const std::shared_ptr< const Instrument > &base, const std::shared_ptr< ParameterMap > &map)
Create a parameterized instrument from the given base and ParameterMap.
static std::shared_ptr< IDetector > createDetector(const IDetector *base, const ParameterMap *map)
Create a parameterized detector from the given base component and ParameterMap and return a shared_pt...
RectangularDetector is a type of CompAssembly, an assembly of components.
StructuredDetector is a type of CompAssembly, an assembly of components.
This functor is used as the deleter object of a shared_ptr to effectively erase ownership Raw pointer...
std::shared_ptr< IComponent > IComponent_sptr
Typedef of a shared pointer to a IComponent.