CbmRoot
Loading...
Searching...
No Matches
CbmSourceRecoTimeslice.h
Go to the documentation of this file.
1/* Copyright (C) 2025 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Sergei Zharko [committer] */
4
9
10#pragma once
11
13
14#include <FairSource.h>
15
16#include <cstdint>
17#include <memory>
18#include <string>
19#include <vector>
20
21class CbmTimeSlice;
23
26class CbmSourceRecoTimeslice : public FairSource {
27 public:
30 CbmSourceRecoTimeslice(const char* filename = "");
31
34
37
39 virtual ~CbmSourceRecoTimeslice() = default;
40
43
46
48 virtual void Close();
49
52 virtual Source_Type GetSourceType() { return fSourceType; }
53
55 virtual Bool_t Init();
56
58 virtual Bool_t InitUnpackers() { return kTRUE; }
59
61 virtual Int_t ReadEvent(UInt_t = 0);
62
64 virtual Bool_t ReInitUnpackers() { return kTRUE; }
65
67 virtual void Reset() {}
68
70 virtual void SetParUnpackers() {}
71
74 void SetSourceType(Source_Type type) { fSourceType = type; }
75
77 Bool_t SpecifyRunId() { return kTRUE; }
78
79 private:
81 void ClearOutputVectors();
82
83 //* Data containers
92
93 //* Auxilary variables
94
95 std::string fInputFileName{};
96
97 std::unique_ptr<cbm::algo::RecoResultsInputArchive> fArchive{nullptr};
100
101 size_t fNumTs{0};
102 Source_Type fSourceType{Source_Type::kONLINE};
103
104
106};
int Int_t
bool Bool_t
CbmSourceRecoTimeslice(const CbmSourceRecoTimeslice &)=delete
Copy constructor.
virtual Bool_t Init()
Initializes the source.
cbm::algo::StorableRecoResults::TrackHitIndexContainer_t * fTrackTofHitIndices
CbmTimeSlice * fTimeslice
Timeslice header (NOTE: legacy, will be deprecated soon)
cbm::PartitionedVector< cbm::algo::bmon::Hit > * fBmonHits
virtual Bool_t ReInitUnpackers()
Re-initialize unpackers (forced by the base class, not relevant)
virtual void SetParUnpackers()
Sets the unpacker parameters (forced byt the base class, not relevant)
virtual void Close()
Closes the source in the end of the run.
Source_Type fSourceType
A source type (use kONLINE not to skip the first timeslice)
ClassDef(CbmSourceRecoTimeslice, 1)
virtual Bool_t InitUnpackers()
Initializes unpackers (forced by the base class, not relevant)
CbmSourceRecoTimeslice(CbmSourceRecoTimeslice &&)=delete
Move constructor.
std::string fInputFileName
Input file name.
Bool_t SpecifyRunId()
Sets run ID (forced by base class, not relevant)
cbm::algo::StorableRecoResults::TrackHitIndexContainer_t * fTrackTrdHitIndices
size_t fNumTs
Timeslice counter.
void SetSourceType(Source_Type type)
Set the Source type.
CbmSourceRecoTimeslice & operator=(const CbmSourceRecoTimeslice &)=delete
Copy assignment operator.
cbm::PartitionedVector< cbm::algo::trd::Hit > * fTrdHits
cbm::algo::StorableRecoResults::TrackHitIndexContainer_t * fTrackStsHitIndices
cbm::algo::ca::Vector< cbm::algo::ca::Track > * fTracks
CbmTsEventHeader * fTsEventHeader
Timeslice event header.
virtual ~CbmSourceRecoTimeslice()=default
Destructor.
cbm::PartitionedVector< cbm::algo::tof::Hit > * fTofHits
CbmSourceRecoTimeslice(const char *filename="")
Constructor.
CbmSourceRecoTimeslice & operator=(CbmSourceRecoTimeslice &&)=delete
Move assignment operator.
std::unique_ptr< cbm::algo::RecoResultsInputArchive > fArchive
Input archive.
virtual Int_t ReadEvent(UInt_t=0)
Reads one timeslice from file.
void ClearOutputVectors()
Clears the output vectors.
virtual Source_Type GetSourceType()
Gets source type.
virtual void Reset()
Resets the instance (forced by the base class, not relevant)
cbm::PartitionedVector< cbm::algo::sts::Hit > * fStsHits
Bookkeeping of time-slice content.
A vector that is partitioned into multiple subvectors.
ca::Vector< std::vector< std::pair< uint32_t, uint32_t > > > TrackHitIndexContainer_t