HIPO  4.3.0
High Performance Output data format for experimental physics
hipo::bank::rowlist Class Reference

rowlist encapsulates a list of rows for this bank, providing a way to iterate over them More...

#include <bank.h>

Public Types

using list_t = std::vector< int >
 

Public Member Functions

 rowlist ()=default
 
 ~rowlist ()=default
 
void reset (int numRows=-1)
 
bool isInitialized () const
 
list_t const & getList () const
 
void setList (list_t const &list)
 
void filter (std::function< bool(bank &, int)> func)
 
void filter (char const *expression)
 
void filter (Parser &parser)
 
void setOwnerBank (bank *const ownerBank)
 

Static Public Member Functions

static list_t createFullList (int num)
 

Detailed Description

rowlist encapsulates a list of rows for this bank, providing a way to iterate over them

Definition at line 357 of file bank.h.

Member Typedef Documentation

◆ list_t

using hipo::bank::rowlist::list_t = std::vector<int>

Definition at line 360 of file bank.h.

Constructor & Destructor Documentation

◆ rowlist()

hipo::bank::rowlist::rowlist ( )
default

◆ ~rowlist()

hipo::bank::rowlist::~rowlist ( )
default

Member Function Documentation

◆ createFullList()

bank::rowlist::list_t hipo::bank::rowlist::createFullList ( int  num)
static
Returns
create a list of numbers from 0 to num
Parameters
numthe size of the list

Definition at line 399 of file bank.cpp.

◆ filter() [1/3]

void hipo::bank::rowlist::filter ( char const *  expression)

filter the list according to an expression

Parameters
expressionthe filter expression

Definition at line 377 of file bank.cpp.

◆ filter() [2/3]

void hipo::bank::rowlist::filter ( Parser parser)

filter the list using a pre-constructed Parser (avoids re-parsing the expression each call)

Parameters
parsera Parser object constructed from the filter expression

Definition at line 384 of file bank.cpp.

◆ filter() [3/3]

void hipo::bank::rowlist::filter ( std::function< bool(bank &, int)>  func)

filter the list according to a function

Parameters
funca function which takes a hipo::bank reference and an int row number and returns a double; if the returned bool is true, the row is accepted

Definition at line 367 of file bank.cpp.

◆ getList()

bank::rowlist::list_t const & hipo::bank::rowlist::getList ( ) const
Returns
reference to the immutable list

Definition at line 356 of file bank.cpp.

◆ isInitialized()

bool hipo::bank::rowlist::isInitialized ( ) const
inline

Definition at line 368 of file bank.h.

◆ reset()

void hipo::bank::rowlist::reset ( int  numRows = -1)

initialize with a full list with specified number of rows

Parameters
numRowsif negative, use the owner bank to set the number of rows, otherwise use numRows

Definition at line 343 of file bank.cpp.

◆ setList()

void hipo::bank::rowlist::setList ( list_t const &  list)
Parameters
listset the list to this list

Definition at line 362 of file bank.cpp.

◆ setOwnerBank()

void hipo::bank::rowlist::setOwnerBank ( bank *const  ownerBank)
inline
Parameters
ownerBankset the owner bank

Definition at line 391 of file bank.h.


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