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

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