ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
ActsPlugins::RootSpacePointIo Class Reference

Root space point reading and writing utility. More...

#include <ActsPlugins/Root/RootSpacePointIo.hpp>

Public Member Functions

void connectForRead (TChain &tchain, const Acts::SpacePointContainer2 &spacePoints)
 sets the branch connection for reading from a file
void connectForWrite (TTree &ttree, const Acts::SpacePointContainer2 &spacePoints)
 sets the branch connection for writing to a file
void read (Acts::MutableSpacePointProxy2 &spacePoint, Acts::SpacePointIndex2 index)
 Read a space point from the tree.
void read (TChain &tchain, Acts::SpacePointContainer2 &spacePoints)
 Read the space points from the tree.
void write (const Acts::ConstSpacePointProxy2 &spacePoint)
 Write a space point to the tree.
void write (const Acts::SpacePointContainer2 &spacePoints, TTree &ttree)
 Write the space points to the tree.

Detailed Description

Root space point reading and writing utility.

Member Function Documentation

◆ connectForRead()

void ActsPlugins::RootSpacePointIo::connectForRead ( TChain & tchain,
const Acts::SpacePointContainer2 & spacePoints )

sets the branch connection for reading from a file

Parameters
tchainthe TChain to read from
spacePointsthe space points to read into

◆ connectForWrite()

void ActsPlugins::RootSpacePointIo::connectForWrite ( TTree & ttree,
const Acts::SpacePointContainer2 & spacePoints )

sets the branch connection for writing to a file

Parameters
ttreethe TTree to write to
spacePointsthe space points to write

◆ read() [1/2]

void ActsPlugins::RootSpacePointIo::read ( Acts::MutableSpacePointProxy2 & spacePoint,
Acts::SpacePointIndex2 index )

Read a space point from the tree.

Note
the caller has to do the TChain::GetEntry() before this call
Parameters
spacePointthe space point to read into
indexthe original index of the space point in the ROOT file

◆ read() [2/2]

void ActsPlugins::RootSpacePointIo::read ( TChain & tchain,
Acts::SpacePointContainer2 & spacePoints )

Read the space points from the tree.

Parameters
tchainthe TChain to read from
spacePointsthe space points to read into

◆ write() [1/2]

void ActsPlugins::RootSpacePointIo::write ( const Acts::ConstSpacePointProxy2 & spacePoint)

Write a space point to the tree.

Note
the caller has to do the TTree::Fill() after this call
Parameters
spacePointthe space point to write

◆ write() [2/2]

void ActsPlugins::RootSpacePointIo::write ( const Acts::SpacePointContainer2 & spacePoints,
TTree & ttree )

Write the space points to the tree.

Parameters
spacePointsthe space points to write
ttreethe TTree to write to