Changeset 19273 for trunk/Mars/mbase
- Timestamp:
- 10/22/18 21:40:28 (6 years ago)
- Location:
- trunk/Mars/mbase
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mbase/MTaskInteractive.cc
r19262 r19273 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz, 6/2003 <mailto:tbretz@ astro.uni-wuerzburg.de>18 ! Author(s): Thomas Bretz, 6/2003 <mailto:tbretz@physik.rwth-aachen.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-20 0320 ! Copyright: MAGIC Software Development, 2000-2018 21 21 ! 22 22 ! … … 62 62 #if ROOT_VERSION_CODE < ROOT_VERSION(6,00,00) 63 63 #include <Api.h> 64 #include <TMethodCall.h> 64 65 #endif 65 #include <TMethodCall.h>66 66 67 67 #include "MLog.h" … … 82 82 fTitle = title ? title : "Interactive task"; 83 83 84 #if ROOT_VERSION_CODE < ROOT_VERSION(6,00,00) 84 85 fCall[0] = 0; 85 86 fCall[1] = 0; 86 87 fCall[2] = 0; 87 88 fCall[3] = 0; 89 #endif 88 90 } 89 91 … … 100 102 } 101 103 104 #if ROOT_VERSION_CODE < ROOT_VERSION(6,00,00) 102 105 // -------------------------------------------------------------------------- 103 106 // … … 128 131 Bool_t MTaskInteractive::Set(void *fcn, Int_t no, const char *params) 129 132 { 130 #if ROOT_VERSION_CODE < ROOT_VERSION(6,00,00)131 133 // this function is called by CINT instead of the function above 132 134 if (!fcn) … … 162 164 163 165 return kTRUE; 164 #else165 gLog << err << "MTaskInteractive::Set not yet supported for root 6." << endl;166 return kFALSE;167 #endif168 166 } 169 167 … … 179 177 fCall[no] = 0; 180 178 } 179 #endif -
trunk/Mars/mbase/MTaskInteractive.h
r7184 r19273 12 12 { 13 13 private: 14 #if ROOT_VERSION_CODE < ROOT_VERSION(6,00,00) 14 15 TMethodCall *fCall[4]; 16 #endif 15 17 16 18 Int_t (*fPreProcess)(MParList *list); … … 19 21 Bool_t (*fReInit)(MParList *list); 20 22 23 #if ROOT_VERSION_CODE < ROOT_VERSION(6,00,00) 21 24 Int_t PreProcess(MParList *list) { if (fCall[0]) return Return(0, &list); return fPreProcess ? (*fPreProcess)(list) : kTRUE; } 22 25 Int_t Process() { if (fCall[1]) return Return(1); return fProcess ? (*fProcess)() : kTRUE; } … … 24 27 Bool_t ReInit(MParList *list) { if (fCall[3]) return Return(3, &list); return fReInit ? (*fReInit)(list) : kTRUE; } 25 28 26 Int_t Return(Int_t no, void *param=NULL);29 Int_t Return(Int_t no, void *param=NULL); 27 30 Bool_t Set(void *fcn, Int_t no, const char *params); 28 31 void Free(Int_t no); 32 #else 33 Int_t PreProcess(MParList *list) { return fPreProcess ? (*fPreProcess)(list) : kTRUE; } 34 Int_t Process() { return fProcess ? (*fProcess)() : kTRUE; } 35 Int_t PostProcess() { return fPostProcess ? (*fPostProcess)() : kTRUE; } 36 Bool_t ReInit(MParList *list) { return fReInit ? (*fReInit)(list) : kTRUE; } 37 38 void Free(Int_t) { } 39 #endif 29 40 30 41 public: … … 38 49 void SetReInit(Bool_t (*func)(MParList *list)) { fReInit = func; Free(3); } 39 50 51 #if ROOT_VERSION_CODE < ROOT_VERSION(6,00,00) 40 52 // This is for usage in CINT 41 53 void SetPreProcess(void *fcn) { Set(fcn, 0, "MParList*"); fPreProcess =0; } … … 43 55 void SetPostProcess(void *fcn) { Set(fcn, 2, ""); fPostProcess=0; } 44 56 void SetReInit(void *fcn) { Set(fcn, 3, "MParList*"); fReInit =0; } 57 #endif 45 58 46 59 ClassDef(MTaskInteractive, 0) // Interactive task
Note:
See TracChangeset
for help on using the changeset viewer.