]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONTrackerDataCompareDialog.h
Fixing memory leaks
[u/mrichter/AliRoot.git] / MUON / AliMUONTrackerDataCompareDialog.h
1 #ifndef ALIMUONTRACKERDATACOMPAREDIALOG_H
2 #define ALIMUONTRACKERDATACOMPAREDIALOG_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice                               */
6
7 // $Id$
8
9 /// \ingroup graphics
10 /// \class AliMUONTrackerDataCompareDialog
11 /// \brief
12 /// 
13 /// Author Laurent Aphecetche, Subatech
14
15 #ifndef ROOT_TGFrame
16 #  include "TGFrame.h"
17 #endif
18
19 class AliMUONVTrackerData;
20 class TGButtonGroup;
21 class TGComboBox;
22 class TGCompositeFrame;
23 class TGTextEntry;
24
25 class AliMUONTrackerDataCompareDialog : public TGTransientFrame
26 {
27 public:
28   AliMUONTrackerDataCompareDialog(const TGWindow* p = 0, const TGWindow* main = 0, UInt_t w = 1, UInt_t h = 1);
29   virtual ~AliMUONTrackerDataCompareDialog();
30
31   void DoOK();
32   void DoCancel();
33   
34 private:
35   
36     /// not defined
37     AliMUONTrackerDataCompareDialog(const AliMUONTrackerDataCompareDialog& rhs);
38   /// not defined
39   AliMUONTrackerDataCompareDialog& operator=(const AliMUONTrackerDataCompareDialog& rhs);
40
41   void CompareData(const char* d1name, const char* d2name, Int_t difftype) const;
42   
43   AliMUONVTrackerData* CompareData(const AliMUONVTrackerData& d1,
44                                    const AliMUONVTrackerData& d2,
45                                    const char* outname,
46                                    Double_t (*difffunction)(Double_t,Double_t)) const;
47   
48 private:
49
50     TGCompositeFrame* fF1; ///< frame for data source 1 selection
51   TGComboBox* fData1; ///< to select first data
52   TGCompositeFrame* fF2; ///< frame for data source 2 selection
53   TGComboBox* fData2; ///< to select second data
54   TGCompositeFrame* fF3; ///< frame for difference type selection
55   TGComboBox* fDiffType; ///< to select the kind of difference to make
56   TGCompositeFrame* fF4; ///< frame for output basename selection
57   TGTextEntry* fBasename; ///< basename of resulting (diff-ed) data
58   TGCompositeFrame* fButtonFrame; ///< to hold OK and Cancel buttons
59   TGTextButton* fOK; ///< ok button
60   TGTextButton* fCancel; ///< cancel button
61   
62   static const Int_t fgkDifference; ///< D1-D2
63   static const Int_t fgkAbsoluteDifference; ///< |D1-D2|
64   static const Int_t fgkRelativeDifference; ///< (D1-D2)/D1
65   static const Int_t fgkAbsoluteRelativeDifference; ///< | (D1-D2) | / | D1 |
66   static const Int_t fgkAll; ///< All four differences at once
67   
68   ClassDef(AliMUONTrackerDataCompareDialog,1) // Dialog to select two data sources to compare
69 };
70
71 #endif