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

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