Analysis  version 7.0 - august 2014
GEVTreeCreator.hh
Go to the documentation of this file.
1 //======================================================================
2 /*! \file GEVTreeCreator.hh
3  *
4  * Déclaration de la classe GEVTreeCreator, qui est
5  * une interface graphique pour définir un nouvel arbre.
6  */
7 //======================================================================
8 
9 #ifndef GEV_TREE_CREATOR_HH
10 #define GEV_TREE_CREATOR_HH
11 
12 #include "EventManager.hh"
13 
14 #include "RGBaseRequester.hh"
15 #include "RGItemListBox.hh"
16 
17 // includes ROOT
18 #include <TGFrame.h>
19 #include <TGButton.h>
20 #include <TGComboBox.h>
21 #include <TGTextEntry.h>
22 #include <TGNumberEntry.h>
23 
24 extern const char *tree_file_types[];
25 
26 
27 //======================================================================
28 /*! \class GEVTreeCreator
29  *
30  * Interface graphique de création d'un arbre.
31  *
32  * Elle permet de définir le type d'arbre et les paramètres associés.
33  */
34 class GEVTreeCreator : public RGBaseRequester
35 {
36 //----------------------------------------------------------------------
37  /*! \object_doc */
39 //----------------------------------------------------------------------
40 
41  public:
42  static string default_file_name; ///< Nom par défaut du fichier TTree
43 
44  protected:
45  EventManager * event_mgr; ///< Pointeur sur le gestionnaire d'événements
46 
47  string tr_name; ///< Nom du nouvel arbre
48  string tr_file; ///< Fichier associé
49  UInt_t tr_max; ///< Nombre maxi d'événements
50 
51 
52 #ifndef __MAKECINT__
53  TreeInfo ** tree_result; ///< Pointeur sur l'adresse de l'arbre alloué en sortie
54 #endif
55 
56  // widgets de l'interface
57  TGCompositeFrame * w_frame; ///< Cadre principal (de la classe RGBaseRequester)
58 
59  TGLabel * w_name_label; ///< Label pour nom de l'arbre
60  TGTextEntry * w_name_text; ///< Texte pour nom de l'arbre
61  TGLabel * w_file_label; ///< Label pour nom de fichier
62  TGLabel * w_file_num_label; ///< Info pour nom de fichier
63  TGLabel * w_file_base_label; ///< Info pour nom de fichier
64  TGHorizontalFrame * w_file_frame; ///< Cadre pour saisie de fichier
65  TGTextEntry * w_file_text; ///< Texte pour nom de fichier
66  TGTextButton * w_file_browse; ///< Bouton pour selection de fichier
67  TGLabel * w_max_label; ///< Label pour nombre maxi d'événements
68  TGNumberEntry * w_max_entry; ///< Saisie du nombre maxi d'événements
69  TGComboBox * w_tree_mode; ///< Mode de fichier
70 
71  RGItemListBox * w_param_list; ///< Liste des paramètres
72 
73  public:
74 //----------------------------------------------------------------------
75 // Constructeur, destructeur, affectation
76  GEVTreeCreator ( EventManager * evt_mgr,
77  Int_t & result,
78  TreeInfo *& tree_ptr,
79  const TGWindow * mw = NULL );
80  virtual ~GEVTreeCreator ( );
81 
82  protected:
83  GEVTreeCreator ( const GEVTreeCreator & original );
84 
85 //----------------------------------------------------------------------
86  public:
87 
88  virtual void Construct ( );
89  virtual void MapRequester ( );
90  virtual bool CheckInputs ( );
91 
92  virtual void SetTreeMode ( );
93 
94 //----------------------------------------------------------------------
95 // Slots
96 
97  virtual void TreeFileBrowse ( );
98  virtual void TreeFileChanged ( const char *str );
99  virtual void TreeMaxTextChanged ( const char *str );
100  virtual void TreeMaxValueChanged ( Long_t val );
101 
102  // boutons de la requête (surcharge de RGMessageRequester)
103  virtual void Button ( Int_t n );
104 
105 
106 //----------------------------------------------------------------------
107  public:
108  /*! Définition à usage de ROOT... */
110 };
111 
112 //----------------------------------------------------------------------
113 // FONCTIONS INLINE
114 //----------------------------------------------------------------------
115 
116 
117 //======================================================================
118 #endif
virtual bool CheckInputs()
Definition: GEVTreeCreator.cpp:261
ClassDef(GEVTreeCreator, 0)
EventManager * event_mgr
Pointeur sur le gestionnaire d&#39;événements.
Definition: GEVTreeCreator.hh:45
Definition: GEVTreeCreator.hh:34
virtual ~GEVTreeCreator()
Definition: GEVTreeCreator.cpp:72
Definition: TreeInfo.hh:95
TGComboBox * w_tree_mode
Mode de fichier.
Definition: GEVTreeCreator.hh:69
virtual void SetTreeMode()
Definition: GEVTreeCreator.cpp:316
virtual void MapRequester()
Definition: GEVTreeCreator.cpp:243
virtual void Construct()
Definition: GEVTreeCreator.cpp:82
TGHorizontalFrame * w_file_frame
Cadre pour saisie de fichier.
Definition: GEVTreeCreator.hh:64
TGLabel * w_name_label
Label pour nom de l&#39;arbre.
Definition: GEVTreeCreator.hh:59
virtual void TreeFileChanged(const char *str)
Definition: GEVTreeCreator.cpp:397
virtual void TreeFileBrowse()
Definition: GEVTreeCreator.cpp:360
TreeInfo ** tree_result
Pointeur sur l&#39;adresse de l&#39;arbre alloué en sortie.
Definition: GEVTreeCreator.hh:53
TGLabel * w_file_num_label
Info pour nom de fichier.
Definition: GEVTreeCreator.hh:62
GObject(GEVTreeCreator)
TGCompositeFrame * w_frame
Cadre principal (de la classe RGBaseRequester)
Definition: GEVTreeCreator.hh:57
TGLabel * w_file_label
Label pour nom de fichier.
Definition: GEVTreeCreator.hh:61
TGTextEntry * w_name_text
Texte pour nom de l&#39;arbre.
Definition: GEVTreeCreator.hh:60
GEVTreeCreator(EventManager *evt_mgr, Int_t &result, TreeInfo *&tree_ptr, const TGWindow *mw=NULL)
Definition: GEVTreeCreator.cpp:40
string tr_name
Nom du nouvel arbre.
Definition: GEVTreeCreator.hh:47
static string default_file_name
Nom par défaut du fichier TTree.
Definition: GEVTreeCreator.hh:42
virtual void Button(Int_t n)
Definition: GEVTreeCreator.cpp:426
TGLabel * w_max_label
Label pour nombre maxi d&#39;événements.
Definition: GEVTreeCreator.hh:67
TGLabel * w_file_base_label
Info pour nom de fichier.
Definition: GEVTreeCreator.hh:63
TGTextEntry * w_file_text
Texte pour nom de fichier.
Definition: GEVTreeCreator.hh:65
virtual void TreeMaxTextChanged(const char *str)
Definition: GEVTreeCreator.cpp:405
RGItemListBox * w_param_list
Liste des paramètres.
Definition: GEVTreeCreator.hh:71
UInt_t tr_max
Nombre maxi d&#39;événements.
Definition: GEVTreeCreator.hh:49
virtual void TreeMaxValueChanged(Long_t val)
Definition: GEVTreeCreator.cpp:413
Definition: EventManager.hh:59
TGNumberEntry * w_max_entry
Saisie du nombre maxi d&#39;événements.
Definition: GEVTreeCreator.hh:68
const char * tree_file_types[]
Définition des types de fichiers pour les TTree ROOT.
Definition: GEVTreeCreator.cpp:21
TGTextButton * w_file_browse
Bouton pour selection de fichier.
Definition: GEVTreeCreator.hh:66
string tr_file
Fichier associé
Definition: GEVTreeCreator.hh:48