Project
Loading...
Searching...
No Matches
o2::tpc::ClusterNativeHelper Class Reference

#include <ClusterNativeHelper.h>

Classes

class  Reader
 A reader class for the raw cluster native data. More...
 
class  TreeWriter
 Utility to write native cluster format to a ROOT tree. More...
 

Public Types

using MCLabelContainer = o2::dataformats::MCLabelContainer
 
using ConstMCLabelContainer = o2::dataformats::ConstMCLabelContainer
 
using ConstMCLabelContainerView = o2::dataformats::ConstMCLabelContainerView
 
using ConstMCLabelContainerViewWithBuffer = ClusterNativeAccess::ConstMCLabelContainerViewWithBuffer
 

Public Member Functions

 ClusterNativeHelper ()=default
 
 ~ClusterNativeHelper ()=default
 

Static Public Member Functions

static void convert (const char *fromFile, const char *toFile, const char *toTreeName="tpcnative")
 
static std::unique_ptr< ClusterNativeAccesscreateClusterNativeIndex (std::unique_ptr< ClusterNative[]> &buffer, std::vector< ClusterNativeContainer > &clusters, MCLabelContainer *bufferMC=nullptr, std::vector< MCLabelContainer > *mcTruth=nullptr)
 
template<typename AttributeT >
static int addFlatBuffer (ClusterNativeAccess &clusterIndex, unsigned char *buffer, size_t size)
 
template<typename BufferType , typename MCArrayType >
static void copySectorData (ClusterNativeAccess const &index, int sector, BufferType &target, MCArrayType &mcTarget)
 

Static Public Attributes

static constexpr unsigned int NSectors = constants::MAXSECTOR
 
static constexpr unsigned int NPadRows = constants::MAXGLOBALPADROW
 

Detailed Description

for TPC native clusters This class supports the following utility functionality for handling of TPC ClusterNative data:

  • interface to the ClusterNativeAccess cluster access index
  • reading of ClusterNative data in binary format
  • conversion to a tree structure for easy examination of the cluster parameters

The class adds a Reader for the binary format of decoded native clusters as written by the TPC reconstruction workflow. The reader fills the access index ClusterNativeAccess in the first version. We can think of something smarter later.

The Writer class converts data from a cluster index to a ROOT tree which then allows to inspect the parameters of clusters.

Finally, ClusterNativeHelper::convert("from.root", "to.root") combines the two.

Definition at line 134 of file ClusterNativeHelper.h.

Member Typedef Documentation

◆ ConstMCLabelContainer

◆ ConstMCLabelContainerView

◆ ConstMCLabelContainerViewWithBuffer

◆ MCLabelContainer

Constructor & Destructor Documentation

◆ ClusterNativeHelper()

o2::tpc::ClusterNativeHelper::ClusterNativeHelper ( )
default

◆ ~ClusterNativeHelper()

o2::tpc::ClusterNativeHelper::~ClusterNativeHelper ( )
default

Member Function Documentation

◆ addFlatBuffer()

template<typename AttributeT >
static int o2::tpc::ClusterNativeHelper::addFlatBuffer ( ClusterNativeAccess clusterIndex,
unsigned char buffer,
size_t  size 
)
inlinestatic

Definition at line 163 of file ClusterNativeHelper.h.

◆ convert()

void ClusterNativeHelper::convert ( const char fromFile,
const char toFile,
const char toTreeName = "tpcnative" 
)
static

convert clusters stored in binary cluster native format to a tree and write to root file the cluster parameters are stored in the tree together with sector and padrow numbers.

Definition at line 26 of file ClusterNativeHelper.cxx.

◆ copySectorData()

template<typename BufferType , typename MCArrayType >
void o2::tpc::ClusterNativeHelper::copySectorData ( ClusterNativeAccess const &  index,
int  sector,
BufferType &  target,
MCArrayType &  mcTarget 
)
static

copy data of the specified sector from the index to a byte-type container optional MC labels are separated accordingly and added to a target vector.

Parameters
indexthe cluster index object
targeta container object, will be resized accordingly
mcTargetcontainer to receive the separated MC label objects

Definition at line 434 of file ClusterNativeHelper.h.

◆ createClusterNativeIndex()

std::unique_ptr< ClusterNativeAccess > ClusterNativeHelper::createClusterNativeIndex ( std::unique_ptr< ClusterNative[]> &  buffer,
std::vector< ClusterNativeContainer > &  clusters,
MCLabelContainer bufferMC = nullptr,
std::vector< MCLabelContainer > *  mcTruth = nullptr 
)
static

Definition at line 60 of file ClusterNativeHelper.cxx.

Member Data Documentation

◆ NPadRows

constexpr unsigned int o2::tpc::ClusterNativeHelper::NPadRows = constants::MAXGLOBALPADROW
staticconstexpr

Definition at line 146 of file ClusterNativeHelper.h.

◆ NSectors

constexpr unsigned int o2::tpc::ClusterNativeHelper::NSectors = constants::MAXSECTOR
staticconstexpr

Definition at line 145 of file ClusterNativeHelper.h.


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