CMS 3D CMS Logo

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

#include <TSinglePedEntry.h>

Public Member Functions

double average () const
 get the average of the inserted values More...
 
void insert (const int &pedestal)
 add a single value More...
 
double RMS () const
 get the RMS of the inserted values More...
 
double RMSSq () const
 get the squared RMS of the inserted values More...
 
 TSinglePedEntry ()
 ctor More...
 
 TSinglePedEntry (const TSinglePedEntry &orig)
 copy ctor More...
 
 ~TSinglePedEntry ()
 dtor More...
 

Private Attributes

int m_entries
 number of entries More...
 
int m_pedestalSqSum
 squared sum of entries More...
 
int m_pedestalSum
 sum of entries More...
 

Detailed Description

Definition at line 13 of file TSinglePedEntry.h.

Constructor & Destructor Documentation

◆ TSinglePedEntry() [1/2]

TSinglePedEntry::TSinglePedEntry ( )

ctor

Definition at line 6 of file TSinglePedEntry.cc.

7  // std::cout << "[TSinglePedEntry][ctor]" << std::endl ;
8 }

◆ TSinglePedEntry() [2/2]

TSinglePedEntry::TSinglePedEntry ( const TSinglePedEntry orig)

copy ctor

Definition at line 12 of file TSinglePedEntry.cc.

12  {
15  m_entries = orig.m_entries;
16 }

References m_entries, m_pedestalSqSum, and m_pedestalSum.

◆ ~TSinglePedEntry()

TSinglePedEntry::~TSinglePedEntry ( )

dtor

Definition at line 10 of file TSinglePedEntry.cc.

10 {}

Member Function Documentation

◆ average()

double TSinglePedEntry::average ( ) const

get the average of the inserted values

Definition at line 24 of file TSinglePedEntry.cc.

24  {
25  if (!m_entries)
26  return -1;
27  return static_cast<double>(m_pedestalSum) / m_entries;
28 }

References m_entries, and m_pedestalSum.

Referenced by average.Average::__str__(), TPedValues::checkEntries(), TPedValues::makePlots(), and TPedValues::terminate().

◆ insert()

void TSinglePedEntry::insert ( const int &  pedestal)

add a single value

Definition at line 18 of file TSinglePedEntry.cc.

18  {
21  ++m_entries;
22 }

References m_entries, m_pedestalSqSum, m_pedestalSum, and EcalCondDBWriter_cfi::pedestal.

Referenced by BeautifulSoup.PageElement::append(), and TPedValues::insert().

◆ RMS()

double TSinglePedEntry::RMS ( ) const

get the RMS of the inserted values

Definition at line 30 of file TSinglePedEntry.cc.

30  {
31  if (!m_entries)
32  return -1;
33  return sqrt(RMSSq());
34 }

References m_entries, RMSSq(), and mathSSE::sqrt().

Referenced by TPedValues::makePlots().

◆ RMSSq()

double TSinglePedEntry::RMSSq ( ) const

get the squared RMS of the inserted values

Definition at line 36 of file TSinglePedEntry.cc.

36  {
37  /*
38  std::cout << "[TSinglePedEntry][minchia] " << m_pedestalSum
39  << "\t" << m_pedestalSum
40  << "\t" << m_entries << std::endl ; // FIXME
41  */
42  if (!m_entries)
43  return -1;
44  double num = 1. / static_cast<double>(m_entries);
46  return output;
47 }

References m_entries, m_pedestalSqSum, m_pedestalSum, EgammaValidation_cff::num, and convertSQLitetoXML_cfg::output.

Referenced by RMS().

Member Data Documentation

◆ m_entries

int TSinglePedEntry::m_entries
private

number of entries

Definition at line 37 of file TSinglePedEntry.h.

Referenced by average(), insert(), RMS(), RMSSq(), and TSinglePedEntry().

◆ m_pedestalSqSum

int TSinglePedEntry::m_pedestalSqSum
private

squared sum of entries

Definition at line 33 of file TSinglePedEntry.h.

Referenced by insert(), RMSSq(), and TSinglePedEntry().

◆ m_pedestalSum

int TSinglePedEntry::m_pedestalSum
private

sum of entries

Definition at line 35 of file TSinglePedEntry.h.

Referenced by average(), insert(), RMSSq(), and TSinglePedEntry().

convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:32
TSinglePedEntry::m_entries
int m_entries
number of entries
Definition: TSinglePedEntry.h:37
TSinglePedEntry::m_pedestalSum
int m_pedestalSum
sum of entries
Definition: TSinglePedEntry.h:35
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
EcalCondDBWriter_cfi.pedestal
pedestal
Definition: EcalCondDBWriter_cfi.py:49
EgammaValidation_cff.num
num
Definition: EgammaValidation_cff.py:34
TSinglePedEntry::RMSSq
double RMSSq() const
get the squared RMS of the inserted values
Definition: TSinglePedEntry.cc:36
TSinglePedEntry::m_pedestalSqSum
int m_pedestalSqSum
squared sum of entries
Definition: TSinglePedEntry.h:33