#ifndef SIEND_HPP #define SIEND_HPP // // $Id: SiEnd.hpp,v 1.6 2001/02/03 22:53:36 hobbs Exp $ // // File: SiEnd.hpp // Purpose: // Created: 15-DEC-1997 Emanuela Barberis // // $Revision: 1.6 $ // // // Include files #include #include #include #include // Constructors/Destructors /** SMT end unit. Each end contains $nd$ disks. */ class SiEnd: public dgs::ReferencePoint { public: /// Default constructor (empty end). SiEnd() {} /** Instantiate an end unit with $nd$ disks. The ideal positions are given in $disk \_pos$. */ SiEnd(int ndis, std::vector disk_zpos, const SiDisk* proto_disk); /** Instantiate an end unit with $nd$ disks. Construct an end with the disks specified in the vector ${\it const std::vector \&disks}$. */ SiEnd(int ndis, std::vector disk_zpos, const std::vector &disks); /** Return the address of the children. Used within dgs::GeometryElement and ReferencePoint to do positioning. */ const std::list get_children(); /// Return the number of disks. int get_disk_count() const; /// Return a constant reference to the idisk-th idisk. const SiDisk* get_disk(int idisk) const; /// Return a modifiable reference to the idisk-th idisk. SiDisk* get_mutable_disk(int idisk); /// Text dump an end unit. friend std::ostream& operator <<(std::ostream& os, const SiEnd& me); friend bool operator<(const SiEnd& lhs, const SiEnd &rhs); friend bool operator==(const SiEnd& lhs, const SiEnd &rhs); friend bool operator!=(const SiEnd& lhs, const SiEnd &rhs); private: /// Vector to hold the disks. std::vector _disks; public: D0_OBJECT_SETUP(SiEnd); }; // Inlines #include #endif //SIEND_HPP