Analysis  version 7.0 - august 2014
SpecHisto.hh
Go to the documentation of this file.
1 //======================================================================
2 /*! \file SpecHisto.hh
3  *
4  * Include file for class SpecHisto.
5  */
6 //======================================================================
7 
8 #ifndef SPEC_HISTO_HH
9 #define SPEC_HISTO_HH
10 
11 #include "SpecCalc.hh"
12 
13 
14 //======================================================================
15 /*! \class SpecHisto
16  *
17  * The class is used to use ROOT histograms defined elsewhere
18  * in the list of spectra.
19  * The histogram is not deleted with the spectrum definition.
20  */
21 class SpecHisto : public SpecCalc
22 {
23 //----------------------------------------------------------------------
24  /*! \object_doc */
26 //----------------------------------------------------------------------
27 
28  protected:
29 
30 
31  public:
32 
33 //----------------------------------------------------------------------
34 // CONSTRUCTEUR / AFFECTATION / DESTRUCTEUR
35 //----------------------------------------------------------------------
36 
37  // Constructor
38  SpecHisto ( TH1 & h );
39 
40  // Copy constructor
41  SpecHisto ( const SpecHisto & original );
42 
43  // Destructorr
44  virtual ~SpecHisto ();
45 
46 //----------------------------------------------------------------------
47 
48  public:
49  virtual void Reset ( );
50 
51  // Retourne l'identificateur du type de spectre.
52  u_int TypeId ( ) const;
53 
54  // Retourne le nom du type de spectre.
55  string Type ( ) const;
56 
57  // Retourne une chaîne décrivant le spectre.
58  virtual string Definition ( ) const;
59 
60  // Ecriture des données du spectre dans une chaîne de définition.
61  virtual string DefinitionString ( ) const;
62 
63 
64 //----------------------------------------------------------------------
65 // pour ROOT...
66  public:
67  /*! Définition à usage de ROOT... */
69 } ;
70 
71 
72 //======================================================================
73 // METHODES INLINE
74 //======================================================================
75 
76 /*! Remise à zéro du spectre: RAZ du spectre référé/ inline void SpecHisto::Reset ( ) { if (histo_ptr != NULL) histo_ptr->Reset(); } /*! Retourne l'identificateur du type de spectre. */ inline u_int SpecHisto::TypeId ( ) const { return (spectrumTypeHisto); } /*! Retourne le nom du type de spectre. */ inline string SpecHisto::Type ( ) const { return (SPECTRUM_TYPE_TXT_HISTO); } //====================================================================== #endif */
77 inline void SpecHisto::Reset ( )
78  { if (histo_ptr != NULL) histo_ptr->Reset(); }
79 
80 /*! Retourne l'identificateur du type de spectre.
81  */
82 inline u_int SpecHisto::TypeId ( ) const
83  { return (spectrumTypeHisto); }
84 
85 /*! Retourne le nom du type de spectre.
86  */
87 inline string SpecHisto::Type ( ) const
88  { return (SPECTRUM_TYPE_TXT_HISTO); }
89 
90 
91 
92 //======================================================================
93 #endif
#define SPECTRUM_TYPE_TXT_HISTO
Nom du type de spectre: histogramme externe.
Definition: Spectrum.hh:106
u_int TypeId() const
Definition: SpecHisto.hh:82
string Type() const
Definition: SpecHisto.hh:87
virtual ~SpecHisto()
Definition: SpecHisto.cpp:72
virtual string DefinitionString() const
Definition: SpecHisto.cpp:98
GObject(SpecHisto)
Definition: SpecHisto.hh:21
Definition: SpecCalc.hh:26
SpecHisto(TH1 &h)
Definition: SpecHisto.cpp:19
virtual void Reset()
Definition: SpecHisto.hh:77
ClassDef(SpecHisto, 0)
virtual string Definition() const
Definition: SpecHisto.cpp:82
TH1 * histo_ptr
Pointeur sur l'histogramme Root.
Definition: Spectrum.hh:243