| Line |  | 
|---|
| 1 | #ifndef MARS_MClone | 
|---|
| 2 | #define MARS_MClone | 
|---|
| 3 |  | 
|---|
| 4 | #ifndef MARS_MTask | 
|---|
| 5 | #include "MTask.h" | 
|---|
| 6 | #endif | 
|---|
| 7 |  | 
|---|
| 8 | class MParList; | 
|---|
| 9 |  | 
|---|
| 10 | class MClone : public MTask | 
|---|
| 11 | { | 
|---|
| 12 | private: | 
|---|
| 13 | const TObject *fObject; // pointer to container which has to be cloned | 
|---|
| 14 | TString fObjName;       // given name to search for in the parameterlist | 
|---|
| 15 |  | 
|---|
| 16 | TObject* fClone;        // pointer to the cloned object. deletion is handled by MClone | 
|---|
| 17 |  | 
|---|
| 18 | Bool_t fForceClone; | 
|---|
| 19 |  | 
|---|
| 20 | // MClone | 
|---|
| 21 | void Init(const char *name, const char *title); | 
|---|
| 22 |  | 
|---|
| 23 | // MTask | 
|---|
| 24 | Int_t PreProcess(MParList *pList); | 
|---|
| 25 | Int_t Process(); | 
|---|
| 26 |  | 
|---|
| 27 | public: | 
|---|
| 28 | MClone(const char *obj,    const char *name=NULL, const char *title=NULL); | 
|---|
| 29 | MClone(const TObject *obj, const char *name=NULL, const char *title=NULL); | 
|---|
| 30 | ~MClone(); | 
|---|
| 31 |  | 
|---|
| 32 | // TObject | 
|---|
| 33 | void Clear(Option_t *opt=NULL); | 
|---|
| 34 |  | 
|---|
| 35 | // MClone | 
|---|
| 36 | TObject *GetClone() const  { return fClone; } | 
|---|
| 37 | const TObject *GetObject() const { return fObject; } | 
|---|
| 38 |  | 
|---|
| 39 | void SetForceClone(Bool_t b=kTRUE) { fForceClone = b; } | 
|---|
| 40 |  | 
|---|
| 41 | ClassDef(MClone, 0) // Task to clone (duplicate) an object in memory | 
|---|
| 42 | }; | 
|---|
| 43 |  | 
|---|
| 44 | #endif | 
|---|
| 45 |  | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.