Analysis Software
Documentation for sPHENIX simulation software
 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>
34 {
35 
36  public:
37 
39  JetScapeWriterStreamFilter<T>(string m_file_name_out, unsigned char filter):
40  JetScapeWriterStream<T>(m_file_name_out){
42  }
44 
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){
58 
59  void Write(weak_ptr<Parton> p){
62 
63  void Write(weak_ptr<Vertex> v){
66 
67  void Write(weak_ptr<Hadron> 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 
84 #ifdef USE_GZIP
85 typedef JetScapeWriterStreamFilter<ogzstream> JetScapeWriterAsciiGZFilter;
86 #endif
87 
88 } // end namespace Jetscape
89 
90 #endif // JETSCAPEWRITERSTREAM_H