Pluto v6.3.0
Loading...
Searching...
No Matches
PFileOutput.h
Go to the documentation of this file.
1// Author: Ingo Froehlich
2// Written: 14/05/2007
3// Modified:
4// PFileOutput Class Header
5
6#ifndef _PFILEOUTPUT_H_
7#define _PFILEOUTPUT_H_
8
9#include "PParticle.h"
10#include "PBulkInterface.h"
11#include "PChannel.h"
12
14
15 private:
16
17 protected:
18
19 Int_t cnt;
20 Int_t subcnt;
21 Int_t getVERTEX;
22 Int_t writeINDEX;
26 Int_t nChannel;
27
28 Int_t branchNum;
29 const char *branchName;
30
31 const char *filename;
32
33 public:
35
36 void SetHeader(Int_t _cnt,
37 Int_t _allPARTICLES,
38 Int_t _getVERTEX,
39 Int_t _asciiOUTPUT,
40 Int_t _writeINDEX,
41 PChannel **_channel,
42 Int_t _nCahnnel
43 ) {
44 //number of expected WriteParticles:
45 cnt = _cnt;
46 //PReaction flags:
47 allPARTICLES = _allPARTICLES;
48 getVERTEX = _getVERTEX;
49 asciiOUTPUT = _asciiOUTPUT;
50 writeINDEX = _writeINDEX;
51 channel = _channel;
52 nChannel = _nCahnnel;
53 };
54
55 void SetBranchHeader(Int_t _subcnt, Int_t _branchNum, const char *_branchName) {
56 subcnt = _subcnt;
57 branchNum = _branchNum;
58 branchName = _branchName;
59 };
60
61 virtual bool OpenFile(const char *_filename); //filename
62 virtual bool CloseFile(void); //
63 virtual bool WriteEvent(void); //next event
64 virtual bool WriteEventHeader(void);
65 virtual bool WriteBranchHeader(void);
66 virtual bool WriteParticle(PParticle *par); //write single particle
67
68 const char *GetFilename() {
69 return filename;
70 };
71
72 ClassDef(PFileOutput, 0) // Pluto file output base class
73};
74#endif
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
PParticle * par[11]
virtual bool CloseFile(void)
Int_t allPARTICLES
transport writeINDEX switch from PReaction
Definition PFileOutput.h:23
Int_t asciiOUTPUT
transport allPARTICLES switch from PReaction
Definition PFileOutput.h:24
Int_t writeINDEX
transport getVERTEX switch from PReaction
Definition PFileOutput.h:22
Int_t nChannel
transport channel array from PReaction
Definition PFileOutput.h:26
virtual bool WriteParticle(PParticle *par)
virtual bool WriteEventHeader(void)
Int_t getVERTEX
number of particles in branch
Definition PFileOutput.h:21
virtual bool WriteEvent(void)
virtual bool OpenFile(const char *_filename)
Int_t branchNum
transport number of channels in array
Definition PFileOutput.h:28
virtual bool WriteBranchHeader(void)
const char * branchName
Branch number, 0:std branch, >0:additional branches.
Definition PFileOutput.h:29
const char * filename
Branch name.
Definition PFileOutput.h:31
const char * GetFilename()
Definition PFileOutput.h:68
PChannel ** channel
transport asciiOUTPUT switch from PReaction
Definition PFileOutput.h:25
void SetHeader(Int_t _cnt, Int_t _allPARTICLES, Int_t _getVERTEX, Int_t _asciiOUTPUT, Int_t _writeINDEX, PChannel **_channel, Int_t _nCahnnel)
Definition PFileOutput.h:36
Int_t subcnt
number of total particles in event
Definition PFileOutput.h:20
void SetBranchHeader(Int_t _subcnt, Int_t _branchNum, const char *_branchName)
Definition PFileOutput.h:55