GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4MbsFile.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 TGO4MBSFILE_H
15#define TGO4MBSFILE_H
16
17#include "TGo4MbsSource.h"
18
20class TList;
21
29
30class TGo4MbsFile : public TGo4MbsSource {
31 public:
32
33 TGo4MbsFile(const char *name);
34
36
38
40
42 Int_t Close() override;
43
45 Int_t Open() override;
46
48 Int_t NextEvent() override;
49
51 const char *GetTagName() const { return fxTagFile.Data(); }
52
53 const char *GetCurrentTagName() const { return fxCurrentTag.Data(); }
54
55 const char *GetCurrentFileName() const { return fxCurrentFile.Data(); }
56
58 const char *GetActiveName() const override;
59
61 static const char *fgcNOTAGFILE;
62
64 static const char *fgcLMDSUF;
65
67 static const char *fgcFILELISTSUF;
68
69 private:
70
71 void AddFileName(const char *name, const char *tagname = nullptr, bool isonly = kFALSE);
72
74 Int_t NextFile();
75
77 Int_t OpenFile();
78
80 Int_t CloseFile();
81
85 Int_t NewFileAction(Bool_t dosave = kTRUE);
86
88 TString fxTagFile;
89
92
94 TString fxCurrentTag;
95
98 TList *fxMultiFile{nullptr};
99
101 Bool_t fbFileOpen{kFALSE};
102
104 Bool_t fbShowInfo{kFALSE};
105
106 ClassDefOverride(TGo4MbsFile, 3)
107};
108
109#endif //TGO4MBSFILE_H
MBS file parameter.
Implements the gsi mbs lmd file source.
Definition TGo4MbsFile.h:30
const char * GetActiveName() const override
interface from eventsource base class to give active file
static const char * fgcFILELISTSUF
standard suffix for list of listmode files
Definition TGo4MbsFile.h:67
Int_t NextEvent() override
Requests the next event from mbs source.
static const char * fgcNOTAGFILE
string to indicate that no lmd tagfile is chosen
Definition TGo4MbsFile.h:61
Int_t Open() override
Open the file or connection.
TString fxCurrentFile
Currently processed file (for multiple input mode)
Definition TGo4MbsFile.h:91
const char * GetTagName() const
Name of the Tagfile.
Definition TGo4MbsFile.h:51
Int_t NewFileAction(Bool_t dosave=kTRUE)
Called whenever new file is opened in multiple mode.
Bool_t fbFileOpen
This indicates if the current file is open or not.
TList * fxMultiFile
file that contains the list of mbs filenames.
Definition TGo4MbsFile.h:98
void AddFileName(const char *name, const char *tagname=nullptr, bool isonly=kFALSE)
TString fxCurrentTag
Currently processed tagfile (for multiple input mode)
Definition TGo4MbsFile.h:94
static const char * fgcLMDSUF
standard suffix for listmode data files
Definition TGo4MbsFile.h:64
const char * GetCurrentTagName() const
Definition TGo4MbsFile.h:53
TGo4MbsFile(const char *name)
Int_t NextFile()
For multiple input mode: Open next file in list.
Int_t Close() override
Close the file or connection.
Int_t OpenFile()
Open current file/tagfile.
Int_t CloseFile()
Close current file/tagfile.
const char * GetCurrentFileName() const
Definition TGo4MbsFile.h:55
TString fxTagFile
Name of the tagfile associated with the listmode event file.
Definition TGo4MbsFile.h:88
Bool_t fbShowInfo
Indicates if mbs file should show information about new open file.
TGo4MbsSource()
default for streamer