CbmRoot
Loading...
Searching...
No Matches
CbmSourceTsArchive Class Reference

Source class for reading from archived time slice data. More...

#include <CbmSourceTsArchive.h>

Inheritance diagram for CbmSourceTsArchive:
[legend]
Collaboration diagram for CbmSourceTsArchive:
[legend]

Public Member Functions

 CbmSourceTsArchive (const char *fileName="")
 Constructor.
 
 CbmSourceTsArchive (std::vector< std::string > fileNames)
 Constructor.
 
virtual ~CbmSourceTsArchive ()
 Destructor.
 
 CbmSourceTsArchive (const CbmSourceTsArchive &)=delete
 Copy constructor - not implemented.
 
CbmSourceTsArchiveoperator= (const CbmSourceTsArchive &)=delete
 Assignment operator - not implemented.
 
void SetDebugPrintout (bool value=true)
 Set the Debug Printout Flag.
 
size_t AddInputFile (const char *fileName)
 Add an input file.
 
virtual void Close ()
 Close source after end of run.
 
virtual Source_Type GetSourceType ()
 Source type.
 
CbmRecoUnpackGetRecoUnpack ()
 Get the Reco Unpack Access the CbmRecoUnpack class to add unpacker configs.
 
virtual Bool_t Init ()
 Initialisation.
 
virtual Bool_t InitUnpackers ()
 Initialise unpackers (forced by base class)
 
Int_t ReadEvent (UInt_t=0)
 Read one time slice from file.
 
virtual Bool_t ReInitUnpackers ()
 Re-Initialise unpackers (forced by base class)
 
virtual void Reset ()
 Reset clear the output vectors as preparation for the next timeslice. Forwarded to CbmRecoUnpack.
 
virtual void SetParUnpackers ()
 Set unpacker parameters (forced by base class)
 
void SetSourceType (Source_Type type)
 Set the Source Type.
 
Bool_t SpecifyRunId ()
 Provide dummy implementation of this virtual function as not relevant in our case.
 

Private Attributes

bool fDoDebugPrints = false
 Flag if extended debug output is to be printed or not.
 
std::vector< std::string > fFileNames = {}
 
Source_Type fSourceType = Source_Type::kONLINE
 type of source that is currently used
 
fles::TimesliceSource * fTsSource = nullptr
 
ULong64_t fTsCounter = 0
 
CbmRecoUnpack fUnpack = {}
 

Detailed Description

Source class for reading from archived time slice data.

Author
Volker Friese
Since
2 June 2021

This class allows to read time-slice data from file(s) and hands them to the unpacking stage. It interfaces fles::TimesliceAutoSource to cbmroot.

Definition at line 26 of file CbmSourceTsArchive.h.

Constructor & Destructor Documentation

◆ CbmSourceTsArchive() [1/3]

CbmSourceTsArchive::CbmSourceTsArchive ( const char * fileName = "")

Constructor.

Parameters
fileNameName of (single) input file.

More input files can be added by the method AddInputFile.

Definition at line 19 of file CbmSourceTsArchive.cxx.

References AddInputFile().

◆ CbmSourceTsArchive() [2/3]

CbmSourceTsArchive::CbmSourceTsArchive ( std::vector< std::string > fileNames)

Constructor.

Parameters
fileNameVector with name(s) of input file(s).

More input files can be added by the method AddInputFile.

Definition at line 23 of file CbmSourceTsArchive.cxx.

◆ ~CbmSourceTsArchive()

virtual CbmSourceTsArchive::~CbmSourceTsArchive ( )
inlinevirtual

Destructor.

Definition at line 45 of file CbmSourceTsArchive.h.

References fTsSource.

◆ CbmSourceTsArchive() [3/3]

CbmSourceTsArchive::CbmSourceTsArchive ( const CbmSourceTsArchive & )
delete

Copy constructor - not implemented.

Member Function Documentation

◆ AddInputFile()

size_t CbmSourceTsArchive::AddInputFile ( const char * fileName)

Add an input file.

Parameters
fileNameInput file name
Returns
Number of input files after adding this one

Definition at line 28 of file CbmSourceTsArchive.cxx.

References fFileNames.

Referenced by CbmSourceTsArchive().

◆ Close()

void CbmSourceTsArchive::Close ( )
virtual

Close source after end of run.

Definition at line 38 of file CbmSourceTsArchive.cxx.

References CbmRecoUnpack::Finish(), and fUnpack.

◆ GetRecoUnpack()

CbmRecoUnpack * CbmSourceTsArchive::GetRecoUnpack ( )
inline

Get the Reco Unpack Access the CbmRecoUnpack class to add unpacker configs.

Returns
CbmRecoUnpack*

Definition at line 86 of file CbmSourceTsArchive.h.

References fUnpack.

◆ GetSourceType()

virtual Source_Type CbmSourceTsArchive::GetSourceType ( )
inlinevirtual

Source type.

Returns
FairSource::Source_Type

Definition at line 79 of file CbmSourceTsArchive.h.

References fSourceType.

◆ Init()

Bool_t CbmSourceTsArchive::Init ( )
virtual

Initialisation.

Definition at line 47 of file CbmSourceTsArchive.cxx.

References fFileNames, fTsSource, fUnpack, and CbmRecoUnpack::Init().

◆ InitUnpackers()

virtual Bool_t CbmSourceTsArchive::InitUnpackers ( )
inlinevirtual

Initialise unpackers (forced by base class)

Definition at line 94 of file CbmSourceTsArchive.h.

◆ operator=()

CbmSourceTsArchive & CbmSourceTsArchive::operator= ( const CbmSourceTsArchive & )
delete

Assignment operator - not implemented.

◆ ReadEvent()

Int_t CbmSourceTsArchive::ReadEvent ( UInt_t = 0)

Read one time slice from file.

Definition at line 69 of file CbmSourceTsArchive.cxx.

References fDoDebugPrints, fTsCounter, fTsSource, fUnpack, and CbmRecoUnpack::Unpack().

◆ ReInitUnpackers()

virtual Bool_t CbmSourceTsArchive::ReInitUnpackers ( )
inlinevirtual

Re-Initialise unpackers (forced by base class)

Definition at line 102 of file CbmSourceTsArchive.h.

◆ Reset()

virtual void CbmSourceTsArchive::Reset ( )
inlinevirtual

Reset clear the output vectors as preparation for the next timeslice. Forwarded to CbmRecoUnpack.

Definition at line 106 of file CbmSourceTsArchive.h.

References fUnpack, and CbmRecoUnpack::Reset().

◆ SetDebugPrintout()

void CbmSourceTsArchive::SetDebugPrintout ( bool value = true)
inline

Set the Debug Printout Flag.

Parameters
value

Definition at line 62 of file CbmSourceTsArchive.h.

References fDoDebugPrints.

◆ SetParUnpackers()

virtual void CbmSourceTsArchive::SetParUnpackers ( )
inlinevirtual

Set unpacker parameters (forced by base class)

Definition at line 109 of file CbmSourceTsArchive.h.

◆ SetSourceType()

void CbmSourceTsArchive::SetSourceType ( Source_Type type)
inline

Set the Source Type.

Parameters
type

Definition at line 112 of file CbmSourceTsArchive.h.

References fSourceType.

◆ SpecifyRunId()

Bool_t CbmSourceTsArchive::SpecifyRunId ( )
inline

Provide dummy implementation of this virtual function as not relevant in our case.

Definition at line 115 of file CbmSourceTsArchive.h.

Member Data Documentation

◆ fDoDebugPrints

bool CbmSourceTsArchive::fDoDebugPrints = false
private

Flag if extended debug output is to be printed or not.

Definition at line 119 of file CbmSourceTsArchive.h.

Referenced by ReadEvent(), and SetDebugPrintout().

◆ fFileNames

std::vector<std::string> CbmSourceTsArchive::fFileNames = {}
private

List of input file names

Definition at line 122 of file CbmSourceTsArchive.h.

Referenced by AddInputFile(), and Init().

◆ fSourceType

Source_Type CbmSourceTsArchive::fSourceType = Source_Type::kONLINE
private

type of source that is currently used

Remarks
currently we use kONLINE as default, since, kFILE skipps the first TS probably due to obsolete reasons (to be checked PR072021)

Definition at line 125 of file CbmSourceTsArchive.h.

Referenced by GetSourceType(), and SetSourceType().

◆ fTsCounter

ULong64_t CbmSourceTsArchive::fTsCounter = 0
private

Time-slice counter

Definition at line 131 of file CbmSourceTsArchive.h.

Referenced by ReadEvent().

◆ fTsSource

fles::TimesliceSource* CbmSourceTsArchive::fTsSource = nullptr
private

Time-slice source interface

Definition at line 128 of file CbmSourceTsArchive.h.

Referenced by Init(), ReadEvent(), and ~CbmSourceTsArchive().

◆ fUnpack

CbmRecoUnpack CbmSourceTsArchive::fUnpack = {}
private

Unpack steering class

Definition at line 134 of file CbmSourceTsArchive.h.

Referenced by Close(), GetRecoUnpack(), Init(), ReadEvent(), and Reset().


The documentation for this class was generated from the following files: