]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONPainterDataSourceFrame.h
In AliMUONReconstructor:
[u/mrichter/AliRoot.git] / MUON / AliMUONPainterDataSourceFrame.h
1 #ifndef ALIMUONPAINTERDATASOURCEFRAME_H
2 #define ALIMUONPAINTERDATASOURCEFRAME_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 AliMUONPainterDataSourceFrame
11 /// \brief Frame to select input data source(s) to be displayed
12 /// 
13 // Author Laurent Aphecetche, Subatech
14
15 #ifndef ROOT_TGFrame
16 #  include <TGFrame.h>
17 #endif
18
19 class AliMUONAttPainter;
20 class AliMUONPainterDataSourceItem;
21 class AliMUONPainterMatrix;
22 class AliMUONVTrackerDataMaker;
23 class AliMUONVTrackerData;
24 class TGCheckButton;
25 class TGComboBox;
26 class TGGroupFrame;
27 class TGNumberEntry;
28 class TGTextEntry;
29 class TObjArray;
30
31 class AliMUONPainterDataSourceFrame : public TGCompositeFrame
32 {
33 public:
34   AliMUONPainterDataSourceFrame(const TGWindow* p, UInt_t w, UInt_t h);
35   virtual ~AliMUONPainterDataSourceFrame();
36   
37   void CalibrateButtonClicked(); 
38   
39   void CreateOCDBDataSource();
40
41   void CreateACFDataSource();
42
43   void CreateRawDataSource();
44   
45   void DataMakerWasRegistered(AliMUONVTrackerDataMaker* reader);
46   
47   void DataMakerWasUnregistered(AliMUONVTrackerDataMaker* reader);
48
49   void HistogramButtonClicked();
50   
51   void OpenFileDialog();
52   
53   void OpenFileDialogACF();
54   
55   void OpenRecentSource();
56
57   void StartRunning();
58
59   void StopRunning();
60
61   static void CreatePedestalCanvases(AliMUONVTrackerData* data,
62                                      Double_t pedMin=0, Double_t pedMax=500,
63                                      Double_t sigmaMin=0, Double_t sigmaMax=5);
64   
65   static AliMUONPainterMatrix* CreateFullTracker(AliMUONVTrackerData* data, 
66                                                  Int_t dim, 
67                                                  Double_t xmin, Double_t xmax, 
68                                                  const AliMUONAttPainter& att);
69
70 private:
71   /// Not implemented
72   AliMUONPainterDataSourceFrame(const AliMUONPainterDataSourceFrame& rhs);
73   /// Not implemented
74   AliMUONPainterDataSourceFrame& operator=(const AliMUONPainterDataSourceFrame& rhs);
75
76   void AddRecentSource(const char* name);
77
78   Bool_t CreateRawDataSource(const TString& uri);
79   
80   void CreateOCDBDataSource(const TString& uri);
81
82   void CreateOCDBDataSource(const TString& cdbPath, Int_t runNumber, const TString& type);
83
84   void CreateACFDataSource(const TString& uri);
85
86   void CreateACFDataSource(const TString& acfPath, const TString& type);
87   
88   void RegisterDataSource(AliMUONVTrackerDataMaker* reader, const char* dsName);
89   
90 private:
91     
92   TGGroupFrame* fRecentSourceSelector; ///< to select recently used sources   
93   
94   TGGroupFrame* fRawSelector; ///< to select a new raw data source
95   TGCompositeFrame* fRawSelector2; ///< idem
96   TGCompositeFrame* fRawSelector21; ///< idem
97   TGCompositeFrame* fRawSelector22; ///< idem
98   TGCompositeFrame* fRawSelector23; ///< idem
99   TGCheckButton* fCalibrateNoGain; ///< to trig calibration of raw data (only 0 suppression)
100   TGCheckButton* fCalibrateGainConstantCapa; ///< to trig calibration of raw data (0-supp and gain w/ constant capacitance)
101   TGCheckButton* fCalibrateGain; ///< to trig calibration of raw data (full blown calibration)
102   TGCheckButton* fCalibrateEmelecGain; ///< to trig calibration of raw data (full blown calibration but with factory gains)
103   TGCheckButton* fHistogramButton; ///< to trig histogramming of raw data
104   TGNumberEntry* fHistoMin; ///< xmin of histo to make
105   TGNumberEntry* fHistoMax; ///< xmax of histo to make
106   TGTextEntry* fRawOCDBPath; ///< OCDB path for raw data calibration
107   
108   TGGroupFrame* fOCDBSelector; ///< to select a new OCDB data source
109   TGGroupFrame* fDataReaders; ///< to display currently active data sources  
110   TGTextEntry* fFilePath; ///< raw data file path text entry widget
111   TGTextEntry* fOCDBPath; ///< OCDB path text entry widget
112   TGNumberEntry* fRunSelector; ///< OCDB run number entry widget
113   TGComboBox* fOCDBTypes; ///< OCDB type combo box entry widget  
114   TGComboBox* fRecentSources; ///< recent sources combo box  
115   TObjArray* fItems; ///< list of data readers we handle
116   
117   TGGroupFrame* fACFSelector; ///< to select ACF (ASCII calibration files)
118   TGTextEntry* fACFPath; ///< path to ASCII calibration file
119   TGComboBox* fACFTypes; ///< types of ASCII calibration files 
120
121   static const char* fgkNumberOfDataSourcesKey; ///< key used to store the # of data sources in the resource file
122   static const char* fgkDataSourceURIKey; ///< key usde to store the data source URIs in the resource file
123
124   ClassDef(AliMUONPainterDataSourceFrame,4) // Data source selection frame
125 };
126
127 #endif