LDMX Software
DirectAccessor< primitive_t > Struct Template Reference

This is a direct type accessor. More...

#include <CommonUtils.h>

Public Member Functions

primitive_t operator() (ULong64_t entry)
 Gives direct access to the underlying parameter.
 

Public Attributes

std::vector< primitive_t > * value = nullptr
 

Detailed Description

template<typename primitive_t>
struct DirectAccessor< primitive_t >

This is a direct type accessor.

It simply forwards access to the underlying vector

Definition at line 247 of file CommonUtils.h.

Member Function Documentation

◆ operator()()

template<typename primitive_t >
primitive_t DirectAccessor< primitive_t >::operator() ( ULong64_t entry)
inline

Gives direct access to the underlying parameter.

Parameters
entrythe entry in the tree

Definition at line 253 of file CommonUtils.h.

253 {
254 if (value) {
255 primitive_t v = value->at(entry);
256 return v;
257 }
258 return std::numeric_limits<primitive_t>::max();
259 }

Member Data Documentation

◆ value

template<typename primitive_t >
std::vector<primitive_t>* DirectAccessor< primitive_t >::value = nullptr

Definition at line 248 of file CommonUtils.h.


The documentation for this struct was generated from the following file: