Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
InitialFromFile.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file InitialFromFile.h
1
/*******************************************************************************
2
* Copyright (c) The JETSCAPE Collaboration, 2018
3
*
4
* Modular, task-based framework for simulating all aspects of heavy-ion collisions
5
*
6
* For the list of contributors see AUTHORS.
7
*
8
* Report issues at https://github.com/JETSCAPE/JETSCAPE/issues
9
*
10
* or via email to bugs.jetscape@gmail.com
11
*
12
* Distributed under the GNU General Public License 3.0 (GPLv3 or later).
13
* See COPYING for details.
14
******************************************************************************/
15
16
#ifndef INITIALFROMFILE_H
17
#define INITIALFROMFILE_H
18
19
#include <iostream>
20
#include <string>
21
#include <sstream>
22
#include <cmath>
23
#include "hdf5.h"
24
#include "
Hydroinfo_h5.h
"
25
#include "
JetScapeModuleBase.h
"
26
#include "
InitialState.h
"
27
#include "
JetScapeLogger.h
"
28
29
using namespace
Jetscape;
30
31
class
InitialFromFile
:
public
Jetscape::InitialState
{
32
// this is wrapper class to read external files that
33
// stores initial number of binary collisions and corresponding
34
// configurations
35
public
:
36
InitialFromFile
();
37
~
InitialFromFile
();
38
42
//void Init();
43
46
void
Exec();
47
50
void
Clear
();
51
52
void
InitTask();
53
57
virtual
void
Write
(weak_ptr<JetScapeWriter> w);
58
61
double
GetNpart
() {
return
npart
; };
62
65
double
GetNcoll
() {
return
ncoll; };
66
69
double
GetTotalEntropy() {
return
totalentropy; };
70
71
private
:
72
// the hdf5 file pointer, e.g. *.hdf5
73
hid_t H5file_ptr_;
74
75
// the hdf5/group pointer, e.g. /event0
76
hid_t
H5group_ptr_
;
77
79
void
ReadConfigs();
80
82
void
ReadNbcDist();
83
85
void
ReadEntropyDist();
86
88
HydroinfoH5
*
h5_helper_
;
89
90
int
dim_x_,
dim_y_
;
91
92
double
npart
= -1;
93
double
ncoll = -1;
94
double
totalentropy = -1;
95
96
// Allows the registration of the module so that it is available to be used by the Jetscape framework.
97
static
RegisterJetScapeModule<InitialFromFile>
reg
;
98
};
99
100
#endif // INITIALFROMFILE_H
JETSCAPE
blob
main
src
initialstate
InitialFromFile.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:25
using
1.8.2 with
sPHENIX GitHub integration