#ifndef MPARLIST_H
#define MPARLIST_H

#ifndef MAGIC_H
#include "MAGIC.h"
#endif

#include <iostream.h>

#ifndef ROOT_TOrdCollection
#include "TOrdCollection.h"
#endif

class MParContainer;

class MParList : public TObject
{
private:
    TIter *fNext;               //!
    TOrdCollection fContainer;	// Collection of Parameter and Data Containers

public:
    MParList();
    MParList(MParList &ts);

    ~MParList()
    {
        if (fNext)
            delete fNext;
    }

    Bool_t AddToList(MParContainer *obj, MParContainer *where = NULL);

    TObject *FindObject(const char *name) const;

    void Reset()
    {
        fNext = new TIter(&fContainer);
    }

    MParContainer *Next()
    {
        return (MParContainer*)(*fNext)();
    }

    void Print(Option_t *t = NULL);

    ClassDef(MParList, 1)	// list of Parameter Containers
};

#endif
