#include <NavGenLattice.h>
Inheritance diagram for NavGenLattice:

Public Types | |
| typedef NavPrimerGenerator::KeyFunc | KeyFunc |
Public Member Functions | |
| NavGenLattice (const Char_t *leftClass, KeyFunc leftKey, const Char_t *rightClass, KeyFunc rightKey, Int_t rship=0) | |
| ~NavGenLattice () | |
Private Member Functions | |
| NavGenLattice (const NavGenLattice &) | |
| const void * | GetSetPtr () const |
| Bool_t | IsLattice () const |
| void | Clear () |
| void | Rebuild () |
Private Attributes | |
| Lattice * | fLattice |
| KeyFunc | fLeftKey |
| KeyFunc | fRightKey |
|
|
Reimplemented from NavPrimerGenerator. Definition at line 25 of file NavGenLattice.h. |
|
||||||||||||||||||||||||
|
Definition at line 75 of file NavGenLattice.cxx. References LEA_CTOR. 00079 : 00080 00081 NavPrimerGenerator(leftClass,rightClass,rship), 00082 fLattice(0), 00083 fLeftKey(leftKey), 00084 fRightKey(rightKey) 00085 00086 00087 { 00088 // 00089 // 00090 // Purpose: Constructor 00091 // 00092 // Arguments: 00093 // leftClass in Name of left class. 00094 // leftKey in Key function for left class 00095 // rightClass in Name of right class. 00096 // rightKey in Key function for right class 00097 // rship in Relationship number. 00098 // 00099 // Return: n/a 00100 // 00101 // Contact: N. West 00102 // 00103 // Specification:- 00104 // ============= 00105 // 00106 // o Create a NavGenLattice. 00107 00108 // Program Notes:- 00109 // ============= 00110 00111 // None. 00112 00113 LEA_CTOR //Leak Checker 00114 00115 } //.....................................................................
|
|
|
Definition at line 118 of file NavGenLattice.cxx. References Clear(), and LEA_DTOR. 00119 {
00120 //
00121 //
00122 // Purpose: Destructor
00123 //
00124 // Arguments:
00125 // None.
00126 //
00127 // Return: n/a
00128 //
00129 // Contact: N. West
00130 //
00131 // Specification:-
00132 // =============
00133 //
00134 // o Destroy a NavGenLattice.
00135
00136 // Program Notes:-
00137 // =============
00138
00139 // None.
00140
00141 LEA_DTOR //Leak Checker
00142
00143 Clear();
00144
00145 }
|
|
|
|
|
|
Implements NavPrimerGenerator. Definition at line 46 of file NavGenLattice.cxx. Referenced by Rebuild(), and ~NavGenLattice(). 00046 {
00047 //
00048 //
00049 // Purpose: Clear any dynamic data.
00050 //
00051 // Arguments: None
00052 //
00053 // Return: n/a
00054 //
00055 // Contact: N. West
00056 //
00057 // Specification:-
00058 // =============
00059 //
00060 // o Drop Lattice.
00061 //
00062
00063 // Program Notes:-
00064 // =============
00065
00066 // None.
00067
00068 if ( fLattice ) delete fLattice;
00069 fLattice = 0;
00070
00071 }
|
|
|
Implements NavPrimerGenerator. Definition at line 46 of file NavGenLattice.h. 00046 { return fLattice; }
|
|
|
Implements NavPrimerGenerator. Definition at line 47 of file NavGenLattice.h. 00047 { return kTRUE; };
|
|
|
Implements NavPrimerGenerator. Definition at line 148 of file NavGenLattice.cxx. References LatticeBuilder::AddPrimary(), LatticeBuilder::AddSecondary(), Clear(), NavPrimer::FindTCollection(), fLattice, NavKey::ForceLong_t(), NavPrimer::Instance(), NavPrimerGenerator::LeftClass(), MSG, and NavPrimerGenerator::RightClass(). 00148 {
00149 //
00150 //
00151 // Purpose: Rebuild Lattice.
00152 //
00153 // Arguments: None.
00154 //
00155 // Return: n/a
00156 //
00157 // Contact: N. West
00158 //
00159 // Specification:-
00160 // =============
00161 //
00162 // o Rebuild Lattice.
00163
00164 // Program Notes:-
00165 // =============
00166
00167 // None.
00168
00169
00170 // Remove old Lattice.
00171
00172 Clear();
00173
00174 // Create new empty Lattice for current event.
00175
00176 const Char_t* leftClass = LeftClass();
00177 const Char_t* rightClass = RightClass();
00178
00179 fLattice = new Lattice(leftClass,
00180 rightClass,
00181 LatticeBase::RLinkMulti);
00182
00183 // Make sure we can find both ROOT containers.
00184
00185 const TCollection* leftCol = NavPrimer::Instance()
00186 ->FindTCollection(leftClass);
00187 const TCollection* rightCol = NavPrimer::Instance()
00188 ->FindTCollection(rightClass);
00189
00190 if ( ! leftCol ) MSG("Nav",Msg::kError)
00191 << "Cannot find ROOT container for: " << leftClass << endl;
00192 if ( ! rightCol ) MSG("Nav",Msg::kError)
00193 << "Cannot find ROOT container for: " << rightClass << endl;
00194
00195 if ( ! leftCol || ! rightCol ) return;
00196
00197
00198
00199 // Prepare a builder.
00200
00201 LatticeBuilder builder( fLattice, Lattice::kLeft );
00202
00203
00204 // Iterate over left class objects and give their keys to the builder.
00205
00206 TIter leftItr(leftCol);
00207 while ( TObject* leftObj = leftItr() ) {
00208 NavKey key = (*fLeftKey)(leftObj);
00209
00210 builder.AddPrimary(key.ForceLong_t(), leftObj);
00211 }
00212
00213 // Iterate over right class objects and give their associated keys
00214 // to the builder.
00215
00216 TIter rightItr(rightCol);
00217 while ( TObject* rightObj = rightItr() ) {
00218 NavKey key = (*fRightKey)(rightObj);
00219 builder.AddSecondary(key.ForceLong_t(), rightObj);
00220 }
00221
00222
00223 }
|
|
|
Definition at line 58 of file NavGenLattice.h. Referenced by Rebuild(). |
|
|
Definition at line 60 of file NavGenLattice.h. |
|
|
Definition at line 61 of file NavGenLattice.h. |
1.3.9.1