Changeset 2491 for trunk


Ignore:
Timestamp:
11/10/03 11:25:13 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r2490 r2491  
    11                                                 -*-*- END OF LINE -*-*-
    22
    3   2003/11/10: Nicola Galante
     3  2003/11/10: Thomas Bretz
    44 
    55   * macros/dohtml.C:
     
    4545     - removed obsolete include of iosfwd
    4646
     47   * Makefile:
     48     - changed makedepend line size
     49     - renamed shared object from mars.so to libmars.so
     50     - moved shared object from lib-directory to mars root directory
     51     - make all executables load the shared object instead of statically
     52       linking
     53     
     54   * Makefile.conf.darwin, Makefile.conf.linux, Makefile.conf.linux-gnu,
     55     Makefile.conf.osf1, Makefile.conf.osf5.1:
     56     - removed obsolete SUBDIRS in MARS_LIB
     57     
     58   * mars.cc:
     59     - do not show logo if command line arguments are wrong
     60
     61   * macros/rootlogon.C:
     62     - load libmars.so instead of lib/mars.so
     63     - added mreflector to include path
     64     
     65   * mmain/MStatusDisplay.[h,cc]:
     66     - secure UpdateTab with a TMutex
     67     - do not use MGTextView for root versions >= 3.02.05
     68     - fixed a crash when all tabs where deleted, no tab was active
     69       anymore
     70     - show when updating postscript header
     71
    4772
    4873 
     
    5075
    5176   * mhistmc/MHMcTriggerLvl2.[cc,h]:
    52      - Changed binning of histograms fHistLutPseudoSize, fHistLutPseudoSizeNorm,
    53        fHistSizeBiggerCell, fHistSizeBiggerCellNorm to fix an overflow bug
    54      - In method GetHistByName(const TString name): changed the class of the returned object,
    55        now it returns a (TObject *), no more a (TH1F *), in order to return
    56        either (TH1 *) than (TH2 *); changed the order by which it checks the name of the
     77     - Changed binning of histograms fHistLutPseudoSize,
     78       fHistLutPseudoSizeNorm, fHistSizeBiggerCell,
     79       fHistSizeBiggerCellNorm to fix an overflow bug
     80     - In method GetHistByName(const TString name): changed the class
     81       of the returned object, now it returns a (TObject *), no more
     82       a (TH1F *), in order to return either (TH1 *) than (TH2 *);
     83       changed the order by which it checks the name of the
    5784       histogram in order to fix a bug in the lexing
    5885
  • trunk/MagicSoft/Mars/Makefile

    r2487 r2491  
    2020#
    2121
    22 PROGRAMS = readraw merpp star mars
    23 SOLIB    = mars.so
     22#PROGRAMS = readraw merpp mars test mona status
     23PROGRAMS = readraw merpp mars
     24SOLIB    = libmars.so
    2425CINT     = M
    2526
     
    3738SUBDIRS = mbase \
    3839          mmain \
     40          mfilter \
     41          mdata \
     42          mhist \
     43          manalysis \
    3944          mfileio \
    4045          mreflector \
    41           mhist \
    4246          mdatacheck \
    4347          mgeom \
    4448          mimage \
    45           manalysis \
    4649          mmontecarlo \
    4750          mmc \
     
    4952          mgui \
    5053          mranforest \
    51           mdata \
    5254          mhistmc \
    53           mfilter \
    5455          mtools
    5556
     57#          monline \
     58
     59#LIBRARIES = $(SUBDIRS:%=lib/lib%.a)
    5660LIBRARIES = $(SUBDIRS:=.a)
    5761MRPROPERS = $(SUBDIRS:=.mrproper)
     
    6266.SUFFIXES: .c .cc .h .o
    6367
    64 SRCFILES = 
     68SRCFILES =
    6569
    6670SRCS    = $(SRCFILES)
     
    8488        @echo " Linking $(SOLIB) ..."
    8589        $(CXX) $(DYNLIB) $(CXXFLAGS) $(SUBDIRS:=/*.o) $(ROOTGLIBS) -o $@
    86         mv mars.so lib
    8790
    88 $(PROGRAMS): $(LIBRARIES) $(OBJS) $(HEADERS) MCint.o $(PROGRAMS:=.o)
     91$(PROGRAMS): $(SOLIB) $(PROGRAMS:=.o)
    8992        @echo " Linking $@ ..."
    90         $(CXX) $(CXXFLAGS) $@.o $(OBJS) $(MARS_LIB) MCint.o $(ROOTGLIBS) -o $@
     93        $(CXX) $(CXXFLAGS) $(ROOTGLIBS) $(SOLIB) $@.o $(MARS_LIB) -o $@
    9194
    9295#
     
    114117$(LIBRARIES):
    115118        @echo " Creating lib$@:"
    116         (cd $*; make; cd ..; mv $*/$@ lib/lib$@)
     119        (cd $*; make; cd ..; mv $*/$@ lib/lib$@)
     120#       (cd $(@:lib/lib%.a=%); make; cd ..; mv $(@:lib/lib%.a=%)/$(@:lib/lib%=%) $@)
    117121
    118122$(MRPROPERS):
     
    137141        @echo "Making tar-file"
    138142        @root -b -q -l -n tar.C
    139 #       @tar cvf ../mars.tar --exclude=Root .roo trc *
     143#       @tar cvf ../mars.tar --exclude=Root .rootrc *
    140144#       @gzip -9 ../mars.tar
    141145
    142 depend:
     146Makefile.depend:
    143147        (! find ./ Makefile.depend -maxdepth 1 -empty 2> /dev/null && \
    144148        echo " Generating dependancies into Makefile.depend" && \
    145         makedepend -- $(INCLUDES) -- $(PROGRAMS:=.cc) $(SRCS) $(SUBDIRS:=/*.cc) -f- 2> /dev/null | grep -v Cint | grep -v "/usr/" > Makefile.depend && \
     149        makedepend -- $(INCLUDES) -- $(PROGRAMS:=.cc) $(SRCS) $(SUBDIRS:=/*.cc) -w1024 -f- 2> /dev/null | grep -v Cint | grep -v "/usr/" > Makefile.depend && \
    146150        echo " ") || find -maxdepth 0 -true > /dev/null
    147151
    148 Makefile.depend: depend
     152depend: Makefile.depend
    149153
    150154# @endcode
  • trunk/MagicSoft/Mars/Makefile.conf.darwin

    r2263 r2491  
    2929# For producing gmon.out use    '-pg'
    3030
    31 MARS_LIB = -Llib $(SUBDIRS:%=-l%) $(MARSLIBS)
     31#MARS_LIB = -Llib $(SUBDIRS:%=-l%) $(MARSLIBS)
     32MARS_LIB = -Llib $(MARSLIBS)
    3233INCLUDES = -I. $(SUBDIRS:%=-I%)
    3334
  • trunk/MagicSoft/Mars/Makefile.conf.linux

    r2263 r2491  
    2727
    2828# For debugging information use '-g'
    29 # For producing gmon.out use    '-pg'
     29# For producing gmon.out use    '-pg' (needs static linking)
    3030
    31 MARS_LIB = -Llib $(SUBDIRS:%=-l%) $(MARSLIBS)
     31#MARS_LIB = -Llib $(SUBDIRS:%=-l%) $(MARSLIBS)
     32MARS_LIB = -Llib $(MARSLIBS)
    3233INCLUDES = -I. $(SUBDIRS:%=-I%)
    3334
  • trunk/MagicSoft/Mars/Makefile.conf.linux-gnu

    r2264 r2491  
    2121
    2222OPTIM    = -O5 -Wall -fno-rtti -fnonnull-objects -fno-exceptions -fPIC -Wtraditional -Wpointer-arith -Wcast-align -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Woverloaded-virtual
    23 DEBUG    =
     23DEBUG    = 
    2424ARCHDEF  = -D__LINUX__
    2525DYNLIB   = -shared
     
    3232# For producing gmon.out use    '-pg'
    3333
    34 MARS_LIB = -Llib $(SUBDIRS:%=-l%)  $(MARSLIBS)
     34#MARS_LIB = -Llib $(SUBDIRS:%=-l%)  $(MARSLIBS)
     35MARS_LIB = -Llib  $(MARSLIBS)
    3536INCLUDES = -I. $(SUBDIRS:%=-I%)
    3637
  • trunk/MagicSoft/Mars/Makefile.conf.osf1

    r2264 r2491  
    2828DYNLIB   = -shared
    2929
    30 MARS_LIB = -Llib $(SUBDIRS/*/-l&)  $(MARSLIBS)
     30#MARS_LIB = -Llib $(SUBDIRS/*/-l&)  $(MARSLIBS)
     31MARS_LIB = -Llib $(MARSLIBS)
    3132INCLUDES = -I. $(SUBDIRS/*/-I&)
    3233
  • trunk/MagicSoft/Mars/Makefile.conf.osf5.1

    r2264 r2491  
    2828DYNLIB   = -shared
    2929
    30 MARS_LIB = -Llib $(SUBDIRS/*/-l&)  $(MARSLIBS)
     30#MARS_LIB = -Llib $(SUBDIRS/*/-l&)  $(MARSLIBS)
     31MARS_LIB = -Llib $(MARSLIBS)
    3132INCLUDES = -I. $(SUBDIRS/*/-I&)
    3233
  • trunk/MagicSoft/Mars/macros/rootlogon.C

    r2236 r2491  
    2525Bool_t isloaded()
    2626{
    27     TString str = gSystem->GetLibraries("*/mars.so");
     27    TString str = gSystem->GetLibraries("libmars.so");
    2828
    2929    return !str.IsNull();
     
    3535        return;
    3636
    37     cout << "Unloading 'mars.so'... " << flush;
    38     if (gSystem->Unload("mars.so"))
     37    cout << "Unloading 'libmars.so'... " << flush;
     38    if (gSystem->Unload("libmars.so"))
    3939        cout << "error." << endl;
    4040    else
     
    4747        return;
    4848
    49     cout << "Loading 'mars.so'... " << flush;
     49    cout << "Loading 'libmars.so'... " << flush;
    5050
    51     if (gSystem->Load(dir.IsNull() ? "mars.so" : dir+"lib/mars.so")!=0)
     51    if (gSystem->Load(dir.IsNull() ? "libmars.so" : dir+"libmars.so")!=0)
    5252        cout << "error." << endl;
    5353    else
     
    106106    gInterpreter->AddIncludePath(dir+"mranforest");
    107107    gInterpreter->AddIncludePath(dir+"mraw");
     108    gInterpreter->AddIncludePath(dir+"mreflector");
    108109    gInterpreter->AddIncludePath(dir+"mtools");
    109110
  • trunk/MagicSoft/Mars/mars.cc

    r2456 r2491  
    7676int main(int argc, char **argv)
    7777{
    78 #ifdef HAVE_XPM
    79     MLogo logo;
    80     logo.Popup();
    81 #endif
    82 
    8378    StartUpMessage();
    8479
     
    121116    else
    122117        gLog.SetDebugLevel(2);
     118
     119#ifdef HAVE_XPM
     120    MLogo logo;
     121    logo.Popup();
     122#endif
    123123
    124124    //
  • trunk/MagicSoft/Mars/mbase/MLog.cc

    r2232 r2491  
    101101
    102102#ifdef _REENTRANT
     103// FIXME: Replace Mutex by TMutex
    103104#include <pthread.h>
    104105#endif
  • trunk/MagicSoft/Mars/mmain/MStatusDisplay.cc

    r2484 r2491  
    107107
    108108// ------------ Workaround for a non working TGTextView::Search -------------
     109#if ROOT_VERSION_CODE < ROOT_VERSION(3,02,05)
    109110class MGTextView : public TGTextView
    110111{
     
    165166    }
    166167};
     168#else
     169#define MGTextView TGTextView
     170#endif
    167171// --------------------------------------------------------------------------
    168172
     
    566570
    567571    fFont = gVirtualX->LoadQueryFont("7x13bold");
     572    fMutex = new TMutex;
    568573
    569574    //
     
    666671    if (fFont)
    667672        gVirtualX->DeleteFont(fFont);
     673
     674    //
     675    // Delete mutex
     676    //
     677    delete fMutex;
    668678}
    669679
     
    820830
    821831    // layout and map new tab
    822     Layout();
    823     MapSubwindows();
    824     Layout();
     832    Layout();          // seems to layout the TGCompositeFrame
     833    MapSubwindows();   // maps the TGCompositeFrame
     834    Layout();          // layout the embedded canvas in the frame
    825835
    826836    // display new tab in the main frame
     
    864874    // the main thread.
    865875    //
    866     // NOTE: Maybe there is still need to make sure, that only
    867     //       one thread can update the canvas by calling UpdateTab
    868     //       at the same time. Could be done by a TMutex.
    869     //
    870876    if (gThreadXAR)
    871877    {
     
    881887    }
    882888
    883 #if ROOT_VERSION_CODE < ROOT_VERSION(3,10,01)
     889    //
     890    // Secure calls to update the tabs against itself, at least
     891    // c->Paint() or c->Flush() may crash X (bad drawable).
     892    // This makes sure, that a X call is not interuppted by
     893    // another X-call which was started from an gui interrrupt
     894    // in the same thread
     895    //
     896    if (mutex->TryLock()==13)
     897        return;
     898
     899#if ROOT_VERSION_CODE < ROOT_VERSION(3,10,02)
    884900    TPad *padsav = (TPad*)gPad;
    885901    if (!gPad)
     
    897913    c->Flush();                   // Copy all pad pixmaps to the screen
    898914
    899 #if ROOT_VERSION_CODE < ROOT_VERSION(3,10,01)
     915#if ROOT_VERSION_CODE < ROOT_VERSION(3,10,02)
    900916    if (padsav)
    901917        padsav->cd();
     
    903919        gPad=NULL;
    904920#endif
     921
    905922    //c->SetCursor(kCross);
    906923
     
    909926    //c->Update();
    910927    //c->Paint();
     928
     929    mutex->UnLock();
    911930}
    912931
     
    979998
    980999    fTab->RemoveTab(i);
     1000    fTab->SetTab(0);
     1001
     1002    // Looks strange...
     1003    // const Int_t n = fTab->GetNumberOfTabs();
     1004    // fTab->SetTab(i<=n-1 ? i : i-1);
    9811005
    9821006    // layout and map new tab
    983 #if ROOT_VERSION_CODE < ROOT_VERSION(3,03,00)
    984     MapSubwindows();
    985     Layout();
    986 #else
    987     Layout();
    988     MapSubwindows();
    989 #endif
     1007    Layout();          // seems to layout the TGCompositeFrame
     1008    MapSubwindows();   // maps the TGCompositeFrame
     1009    Layout();          // layout the embedded canvas in the frame
    9901010
    9911011    // display new tab in the main frame
     
    18581878
    18591879    ps.Close();
    1860 
    1861     if (num<0)
    1862         *fLog << inf << " - ";
    1863 
    1864     SetStatusLine2("Updating Postscript header...");
    1865     *fLog << inf << "Updating Postscript header..." << flush;
    18661880    UpdatePSHeader(name);
    1867     *fLog << inf << "done." << endl;
    1868 
    18691881
    18701882    gVirtualPS = psave;
  • trunk/MagicSoft/Mars/mmain/MStatusDisplay.h

    r2477 r2491  
    2020class TPad;
    2121class TTimer;
     22class TMutex;
    2223class TCanvas;
    2324
     
    6465    TGLayoutHints    *fLayCanvas;
    6566
    66     TTimer fTimer;
     67    TTimer  fTimer;
     68    TMutex *fMutex;
    6769
    6870    TGStatusBar *fStatusBar;
     
    122124
    123125     void StartUpdate(Int_t millisec=-1);
    124      void StopUpdate();                 
    125      void SetUpdateTime(Long_t t);       
     126     void StopUpdate();
     127     void SetUpdateTime(Long_t t);
    126128
    127129     void SetProgressBarPosition(Float_t p);
Note: See TracChangeset for help on using the changeset viewer.