Geant4  10.03
G4ToolsAnalysisManager.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // $Id: G4ToolsAnalysisManager.hh 91012 2015-06-15 10:38:07Z ihrivnac $
27 
28 // The common implementation of analysis manager classes.
29 
30 // Author: Ivana Hrivnacova, 18/06/2013 (ivana@ipno.in2p3.fr)
31 
32 #ifndef G4ToolsAnalysisManager_h
33 #define G4ToolsAnalysisManager_h 1
34 
35 #include "G4VAnalysisManager.hh"
36 #include "globals.hh"
37 
38 #include "tools/histo/h1d"
39 #include "tools/histo/h2d"
40 #include "tools/histo/h3d"
41 #include "tools/histo/p1d"
42 #include "tools/histo/p2d"
43 #include "tools/wroot/ntuple"
44 
45 class G4H1ToolsManager;
46 class G4H2ToolsManager;
47 class G4H3ToolsManager;
48 class G4P1ToolsManager;
49 class G4P2ToolsManager;
50 
51 namespace tools {
52 namespace histo {
53 class hmpi;
54 }
55 }
56 
58 {
59  public:
60  explicit G4ToolsAnalysisManager(const G4String& type, G4bool isMaster = true);
61  virtual ~G4ToolsAnalysisManager();
62 
63  // Access methods
64  tools::histo::h1d* GetH1(G4int id, G4bool warn = true,
65  G4bool onlyIfActive = true) const;
66  tools::histo::h2d* GetH2(G4int id, G4bool warn = true,
67  G4bool onlyIfActive = true) const;
68  tools::histo::h3d* GetH3(G4int id, G4bool warn = true,
69  G4bool onlyIfActive = true) const;
70  tools::histo::p1d* GetP1(G4int id, G4bool warn = true,
71  G4bool onlyIfActive = true) const;
72  tools::histo::p2d* GetP2(G4int id, G4bool warn = true,
73  G4bool onlyIfActive = true) const;
74 
75  // Iterators
76  std::vector<tools::histo::h1d*>::iterator BeginH1();
77  std::vector<tools::histo::h1d*>::iterator EndH1();
78  std::vector<tools::histo::h1d*>::const_iterator BeginConstH1() const;
79  std::vector<tools::histo::h1d*>::const_iterator EndConstH1() const;
80 
81  std::vector<tools::histo::h2d*>::iterator BeginH2();
82  std::vector<tools::histo::h2d*>::iterator EndH2();
83  std::vector<tools::histo::h2d*>::const_iterator BeginConstH2() const;
84  std::vector<tools::histo::h2d*>::const_iterator EndConstH2() const;
85 
86  std::vector<tools::histo::h3d*>::iterator BeginH3();
87  std::vector<tools::histo::h3d*>::iterator EndH3();
88  std::vector<tools::histo::h3d*>::const_iterator BeginConstH3() const;
89  std::vector<tools::histo::h3d*>::const_iterator EndConstH3() const;
90 
91  std::vector<tools::histo::p1d*>::iterator BeginP1();
92  std::vector<tools::histo::p1d*>::iterator EndP1();
93  std::vector<tools::histo::p1d*>::const_iterator BeginConstP1() const;
94  std::vector<tools::histo::p1d*>::const_iterator EndConstP1() const;
95 
96  std::vector<tools::histo::p2d*>::iterator BeginP2();
97  std::vector<tools::histo::p2d*>::iterator EndP2();
98  std::vector<tools::histo::p2d*>::const_iterator BeginConstP2() const;
99  std::vector<tools::histo::p2d*>::const_iterator EndConstP2() const;
100 
101  std::vector<tools::wroot::ntuple*>::iterator BeginNtuple();
102  std::vector<tools::wroot::ntuple*>::iterator EndNtuple();
103  std::vector<tools::wroot::ntuple*>::const_iterator BeginConstNtuple() const;
104  std::vector<tools::wroot::ntuple*>::const_iterator EndConstNtuple() const;
105 
106  protected:
107  // virtual methods from base class
108  virtual G4bool PlotImpl() final;
109  virtual G4bool MergeImpl(tools::histo::hmpi* hmpi) final;
110  // methods
111  G4bool Reset();
112 
113  // data members
119  };
120 
122 
123 #endif
124 
std::vector< tools::wroot::ntuple * >::const_iterator BeginConstNtuple() const
std::vector< tools::histo::h2d * >::iterator BeginH2()
tools::histo::p1d * GetP1(G4int id, G4bool warn=true, G4bool onlyIfActive=true) const
std::vector< tools::histo::p1d * >::const_iterator BeginConstP1() const
std::vector< tools::histo::h3d * >::const_iterator EndConstH3() const
std::vector< tools::histo::p2d * >::const_iterator BeginConstP2() const
int G4int
Definition: G4Types.hh:78
std::vector< tools::histo::p2d * >::iterator EndP2()
std::vector< tools::histo::h3d * >::const_iterator BeginConstH3() const
std::vector< tools::histo::h2d * >::const_iterator EndConstH2() const
std::vector< tools::histo::p1d * >::const_iterator EndConstP1() const
std::vector< tools::histo::h1d * >::iterator BeginH1()
std::vector< tools::histo::p1d * >::iterator EndP1()
std::vector< tools::wroot::ntuple * >::iterator EndNtuple()
std::vector< tools::histo::h1d * >::const_iterator EndConstH1() const
std::vector< tools::histo::h1d * >::iterator EndH1()
bool G4bool
Definition: G4Types.hh:79
std::vector< tools::histo::p2d * >::const_iterator EndConstP2() const
std::vector< tools::wroot::ntuple * >::iterator BeginNtuple()
std::vector< tools::wroot::ntuple * >::const_iterator EndConstNtuple() const
std::vector< tools::histo::p2d * >::iterator BeginP2()
tools::histo::h2d * GetH2(G4int id, G4bool warn=true, G4bool onlyIfActive=true) const
std::vector< tools::histo::h3d * >::iterator EndH3()
tools::histo::h3d * GetH3(G4int id, G4bool warn=true, G4bool onlyIfActive=true) const
std::vector< tools::histo::p1d * >::iterator BeginP1()
virtual G4bool PlotImpl() final
tools::histo::h1d * GetH1(G4int id, G4bool warn=true, G4bool onlyIfActive=true) const
std::vector< tools::histo::h3d * >::iterator BeginH3()
G4ToolsAnalysisManager(const G4String &type, G4bool isMaster=true)
std::vector< tools::histo::h2d * >::const_iterator BeginConstH2() const
std::vector< tools::histo::h1d * >::const_iterator BeginConstH1() const
tools::histo::p2d * GetP2(G4int id, G4bool warn=true, G4bool onlyIfActive=true) const
std::vector< tools::histo::h2d * >::iterator EndH2()
virtual G4bool MergeImpl(tools::histo::hmpi *hmpi) final