Changeset 7787 for trunk/MagicSoft


Ignore:
Timestamp:
07/11/06 20:45:10 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Cosy
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Cosy/Changelog

    r7785 r7787  
    11                                                                  -*-*- END -*-*-
     2 2006/07/11 Thomas Bretz (La Palma)
     3
     4   * Makefile:
     5     - changed to support linking with the libmars.so instead
     6       of compiling a lot of stuff itself
     7
     8   * Makefile.conf.general: 
     9     - added -DMARSVER
     10
     11   * base/BaseLinkDef.h:
     12     - removed the now obsolete pragma
     13
     14   * base/Makefile
     15     - removed the now obsolete files
     16
     17   * candrv/Makefile, caos/Makefile, catalog/Makefile,
     18     videodev/Makefile, devdrv/Makefile, gui/Makefile,
     19     main/Makefile, tcpip/Makefile:
     20     - added the new mars include directory
     21
     22   * caos/Leds.h, caos/Rings.h:
     23     - added an overwrite for Print to make the compiler happy
     24
     25   * catalog/StarCatalog.cc:
     26     - small improvements to determination of image border
     27       by using min- and max-functions
     28
     29   * gui/MGCoordinate.cc:
     30     - small improvement to layout
     31
     32   * gui/MGImage.cc:
     33     - fixed 16bit-color mode. The encoding was just wrong
     34
     35   * videodev/Camera.cc:
     36     - unlock the tread after the broadcast. The reason why it
     37       is neccessary in root 4.04/02g to make cosy work is
     38       unknown. Anyhow it makes switching the cameras more robust
     39
     40
     41
    242 2006/07/11 Daniela Dorner
    343
  • trunk/MagicSoft/Cosy/Makefile

    r4107 r7787  
    2323SOLIB    = cosy.so
    2424CINT     = M
    25 INCLUDES = -I. -Imain  -Ibase -Icandrv -Iincl -Igui -Ivideodev -Icatalog -Idevdrv
    26 LIBS     = -lpng -lz -L/usr/X11R6/lib -lpthread
     25INCLUDES = -I. -Imain  -Ibase -Icandrv -Iincl -Igui -Ivideodev -Icatalog -Idevdrv -Imars
     26LIBS     = -lpng -lz -L/usr/X11R6/lib -lpthread libmars.so
    2727
    2828#
     
    126126
    127127links:
    128         @ln -sf ../../Mars/mbase/MAGIC.h base/MAGIC.h
    129         @ln -sf ../../Mars/mbase/MLog.h  base/MLog.h
    130         @ln -sf ../../Mars/mbase/MLog.cc base/MLog.cc
    131         @ln -sf ../../Mars/mbase/MLogPlugin.h  base/MLogPlugin.h
    132         @ln -sf ../../Mars/mbase/MLogPlugin.cc base/MLogPlugin.cc
    133         @ln -sf ../../Mars/mbase/MLogManip.h  base/MLogManip.h
    134         @ln -sf ../../Mars/mbase/MLogManip.cc base/MLogManip.cc
    135         @ln -sf ../../Mars/mbase/MGList.h  base/MGList.h
    136         @ln -sf ../../Mars/mbase/MGList.cc base/MGList.cc
    137         @ln -sf ../../Mars/mbase/MTime.h  base/MTime.h
    138         @ln -sf ../../Mars/mbase/MTime.cc base/MTime.cc
    139         @ln -sf ../../Mars/mbase/MParContainer.h  base/MParContainer.h
    140         @ln -sf ../../Mars/mbase/MParContainer.cc base/MParContainer.cc
    141         @ln -sf ../../Mars/mbase/MString.h  base/MString.h
    142         @ln -sf ../../Mars/mbase/MString.cc base/MString.cc
    143         @ln -sf ../../Mars/mbase/MGMap.h  base/MGMap.h
    144         @ln -sf ../../Mars/mbase/MGMap.cc base/MGMap.cc
    145         @ln -sf ../../Mars/mbase/MGMenu.h  base/MGMenu.h
    146         @ln -sf ../../Mars/mbase/MGMenu.cc base/MGMenu.cc
    147         @ln -sf ../../Mars/mbase/MString.h  base/MString.h
    148         @ln -sf ../../Mars/mbase/MString.cc base/MString.cc
    149         @ln -sf ../../Mars/mgeom/MGeomMirror.h  base/MGeomMirror.h
    150         @ln -sf ../../Mars/mgeom/MGeomMirror.cc  base/MGeomMirror.cc
    151         @ln -sf ../../Mars/mgeom/MGeomCam.h  base/MGeomCam.h
    152         @ln -sf ../../Mars/mgeom/MGeomCam.cc base/MGeomCam.cc
    153         @ln -sf ../../Mars/mgeom/MGeomPix.h  base/MGeomPix.h
    154         @ln -sf ../../Mars/mgeom/MGeomPix.cc base/MGeomPix.cc
    155         @ln -sf ../../Mars/mgeom/MGeomCamMagic.h  base/MGeomCamMagic.h
    156         @ln -sf ../../Mars/mgeom/MGeomCamMagic.cc base/MGeomCamMagic.cc
    157         @ln -sf ../../Mars/mastro/MAstro.h  base/MAstro.h
    158         @ln -sf ../../Mars/mastro/MAstro.cc base/MAstro.cc
    159         @ln -sf ../../Mars/mastro/MAstroCatalog.h  base/MAstroCatalog.h
    160         @ln -sf ../../Mars/mastro/MAstroCatalog.cc base/MAstroCatalog.cc
    161         @ln -sf ../../Mars/mastro/MAstroCamera.h  base/MAstroCamera.h
    162         @ln -sf ../../Mars/mastro/MAstroCamera.cc base/MAstroCamera.cc
    163         @ln -sf ../../Mars/mastro/MAstroSky2Local.h  base/MAstroSky2Local.h
    164         @ln -sf ../../Mars/mastro/MAstroSky2Local.cc base/MAstroSky2Local.cc
    165         @ln -sf ../../Mars/mastro/MObservatory.h  base/MObservatory.h
    166         @ln -sf ../../Mars/mastro/MObservatory.cc base/MObservatory.cc
    167         @ln -sf ../../Mars/mhist/MHCamera.h base/MHCamera.h
    168         @ln -sf ../../Mars/mhist/MHCamera.cc base/MHCamera.cc
    169         @ln -sf ../../Mars/mhbase/MH.h base/MH.h
    170         @ln -sf ../../Mars/mhbase/MH.cc base/MH.cc
    171         @ln -sf ../../Mars/mhbase/MBinning.h base/MBinning.h
    172         @ln -sf ../../Mars/mhbase/MBinning.cc base/MBinning.cc
    173         @ln -sf ../../Mars/mbase/MParList.h base/MParList.h
    174         @ln -sf ../../Mars/mbase/MParList.cc base/MParList.cc
    175         @ln -sf ../../Mars/mgui/MHexagon.h base/MHexagon.h
    176         @ln -sf ../../Mars/mgui/MHexagon.cc base/MHexagon.cc
    177         @ln -sf ../../Mars/mgui/MCamEvent.h base/MCamEvent.h
    178         @ln -sf ../../Mars/mgui/MCamEvent.cc base/MCamEvent.cc
     128        @ln -sf /home/caos/March06/Mars/*/*.h mars
     129        @ln -sf /home/caos/March06/Mars/libmars.so
    179130
    180131magic:
  • trunk/MagicSoft/Cosy/Makefile.conf.general

    r4076 r7787  
    1313
    1414CANDEFS   = -DCPU=486 -DBUS_LITTLE_ENDIAN -DDEBUG=0 -DLINUX -D__LINUX__ -DSHOW
    15 DEFINES   = -D__COSY__ -DROOTVER=\"$(ROOTVER)\" $(CANDEFS)
     15DEFINES   = -D__COSY__ -DMARSVER=\"Cosy\" -DROOTVER=\"$(ROOTVER)\" $(CANDEFS)
    1616
    1717CXXFLAGS  = $(ROOTCFLAGS) $(INCLUDES) $(OPTIM) $(DEBUG) $(DEFINES)
  • trunk/MagicSoft/Cosy/base/BaseLinkDef.h

    r4105 r7787  
    66
    77//#pragma link C++ global gLog;
    8 #pragma link C++ class MLog;
     8//#pragma link C++ class MLog;
     9//#pragma link C++ class MLogHtml;
     10//#pragma link C++ class MArgs;
    911#pragma link C++ class MStar+;
    10 #pragma link C++ class MGMap+;
    11 #pragma link C++ class MGList+;
    12 #pragma link C++ class MParContainer+;
     12//#pragma link C++ class MGMap+;
     13//#pragma link C++ class MGList+;
     14//#pragma link C++ class MParContainer+;
    1315
    14 #pragma link C++ class MObservatory+;
    15 #pragma link C++ class MVector3+;
     16//#pragma link C++ class MObservatory+;
     17//#pragma link C++ class MVector3+;
    1618
    17 #pragma link C++ class MString+;
    18 #pragma link C++ class MAstro+;
    19 #pragma link C++ class MAstroSky2Local+;
    20 #pragma link C++ class MAstroCatalog+;
    21 #pragma link C++ class MAstroCamera+;
     19//#pragma link C++ class MString+;
     20//#pragma link C++ class MAstro+;
     21//#pragma link C++ class MAstroSky2Local+;
     22//#pragma link C++ class MAstroCatalog+;
     23//#pragma link C++ class MAstroCamera+;
    2224
    23 #pragma link C++ class MGeomPix+;
    24 #pragma link C++ class MGeomCam+;
    25 #pragma link C++ class MGeomCamMagic+;
    26 #pragma link C++ class MGeomMirror+;
     25//#pragma link C++ class MGeomPix+;
     26//#pragma link C++ class MGeomCam+;
     27//#pragma link C++ class MGeomCamMagic+;
     28//#pragma link C++ class MGeomMirror+;
    2729
    28 #pragma link C++ class MHCamera+;
    29 #pragma link C++ class MH+;
    30 #pragma link C++ class MBinning+;
    31 #pragma link C++ class MCamEvent+;
    32 #pragma link C++ class MHexagon+;
     30//#pragma link C++ class MHCamera+;
     31//#pragma link C++ class MH+;
     32//#pragma link C++ class MBinning+;
     33//#pragma link C++ class MCamEvent+;
     34//#pragma link C++ class MHexagon+;
    3335
    34 #pragma link C++ class MTime+;
    35 #pragma link C++ function operator<<(ostream&, MTime&);
     36//#pragma link C++ class MTime+;
     37//#pragma link C++ function operator<<(ostream&, MTime&);
    3638
    3739#endif
  • trunk/MagicSoft/Cosy/base/Makefile

    r4105 r7787  
    3232
    3333SRCFILES = MStopwatch.cc \
    34            MParContainer.cc \
    3534           MThread.cc \
    3635           MTimeout.cc \
    37            MTime.cc \
    38            MString.cc \
    39            MStar.cc \
     36           MStar.cc \
    4037           MStarList.cc \
    41            MAstro.cc \
    42            MAstroCatalog.cc \
    43            MAstroCamera.cc \
    44            MAstroSky2Local.cc \
    45            MGeomMirror.cc \
    46            MGeomPix.cc \
    47            MGeomCam.cc \
    48            MGeomCamMagic.cc \
    49            MGMap.cc \
    50            MGMenu.cc \
    51            MH.cc \
    52            MBinning.cc \
    53            MHexagon.cc \
    54            MCamEvent.cc \
    55            MHCamera.cc \
    56            msgqueue.cc \
    57            MLog.cc \
    58            MLogManip.cc \
    59            MObservatory.cc \
    60            MGList.cc
    61 
    62 CINTHEADERS = MStar.h \
    63               MGList.h \
    64               MTime.h \
    65               MString.h \
    66               MAstro.h \
    67               MAstroSky2Local.h \
    68               MAstroCatalog.h \
    69               MAstroCamera.h \
    70               MGeomMirror.h \
    71               MGeomPix.h \
    72               MGeomCam.h \
    73               MGeomCamMagic.h \
    74               MHCamera.h \
    75               MBinning.h \
    76               MH.h \
    77               MGMap.h \
    78               MGMenu.h \
    79               MHexagon.h \
    80               MCamEvent.h \
    81               MLog.h \
    82               MLogManip.h \
    83               MObservatory.h \
    84               MParContainer.h
    85 
     38           msgqueue.cc
     39           
     40CINTHEADERS = MStar.h
     41             
    8642SRCS    = $(SRCFILES)
    8743HEADERS = $(SRCFILES:.cc=.h)
  • trunk/MagicSoft/Cosy/candrv/Makefile

    r1742 r7787  
    2020# @endcode
    2121
    22 INCLUDES = -I. -I.. -I../incl -I../base
     22INCLUDES = -I. -I.. -I../incl -I../base -I../mars
    2323
    2424# @code
  • trunk/MagicSoft/Cosy/caos/Leds.h

    r4255 r7787  
    2929
    3030    void Print(Option_t *o=NULL) const;
     31    void Print(Option_t *o1, Option_t *o2) const { TClonesArray::Print(o1, o2); }
    3132
    3233    ClassDef(Leds, 1)
  • trunk/MagicSoft/Cosy/caos/Makefile

    r4107 r7787  
    2020# @endcode
    2121
    22 INCLUDES = -I. -I.. -I../base
     22INCLUDES = -I. -I.. -I../base -I../mars
    2323#base: MString
    2424
  • trunk/MagicSoft/Cosy/caos/Rings.h

    r7299 r7787  
    2828
    2929    void Print(Option_t *o=NULL) const;
     30    void Print(Option_t *o1, Option_t *o2) const { TClonesArray::Print(o1, o2); }
    3031
    3132    const Ring &operator()(int i) const { return *(Ring*)At(i); }
  • trunk/MagicSoft/Cosy/catalog/Makefile

    r4104 r7787  
    2020# @endcode
    2121
    22 INCLUDES = -I. -I.. -I../base -I../slalib
     22INCLUDES = -I. -I.. -I../base -I../slalib -I../mars
    2323
    2424# @code
  • trunk/MagicSoft/Cosy/catalog/StarCatalog.cc

    r7773 r7787  
    169169    // CalcStars flips the picture in X defaultwise now
    170170    // This defined the box in which stars are really returned
    171     int x0 = (768-xc)-box;
    172     int x1 = (768-xc)+box;
    173     int y0 = yc-box;
    174     int y1 = yc+box;
    175 
    176     if (x0<  -offset) x0=  -offset;
    177     if (y0<  -offset) y0=  -offset;
    178     if (x1>fW+offset) x1=fW+offset;
    179     if (y1>fH+offset) y1=fH+offset;
     171    const int x0 = TMath::Max((768-xc)-box,   -offset);
     172    const int y0 = TMath::Max(yc-box,         -offset);
     173    const int x1 = TMath::Min((768-xc)+box, fW+offset);
     174    const int y1 = TMath::Min(yc+box,       fH+offset);
    180175
    181176    // Align stars into telescope system
  • trunk/MagicSoft/Cosy/devdrv/Makefile

    r1742 r7787  
    2121
    2222DEFINES  = -DCPU=486 -DBUS_LITTLE_ENDIAN -DDEBUG=0 -DLINUX -DSHOW
    23 INCLUDES = -I. -I.. -I../base -I../candrv -I../incl
     23INCLUDES = -I. -I.. -I../base -I../candrv -I../incl -I../mars
    2424
    2525# @code
  • trunk/MagicSoft/Cosy/gui/MGCoordinate.cc

    r1531 r7787  
    9494        label = new TGLabel(this, deg);
    9595        label->SetTextJustify(kTextLeft);
    96         label->Move(39, 26);
     96        label->Move(37, 29);
    9797        label->MapWindow();
    9898        fList->Add(label);
     
    100100        label = new TGLabel(this, min);
    101101        label->SetTextJustify(kTextLeft);
    102         label->Move(73, 26);
     102        label->Move(71, 29);
    103103        label->MapWindow();
    104104        fList->Add(label);
     
    106106        label = new TGLabel(this, sec);
    107107        label->SetTextJustify(kTextLeft);
    108         label->Move(107, 26);
     108        label->Move(107, 29);
    109109        label->MapWindow();
    110110        fList->Add(label);
  • trunk/MagicSoft/Cosy/gui/MGImage.cc

    r4076 r7787  
    9797    while (s<e)
    9898    {
    99         //      11111100    11111000      11111000
    100         *d++ = (*s&0xfc) | (*s&0xf8)<<5 | (*s&0xf8)<<11;
     99        //         11111100    11111000      11111000
     100        // *d++ = (*s&0xfc) | (*s&0xf8)<<5 | (*s&0xf8)<<11;
     101
     102        //      11111000       11111100       11111000
     103        *d++ = (*s&0xf8)<<8 | (*s&0xfc)<<3 | (*s>>3);
    101104        s++;
    102105    }
  • trunk/MagicSoft/Cosy/gui/Makefile

    r4865 r7787  
    2121
    2222INCLUDES = -I. -I.. -I../base -I../slalib -I../candrv -I../incl \
    23            -I../catalog -I../videodev -I../main -I../caos -I../tcpip
     23           -I../catalog -I../videodev -I../main -I../caos -I../tcpip \
     24           -I../mars
    2425
    2526# @code
  • trunk/MagicSoft/Cosy/main/Makefile

    r4865 r7787  
    2121
    2222INCLUDES = -I. -I../base -I.. -I../gui -I../catalog -I../devdrv \
    23            -I../candrv -I../incl -I../videodev -I../caos -I../tcpip
     23           -I../candrv -I../incl -I../videodev -I../caos -I../tcpip \
     24           -I../mars
    2425
    2526# @code
  • trunk/MagicSoft/Cosy/tcpip/Makefile

    r6843 r7787  
    2020# @endcode
    2121
    22 INCLUDES = -I. -I../base -I../catalog -I../main -I../candrv -I../incl -I../caos
     22INCLUDES = -I. -I../base -I../catalog -I../main -I../candrv -I../incl -I../caos -I../mars
    2323
    2424# @code
  • trunk/MagicSoft/Cosy/videodev/Camera.cc

    r4076 r7787  
    1717inline int Camera::Ioctl(int req, void *opt, const char *str)
    1818{
     19    if (fd<0)
     20    {
     21        cout << "Error! Called Ioctl with invalid filedescriptor." << endl;
     22        return -1;
     23    }
     24
    1925    while (1)
    2026    {
     
    181187//        cout << "Camera::Camera - mutex is already locked by this thread" << endl;
    182188    pthread_create(&fThread, NULL, MapThread, this);
    183     cout << "done." << endl;
     189    cout << "CameraInitialized..." << endl;
    184190
    185191}
     
    216222void Camera::ExitLoop()
    217223{
    218     //    cout << "ExitLoop..." << endl;
    219224    fStop = 1;
    220225    while (IsRunning())
    221226        usleep(1);
    222     //    cout << "Loop exited." << endl;
    223227}
    224228
     
    261265    while (1)
    262266    {
    263         //cout << "Wait..." << flush;
    264         fCond.Wait();
    265         //cout << "done." << endl;
     267        fCond.Wait();;
    266268        if (fd==-1)
    267269            break;
     
    319321    }
    320322
    321     cout << "Loop..." << endl;
    322323    ExitLoop();
    323324
     
    329330    //
    330331    fCond.Broadcast();
     332
     333    // I don't know what the reason for this line is, but it
     334    // seems to solve some starnge crashes when switching
     335    // between the two cameras and it ensures that cosy works
     336    // with root 4.04/02g
     337    fMutex->UnLock();
    331338}
    332339
  • trunk/MagicSoft/Cosy/videodev/Makefile

    r2278 r7787  
    2020# @endcode
    2121
    22 INCLUDES = -I. -I.. -I../incl -I../base -I../caos -I/usr/X11R6/include
     22INCLUDES = -I. -I.. -I../incl -I../base -I../caos -I/usr/X11R6/include -I../mars
    2323
    2424# @code
Note: See TracChangeset for help on using the changeset viewer.