Geant4  10.01.p01
G4VP1Manager.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$
27 
28 // Base class for P1 manager.
29 //
30 // Author: Ivana Hrivnacova, 24/07/2014 (ivana@ipno.in2p3.fr)
31 
32 #ifndef G4VP1Manager_h
33 #define G4VP1Manager_h 1
34 
35 #include "G4BaseAnalysisManager.hh"
36 #include "globals.hh"
37 
38 #include <vector>
39 
40 class G4HnManager;
42 
44 {
45  // Disable using the object managers outside
46  friend class G4VAnalysisManager;
47  friend class G4VAnalysisReader;
48 
49  protected:
51  virtual ~G4VP1Manager();
52 
53  // Methods for handling profiles
54  virtual G4int CreateP1(const G4String& name, const G4String& title,
55  G4int nbins, G4double xmin, G4double xmax,
56  G4double ymin = 0, G4double ymax = 0,
57  const G4String& xunitName = "none",
58  const G4String& yunitName = "none",
59  const G4String& xfcnName = "none",
60  const G4String& yfcnName = "none",
61  const G4String& xbinScheme = "linear") = 0;
62  virtual G4int CreateP1(const G4String& name, const G4String& title,
63  const std::vector<G4double>& edges,
64  G4double ymin = 0, G4double ymax = 0,
65  const G4String& xunitName = "none",
66  const G4String& yunitName = "none",
67  const G4String& xfcnName = "none",
68  const G4String& yfcnName = "none") = 0;
69 
70  virtual G4bool SetP1(G4int id,
71  G4int nbins, G4double xmin, G4double xmax,
72  G4double ymin = 0, G4double ymax = 0,
73  const G4String& xunitName = "none",
74  const G4String& yunitName = "none",
75  const G4String& xfcnName = "none",
76  const G4String& yfcnName = "none",
77  const G4String& xbinScheme = "linear") = 0;
78  virtual G4bool SetP1(G4int id,
79  const std::vector<G4double>& edges,
80  G4double ymin = 0, G4double ymax = 0,
81  const G4String& xunitName = "none",
82  const G4String& yunitName = "none",
83  const G4String& xfcnName = "none",
84  const G4String& yfcnName = "none") = 0;
85 
86  virtual G4bool ScaleP1(G4int id, G4double factor) = 0;
87 
88  // Methods to fill profiles
89  virtual G4bool FillP1(G4int id, G4double xvalue, G4double yvalue,
90  G4double weight = 1.0) = 0;
91 
92  // Access methods
93  virtual G4int GetP1Id(const G4String& name, G4bool warn = true) const = 0;
94 
95  // Access to P1 parameters
96  virtual G4int GetP1Nbins(G4int id) const = 0;
97  virtual G4double GetP1Xmin(G4int id) const = 0;
98  virtual G4double GetP1Xmax(G4int id) const = 0;
99  virtual G4double GetP1XWidth(G4int id) const = 0;
100  virtual G4double GetP1Ymin(G4int id) const = 0;
101  virtual G4double GetP1Ymax(G4int id) const = 0;
102 
103  // Setters for attributes for plotting
104  virtual G4bool SetP1Title(G4int id, const G4String& title) = 0;
105  virtual G4bool SetP1XAxisTitle(G4int id, const G4String& title) = 0;
106  virtual G4bool SetP1YAxisTitle(G4int id, const G4String& title) = 0;
107 
108  // Access attributes for plotting
109  virtual G4String GetP1Title(G4int id) const = 0;
110  virtual G4String GetP1XAxisTitle(G4int id) const = 0;
111  virtual G4String GetP1YAxisTitle(G4int id) const = 0;
112 
113  // Methods to manipulate profiles
114  // virtual G4bool WriteOnAscii(std::ofstream& output) = 0;
115 
116  // data members
118 
119  private:
120  // Not implemented copy constructor
121  G4VP1Manager(const G4VP1Manager& rhs);
122  // Not implemented assignment operator
123  G4VP1Manager& operator=(const G4VP1Manager& rhs);
124 };
125 
126 #endif
127 
virtual G4int GetP1Nbins(G4int id) const =0
virtual G4bool SetP1XAxisTitle(G4int id, const G4String &title)=0
G4String name
Definition: TRTMaterials.hh:40
int G4int
Definition: G4Types.hh:78
G4HnManager * fHnManager
virtual G4String GetP1Title(G4int id) const =0
virtual G4bool SetP1Title(G4int id, const G4String &title)=0
virtual G4String GetP1XAxisTitle(G4int id) const =0
G4VP1Manager & operator=(const G4VP1Manager &rhs)
virtual G4bool SetP1YAxisTitle(G4int id, const G4String &title)=0
bool G4bool
Definition: G4Types.hh:79
virtual G4double GetP1Xmin(G4int id) const =0
virtual G4bool ScaleP1(G4int id, G4double factor)=0
G4VP1Manager(const G4AnalysisManagerState &state)
Definition: G4VP1Manager.cc:34
virtual G4double GetP1Ymax(G4int id) const =0
static const G4double factor
virtual G4double GetP1Ymin(G4int id) const =0
virtual G4int CreateP1(const G4String &name, const G4String &title, G4int nbins, G4double xmin, G4double xmax, G4double ymin=0, G4double ymax=0, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &xbinScheme="linear")=0
virtual G4bool FillP1(G4int id, G4double xvalue, G4double yvalue, G4double weight=1.0)=0
double G4double
Definition: G4Types.hh:76
virtual G4bool SetP1(G4int id, G4int nbins, G4double xmin, G4double xmax, G4double ymin=0, G4double ymax=0, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &xbinScheme="linear")=0
virtual G4String GetP1YAxisTitle(G4int id) const =0
virtual G4double GetP1XWidth(G4int id) const =0
virtual G4double GetP1Xmax(G4int id) const =0
virtual ~G4VP1Manager()
Definition: G4VP1Manager.cc:42
virtual G4int GetP1Id(const G4String &name, G4bool warn=true) const =0