00001 #if !defined(LATTICE_LATTICELINK_H) 00002 #define LATTICE_LATTICELINK_H 00003 // -*- C++ -*- 00004 // 00005 // Package: Lattice 00006 // Module: LatticeLink 00007 // 00008 // Description: Declare lattice link class. 00009 // 00010 // Usage: Included by LatticeBase.h. Most interface is there. 00011 // 00012 // Author: Jon Thaler 00013 // Created: Sat Apr 4 07:03:03 EST 1998 00014 // $Id: LatticeLink.h,v 1.2 2000/05/10 10:07:04 west Exp $ 00015 // 00016 // Minos Revision History 00017 // 00018 // This file has been converted automatically from the corresponding CLEO 00019 // Lattice code by Nick West on: 14/03/2000 08:38:07 00020 // 00021 // It is being used to explore the possibility that a modified Lattice 00022 // can be used in MINOS. The main changes are:- 00023 // 00024 // 1) The removal Lattice templates classes:- 00025 // 00026 // a) LinkData is dummy 00027 // b) Left and Right ID types are void* 00028 // 00029 // 2) Conversion of CLEO types and includes to MINOS equivalents 00030 // e.g.:- 00031 // 00032 // a) DABoolean -> Bool_t 00033 // b) report -> MSG 00034 #include "Lattice/LatticeDef.h" 00035 00036 // 00037 00038 // 00039 // 00040 00041 //=================================================================== 00042 //-------------------------------------------------------+ 00043 // Define the default (empty) Lattice link data class. | 00044 //-------------------------------------------------------+ 00045 class DefaultLinkData 00046 {}; 00047 00048 //=================================================================== 00049 class LatticeLink 00050 { 00051 public: 00052 00053 //------------------------------------------------+ 00054 // Friend classes and functions | 00055 // LatticeBase class has control of LatticeLink. | 00056 //------------------------------------------------+ 00057 friend class LatticeBase; 00058 00059 //----------+ 00060 // typedefs | 00061 //----------+ 00062 typedef LatticeBase Lattice; 00063 typedef LatticeLeftNode LeftNode; 00064 typedef LatticeRightNode RightNode; 00065 00066 typedef LatticeDef::LeftID LeftID; 00067 typedef LatticeDef::RightID RightID; 00068 00069 typedef LatticeDef::VectorLeftID VectorLeftID; 00070 typedef LatticeDef::VectorRightID VectorRightID; 00071 typedef LatticeDef::LinkData LinkData; 00072 00073 //-------------+ 00074 // Data access | 00075 //-------------+ 00076 // Retrieve the link data. 00077 LinkData& linkData(); 00078 const LinkData& linkData() const; 00079 00080 // Retrieve the vector of data on the left or right side of the link. 00081 const VectorLeftID& vLeftID () const; 00082 const VectorRightID& vRightID() const; 00083 00084 // Retrieve the one datum on the left or right side of the link. 00085 const LeftID* leftID () const; 00086 const RightID* rightID() const; 00087 00088 // Display the link. 00089 void show(ostream&) const; 00090 00091 protected: 00092 private: 00093 //-----------------------------+ 00094 // Constructors and destructor | 00095 // Only Lattice has access. | 00096 //-----------------------------+ 00097 LatticeLink(LeftNode*, RightNode*); 00098 LatticeLink(LeftNode*, RightNode*, const LinkData&); 00099 ~LatticeLink(); 00100 00101 //--------------------------------------+ 00102 // Disabled constructors and assignment | 00103 //--------------------------------------+ 00104 LatticeLink(); 00105 LatticeLink(const LatticeLink&); 00106 const LatticeLink& operator = (const LatticeLink&); 00107 00108 //--------------------------------------------------------+ 00109 // Member data: | 00110 // m_LinkData The user specified link data object. | 00111 // m_VLeftID Vector of left IDs attached to this link. | 00112 // m_VRightID " " right " " " " " | 00113 //--------------------------------------------------------+ 00114 LinkData& m_LinkData; 00115 VectorLeftID& m_VLeftID; 00116 VectorRightID& m_VRightID; 00117 }; 00118 00119 #endif /* LATTICE_LATTICELINK_H */
1.3.9.1