Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:11:55

0001 // @(#):$Id$
0002 // Author: M.Gheata
0003 /*************************************************************************
0004  * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers.               *
0005  * All rights reserved.                                                  *
0006  *                                                                       *
0007  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0008  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0009  *************************************************************************/
0010 
0011 #ifndef ROOT_TGeoTubeEditor
0012 #define ROOT_TGeoTubeEditor
0013 
0014 #include "TGWidget.h"
0015 #include "TGeoGedFrame.h"
0016 
0017 class TGeoTube;
0018 class TGeoTabManager;
0019 class TGTextEntry;
0020 class TGNumberEntry;
0021 class TGTab;
0022 class TGComboBox;
0023 class TGTextButton;
0024 class TGCheckButton;
0025 class TString;
0026 
0027 class TGeoTubeEditor : public TGeoGedFrame {
0028 
0029 protected:
0030    Double_t fRmini;         // Initial inner radius
0031    Double_t fRmaxi;         // Initial outer radius
0032    Double_t fDzi;           // Initial box dz
0033    TString fNamei;          // Initial name
0034    TGeoTube *fShape;        // Shape object
0035    Bool_t fIsModified;      // Flag that volume was modified
0036    Bool_t fIsShapeEditable; // Flag that the shape can be changed
0037 
0038    TGTextEntry *fShapeName;   // Shape name text entry
0039    TGNumberEntry *fERmin;     // Number entry for rmin
0040    TGNumberEntry *fERmax;     // Number entry for rmax
0041    TGNumberEntry *fEDz;       // Number entry for DZ
0042    TGTextButton *fApply;      // Apply-Button to accept changes
0043    TGTextButton *fUndo;       // Undo-Button
0044    TGCompositeFrame *fBFrame; // Frame containing Apply/Undo
0045    TGCheckButton *fDelayed;   // Check button for delayed draw
0046    TGCompositeFrame *fDFrame; // Frame containing Delayed draw
0047 
0048    virtual void ConnectSignals2Slots(); // Connect the signals to the slots
0049    Bool_t IsDelayed() const;
0050 
0051 public:
0052    TGeoTubeEditor(const TGWindow *p = nullptr, Int_t width = 140, Int_t height = 30, UInt_t options = kChildFrame,
0053                   Pixel_t back = GetDefaultFrameBackground());
0054    ~TGeoTubeEditor() override;
0055    void SetModel(TObject *obj) override;
0056 
0057    void DoRmin();
0058    void DoRmax();
0059    void DoDz();
0060    void DoModified();
0061    void DoName();
0062    virtual void DoApply();
0063    virtual void DoUndo();
0064 
0065    ClassDefOverride(TGeoTubeEditor, 0) // TGeoTube editor
0066 };
0067 
0068 class TGDoubleVSlider;
0069 
0070 class TGeoTubeSegEditor : public TGeoTubeEditor {
0071 
0072 protected:
0073    Bool_t fLock;           // Phi lock
0074    Double_t fPmini;        // Initial phi min
0075    Double_t fPmaxi;        // Initial phi max
0076    TGDoubleVSlider *fSPhi; // Phi slider
0077    TGNumberEntry *fEPhi1;  // Number entry for phi1
0078    TGNumberEntry *fEPhi2;  // Number entry for phi2
0079 
0080    void ConnectSignals2Slots() override; // Connect the signals to the slots
0081 
0082 public:
0083    TGeoTubeSegEditor(const TGWindow *p = nullptr, Int_t width = 140, Int_t height = 30, UInt_t options = kChildFrame,
0084                      Pixel_t back = GetDefaultFrameBackground());
0085    ~TGeoTubeSegEditor() override;
0086    void SetModel(TObject *obj) override;
0087 
0088    void DoPhi();
0089    void DoPhi1();
0090    void DoPhi2();
0091    void DoApply() override;
0092    void DoUndo() override;
0093 
0094    ClassDefOverride(TGeoTubeSegEditor, 0) // TGeoTubeSeg editor
0095 };
0096 
0097 class TGeoCtubEditor : public TGeoTubeSegEditor {
0098 
0099 protected:
0100    Double_t fThlo;        // Theta angle of the normal to the lower plane (90, 180)
0101    Double_t fPhlo;        // Phi angle of the normal to lower Z plane
0102    Double_t fThhi;        // Theta angle of the normal to the upper plane (0, 90)
0103    Double_t fPhhi;        // Phi angle of the normal to upper Z plane
0104    TGNumberEntry *fEThlo; // Number entry for thlo
0105    TGNumberEntry *fEPhlo; // Number entry for phlo
0106    TGNumberEntry *fEThhi; // Number entry for thhi
0107    TGNumberEntry *fEPhhi; // Number entry for phhi
0108 
0109 public:
0110    TGeoCtubEditor(const TGWindow *p = nullptr, Int_t width = 140, Int_t height = 30, UInt_t options = kChildFrame,
0111                   Pixel_t back = GetDefaultFrameBackground());
0112    ~TGeoCtubEditor() override;
0113    void SetModel(TObject *obj) override;
0114 
0115    void DoThlo();
0116    void DoPhlo();
0117    void DoThhi();
0118    void DoPhhi();
0119    void DoApply() override;
0120    void DoUndo() override;
0121 
0122    ClassDefOverride(TGeoCtubEditor, 0) // TGeoCtub editor
0123 };
0124 
0125 #endif