ATLAS Offline Software
Loading...
Searching...
No Matches
FPGATrackSimMatrixIO.cxx File Reference
Include dependency graph for FPGATrackSimMatrixIO.cxx:

Go to the source code of this file.

Functions

void readTree (AccumulateMap &map, TTree *tree, size_t nLayers, size_t nCoords)
 Reads a matrix tree, accumulating its entries into a map.
std::vector< std::pair< std::vector< module_t >, FPGATrackSimMatrixAccumulator > > readTree (TTree *tree, size_t nLayers, size_t nCoords)
 Reads a matrix tree, accumulating its entries into a vector, in the order they are read.
void fillTree (AccumulateMap &map, TTree *tree, int nLayers, int nCoords)
 Writes the contents of an AccumulateMap into the supplied tree (one entry per sector).

Detailed Description

Author
Riley Xu - riley.nosp@m..xu@.nosp@m.cern..nosp@m.ch
Date
May 29th, 2020

Definition in file FPGATrackSimMatrixIO.cxx.

Function Documentation

◆ fillTree()

void fillTree ( AccumulateMap & map,
TTree * tree,
int nLayers,
int nCoords )

Writes the contents of an AccumulateMap into the supplied tree (one entry per sector).

Parameters
map- map to be written
tree- tree to be written to; this function will create the branches
nLayers- number of logical layers
nCoords- number of hit coordinates in a full (13/13) track

Definition at line 226 of file FPGATrackSimMatrixIO.cxx.

227{
228 fillTree(map.begin(), map.end(), tree, nLayers, nCoords);
229}
void fillTree(AccumulateMap &map, TTree *tree, int nLayers, int nCoords)
Writes the contents of an AccumulateMap into the supplied tree (one entry per sector).
STL class.
TChain * tree

◆ readTree() [1/2]

void readTree ( AccumulateMap & map,
TTree * tree,
size_t nLayers,
size_t nCoords )

Reads a matrix tree, accumulating its entries into a map.

Note this functions sets and resets branch addresses.

Parameters
map- map to be added to
tree- tree to be read
nLayers- number of logical layers
nCoords- number of hit coordinates in a full (13/13) track

Definition at line 92 of file FPGATrackSimMatrixIO.cxx.

93{
94 FPGATrackSimMatrixReader reader(tree, nLayers, nCoords);
95 while (reader.nextEntry())
96 accumulate(map, reader.getModules(), reader.getAccumulator());
97}
bool accumulate(AccumulateMap &map, std::vector< module_t > const &modules, FPGATrackSimMatrixAccumulator const &acc)
Accumulates an accumulator (e.g.
reader
read the goodrunslist xml file(s)
Definition collisions.py:22

◆ readTree() [2/2]

std::vector< std::pair< std::vector< module_t >, FPGATrackSimMatrixAccumulator > > readTree ( TTree * tree,
size_t nLayers,
size_t nCoords )

Reads a matrix tree, accumulating its entries into a vector, in the order they are read.

Note this functions sets and resets branch addresses.

Parameters
tree- tree to be read
nLayers- number of logical layers
nCoords- number of hit coordinates in a full (13/13) track

Definition at line 108 of file FPGATrackSimMatrixIO.cxx.

109{
110 std::vector<std::pair<std::vector<module_t>, FPGATrackSimMatrixAccumulator>> matrices;
111
112 FPGATrackSimMatrixReader reader(tree, nLayers, nCoords);
113 while (reader.nextEntry())
114 matrices.push_back({ reader.getModules(), reader.getAccumulator() });
115
116 return matrices;
117}