Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
KFPHistogramSet.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file KFPHistogramSet.h
1 /*
2  * This file is part of KFParticle package
3  * Copyright (C) 2007-2019 FIAS Frankfurt Institute for Advanced Studies
4  * 2007-2019 Goethe University of Frankfurt
5  * 2007-2019 Ivan Kisel <I.Kisel@compeng.uni-frankfurt.de>
6  * 2007-2019 Maksym Zyzak
7  *
8  * KFParticle is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * KFParticle is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20  */
21 
22 #ifndef KFPHISTOGRAMSET
23 #define KFPHISTOGRAMSET
24 
25 #include "KFPHistogram1D.h"
26 #include "KFParticle.h"
27 
41 {
42  public:
43  KFPHistogramSet(int iPart=0);
45 
46  void Fill(const KFParticle& particle);
47 
48  inline int GetNHisto1D() const { return NHisto1D; }
49  inline int DataSize() const
50  {
51  int dataSize = 0;
52  for(int i=0; i<NHisto1D; i++)
53  dataSize += fKFPHistogram1D[i].DataSize();
54  return dataSize;
55  }
56  KFPHistogram1D GetHistogram1D(int iHistogram) const { return fKFPHistogram1D[iHistogram]; }
57 
63  inline void SetHisto1DBinContent(int iHisto, int iBin, int value) { fKFPHistogram1D[iHisto].SetBinContent(iBin,value); }
64 
65  inline void operator += ( const KFPHistogramSet &h )
66  {
67  for(int i=0; i<NHisto1D; i++)
69  }
70 
71  void SetHistogramMemory(int* pointer);
72 
73  private:
74  static const int NHisto1D = 17;
76 };
77 
78 #endif