Changeset 19273


Ignore:
Timestamp:
Oct 22, 2018, 9:40:28 PM (7 months ago)
Author:
tbretz
Message:
A lot of code became obsolete with root 6.
Location:
trunk/Mars/mbase
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mbase/MTaskInteractive.cc

    r19262 r19273  
    1616!
    1717!
    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>
    1919!
    20 !   Copyright: MAGIC Software Development, 2000-2003
     20!   Copyright: MAGIC Software Development, 2000-2018
    2121!
    2222!
     
    6262#if ROOT_VERSION_CODE < ROOT_VERSION(6,00,00)
    6363#include <Api.h>
     64#include <TMethodCall.h>
    6465#endif
    65 #include <TMethodCall.h>
    6666
    6767#include "MLog.h"
     
    8282    fTitle = title ? title : "Interactive task";
    8383
     84#if ROOT_VERSION_CODE < ROOT_VERSION(6,00,00)
    8485    fCall[0] = 0;
    8586    fCall[1] = 0;
    8687    fCall[2] = 0;
    8788    fCall[3] = 0;
     89#endif
    8890}
    8991
     
    100102}
    101103
     104#if ROOT_VERSION_CODE < ROOT_VERSION(6,00,00)
    102105// --------------------------------------------------------------------------
    103106//
     
    128131Bool_t MTaskInteractive::Set(void *fcn, Int_t no, const char *params)
    129132{
    130 #if ROOT_VERSION_CODE < ROOT_VERSION(6,00,00)
    131133    // this function is called by CINT instead of the function above
    132134    if (!fcn)
     
    162164
    163165    return kTRUE;
    164 #else
    165     gLog << err << "MTaskInteractive::Set not yet supported for root 6." << endl;
    166     return kFALSE;
    167 #endif
    168166}
    169167
     
    179177    fCall[no] = 0;
    180178}
     179#endif
  • trunk/Mars/mbase/MTaskInteractive.h

    r7184 r19273  
    1212{
    1313private:
     14#if ROOT_VERSION_CODE < ROOT_VERSION(6,00,00)
    1415    TMethodCall *fCall[4];
     16#endif
    1517
    1618    Int_t  (*fPreProcess)(MParList *list);
     
    1921    Bool_t (*fReInit)(MParList *list);
    2022
     23#if ROOT_VERSION_CODE < ROOT_VERSION(6,00,00)
    2124    Int_t  PreProcess(MParList *list) { if (fCall[0]) return Return(0, &list); return fPreProcess  ? (*fPreProcess)(list) : kTRUE; }
    2225    Int_t  Process()                  { if (fCall[1]) return Return(1);        return fProcess     ? (*fProcess)()        : kTRUE; }
     
    2427    Bool_t ReInit(MParList *list)     { if (fCall[3]) return Return(3, &list); return fReInit      ? (*fReInit)(list)     : kTRUE; }
    2528
    26     Int_t Return(Int_t no, void *param=NULL);
     29    Int_t  Return(Int_t no, void *param=NULL);
    2730    Bool_t Set(void *fcn, Int_t no, const char *params);
    2831    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
    2940
    3041public:
     
    3849    void SetReInit(Bool_t (*func)(MParList *list))    { fReInit      = func; Free(3); }
    3950
     51#if ROOT_VERSION_CODE < ROOT_VERSION(6,00,00)
    4052    // This is for usage in CINT
    4153    void SetPreProcess(void *fcn)  { Set(fcn, 0, "MParList*"); fPreProcess =0; }
     
    4355    void SetPostProcess(void *fcn) { Set(fcn, 2, "");          fPostProcess=0; }
    4456    void SetReInit(void *fcn)      { Set(fcn, 3, "MParList*"); fReInit     =0; }
     57#endif
    4558
    4659    ClassDef(MTaskInteractive, 0) // Interactive task
Note: See TracChangeset for help on using the changeset viewer.