CbmRoot
Loading...
Searching...
No Matches
CbmSourceDigiEvents.h
Go to the documentation of this file.
1/* Copyright (C) 2024 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Volker Friese[committer] */
4
5#pragma once // include this header only once per compilation unit
6
7#include "CbmDigiEvent.h"
8#include "DigiData.h"
10
11#include <FairSource.h>
12
13#include <cstdint>
14#include <memory>
15#include <string>
16#include <vector>
17
18
28class CbmSourceDigiEvents : public FairSource {
29
30 public:
36 CbmSourceDigiEvents(const char* fileName = "");
37
40
43
46
48 virtual void Close();
49
53 virtual Source_Type GetSourceType() { return fSourceType; }
54
56 virtual Bool_t Init();
57
59 virtual Bool_t InitUnpackers() { return kTRUE; }
60
62 Int_t ReadEvent(UInt_t = 0);
63
65 virtual Bool_t ReInitUnpackers() { return kTRUE; }
66
68 virtual void Reset() {}
69
71 virtual void SetParUnpackers() {}
72
76 void SetSourceType(Source_Type type) { fSourceType = type; }
77
79 Bool_t SpecifyRunId() { return kTRUE; }
80
81
82 private:
84 std::string fInputFileName = {};
85
87 std::unique_ptr<cbm::algo::RecoResultsInputArchive> fArchive = nullptr;
88
90 std::vector<CbmDigiEvent>* fEvents = nullptr;
91
93 Source_Type fSourceType = Source_Type::kONLINE;
94
96 size_t fNumTs = 0;
97
99 size_t fNumEvents = 0;
100
101
102 ClassDef(CbmSourceDigiEvents, 1)
103};
Source class for reading from files resulting from online processing (containing DigiEvents)
virtual void Close()
Close source after end of run.
void SetSourceType(Source_Type type)
Set the Source Type.
CbmSourceDigiEvents(const char *fileName="")
Constructor.
CbmSourceDigiEvents & operator=(const CbmSourceDigiEvents &)=delete
Assignment operator - not implemented.
virtual void Reset()
Reset (forced by base class, not relevant here)
virtual Bool_t Init()
Initialisation.
std::unique_ptr< cbm::algo::RecoResultsInputArchive > fArchive
virtual void SetParUnpackers()
Set unpacker parameters (forced by base class, not relevant here)
Bool_t SpecifyRunId()
Set Run ID (forced by base class, not relevant here)
Source_Type fSourceType
type of source that is currently used
virtual Bool_t InitUnpackers()
Initialise unpackers (forced by base class, not relevant here)
CbmSourceDigiEvents(const CbmSourceDigiEvents &)=delete
Copy constructor - not implemented.
virtual Source_Type GetSourceType()
Source type.
Int_t ReadEvent(UInt_t=0)
Read one time slice from file.
std::vector< CbmDigiEvent > * fEvents
virtual Bool_t ReInitUnpackers()
Re-Initialise unpackers (forced by base class, not relevant here)
virtual ~CbmSourceDigiEvents()
Destructor.