Project
Loading...
Searching...
No Matches
o2::tpc::rawreader::RawReaderCRUManager Class Reference

#include <RawReaderCRU.h>

Public Types

using ADCDataCallback = std::function< Int_t(const PadROCPos &, const CRU &, const gsl::span< const uint32_t >)>
 
using LinkZSCallback = o2::tpc::raw_processing_helpers::ADCCallback
 
using EndReaderCallback = std::function< void()>
 

Public Member Functions

 RawReaderCRUManager ()=default
 constructor
 
RawReaderCRU & createReader (const std::string_view inputFileName, uint32_t numTimeBins=0, uint32_t link=0, uint32_t stream=0, uint32_t debugLevel=0, uint32_t verbosity=0, const std::string_view outputFilePrefix="")
 create a new raw reader
 
void setupReaders (const std::string_view inputFileNames, uint32_t numTimeBins=1000, uint32_t debugLevel=0, uint32_t verbosity=0, const std::string_view outputFilePrefix="")
 
void init ()
 initialize all readers
 
auto & getReaders ()
 return vector of readers
 
const auto & getReaders () const
 return vector of readers
 
auto getNumberOfReaders () const
 return number of configured raw readers
 
RawReaderCRU & getLastReader ()
 return last reader
 
const RawReaderCRU & getLastReader () const
 return last reader
 
void resetReaders ()
 reset readers
 
void resetEventSync ()
 reset event synchronisation info
 
void reset ()
 reset all
 
void setEventNumber (uint32_t eventNumber)
 set event number to all sub-readers
 
const RawReaderCRUEventSync & getEventSync () const
 get the event sync
 
size_t getNumberOfEvents () const
 get number of all events
 
size_t getNumberOfCompleteEvents () const
 get number of complete events
 
bool isEventComplete (size_t eventNumber) const
 check if event is complete
 
void setDebugLevel (uint32_t debugLevel)
 set debug level
 
void setDataType (DataType dataType, RAWDataType rawType)
 set data type
 
DataType getDataType () const
 get data type
 
void copyEvents (const std::vector< uint32_t > eventNumbers, std::string_view outputDirectory, std::ios_base::openmode mode=std::ios_base::openmode(0))
 copy single events to another file
 
void writeGBTDataPerLink (std::string_view outputDirectory, int maxEvents=-1)
 copy single events from raw input files to another file
 
void setADCDataCallback (ADCDataCallback function)
 set a callback function
 
void setLinkZSCallback (LinkZSCallback function)
 set a callback function for decoded LinkZS data
 
LinkZSCallback getLinkZSCallback ()
 get LinkZSCallback
 
void processEvent (uint32_t eventNumber, EndReaderCallback endReader=nullptr)
 process event calling mADCDataCallback to process values
 

Static Public Member Functions

static void copyEvents (const std::string_view inputFileNames, const std::vector< uint32_t > eventNumbers, std::string_view outputDirectory, std::ios_base::openmode mode=std::ios_base::openmode(0))
 copy single events from raw input files to another file
 
static void writeGBTDataPerLink (const std::string_view inputFileNames, std::string_view outputDirectory, int maxEvents=-1)
 copy single events from raw input files to another file
 

Friends

class RawReaderCRU
 

Detailed Description

Definition at line 961 of file RawReaderCRU.h.

Member Typedef Documentation

◆ ADCDataCallback

using o2::tpc::rawreader::RawReaderCRUManager::ADCDataCallback = std::function<Int_t(const PadROCPos&, const CRU&, const gsl::span<const uint32_t>)>

Definition at line 964 of file RawReaderCRU.h.

◆ EndReaderCallback

Definition at line 966 of file RawReaderCRU.h.

◆ LinkZSCallback

Constructor & Destructor Documentation

◆ RawReaderCRUManager()

o2::tpc::rawreader::RawReaderCRUManager::RawReaderCRUManager ( )
default

constructor

Member Function Documentation

◆ copyEvents() [1/2]

void RawReaderCRUManager::copyEvents ( const std::string_view  inputFileNames,
const std::vector< uint32_t >  eventNumbers,
std::string_view  outputDirectory,
std::ios_base::openmode  mode = std::ios_base::openmode(0) 
)
static

copy single events from raw input files to another file

Definition at line 1206 of file RawReaderCRU.cxx.

◆ copyEvents() [2/2]

void RawReaderCRUManager::copyEvents ( const std::vector< uint32_t >  eventNumbers,
std::string_view  outputDirectory,
std::ios_base::openmode  mode = std::ios_base::openmode(0) 
)

copy single events to another file

Definition at line 1190 of file RawReaderCRU.cxx.

◆ createReader()

RawReaderCRU & o2::tpc::rawreader::RawReaderCRUManager::createReader ( const std::string_view  inputFileName,
uint32_t  numTimeBins = 0,
uint32_t  link = 0,
uint32_t  stream = 0,
uint32_t  debugLevel = 0,
uint32_t  verbosity = 0,
const std::string_view  outputFilePrefix = "" 
)
inline

create a new raw reader

Definition at line 972 of file RawReaderCRU.h.

◆ getDataType()

DataType o2::tpc::rawreader::RawReaderCRUManager::getDataType ( ) const
inline

get data type

Definition at line 1056 of file RawReaderCRU.h.

◆ getEventSync()

const RawReaderCRUEventSync & o2::tpc::rawreader::RawReaderCRUManager::getEventSync ( ) const
inline

get the event sync

Definition at line 1033 of file RawReaderCRU.h.

◆ getLastReader() [1/2]

RawReaderCRU & o2::tpc::rawreader::RawReaderCRUManager::getLastReader ( )
inline

return last reader

Definition at line 1005 of file RawReaderCRU.h.

◆ getLastReader() [2/2]

const RawReaderCRU & o2::tpc::rawreader::RawReaderCRUManager::getLastReader ( ) const
inline

return last reader

Definition at line 1008 of file RawReaderCRU.h.

◆ getLinkZSCallback()

LinkZSCallback o2::tpc::rawreader::RawReaderCRUManager::getLinkZSCallback ( )
inline

get LinkZSCallback

Definition at line 1077 of file RawReaderCRU.h.

◆ getNumberOfCompleteEvents()

size_t o2::tpc::rawreader::RawReaderCRUManager::getNumberOfCompleteEvents ( ) const
inline

get number of complete events

Definition at line 1039 of file RawReaderCRU.h.

◆ getNumberOfEvents()

size_t o2::tpc::rawreader::RawReaderCRUManager::getNumberOfEvents ( ) const
inline

get number of all events

Definition at line 1036 of file RawReaderCRU.h.

◆ getNumberOfReaders()

auto o2::tpc::rawreader::RawReaderCRUManager::getNumberOfReaders ( ) const
inline

return number of configured raw readers

Definition at line 1002 of file RawReaderCRU.h.

◆ getReaders() [1/2]

auto & o2::tpc::rawreader::RawReaderCRUManager::getReaders ( )
inline

return vector of readers

Definition at line 996 of file RawReaderCRU.h.

◆ getReaders() [2/2]

const auto & o2::tpc::rawreader::RawReaderCRUManager::getReaders ( ) const
inline

return vector of readers

Definition at line 999 of file RawReaderCRU.h.

◆ init()

void RawReaderCRUManager::init ( )

initialize all readers

Definition at line 1144 of file RawReaderCRU.cxx.

◆ isEventComplete()

bool o2::tpc::rawreader::RawReaderCRUManager::isEventComplete ( size_t  eventNumber) const
inline

check if event is complete

Definition at line 1042 of file RawReaderCRU.h.

◆ processEvent()

void RawReaderCRUManager::processEvent ( uint32_t  eventNumber,
EndReaderCallback  endReader = nullptr 
)

process event calling mADCDataCallback to process values

Definition at line 1243 of file RawReaderCRU.cxx.

◆ reset()

void o2::tpc::rawreader::RawReaderCRUManager::reset ( )
inline

reset all

Definition at line 1017 of file RawReaderCRU.h.

◆ resetEventSync()

void o2::tpc::rawreader::RawReaderCRUManager::resetEventSync ( )
inline

reset event synchronisation info

Definition at line 1014 of file RawReaderCRU.h.

◆ resetReaders()

void o2::tpc::rawreader::RawReaderCRUManager::resetReaders ( )
inline

reset readers

Definition at line 1011 of file RawReaderCRU.h.

◆ setADCDataCallback()

void o2::tpc::rawreader::RawReaderCRUManager::setADCDataCallback ( ADCDataCallback  function)
inline

set a callback function

Definition at line 1071 of file RawReaderCRU.h.

◆ setDataType()

void o2::tpc::rawreader::RawReaderCRUManager::setDataType ( DataType  dataType,
RAWDataType  rawType 
)
inline

set data type

Definition at line 1048 of file RawReaderCRU.h.

◆ setDebugLevel()

void o2::tpc::rawreader::RawReaderCRUManager::setDebugLevel ( uint32_t  debugLevel)
inline

set debug level

Definition at line 1045 of file RawReaderCRU.h.

◆ setEventNumber()

void o2::tpc::rawreader::RawReaderCRUManager::setEventNumber ( uint32_t  eventNumber)
inline

set event number to all sub-readers

Definition at line 1025 of file RawReaderCRU.h.

◆ setLinkZSCallback()

void o2::tpc::rawreader::RawReaderCRUManager::setLinkZSCallback ( LinkZSCallback  function)
inline

set a callback function for decoded LinkZS data

Definition at line 1074 of file RawReaderCRU.h.

◆ setupReaders()

void RawReaderCRUManager::setupReaders ( const std::string_view  inputFileNames,
uint32_t  numTimeBins = 1000,
uint32_t  debugLevel = 0,
uint32_t  verbosity = 0,
const std::string_view  outputFilePrefix = "" 
)

Definition at line 1168 of file RawReaderCRU.cxx.

◆ writeGBTDataPerLink() [1/2]

void RawReaderCRUManager::writeGBTDataPerLink ( const std::string_view  inputFileNames,
std::string_view  outputDirectory,
int  maxEvents = -1 
)
static

copy single events from raw input files to another file

Definition at line 1228 of file RawReaderCRU.cxx.

◆ writeGBTDataPerLink() [2/2]

void RawReaderCRUManager::writeGBTDataPerLink ( std::string_view  outputDirectory,
int  maxEvents = -1 
)

copy single events from raw input files to another file

Definition at line 1213 of file RawReaderCRU.cxx.

Friends And Related Symbol Documentation

◆ RawReaderCRU

friend class RawReaderCRU
friend

Definition at line 1093 of file RawReaderCRU.h.


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