#ifndef COSY_Leds
#define COSY_Leds

#ifndef ROOT_TClonesArray
#include <TClonesArray.h>
#endif

class Led;

class Leds : public TClonesArray
{
public:
    Leds() : TClonesArray("Led", 1) {}

    //
    // leds.ExpandCreate(5);
    // for (int i=1; i<5; i++)
    //    leds.Set(i, x, y, dx, dy, mag);
    //

    void Set(Int_t i, Double_t x, Double_t y, Double_t dx, Double_t dy, Double_t mag);

    //nst Led &GetLed(int i) const { return *(Led*)( (*this)[i] ); }

    const Led &operator()(int i) const { return *(Led*)At(i); }
    Led &operator()(int i) { return *(Led*)At(i); }

    void Print(Option_t *o=NULL) const;

    ClassDef(Leds, 1)
};

#endif
