Analysis  version 7.0 - august 2014
GanilParamInfo.hh
Go to the documentation of this file.
1 //======================================================================
2 /*! \file GanilParamInfo.hh
3  *
4  * Déclaration des méthodes de la classe GanilParamInfo traitant les
5  * données du buffer Event Header.
6  */
7 //======================================================================
8 
9 #ifndef GANIL_PARAM_INFO_HH
10 #define GANIL_PARAM_INFO_HH
11 
12 #include "GanilCommon.hh"
13 #include "GanilBuffer.hh"
14 #include "GanilCoderInfo.hh"
15 #include "GanilParam.hh"
16 #include "GListT.hh"
17 
18 //======================================================================
19 /*! \class GanilParamInfo
20  *
21  * Classe traitant les données du buffer Event Header.
22  */
24 {
25  friend class GanilRun;
26 
27 //----------------------------------------------------------------------
28  /*! \object_doc */
30 //----------------------------------------------------------------------
31 
32  protected:
33 
34  GListT<GanilParam> param_list; ///< Liste des paramètres GANIL
35 
36  u_int number_table[16384]; ///< Table de conversion label -> numéro de paramètre (mode EBYEDAT)
37  u_short mask_table[16384]; ///< Table des masques binaires
38 
39  public:
40  // constructeur
41  GanilParamInfo ( );
42 
43  // constructeur de recopie
44  GanilParamInfo ( const GanilParamInfo & );
45 
46  // destructeur
47  virtual ~GanilParamInfo ( );
48 
49  // operateur de d'affectation
51 
52 //----------------------------------------------------------------------
53  // operateur de comparaison
54  bool operator == ( const GanilParamInfo & );
55 
56  // Opérateur de comparaison (non-équivalence).
57  bool operator != ( const GanilParamInfo &data );
58 
59 //----------------------------------------------------------------------
60  // traitement des paramètres GANIL
61  int GetGanilParamNumber ( const string &par_name );
62 
63  GanilParam *GetGanilParamPtr ( const string &par_name );
64  GanilParam *GetGanilParamPtr ( const u_int par_num );
65 
66  u_int GetGanilParamMask ( const string &par_name );
67  u_int GetGanilParamMask ( const u_int par_num );
68  bool SetGanilParamMask ( const string &par_name, const u_int m );
69  bool SetGanilParamMask ( const u_int par_num, const u_int m );
70 
71 //----------------------------------------------------------------------
72  // sortie des informations
73  void ParamInfo ( );
74  void ParamInfo ( ostream & );
75 
76  void WriteParamList ( );
77  void WriteParamList ( const string & );
78  void WriteParamList ( ostream & );
79 
80 //----------------------------------------------------------------------
81  protected:
82 
83  // Remplit les données de la liste de paramètres à partir du buffer.
84  // Le pointeur sur la donnée GanilCoderInfo sert à récupérer les
85  // infos codeur.
86  int SetParamInfo ( GanilBuffer &buffer );
87 
88  // rempli les données à partir d'un buffer en spécifiant la structure
89  // de codeur associée int SetParamInfo ( GanilBuffer &buffer, const GanilCoderInfo *coder ); //---------------------------------------------------------------------- // pour ROOT... public: /*! Définition à usage de ROOT... */ ClassDef(GanilParamInfo,0); } ; //====================================================================== // METHODES INLINE //====================================================================== /*! Opérateur de comparaison (non-équivalence). * \param data donnée avec laquelle on teste l'équivalence */ inline bool GanilParamInfo::operator != ( const GanilParamInfo &data ) { return ( ! (*this == data) ); } /*! Ecriture de la liste des paramètres sur la sortie standard. */ inline void GanilParamInfo::WriteParamList() { WriteParamList (cout); } /*! Ecriture des informations sur la sortie standard. */ inline void GanilParamInfo::ParamInfo() { ParamInfo (cout); } /*! Remplit les données de la liste de paramètres à partir du buffer. * Le pointeur sur la donnée GanilCoderInfo sert à récupérer les * infos codeur. * \param buffer buffer où se trouvent les données */ inline int GanilParamInfo::SetParamInfo ( GanilBuffer &buffer ) { return (SetParamInfo (buffer, (const GanilCoderInfo *) this )); } //====================================================================== #endif
90  int SetParamInfo ( GanilBuffer &buffer, const GanilCoderInfo *coder );
91 
92 
93 //----------------------------------------------------------------------
94 // pour ROOT...
95  public:
96  /*! Définition à usage de ROOT... */
98 } ;
99 
100 
101 //======================================================================
102 // METHODES INLINE
103 //======================================================================
104 
105 
106 /*! Opérateur de comparaison (non-équivalence).
107  * \param data donnée avec laquelle on teste l'équivalence
108  */
110  { return ( ! (*this == data) ); }
111 
112 /*! Ecriture de la liste des paramètres sur la sortie standard.
113  */
115  { WriteParamList (cout); }
116 
117 /*! Ecriture des informations sur la sortie standard.
118  */
120  { ParamInfo (cout); }
121 
122 /*! Remplit les données de la liste de paramètres à partir du buffer.
123  * Le pointeur sur la donnée GanilCoderInfo sert à récupérer les
124  * infos codeur.
125  * \param buffer buffer où se trouvent les données
126  */
128  { return (SetParamInfo (buffer, (const GanilCoderInfo *) this )); }
129 
130 
131 //======================================================================
132 #endif
string * coder
Table des noms de branches.
Definition: GanilCoderInfo.hh:85
Definition: GanilParamInfo.hh:23
void WriteParamList()
Definition: GanilParamInfo.hh:114
Definition: GanilRun.hh:39
u_int number_table[16384]
Table de conversion label -&gt; numéro de paramètre (mode EBYEDAT)
Definition: GanilParamInfo.hh:36
Definition: GanilParam.hh:29
Definition: GanilCoderInfo.hh:66
GanilParamInfo & operator=(const GanilParamInfo &)
Definition: GanilParamInfo.cpp:55
bool operator==(const GanilParamInfo &)
Definition: GanilParamInfo.cpp:82
virtual ~GanilParamInfo()
Definition: GanilParamInfo.cpp:47
GListT< GanilParam > param_list
Liste des paramètres GANIL.
Definition: GanilParamInfo.hh:34
Definition: GanilBuffer.hh:26
void ParamInfo()
Definition: GanilParamInfo.hh:119
int SetParamInfo(GanilBuffer &buffer)
Definition: GanilParamInfo.hh:127
GanilParam * GetGanilParamPtr(const string &par_name)
Definition: GanilParamInfo.cpp:141
u_int GetGanilParamMask(const string &par_name)
Definition: GanilParamInfo.cpp:168
bool SetGanilParamMask(const string &par_name, const u_int m)
Definition: GanilParamInfo.cpp:202
u_short mask_table[16384]
Table des masques binaires.
Definition: GanilParamInfo.hh:37
GObject(GanilParamInfo)
int GetGanilParamNumber(const string &par_name)
Definition: GanilParamInfo.cpp:117
bool operator!=(const GanilParamInfo &data)
Definition: GanilParamInfo.hh:109
GanilParamInfo()
Definition: GanilParamInfo.cpp:15
ClassDef(GanilParamInfo, 0)