Analysis  version 7.0 - august 2014
GanilParam.hh
Go to the documentation of this file.
1 //======================================================================
2 /*! \file GanilParam.hh
3  *
4  * Déclaration des méthodes de la classe GanilParam qui représente les
5  * paramètres bruts de l'acquisition GANIL.
6  */
7 //======================================================================
8 
9 #ifndef GANIL_PARAM_HH
10 #define GANIL_PARAM_HH
11 
12 #include "GanilCommon.hh"
13 #include "Param.hh"
14 #include "Data.hh"
15 
16 #define GANIL_PARAM_TYPE_FLAG 0x00000003 ///< Bits définissant le type de paramètre
17 #define GANIL_PARAM_USER_FLAG 0x00000010 ///< Bit définissant l'usage: 0 param. GANIL / 1 param. USER
18 
19 //======================================================================
20 /*! \class GanilParam
21  *
22  * Classe représentant les paramètres bruts de l'acquisition GANIL.
23  * Le champ \ref type contient plusieurs information:
24  * - bits 0 et 1: mode de fonctionnement du paramètre: single,
25  * multihit, ou array (voir la classe Param)
26  * - bit 4: s'il est à 0, c'est un paramètre de l'acquisition GANIL,
27  * et est mis à 1, c'est un paramètre utilisateur.
28  */
30 {
31  friend class GanilParamInfo;
32  friend class GanilRun;
33 
34 //----------------------------------------------------------------------
35  /*! \object_doc */
37 //----------------------------------------------------------------------
38 
39  protected:
40  u_int type; ///< Type de paramètre (single, multihit, array)
41  u_int datatype; ///< Type de données du paramètre (entier/réel, 16/32/64 bits, signé/non signé)
42 
43  string name; ///< Nom du paramètre brut
44  u_int label; ///< Label du paramètre (différent de number en mode EBYEDAT)
45  u_int mask; ///< Masque binaire associéc5f9
46  u_int branch; ///< Numéro de branche
47 
48  public:
49  // constructeur par défaut
50  GanilParam ( );
51 
52  // constructeur complet
53  GanilParam ( const u_int p_type,
54  const string &p_name,
55  const u_int p_label,
56  const u_int p_datatype = DATA_TYPE_U_INT2,
57  const u_int p_mask = 0);
58 
59  // constructeur de recopie
60  GanilParam ( const GanilParam & );
61 
62  // destructeur
63  virtual ~GanilParam ( );
64 
65 //----------------------------------------------------------------------
66  // comparaison
67  bool operator == ( const GanilParam &par );
68 
69  // Opérateur de comparaison (non-équivalence).
70  bool operator != ( const GanilParam &par );
71 
72 //----------------------------------------------------------------------
73 
74  // Retourne le nom du paramètre.
75  string Name() const;
76 
77  // Retourne le label du paramètre.
78  u_int Label() const;
79 
80  // Retourne le masque binaire du paramètre.
81  u_int Mask() const;
82 
83  // Retourne le numéro de branche du paramètre.
84  u_int Branch() const;
85 
86 //----------------------------------------------------------------------
87 // pour ROOT...
88  public:
89  /*! Définition à usage de ROOT... */
91 } ;
92 
93 
94 //======================================================================
95 // METHODES INLINE
96 //======================================================================
97 
98 
99 /*! Opérateur de comparaison (non-équivalence).
100  * \param par paramètre GANIL à comparer
101  */
102 inline bool GanilParam::operator != ( const GanilParam &par )
103  { return ( ! (*this == par) ); }
104 
105 /*! Retourne le nom du paramètre.
106  */
107 inline string GanilParam::Name() const
108  { return (name); }
109 
110 /*! Retourne le label du paramètre.
111  */
112 inline u_int GanilParam::Label() const
113  { return (label); }
114 
115 /*! Retourne le masque binaire du paramètre.
116  */
117 inline u_int GanilParam::Mask() const
118  { return (mask); }
119 
120 /*! Retourne le numéro de branche du paramètre.
121  */
122 inline u_int GanilParam:: Branch() const
123  { return (branch); }
124 
125 
126 //======================================================================
127 #endif
Definition: GanilParamInfo.hh:23
Definition: GanilRun.hh:39
Definition: GanilParam.hh:29
GanilParam()
Definition: GanilParam.cpp:14
string Name() const
Definition: GanilParam.hh:107
u_int Mask() const
Definition: GanilParam.hh:117
string name
Nom du paramètre brut.
Definition: GanilParam.hh:43
ClassDef(GanilParam, 0)
bool operator==(const GanilParam &par)
Definition: GanilParam.cpp:74
u_int Label() const
Definition: GanilParam.hh:112
u_int datatype
Type de données du paramètre (entier/réel, 16/32/64 bits, signé/non signé)
Definition: GanilParam.hh:41
u_int branch
Numéro de branche.
Definition: GanilParam.hh:46
u_int label
Label du paramètre (différent de number en mode EBYEDAT)
Definition: GanilParam.hh:44
bool operator!=(const GanilParam &par)
Definition: GanilParam.hh:102
#define DATA_TYPE_U_INT2
bits spécifiant le type de donnée
Definition: Data.hh:48
virtual ~GanilParam()
Definition: GanilParam.cpp:64
u_int mask
Masque binaire associé
Definition: GanilParam.hh:45
u_int type
Type de paramètre (single, multihit, array)
Definition: GanilParam.hh:40
GObject(GanilParam)
u_int Branch() const
Definition: GanilParam.hh:122