-
Notifications
You must be signed in to change notification settings - Fork 101
Expand file tree
/
Copy pathFairSource.h
More file actions
66 lines (57 loc) · 2.4 KB
/
FairSource.h
File metadata and controls
66 lines (57 loc) · 2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/********************************************************************************
* Copyright (C) 2014-2023 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
* copied verbatim in the file "LICENSE" *
********************************************************************************/
// -----------------------------------------------------------------------------
// ----- -----
// ----- FairSource -----
// ----- Created 01.11.2013 by F. Uhlig -----
// ----- -----
// -----------------------------------------------------------------------------
#ifndef FAIRSOURCE_H
#define FAIRSOURCE_H
#include <Rtypes.h>
#include <TObject.h>
class FairEventHeader;
enum Source_Type
{
kONLINE,
kFILE
};
class FairSource : public TObject
{
public:
FairSource();
FairSource(const FairSource& source);
~FairSource() override;
virtual Bool_t Init() = 0;
virtual Int_t ReadEvent(UInt_t = 0) = 0;
virtual Bool_t SpecifyRunId() = 0;
virtual void Close() = 0;
virtual void Reset() = 0;
virtual Bool_t ActivateObject(TObject**, const char*) { return kFALSE; }
virtual Bool_t ActivateObjectAny(void**, const std::type_info&, const char*) { return kFALSE; }
virtual Source_Type GetSourceType() = 0;
virtual void SetParUnpackers() = 0;
virtual Bool_t InitUnpackers() = 0;
virtual Bool_t ReInitUnpackers() = 0;
/**Check the maximum event number we can run to*/
virtual Int_t CheckMaxEventNo(Int_t = 0) { return -1; }
/**Read the tree entry on one branch**/
virtual void ReadBranchEvent(const char*) {}
virtual void ReadBranchEvent(const char*, Int_t) {}
virtual void FillEventHeader(FairEventHeader* feh);
void SetRunId(Int_t runId) { fRunId = runId; }
Int_t GetRunId() const { return fRunId; }
void Finish() { FinishTask(); }
protected:
Int_t fRunId;
private:
virtual void FinishTask() {}
public:
ClassDefOverride(FairSource, 2);
};
#endif