Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4TScoreHistFiller.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
27#ifndef G4TScoreHistFiller_h
28#define G4TScoreHistFiller_h 1
29
30#include "G4VScoreHistFiller.hh"
31#include "globals.hh"
32
33#include <memory>
34
35// class description:
36//
37// This class implements filling histogram
38// In order to avoid introducing dependency on the analysis category,
39// the analysis manager type is defined via template.
40//
41// Created : M. Asai (Sept. 2020)
42//
43
44template <typename T>
46{
47 public:
48 G4TScoreHistFiller() = default;
49 virtual ~G4TScoreHistFiller() = default;
50
51 // methods
52 virtual void FillH1(G4int id, G4double value, G4double weight = 1.0);
53 virtual void FillH2(G4int id, G4double xvalue, G4double yvalue, G4double weight = 1.0);
54 virtual void FillH3(
55 G4int id, G4double xvalue, G4double yvalue, G4double zvalue, G4double weight = 1.0);
56 virtual void FillP1(G4int id, G4double xvalue, G4double yvalue, G4double weight = 1.0);
57 virtual void FillP2(
58 G4int id, G4double xvalue, G4double yvalue, G4double zvalue, G4double weight = 1.0);
59
60 virtual G4bool CheckH1(G4int id);
61 virtual G4bool CheckH2(G4int id);
62 virtual G4bool CheckH3(G4int id);
63 virtual G4bool CheckP1(G4int id);
64 virtual G4bool CheckP2(G4int id);
65
67 G4int GetVerboseLevel() const { return fVerboseLevel; }
68
69 protected:
70 // methods
72
73 private:
74 // methods
75 void CreateAnalysisManager();
76
77 // data members
78 T* fAnalysisManager = nullptr;
79 G4int fVerboseLevel = 0;
80 G4bool fIsInitialized = false;
81};
82
83#include "G4TScoreHistFiller.icc"
84
85#endif
double G4double
Definition G4Types.hh:83
bool G4bool
Definition G4Types.hh:86
int G4int
Definition G4Types.hh:85
virtual G4bool CheckH1(G4int id)
virtual G4VScoreHistFiller * CreateInstance() const
virtual void FillH2(G4int id, G4double xvalue, G4double yvalue, G4double weight=1.0)
virtual G4bool CheckP2(G4int id)
virtual G4bool CheckH3(G4int id)
G4int GetVerboseLevel() const
virtual G4bool CheckP1(G4int id)
virtual ~G4TScoreHistFiller()=default
virtual void FillP1(G4int id, G4double xvalue, G4double yvalue, G4double weight=1.0)
virtual void FillH1(G4int id, G4double value, G4double weight=1.0)
virtual void FillH3(G4int id, G4double xvalue, G4double yvalue, G4double zvalue, G4double weight=1.0)
virtual G4bool CheckH2(G4int id)
virtual void FillP2(G4int id, G4double xvalue, G4double yvalue, G4double zvalue, G4double weight=1.0)
void SetVerboseLevel(G4int value)
G4TScoreHistFiller()=default