00001 #if !defined(LATTICE_LATTICENODE_H) 00002 #define LATTICE_LATTICENODE_H 00003 // -*- C++ -*- 00004 // 00005 // Package: Lattice 00006 // Module: LatticeNode 00007 // 00008 // Description: Declare lattice node class. 00009 // 00010 // Usage: Included by LatticeBase.h. 00011 // The actual implementation is a pair of classes, LatticeLeftNode and 00012 // LatticeRightNode. Perhaps this dichotomy can be eliminated. 00013 // The constructors are private, so only LatticeBase can make new nodes. 00014 // 00015 // See the web documentation: 00016 // http://www.lns.cornell.edu/restricted/CLEO/CLEO3/soft/ 00017 // 00018 // Author: Jon Thaler 00019 // Created: Sat Apr 4 07:03:03 EST 1998 00020 // $Id: LatticeNode.h,v 1.2 2000/05/10 10:07:04 west Exp $ 00021 // 00022 // Minos Revision History 00023 // 00024 // This file has been converted automatically from the corresponding CLEO 00025 // Lattice code by Nick West on: 14/03/2000 08:38:07 00026 // 00027 // It is being used to explore the possibility that a modified Lattice 00028 // can be used in MINOS. The main changes are:- 00029 // 00030 // 1) The removal Lattice templates classes:- 00031 // 00032 // a) LinkData is dummy 00033 // b) Left and Right ID types are void* 00034 // 00035 // 2) Conversion of CLEO types and includes to MINOS equivalents 00036 // e.g.:- 00037 // 00038 // a) DABoolean -> Bool_t 00039 // b) report -> MSG 00040 #include "Lattice/LatticeDef.h" 00041 00042 // 00043 00044 // 00045 // 00046 00047 //============================================================== 00048 //------------------+ 00049 // LatticeLeftNode: | 00050 //------------------+ 00051 class LatticeLeftNode 00052 { 00053 public: 00054 //-----------------------------------------------------+ 00055 // friend classses and functions | 00056 // Lattice base class has control of LatticeLeftNode. | 00057 //-----------------------------------------------------+ 00058 friend class LatticeBase; 00059 00060 //----------+ 00061 // typedefs | 00062 //----------+ 00063 typedef LatticeBase Lattice; 00064 typedef LatticeLink Link; 00065 typedef LatticeLeftNode LeftNode; 00066 typedef LatticeRightNode RightNode; 00067 00068 typedef LatticeDef::LeftID LeftID; 00069 typedef LatticeDef::RightID RightID; 00070 00071 typedef LatticeDef::VectorLeftID VectorLeftID; 00072 typedef LatticeDef::VectorRightID VectorRightID; 00073 typedef LatticeDef::Links Links; 00074 00075 typedef VectorLeftID ::const_iterator LeftItr; 00076 typedef VectorRightID::const_iterator RightItr; 00077 typedef Links ::const_iterator LinkItr; 00078 00079 //----------+ 00080 // Methods. | 00081 //----------+ 00082 const Links& links () const; 00083 Bool_t isLinkedTo (RightID) const; 00084 Bool_t sharesLinksWith(LeftID) const; 00085 LeftID identifier () const; 00086 void show (ostream&) const; 00087 00088 protected: 00089 private: 00090 //---------------------------+ 00091 // Constructors & destructor | 00092 //---------------------------+ 00093 LatticeLeftNode(const LatticeDef::StoreType&); 00094 LatticeLeftNode(LeftID); 00095 ~LatticeLeftNode(); 00096 00097 //------------------------------------+ 00098 // Disabled constructors & assignment | 00099 // No definitions in the .cc file. | 00100 //------------------------------------+ 00101 LatticeLeftNode(); 00102 LatticeLeftNode(const LatticeLeftNode&); 00103 const LatticeLeftNode& operator = (const LatticeLeftNode&); 00104 00105 //-------------+ 00106 // Member data | 00107 //-------------+ 00108 Links& m_Links; 00109 VectorLeftID& m_VLeftID; 00110 VectorRightID& m_VRightID; 00111 const LeftID m_ID; 00112 }; 00113 00114 //============================================================== 00115 //-------------------+ 00116 // LatticeRightNode: | 00117 //-------------------+ 00118 class LatticeRightNode 00119 {public: 00120 00121 //-------------------------------------------------+ 00122 // friend classses and functions | 00123 // Lattice class has control of LatticeRightNode. | 00124 //-------------------------------------------------+ 00125 friend class LatticeBase; 00126 00127 //----------+ 00128 // typedefs | 00129 //----------+ 00130 typedef LatticeBase Lattice; 00131 typedef LatticeLink Link; 00132 typedef LatticeLeftNode LeftNode; 00133 typedef LatticeRightNode RightNode; 00134 00135 typedef LatticeDef::LeftID LeftID; 00136 typedef LatticeDef::RightID RightID; 00137 00138 typedef LatticeDef::VectorLeftID VectorLeftID; 00139 typedef LatticeDef::VectorRightID VectorRightID; 00140 typedef LatticeDef::Links Links; 00141 00142 typedef VectorLeftID ::const_iterator LeftItr; 00143 typedef VectorRightID::const_iterator RightItr; 00144 typedef Links ::const_iterator LinkItr; 00145 00146 //----------+ 00147 // Methods. | 00148 //----------+ 00149 const Links& links () const; 00150 Bool_t isLinkedTo (LeftID) const; 00151 Bool_t sharesLinksWith(RightID) const; 00152 RightID identifier () const; 00153 void show (ostream&) const; 00154 00155 protected: 00156 private: 00157 //-----------------------------+ 00158 // Constructors and destructor | 00159 //-----------------------------+ 00160 LatticeRightNode(const LatticeDef::StoreType&); 00161 LatticeRightNode(RightID); 00162 ~LatticeRightNode(); 00163 00164 //------------------------------------+ 00165 // Disabled constructors & assignment | 00166 //------------------------------------+ 00167 LatticeRightNode(); 00168 LatticeRightNode(const LatticeRightNode&); 00169 const LatticeRightNode& operator = (const LatticeRightNode&); 00170 00171 //--------------+ 00172 // Member data: | 00173 //--------------+ 00174 Links& m_Links; 00175 VectorRightID& m_VRightID; 00176 VectorLeftID& m_VLeftID; 00177 const RightID m_ID; 00178 }; 00179 00180 #endif /* LATTICE_LATTICENODE_H */
1.3.9.1