ATLAS Offline Software
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
FlexProfileArray Class Reference

#include <FlexProfileArray.h>

Collaboration diagram for FlexProfileArray:

Public Types

enum  ERROROPTION { ERRORMEAN, ERRORSPREAD, ERRORSPREADI, ERRORSPREADG }
 

Public Member Functions

 FlexProfileArray (unsigned nbins)
 
 ~FlexProfileArray ()
 
unsigned getNBins () const
 
void fill (unsigned bin, const double &profiledpar)
 
void fill (unsigned bin, const double &profiledpar, const double &weight)
 
double getBinEntries (unsigned bin) const
 
double getBinContent (unsigned bin) const
 
double getBinError (unsigned bin) const
 
void getBinInfo (unsigned bin, double &entries, double &content, double &error) const
 
void setBinEntries (unsigned bin, const double &)
 
void setBinContent (unsigned bin, const double &)
 
void setBinError (unsigned bin, const double &)
 
void setBinInfo (unsigned bin, const double &entries, const double &content, const double &error)
 
void copyContents (double *entries, double *contents, double *errors) const
 
void setErrorOption (ERROROPTION e)
 
void setErrorOptionFromString (const char *option)
 
const char * getErrorOptionAsString () const
 
void reset ()
 
double integral () const
 

Static Public Member Functions

static unsigned extraAllocSize (unsigned nbins)
 

Private Member Functions

float * getPtr (unsigned ibin)
 
float * getPtrNoAlloc (unsigned ibin) const
 
unsigned nbinsInLastGroup () const
 
double computeBinError (float *f) const
 

Static Private Member Functions

static unsigned nGroups (unsigned nbins)
 
static unsigned groupIndex (unsigned ibin)
 
static unsigned indexInGroup (unsigned ibin)
 
static float * allocateGroup ()
 
static void deallocateGroup (float *)
 

Private Attributes

const unsigned m_nbins
 
ERROROPTION m_errOpt
 
float ** m_groups
 

Detailed Description

Definition at line 30 of file FlexProfileArray.h.

Member Enumeration Documentation

◆ ERROROPTION

Enumerator
ERRORMEAN 
ERRORSPREAD 
ERRORSPREADI 
ERRORSPREADG 

Definition at line 60 of file FlexProfileArray.h.

Constructor & Destructor Documentation

◆ FlexProfileArray()

FlexProfileArray::FlexProfileArray ( unsigned  nbins)

◆ ~FlexProfileArray()

FlexProfileArray::~FlexProfileArray ( )

Member Function Documentation

◆ allocateGroup()

static float* FlexProfileArray::allocateGroup ( )
staticprivate

◆ computeBinError()

double FlexProfileArray::computeBinError ( float *  f) const
private

◆ copyContents()

void FlexProfileArray::copyContents ( double *  entries,
double *  contents,
double *  errors 
) const

◆ deallocateGroup()

static void FlexProfileArray::deallocateGroup ( float *  )
staticprivate

◆ extraAllocSize()

static unsigned FlexProfileArray::extraAllocSize ( unsigned  nbins)
inlinestatic

Definition at line 33 of file FlexProfileArray.h.

33 { return nGroups(nbins)*sizeof(float*); }

◆ fill() [1/2]

void FlexProfileArray::fill ( unsigned  bin,
const double &  profiledpar 
)

◆ fill() [2/2]

void FlexProfileArray::fill ( unsigned  bin,
const double &  profiledpar,
const double &  weight 
)

◆ getBinContent()

double FlexProfileArray::getBinContent ( unsigned  bin) const

◆ getBinEntries()

double FlexProfileArray::getBinEntries ( unsigned  bin) const

◆ getBinError()

double FlexProfileArray::getBinError ( unsigned  bin) const

◆ getBinInfo()

void FlexProfileArray::getBinInfo ( unsigned  bin,
double &  entries,
double &  content,
double &  error 
) const

◆ getErrorOptionAsString()

const char* FlexProfileArray::getErrorOptionAsString ( ) const

◆ getNBins()

unsigned FlexProfileArray::getNBins ( ) const
inline

Definition at line 38 of file FlexProfileArray.h.

38 { return m_nbins; }

◆ getPtr()

float* FlexProfileArray::getPtr ( unsigned  ibin)
private

◆ getPtrNoAlloc()

float* FlexProfileArray::getPtrNoAlloc ( unsigned  ibin) const
private

◆ groupIndex()

static unsigned FlexProfileArray::groupIndex ( unsigned  ibin)
inlinestaticprivate

Definition at line 77 of file FlexProfileArray.h.

77 { return ibin/FLEXPROFILEARRAY_NBINSPERGROUP; }

◆ indexInGroup()

static unsigned FlexProfileArray::indexInGroup ( unsigned  ibin)
inlinestaticprivate

Definition at line 78 of file FlexProfileArray.h.

78 { return (ibin%FLEXPROFILEARRAY_NBINSPERGROUP)*3; }//3 because there are three fields per bin

◆ integral()

double FlexProfileArray::integral ( ) const

◆ nbinsInLastGroup()

unsigned FlexProfileArray::nbinsInLastGroup ( ) const
inlineprivate

Definition at line 81 of file FlexProfileArray.h.

82  {
85  }

◆ nGroups()

static unsigned FlexProfileArray::nGroups ( unsigned  nbins)
inlinestaticprivate

◆ reset()

void FlexProfileArray::reset ( )

◆ setBinContent()

void FlexProfileArray::setBinContent ( unsigned  bin,
const double &   
)

◆ setBinEntries()

void FlexProfileArray::setBinEntries ( unsigned  bin,
const double &   
)

◆ setBinError()

void FlexProfileArray::setBinError ( unsigned  bin,
const double &   
)

◆ setBinInfo()

void FlexProfileArray::setBinInfo ( unsigned  bin,
const double &  entries,
const double &  content,
const double &  error 
)

◆ setErrorOption()

void FlexProfileArray::setErrorOption ( ERROROPTION  e)
inline

Definition at line 61 of file FlexProfileArray.h.

61 { m_errOpt=e; }

◆ setErrorOptionFromString()

void FlexProfileArray::setErrorOptionFromString ( const char *  option)

Member Data Documentation

◆ m_errOpt

ERROROPTION FlexProfileArray::m_errOpt
private

Definition at line 72 of file FlexProfileArray.h.

◆ m_groups

float** FlexProfileArray::m_groups
private

Definition at line 73 of file FlexProfileArray.h.

◆ m_nbins

const unsigned FlexProfileArray::m_nbins
private

Definition at line 71 of file FlexProfileArray.h.


The documentation for this class was generated from the following file:
FlexProfileArray::m_errOpt
ERROROPTION m_errOpt
Definition: FlexProfileArray.h:72
FlexProfileArray::ERRORSPREADG
@ ERRORSPREADG
Definition: FlexProfileArray.h:60
FlexProfileArray::ERRORMEAN
@ ERRORMEAN
Definition: FlexProfileArray.h:60
SCT_CalibAlgs::nbins
@ nbins
Definition: SCT_CalibNumbers.h:10
beamspotman.n
n
Definition: beamspotman.py:731
FlexProfileArray::ERRORSPREADI
@ ERRORSPREADI
Definition: FlexProfileArray.h:60
FlexProfileArray::nGroups
static unsigned nGroups(unsigned nbins)
Definition: FlexProfileArray.h:76
FLEXPROFILEARRAY_NBINSPERGROUP
#define FLEXPROFILEARRAY_NBINSPERGROUP
Definition: FlexProfileArray.h:28
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
FlexProfileArray::ERRORSPREAD
@ ERRORSPREAD
Definition: FlexProfileArray.h:60
FlexProfileArray::m_nbins
const unsigned m_nbins
Definition: FlexProfileArray.h:71