source: trunk/MagicSoft/Mars/mbase/MParList.h@ 984

Last change on this file since 984 was 984, checked in by tbretz, 23 years ago
*** empty log message ***
File size: 2.6 KB
Line 
1#ifndef MPARLIST_H
2#define MPARLIST_H
3
4/////////////////////////////////////////////////////////////////////////////
5// //
6// MParList //
7// //
8// List of parameter containers (MParContainer) //
9// //
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef MAGIC_H
13#include "MAGIC.h"
14#endif
15
16#ifndef ROOT_TOrdCollection
17#include "TOrdCollection.h"
18#endif
19#ifndef MPARCONTAINER_H
20#include "MParContainer.h"
21#endif
22
23#include <TObjArray.h>
24
25class MLog;
26
27class MParList : public MParContainer
28{
29private:
30 TOrdCollection fContainer; // Collection of Parameter and Data Containers
31 TOrdCollection fAutodelete; // All what this list contains is deleted in the destructor
32
33 static TString GetClassName(const char *classname);
34 static TString GetObjectName(const char *classname, const char *objname);
35
36 enum { kIsOwner = BIT(14) };
37
38public:
39 MParList(const char *name=NULL, const char *title=NULL);
40 MParList(MParList &ts);
41
42 ~MParList();
43
44 Bool_t AddToList(MParContainer *obj, MParContainer *where = NULL);
45 void AddToList(TObjArray *list);
46
47 void SetLogStream(MLog *log);
48
49 TObject *FindObject(const char *name) const;
50 TObject *FindObject(TObject *obj) const;
51 MParContainer *FindCreateObj(const char *classname, const char *objname=NULL);
52
53 TObjArray FindObjectList(const char *name, UInt_t first, const UInt_t last) const;
54 TObjArray FindObjectList(const char *name, const UInt_t num) const
55 {
56 return FindObjectList(name, 0, num);
57 }
58
59 TObjArray FindCreateObjList(const char *cname, UInt_t first, const UInt_t last, const char *oname=NULL);
60 TObjArray FindCreateObjList(const char *cname, const UInt_t num, const char *oname=NULL)
61 {
62 return FindCreateObjList(cname, 0, num, oname);
63 }
64
65 static TObjArray CreateObjList(const char *cname, UInt_t first, const UInt_t last, const char *oname=NULL);
66 static TObjArray CreateObjList(const char *cname, const UInt_t num, const char *oname=NULL)
67 {
68 return CreateObjList(cname, 0, num, oname);
69 }
70
71 void Reset();
72 void SetReadyToSave(Bool_t flag=kTRUE);
73
74 void SetOwner(Bool_t enable=kTRUE);
75
76 void Print(Option_t *t = NULL);
77
78 ClassDef(MParList, 0) // list of parameter containers (MParContainer)
79};
80
81#endif
Note: See TracBrowser for help on using the repository browser.