CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
CSCSubtractPedestal Class Reference

#include <CSCPedestalChoice.h>

Public Member Functions

 CSCSubtractPedestal (float ped)
 
void operator() (float &elem) const
 
void operator() (int &elem) const
 

Private Attributes

float ped_
 

Detailed Description

A class to be used as a function in a for_each algorithm to subtract the pedestal. That is set as the ctor arg.

Definition at line 100 of file CSCPedestalChoice.h.

Constructor & Destructor Documentation

◆ CSCSubtractPedestal()

CSCSubtractPedestal::CSCSubtractPedestal ( float  ped)
inline

Definition at line 102 of file CSCPedestalChoice.h.

102 : ped_(ped) {}

Member Function Documentation

◆ operator()() [1/2]

void CSCSubtractPedestal::operator() ( float &  elem) const
inline

Definition at line 103 of file CSCPedestalChoice.h.

103 { elem -= ped_; }

References ped_.

◆ operator()() [2/2]

void CSCSubtractPedestal::operator() ( int &  elem) const
inline

Definition at line 104 of file CSCPedestalChoice.h.

104  {
105  elem -= static_cast<int>(ped_); // not strictly correct but OK for the typical large pedestals
106  }

References ped_.

Member Data Documentation

◆ ped_

float CSCSubtractPedestal::ped_
private

Definition at line 109 of file CSCPedestalChoice.h.

Referenced by operator()().

CSCSubtractPedestal::ped_
float ped_
Definition: CSCPedestalChoice.h:109