Changeset 1802 for trunk/MagicSoft/Cosy/caos/Rings.cc
- Timestamp:
- 03/02/03 16:55:47 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/caos/Rings.cc
r1798 r1802 1 1 #include "Rings.h" 2 3 #include <iostream.h> 2 4 3 5 #include "Led.h" … … 6 8 ClassImp(Rings); 7 9 8 Int_tRings::CalcCenters(const Leds &leds)10 void Rings::CalcCenters(const Leds &leds) 9 11 { 10 12 int nPoints = leds.GetEntries(); … … 15 17 for (int k=j+1; k<nPoints; k++) 16 18 { 17 Ring &ring = * (Ring*)(*this)[n];19 Ring &ring = *new ((*this)[n]) Ring; 18 20 19 ring.CalcCenter(leds, i, j, k); 21 if (!ring.CalcCenter(leds, i, j, k)) 22 { 23 RemoveAt(n); 24 continue; 25 } 20 26 21 27 n++; 22 28 } 23 return n; 29 30 Expand(n); 24 31 } 25 32 … … 31 38 32 39 // 33 // angles v and relative angle w40 // angles v 34 41 // 35 for (int j=0; j<leds.GetEntries(); j++) 42 const int n=leds.GetEntries(); 43 44 for (int j=0; j<n; j++) 36 45 leds(j).CalcPhi(fCenter); 37 46 } 47 48 void Rings::Print(Option_t *o=NULL) const 49 { 50 cout << "Number of Rings: " << GetEntries() << endl; 51 TClonesArray::Print(); 52 cout << "Center: " << endl; 53 fCenter.Print(); 54 }
Note:
See TracChangeset
for help on using the changeset viewer.