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
JetScapeWriterStreamFilter.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file JetScapeWriterStreamFilter.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
// jetscape writer ascii class, filter
17
18
#ifndef JETSCAPEWRITERSTREAMFILTER_H
19
#define JETSCAPEWRITERSTREAMFILTER_H
20
21
#include "
JetScapeWriterStream.h
"
22
#include "
sigslot.h
"
23
24
#define JETSCAPEWRITER_PARTONSHOWER 1
25
#define JETSCAPEWRITER_PARTON 2
26
#define JETSCAPEWRITER_VERTEX 4
27
#define JETSCAPEWRITER_HADRON 8
28
29
30
namespace
Jetscape {
31
32
template
<
class
T>
33
class
JetScapeWriterStreamFilter
:
public
JetScapeWriterStream
<T>
34
{
35
36
public
:
37
38
JetScapeWriterStreamFilter<T>
() {};
39
JetScapeWriterStreamFilter<T>
(
string
m_file_name_out,
unsigned
char
filter
):
40
JetScapeWriterStream<T>
(m_file_name_out){
41
displayFilter
=
filter
;
42
}
43
virtual
~
JetScapeWriterStreamFilter<T>
(){};
44
45
sigslot::signal1<vector<shared_ptr<Hadron>
>& >
GetHadronList
;
46
47
//void Init();
48
//void Exec();
49
//
50
//bool GetStatus() {return output_file.good();}
51
//void Close() {output_file.close();}
52
//
53
//void WriteInitFileXML();
54
55
void
Write
(weak_ptr<PartonShower>
ps
){
56
if
(
displayFilter
&
JETSCAPEWRITER_PARTONSHOWER
)
57
{
JetScapeWriterStream<T>::Write
(ps);}}
58
59
void
Write
(weak_ptr<Parton>
p
){
60
if
(
displayFilter
&
JETSCAPEWRITER_PARTON
)
61
{
JetScapeWriterStream<T>::Write
(p);}}
62
63
void
Write
(weak_ptr<Vertex>
v
){
64
if
(
displayFilter
&
JETSCAPEWRITER_VERTEX
)
65
{
JetScapeWriterStream<T>::Write
(v);}}
66
67
void
Write
(weak_ptr<Hadron>
h
){
68
if
(
displayFilter
&
JETSCAPEWRITER_HADRON
)
69
{
JetScapeWriterStream<T>::Write
(h);}}
70
71
//void WriteHeaderToFile();
72
//
73
//void Write(string s) {output_file<<s<<endl;}
74
//void WriteComment(string s) {output_file<<"# "<<s<<endl;}
75
//void WriteWhiteSpace(string s) {output_file<<s<<" ";}
76
//void WriteEvent();
77
78
protected
:
79
unsigned
char
displayFilter
;
80
81
};
82
83
typedef
JetScapeWriterStreamFilter<ofstream>
JetScapeWriterAsciiFilter
;
84
#ifdef USE_GZIP
85
typedef
JetScapeWriterStreamFilter<ogzstream>
JetScapeWriterAsciiGZFilter;
86
#endif
87
88
}
// end namespace Jetscape
89
90
#endif // JETSCAPEWRITERSTREAM_H
JETSCAPE
blob
main
src
framework
JetScapeWriterStreamFilter.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:24
using
1.8.2 with
sPHENIX GitHub integration