GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TYYYEventSource.h
Go to the documentation of this file.
1// $Id$
2//-----------------------------------------------------------------------
3// The GSI Online Offline Object Oriented (Go4) Project
4// Experiment Data Processing at EE department, GSI
5//-----------------------------------------------------------------------
6// Copyright (C) 2000- GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
7// Planckstr. 1, 64291 Darmstadt, Germany
8// Contact: http://go4.gsi.de
9//-----------------------------------------------------------------------
10// This software can be used under the license agreements as stated
11// in Go4License.txt file which is part of the distribution.
12//-----------------------------------------------------------------------
13
14#ifndef TYYYEventSource_H
15#define TYYYEventSource_H
16
17#include "TGo4EventSource.h"
18#include <fstream>
19
20class TYYYRawEvent;
22
24 public:
25
27
29 TYYYEventSource(const char *name, const char *args, Int_t port);
30
33
34 virtual ~TYYYEventSource();
35
37 virtual Int_t Open();
38
40 virtual Int_t Close();
41
43 Bool_t CheckEventClass(TClass *cl) override;
44
51 Bool_t BuildEvent(TGo4EventElement *dest) override;
52
53 const char *GetArgs() const { return fxArgs.Data(); }
54
55 void SetArgs(const char *arg) { fxArgs = arg; }
56
57 Int_t GetPort() const { return fiPort; }
58
59 void SetPort(Int_t val) { fiPort = val; }
60
61 private:
62
63 Bool_t fbIsOpen{kFALSE};
64
66 TString fxArgs;
67
69 Int_t fiPort{0};
70
72 std::ifstream *fxFile{nullptr};
73
74 ClassDefOverride(TYYYEventSource, 1)
75};
76
77#endif
The abstract base class for the data elements of which the unpacked events (or detector structure dat...
Int_t fiPort
Optional port number.
Bool_t BuildEvent(TGo4EventElement *dest) override
This methods actually fills the target event class which is passed as pointer.
void SetPort(Int_t val)
std::ifstream * fxFile
file that contains the data in ascii format.
virtual Int_t Open()
Open the file or connection.
TString fxArgs
Optional argument string.
Bool_t CheckEventClass(TClass *cl) override
This method checks if event class is suited for the source.
Int_t GetPort() const
virtual ~TYYYEventSource()
const char * GetArgs() const
void SetArgs(const char *arg)
virtual Int_t Close()
Close the file or connection.
Example for user defined raw event class.