Geant4
11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4CascadeChannelTables.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
// Factory class to return pointer to Bertini cross-section table based on
28
// collision initial state (hadron type codes).
29
//
30
// Author: Michael Kelsey (SLAC)
31
//
32
// 20110728 M. Kelsey -- Use static instance() function to work around
33
// "disappearance" bug on Linux (GCC 4.1.2).
34
// 20110915 M. Kelsey -- Move static implementations (won't work on Windows);
35
// Add local table instantiating function (to replace self-reg)
36
// 20110923 M. Kelsey -- Add optional stream& argument to printTable().
37
// 20130129 M. Kelsey -- Drop load-on-demand interfaces, fill in ctor
38
// 20130306 M. Kelsey -- Add inclusive printing of all tables here
39
// 20130429 M. Kelsey -- Change instance to thread-local pointer.
40
// 20141121 M. Kelsey -- Dtor must be public for end-of-job cleanup.
41
42
#ifndef G4_CASCADE_CHANNEL_TABLES_HH
43
#define G4_CASCADE_CHANNEL_TABLES_HH
44
45
#include "
globals.hh
"
46
#include <iosfwd>
47
#include <map>
48
49
class
G4CascadeChannel
;
50
51
52
class
G4CascadeChannelTables
{
53
public
:
54
// Argument is interaction code, product of G4InuclEP types
55
static
const
G4CascadeChannel
*
GetTable
(
G4int
initialState);
56
57
// Arguments are individual G4InuclElementaryParticle types
58
static
const
G4CascadeChannel
*
GetTable
(
G4int
had1,
G4int
had2);
59
60
// Convenience functions for diagnostic output
61
static
void
Print
(std::ostream& os=
G4cout
);
62
static
void
PrintTable
(
G4int
initialState, std::ostream& os=
G4cout
);
63
64
public
:
65
~G4CascadeChannelTables
();
66
67
private
:
68
static
const
G4CascadeChannelTables
& instance();
// Singleton
69
static
G4ThreadLocal
G4CascadeChannelTables
* theInstance;
// per thread
70
71
G4CascadeChannelTables
();
72
73
// Fetch table from map if already registered, or return null
74
const
G4CascadeChannel
* FindTable(
G4int
initialState)
const
;
75
76
typedef
std::map<G4int, G4CascadeChannel*> TableMap;
77
TableMap tables;
78
};
79
80
#endif
/* G4_CASCADE_CHANNEL_TABLES_HH */
G4int
int G4int
Definition
G4Types.hh:85
G4cout
G4GLOB_DLL std::ostream G4cout
G4CascadeChannelTables
Definition
G4CascadeChannelTables.hh:52
G4CascadeChannelTables::Print
static void Print(std::ostream &os=G4cout)
Definition
G4CascadeChannelTables.cc:167
G4CascadeChannelTables::GetTable
static const G4CascadeChannel * GetTable(G4int initialState)
Definition
G4CascadeChannelTables.cc:142
G4CascadeChannelTables::~G4CascadeChannelTables
~G4CascadeChannelTables()
Definition
G4CascadeChannelTables.cc:133
G4CascadeChannelTables::PrintTable
static void PrintTable(G4int initialState, std::ostream &os=G4cout)
Definition
G4CascadeChannelTables.cc:175
G4CascadeChannel
Definition
G4CascadeChannel.hh:42
globals.hh
G4ThreadLocal
#define G4ThreadLocal
Definition
tls.hh:77
geant4-v11.2.2
source
processes
hadronic
models
cascade
cascade
include
G4CascadeChannelTables.hh
Generated by
1.12.0