#ifndef __DRCOPTDEVSYS_H__ #define __DRCOPTDEVSYS_H__ /*! \brief Class for representation of a system of optical devices. Optical devices can be combined (coupled) to a system. This system, then can be also multiplicated by the copy constructor. A copy number helps to distingish between all generated systems. */ class DrcOptDevSys { protected: //! Copy number for "copies". int m_copyNumber; //! Name of volume. string m_name; //! Verbosity from 0 to 5. int m_verbosity; //! Flag for photon tracing. mutable bool m_photonTrace; //! Stream for photon tracing. mutable fstream* m_photonTraceStream; //! List of devices. list m_listDev; //! List of devices for couplings. list m_listDev1Coupling; //! List of devices for couplings. list m_listDev2Coupling; //! List of surfaces for couplings. list m_listSurf1Coupling; //! List of surfaces for couplings. list m_listSurf2Coupling; private: /*! \brief Auxiliary function for assignment operator and copy constructor.. \param d The object to copy. */ void copy(const DrcOptDevSys& d); public: //! Constructor DrcOptDevSys(); //! Destructor. virtual ~DrcOptDevSys(); /*! \brief Copy constructor. \param d The object to copy. */ DrcOptDevSys(const DrcOptDevSys& d); /*! \brief Assignment operator. \param d The object to assign. */ DrcOptDevSys& operator=(const DrcOptDevSys& d); /*! \brief List of devices the device system is composed of. \return List. */ list& deviceList(){return m_listDev;}; /*! \brief Set the copy number for this object. This serves for the purpos to distinguisch between several objects generated with a copy constructor. \param i The copy number. */ void setCopyNumber(int i); /*! \brief Copy number for this object. \return The copy number. \sa setCopyNumber */ int copyNumber(){return m_copyNumber;}; /*! \brief Set the name of the volume. \param name The name. */ void setName(string name){m_name=name;}; /*! \brief The name of the volume. \return The name. */ string name(){return m_name;}; /*! \brief Verbosity Set the verbosity. Range is 0 to 5. \verbatim 0=quiet, 1=constructors,destructors, 2=member functions, 3=functionality 4=photons 5=everything \endverbatim \param level The verbosity level */ void setVerbosity(int level){m_verbosity=level;}; /*! \brief Verbosity. \return Verbosity \sa setVerbosity() */ const int verbosity() const {return m_verbosity;}; /*! \brief Add device. \param dev The device. */ void addDevice(const DrcOptDev& dev); /*! \brief Couple two devices such that photons can propagate from one to the other. \param dev1 The first optical device to couple. \param dev2 The second optical device to couple. \param surf1 The surface of dev1 to couple. \param surf2 The surface of dev2 to couple. */ void coupleDevice(string dev1, string dev2, string surf1, string surf2); /*! \brief Write volume coordinates to stream in root syntax. \param stream The stream. */ void print(fstream& stream) const; //! Print out pointers and names of volumes, surfaces... void print(); /*! \brief Set print color for root objects. All subobjects of this object will get the chosen color for printing with root. \param col The chosen color. \sa DrcSurfAbs::setPrintColor() */ void setPrintColor(int col); /*! \brief Add transformation The tranform from the root framework is a rotation followed by a shift and is represented by a 4x4 matrix, rotation + shift vector. \param trans The transformation. */ virtual void addTransform(const Transform3D& trans); }; #endif