Geant4  10.00.p01
G4XmlAnalysisManager.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: G4XmlAnalysisManager.hh 74257 2013-10-02 14:24:55Z gcosmo $
27 
28 // The main manager for Xml analysis.
29 // It delegates most of functions to the object specific managers.
30 
31 // Author: Ivana Hrivnacova, 18/06/2013 (ivana@ipno.in2p3.fr)
32 
33 #ifndef G4XmlAnalysisManager_h
34 #define G4XmlAnalysisManager_h 1
35 
36 #include "G4VAnalysisManager.hh"
37 #include "globals.hh"
38 
39 #include "tools/histo/h1d"
40 #include "tools/histo/h2d"
41 #include "tools/waxml/ntuple"
42 
43 
44 class G4XmlFileManager;
45 class G4H1ToolsManager;
46 class G4H2ToolsManager;
47 class G4XmlNtupleManager;
48 
50 {
51  public:
52  G4XmlAnalysisManager(G4bool isMaster = true);
54 
55  // static methods
57 
58  // Access methods
59  tools::histo::h1d* GetH1(G4int id, G4bool warn = true,
60  G4bool onlyIfActive = true) const;
61  tools::histo::h2d* GetH2(G4int id, G4bool warn = true,
62  G4bool onlyIfActive = true) const;
63  tools::waxml::ntuple* GetNtuple() const;
64  tools::waxml::ntuple* GetNtuple(G4int ntupleId) const;
65 
66  protected:
67  // virtual methods from base class
68  virtual G4bool OpenFileImpl(const G4String& fileName);
69  virtual G4bool WriteImpl();
70  virtual G4bool CloseFileImpl();
71 
72  private:
73  // static data members
76 
77  // methods
78  G4bool WriteH1();
79  G4bool WriteH2();
82  G4bool Reset();
83 
84  // data members
89 
90 };
91 
92 #include "G4XmlAnalysisManager.icc"
93 
94 #endif
95 
static G4XmlAnalysisManager * fgMasterInstance
G4XmlFileManager * fFileManager
virtual G4bool CloseFileImpl()
static G4XmlAnalysisManager * Instance()
G4H1ToolsManager * fH1Manager
G4H2ToolsManager * fH2Manager
G4XmlAnalysisManager(G4bool isMaster=true)
#define G4ThreadLocal
Definition: tls.hh:52
int G4int
Definition: G4Types.hh:78
static G4ThreadLocal G4XmlAnalysisManager * fgInstance
tools::waxml::ntuple * GetNtuple() const
virtual G4bool OpenFileImpl(const G4String &fileName)
tools::histo::h1d * GetH1(G4int id, G4bool warn=true, G4bool onlyIfActive=true) const
bool G4bool
Definition: G4Types.hh:79
G4XmlNtupleManager * fNtupleManager
tools::histo::h2d * GetH2(G4int id, G4bool warn=true, G4bool onlyIfActive=true) const