Analysis  version 7.0 - august 2014
SpecHCumul.hh
Go to the documentation of this file.
1 //======================================================================
2 /*! \file SpecHCumul.hh
3  *
4  * Include file for class SpecHCumul.
5  */
6 //======================================================================
7 
8 #ifndef SPEC_HCUMUL_HH
9 #define SPEC_HCUMUL_HH
10 
11 #include "Spec2Dim.hh"
12 
13 
14 //======================================================================
15 /*! \class SpecHCumul
16  *
17  * The class is used to cumulate, event by event, the result of
18  * a 1D histogram into a 2D histogram.
19  */
20 class SpecHCumul : public Spec2Dim
21 {
22 //----------------------------------------------------------------------
23  /*! \object_doc */
25 //----------------------------------------------------------------------
26 
27  protected:
28  const TH1 * histo_src; ///< Pointer to the histogram to cumulate
29 
30  public:
31 
32 //----------------------------------------------------------------------
33 // CONSTRUCTEUR / AFFECTATION / DESTRUCTEUR
34 //----------------------------------------------------------------------
35 
36  // Constructor
37  SpecHCumul ( const string & spec_name, Spectrum * spec,
38  const u_int ny, double y1, double y2 );
39  SpecHCumul ( const string & spec_name, const TH1 * hptr,
40  const u_int ny, double y1, double y2 );
41 
42  // Copy constructor
43  SpecHCumul ( const SpecHCumul & original );
44 
45  // Destructorr
46  virtual ~SpecHCumul ();
47 
48 //----------------------------------------------------------------------
49 
50  protected:
51  virtual TH1 * SetHistoCumul ( const TH1 * hptr,
52  u_int ny, double y1, double y2 );
53  // incrémentation auto du spectre
54  virtual void IncrementSpectrum ( );
55 
56  public:
57 
58  const TH1 * GetRefHisto ( ) const; // inline
59 
60  // Retourne l'identificateur du type de spectre.
61  u_int TypeId ( ) const;
62 
63  // Retourne le nom du type de spectre.
64  string Type ( ) const;
65 
66  // Retourne une chaîne décrivant le spectre.
67  virtual string Definition ( ) const;
68 
69  // Ecriture des données du spectre dans une chaîne de définition.
70  virtual string DefinitionString ( ) const;
71 
72  // Définition d'un spectre de type donné static Spectrum * NewSpectrumDef ( const string & name, const string & defstr, const EventManager * evt_mgr, int & error ); //---------------------------------------------------------------------- // pour ROOT... public: /*! Définition à usage de ROOT... */ ClassDef(SpecHCumul,0); } ; //====================================================================== // METHODES INLINE //====================================================================== /*! Retourne l'identificateur du type de spectre. */ inline u_int SpecHCumul::TypeId ( ) const { return (spectrumTypeHCumul); } /*! Retourne le nom du type de spectre. */ inline string SpecHCumul::Type ( ) const { return (SPECTRUM_TYPE_TXT_HCUMUL); } /*! Returns the pointer to the reference histogram for the spectrum.*/ inline const TH1 * SpecHCumul::GetRefHisto ( ) const { return ( histo_src ); } //====================================================================== #endif
73  static Spectrum * NewSpectrumDef ( const string & name,
74  const string & defstr,
75  const EventManager * evt_mgr,
76  int & error );
77 
78 
79 //----------------------------------------------------------------------
80 // pour ROOT...
81  public:
82  /*! Définition à usage de ROOT... */
84 } ;
85 
86 
87 //======================================================================
88 // METHODES INLINE
89 //======================================================================
90 
91 /*! Retourne l'identificateur du type de spectre.
92  */
93 inline u_int SpecHCumul::TypeId ( ) const
94  { return (spectrumTypeHCumul); }
95 
96 /*! Retourne le nom du type de spectre.
97  */
98 inline string SpecHCumul::Type ( ) const
99  { return (SPECTRUM_TYPE_TXT_HCUMUL); }
100 
101 /*! Returns the pointer to the reference histogram for the spectrum.*/
102 inline const TH1 * SpecHCumul::GetRefHisto ( ) const
103  { return ( histo_src ); }
104 
105 
106 
107 //======================================================================
108 #endif
Definition: Spec2Dim.hh:23
GObject(SpecHCumul)
const TH1 * GetRefHisto() const
Definition: SpecHCumul.hh:102
const TH1 * histo_src
Pointer to the histogram to cumulate.
Definition: SpecHCumul.hh:28
Definition: Spectrum.hh:222
virtual string Definition() const
Definition: SpecHCumul.cpp:143
Definition: SpecHCumul.hh:20
virtual void IncrementSpectrum()
Definition: SpecHCumul.cpp:128
virtual string DefinitionString() const
Definition: SpecHCumul.cpp:162
virtual TH1 * SetHistoCumul(const TH1 *hptr, u_int ny, double y1, double y2)
Definition: SpecHCumul.cpp:77
virtual ~SpecHCumul()
Definition: SpecHCumul.cpp:61
#define SPECTRUM_TYPE_TXT_HCUMUL
Nom du type de spectre: event by event superimosed 1D histogram.
Definition: Spectrum.hh:119
u_int TypeId() const
Definition: SpecHCumul.hh:93
string Type() const
Definition: SpecHCumul.hh:98
Definition: EventManager.hh:59
SpecHCumul(const string &spec_name, Spectrum *spec, const u_int ny, double y1, double y2)
Definition: SpecHCumul.cpp:23
static Spectrum * NewSpectrumDef(const string &name, const string &defstr, const EventManager *evt_mgr, int &error)
Definition: SpecHCumul.cpp:185
ClassDef(SpecHCumul, 0)