Public Member Functions | Private Attributes | List of all members
dbutils::daqconfig::PixelParameterListWrapper Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-11-30/DatabaseUtils/cxx/include/DAQConfig/PixelParameterListWrapper.h"

Public Member Functions

 PixelParameterListWrapper (boost::shared_ptr< std::vector< int16_t > > listPtr)
 
boost::shared_ptr< std::vector< int16_t > > getListPtr ()
 
bool operator== (const PixelParameterListWrapper &other)
 
bool operator!= (const PixelParameterListWrapper &other)
 

Private Attributes

boost::shared_ptr< std::vector< int16_t > > _listPtr
 

Detailed Description

Simple wrapper class for a list of pixel parameters. The main (and only?) reason for this class is to provide a way to compare two lists for equality.

Author
Kurt Biery
Version
Revision
1.1.38.1
Date
2019/09/27 00:07:03

Definition at line 20 of file PixelParameterListWrapper.h.

Constructor & Destructor Documentation

dbutils::daqconfig::PixelParameterListWrapper::PixelParameterListWrapper ( boost::shared_ptr< std::vector< int16_t > >  listPtr)

Creates a wrapper instance from the specified list.

Definition at line 11 of file PixelParameterListWrapper.cpp.

References operator==().

11  :
12  _listPtr(listPtr)
13 {
14 }
boost::shared_ptr< std::vector< int16_t > > _listPtr

Member Function Documentation

boost::shared_ptr<std::vector<int16_t> > dbutils::daqconfig::PixelParameterListWrapper::getListPtr ( )
inline

Definition at line 34 of file PixelParameterListWrapper.h.

References _listPtr, operator!=(), operator==(), and fhicl::other.

34 {return _listPtr;}
boost::shared_ptr< std::vector< int16_t > > _listPtr
bool dbutils::daqconfig::PixelParameterListWrapper::operator!= ( const PixelParameterListWrapper other)

Tests if the specified list is not equal to this one.

Definition at line 42 of file PixelParameterListWrapper.cpp.

References fhicl::other.

Referenced by getListPtr(), and operator==().

43 {
44  return !(*this==other);
45 }
bool dbutils::daqconfig::PixelParameterListWrapper::operator== ( const PixelParameterListWrapper other)

Tests if the specified list is equal to this one.

Definition at line 20 of file PixelParameterListWrapper.cpp.

References _listPtr, compare_h5_caf::idx, and operator!=().

Referenced by getListPtr(), and PixelParameterListWrapper().

21 {
22  std::vector<int16_t> thisList = *_listPtr;
23  std::vector<int16_t> otherList = *other._listPtr;
24 
25  if (otherList.size() != thisList.size()) {
26  return false;
27  }
28 
29  for (uint32_t idx = 0; idx < thisList.size(); ++idx) {
30  if (otherList[idx] != thisList[idx]) {
31  return false;
32  }
33  }
34 
35  return true;
36 }
boost::shared_ptr< std::vector< int16_t > > _listPtr

Member Data Documentation

boost::shared_ptr<std::vector<int16_t> > dbutils::daqconfig::PixelParameterListWrapper::_listPtr
private

Definition at line 45 of file PixelParameterListWrapper.h.

Referenced by getListPtr(), and operator==().


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