#ifndef SICENTRAL_HPP #define SICENTRAL_HPP // // $Id: SiCentral.hpp,v 1.6 2001/02/03 22:53:35 hobbs Exp $ // // File: SiCentral.hpp // Purpose: // Created: 15-DEC-1997 Emanuela Barberis // // $Revision: 1.6 $ // // // Include files (iostream added by A. Patwa) #include #include #include #include #include #include // Constructors/Destructors /** SMT central unit. Each central contains $nb$ barrels and $nd$ disks. */ class SiCentral: public dgs::ReferencePoint { public: /// Default constructor (empty central). SiCentral() {} /** Instantiate a central unit with $nb$ barrels and $nd$ disks. The ideal positions are given in $barrel \_pos$ and $disk \_pos$. */ SiCentral(int nb, float* barrel_zpos, const SiBarrel* proto_barrels, int nd, float* disk_zpos, const SiDisk* proto_disks); /** Instantiate a central unit with $nb$ barrels, $nd$ disks. Construct a central with the barrels and disks specified in the vectors ${\it const std::vector \&barrels}$ and ${\it const std::vector \&disks}$. */ SiCentral(const std::vector& barrel_zpos, const std::vector& barrels, const 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 barrels. int get_barrel_count() const; /// Return a constant reference to the ibarrel-th ibarrel. const SiBarrel* get_barrel(int ib) const; /// Return a modifiable reference to the ibarrel-th ibarrel. SiBarrel* get_mutable_barrel(int ib); /// Return the number of disks. int get_disk_count() const; /// Return a constant reference to the idisk-th idisk. const SiDisk* get_disk(int id) const; /// Return a modifiable reference to the idisk-th idisk. SiDisk* get_mutable_disk(int id); /// Text dump a central unit. friend std::ostream& operator <<(std::ostream& os, const SiCentral& me); friend bool operator <<(const SiCentral& lhs, const SiCentral &rhs); friend bool operator ==(const SiCentral& lhs, const SiCentral &rhs); friend bool operator !=(const SiCentral& lhs, const SiCentral &rhs); private: /// Vector to hold the barrels. std::vector _barrels; /// Vector to hold the disks. std::vector _disks; public: D0_OBJECT_SETUP(SiCentral); }; // Inlines #include #endif //SICENTRAL_HPP