source: trunk/Cosy/caos/Rings.h@ 17556

Last change on this file since 17556 was 9551, checked in by tbretz, 15 years ago
*** empty log message ***
File size: 1017 bytes
Line 
1#ifndef COSY_Rings
2#define COSY_Rings
3
4#ifndef ROOT_TClonesArray
5#include <TClonesArray.h>
6#endif
7
8#ifndef COSY_Ring
9#include "Ring.h"
10#endif
11
12class Leds;
13
14class Rings : public TClonesArray
15{
16private:
17 Ring fCenter;
18 Short_t fMinNumberLeds;
19
20 void CalcCenters(const Leds &leds, Float_t min, Float_t max);
21
22public:
23 Rings() : TClonesArray("Ring", 1) , fMinNumberLeds(5) { }
24
25 void SetMinNumberLeds(Short_t n) { fMinNumberLeds=n; }
26
27 Int_t CalcRings(Leds &leds, Float_t min=-1, Float_t max=-1);
28
29 void Print(Option_t *o=NULL) const;
30 void Print(Option_t *o1, Option_t *o2) const { TClonesArray::Print(o1, o2); }
31
32 void Print(const Option_t*, Int_t) const { }
33 void Print(const Option_t*, const char*, Int_t) const { }
34 void Print(const Option_t*, TPRegexp&, Int_t) const { }
35
36 const Ring &operator()(int i) const { return *(Ring*)At(i); }
37 Ring &operator()(int i) { return *(Ring*)At(i); }
38
39 const Ring &GetCenter() const { return fCenter; }
40
41 ClassDef(Rings, 1)
42};
43
44#endif
Note: See TracBrowser for help on using the repository browser.