Geant4-11
G4ToolsAnalysisReader.cc
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
27// Author: Ivana Hrivnacova, 20/07/2015 (ivana@ipno.in2p3.fr)
28
30#include "G4H1ToolsManager.hh"
31#include "G4H2ToolsManager.hh"
32#include "G4H3ToolsManager.hh"
33#include "G4P1ToolsManager.hh"
34#include "G4P2ToolsManager.hh"
35
36//_____________________________________________________________________________
38 : G4VAnalysisReader(type)
39{
40 // Create managers
46 // The managers will be deleted by the base class
47
48 // Set managers to base class which takes then their ownership
54}
55
56//
57// protected methods
58//
59
60//_____________________________________________________________________________
62 const G4String& fileName,
63 const G4String& dirName,
64 G4bool isUserFileName)
65{
66 return ReadTImpl<tools::histo::h1d>(
67 h1Name, fileName, dirName, isUserFileName, fH1Manager);
68}
69
70//_____________________________________________________________________________
72 const G4String& fileName,
73 const G4String& dirName,
74 G4bool isUserFileName)
75{
76 return ReadTImpl<tools::histo::h2d>(
77 h2Name, fileName, dirName, isUserFileName, fH2Manager);
78}
79
80//_____________________________________________________________________________
82 const G4String& fileName,
83 const G4String& dirName,
84 G4bool isUserFileName)
85{
86 return ReadTImpl<tools::histo::h3d>(
87 h3Name, fileName, dirName, isUserFileName, fH3Manager);
88}
89
90//_____________________________________________________________________________
92 const G4String& fileName,
93 const G4String& dirName,
94 G4bool isUserFileName)
95{
96 return ReadTImpl<tools::histo::p1d>(
97 p1Name, fileName, dirName, isUserFileName, fP1Manager);
98}
99
100//_____________________________________________________________________________
102 const G4String& fileName,
103 const G4String& dirName,
104 G4bool isUserFileName)
105{
106 return ReadTImpl<tools::histo::p2d>(
107 p2Name, fileName, dirName, isUserFileName, fP2Manager);
108}
109
110//_____________________________________________________________________________
112{
113// Reset histograms and profiles
114
115 auto result = true;
116
117 result &= fH1Manager->Reset();
118 result &= fH2Manager->Reset();
119 result &= fH3Manager->Reset();
120 result &= fP1Manager->Reset();
121 result &= fP2Manager->Reset();
122
123 return result;
124}
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
G4bool Reset()
G4H3ToolsManager * fH3Manager
G4ToolsAnalysisReader(const G4String &type)
virtual G4int ReadP1Impl(const G4String &p1Name, const G4String &fileName, const G4String &dirName, G4bool isUserFileName) final
G4P1ToolsManager * fP1Manager
virtual G4int ReadH1Impl(const G4String &h1Name, const G4String &fileName, const G4String &dirName, G4bool isUserFileName) final
G4P2ToolsManager * fP2Manager
virtual G4int ReadP2Impl(const G4String &p2Name, const G4String &fileName, const G4String &dirName, G4bool isUserFileName) final
G4H1ToolsManager * fH1Manager
G4H2ToolsManager * fH2Manager
virtual G4int ReadH3Impl(const G4String &h3Name, const G4String &fileName, const G4String &dirName, G4bool isUserFileName) final
virtual G4int ReadH2Impl(const G4String &h2Name, const G4String &fileName, const G4String &dirName, G4bool isUserFileName) final
void SetP1Manager(G4VP1Manager *p1Manager)
void SetP2Manager(G4VP2Manager *p2Manager)
G4AnalysisManagerState fState
void SetH2Manager(G4VH2Manager *h2Manager)
void SetH1Manager(G4VH1Manager *h1Manager)
void SetH3Manager(G4VH3Manager *h3Manager)