source: trunk/MagicSoft/Mars/mbase/MClone.h@ 5456

Last change on this file since 5456 was 2206, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 964 bytes
Line 
1#ifndef MARS_MClone
2#define MARS_MClone
3
4#ifndef MARS_MAGIC
5#include "MAGIC.h"
6#endif
7
8#ifndef MARS_MTask
9#include "MTask.h"
10#endif
11
12class MParList;
13
14class MClone : public MTask
15{
16private:
17 const TObject *fObject; // pointer to container which has to be cloned
18 TString fObjName; // given name to search for in the parameterlist
19
20 TObject* fClone; // pointer to the cloned object. deletion is handled by MClone
21
22 void Init(const char *name, const char *title);
23
24public:
25 MClone(const char *obj, const char *name=NULL, const char *title=NULL);
26 MClone(const TObject *obj, const char *name=NULL, const char *title=NULL);
27 ~MClone();
28
29 Int_t PreProcess(MParList *pList);
30 Int_t Process();
31
32 TObject *GetClone() const { return fClone; }
33 const TObject *GetObject() const { return fObject; }
34
35 void Clear(Option_t *opt=NULL);
36
37 ClassDef(MClone, 0) // Task to clone (duplicate) an object in memory
38};
39
40#endif
41
Note: See TracBrowser for help on using the repository browser.