ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
LArRawChannelBuilderStatistics Class Reference

Returns various counters from the LArRawChannel building. More...

#include <LArRawChannelBuilderStatistics.h>

Collaboration diagram for LArRawChannelBuilderStatistics:

Public Member Functions

 LArRawChannelBuilderStatistics (unsigned int nerr, unsigned short bitpat)
 
 ~LArRawChannelBuilderStatistics ()
 
void incrementErrorCount (unsigned int nerr)
 
ulonglong returnErrorCount (unsigned int nerr)
 
ulonglong returnErrorCountPerEvent (unsigned int nerr)
 
ulonglong returnErrorCountSqPerEvent (unsigned int nerr)
 
unsigned long returnEvents () const
 
void setErrorString (unsigned int nerr, const std::string &s)
 
std::string returnErrorString (unsigned int nerr)
 
unsigned int returnBitPattern () const
 
unsigned int returnMaxErrors () const
 
void resetErrorcountPerEvent ()
 

Private Attributes

const unsigned int m_N_errors
 
std::vector< ulonglong > m_error_count
 
std::vector< std::string > m_error_string
 
std::vector< unsigned long > m_errors_this_event
 
std::vector< ulonglong > m_errors_per_event
 
std::vector< ulonglong > m_errorsSq_per_event
 
unsigned long m_events
 
const unsigned int m_bit_pattern
 
const std::string m_s
 
bool m_first
 

Detailed Description

Returns various counters from the LArRawChannel building.

Author
Rolf Seuster

Definition at line 20 of file LArRawChannelBuilderStatistics.h.

Constructor & Destructor Documentation

◆ LArRawChannelBuilderStatistics()

LArRawChannelBuilderStatistics::LArRawChannelBuilderStatistics ( unsigned int  nerr,
unsigned short  bitpat 
)

Definition at line 10 of file LArRawChannelBuilderStatistics.cxx.

11  :
12  m_N_errors(nerr),
13  m_bit_pattern(bitpat),
14  m_s("")
15 {
16  m_error_count.resize(m_N_errors);
17  m_error_string.resize(m_N_errors);
21 
22  for( unsigned int i=0; i<m_N_errors; i++ )
23  {
24  m_error_count[i]=0;
28  }
29  m_events=0;
30 
31  m_first=true;
32 }

◆ ~LArRawChannelBuilderStatistics()

LArRawChannelBuilderStatistics::~LArRawChannelBuilderStatistics ( )
inline

Definition at line 24 of file LArRawChannelBuilderStatistics.h.

24 {};

Member Function Documentation

◆ incrementErrorCount()

void LArRawChannelBuilderStatistics::incrementErrorCount ( unsigned int  nerr)

Definition at line 34 of file LArRawChannelBuilderStatistics.cxx.

35 {
36  if(nerr<m_N_errors)
37  {
38  m_error_count[nerr]++;
39  m_errors_this_event[nerr]++;
40  }
41 }

◆ resetErrorcountPerEvent()

void LArRawChannelBuilderStatistics::resetErrorcountPerEvent ( )

Definition at line 90 of file LArRawChannelBuilderStatistics.cxx.

91 {
92  for( unsigned int i=0; i<m_N_errors; i++ )
93  {
94  // errors per event
97 
99  }
100  m_events++;
101 }

◆ returnBitPattern()

unsigned int LArRawChannelBuilderStatistics::returnBitPattern ( ) const

Definition at line 85 of file LArRawChannelBuilderStatistics.cxx.

86 {
87  return m_bit_pattern;
88 }

◆ returnErrorCount()

ulonglong LArRawChannelBuilderStatistics::returnErrorCount ( unsigned int  nerr)

Definition at line 43 of file LArRawChannelBuilderStatistics.cxx.

44 {
45  if(nerr<m_N_errors)
46  return m_error_count[nerr];
47  return 0;
48 }

◆ returnErrorCountPerEvent()

ulonglong LArRawChannelBuilderStatistics::returnErrorCountPerEvent ( unsigned int  nerr)

Definition at line 50 of file LArRawChannelBuilderStatistics.cxx.

51 {
52  if(nerr<m_N_errors)
53  return m_errors_per_event[nerr];
54  return 0;
55 }

◆ returnErrorCountSqPerEvent()

ulonglong LArRawChannelBuilderStatistics::returnErrorCountSqPerEvent ( unsigned int  nerr)

Definition at line 57 of file LArRawChannelBuilderStatistics.cxx.

58 {
59  if(nerr<m_N_errors)
60  return m_errorsSq_per_event[nerr];
61  return 0;
62 }

◆ returnErrorString()

std::string LArRawChannelBuilderStatistics::returnErrorString ( unsigned int  nerr)

Definition at line 74 of file LArRawChannelBuilderStatistics.cxx.

75 {
76  if(nerr>=m_N_errors)
77  return m_s;
78  return m_error_string[nerr];
79 }

◆ returnEvents()

unsigned long LArRawChannelBuilderStatistics::returnEvents ( ) const

Definition at line 64 of file LArRawChannelBuilderStatistics.cxx.

65 {
66  return m_events;
67 }

◆ returnMaxErrors()

unsigned int LArRawChannelBuilderStatistics::returnMaxErrors ( ) const

Definition at line 80 of file LArRawChannelBuilderStatistics.cxx.

81 {
82  return m_N_errors;
83 }

◆ setErrorString()

void LArRawChannelBuilderStatistics::setErrorString ( unsigned int  nerr,
const std::string &  s 
)

Definition at line 69 of file LArRawChannelBuilderStatistics.cxx.

70 {
71  if(nerr<m_N_errors)
72  m_error_string[nerr]=s;
73 }

Member Data Documentation

◆ m_bit_pattern

const unsigned int LArRawChannelBuilderStatistics::m_bit_pattern
private

Definition at line 52 of file LArRawChannelBuilderStatistics.h.

◆ m_error_count

std::vector<ulonglong> LArRawChannelBuilderStatistics::m_error_count
private

Definition at line 44 of file LArRawChannelBuilderStatistics.h.

◆ m_error_string

std::vector<std::string> LArRawChannelBuilderStatistics::m_error_string
private

Definition at line 45 of file LArRawChannelBuilderStatistics.h.

◆ m_errors_per_event

std::vector<ulonglong> LArRawChannelBuilderStatistics::m_errors_per_event
private

Definition at line 47 of file LArRawChannelBuilderStatistics.h.

◆ m_errors_this_event

std::vector<unsigned long> LArRawChannelBuilderStatistics::m_errors_this_event
private

Definition at line 46 of file LArRawChannelBuilderStatistics.h.

◆ m_errorsSq_per_event

std::vector<ulonglong> LArRawChannelBuilderStatistics::m_errorsSq_per_event
private

Definition at line 48 of file LArRawChannelBuilderStatistics.h.

◆ m_events

unsigned long LArRawChannelBuilderStatistics::m_events
private

Definition at line 49 of file LArRawChannelBuilderStatistics.h.

◆ m_first

bool LArRawChannelBuilderStatistics::m_first
private

Definition at line 55 of file LArRawChannelBuilderStatistics.h.

◆ m_N_errors

const unsigned int LArRawChannelBuilderStatistics::m_N_errors
private

Definition at line 43 of file LArRawChannelBuilderStatistics.h.

◆ m_s

const std::string LArRawChannelBuilderStatistics::m_s
private

Definition at line 53 of file LArRawChannelBuilderStatistics.h.


The documentation for this class was generated from the following files:
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
LArRawChannelBuilderStatistics::m_errors_this_event
std::vector< unsigned long > m_errors_this_event
Definition: LArRawChannelBuilderStatistics.h:46
LArRawChannelBuilderStatistics::m_N_errors
const unsigned int m_N_errors
Definition: LArRawChannelBuilderStatistics.h:43
LArRawChannelBuilderStatistics::m_bit_pattern
const unsigned int m_bit_pattern
Definition: LArRawChannelBuilderStatistics.h:52
LArRawChannelBuilderStatistics::m_first
bool m_first
Definition: LArRawChannelBuilderStatistics.h:55
LArRawChannelBuilderStatistics::m_s
const std::string m_s
Definition: LArRawChannelBuilderStatistics.h:53
lumiFormat.i
int i
Definition: lumiFormat.py:92
LArRawChannelBuilderStatistics::m_errorsSq_per_event
std::vector< ulonglong > m_errorsSq_per_event
Definition: LArRawChannelBuilderStatistics.h:48
LArRawChannelBuilderStatistics::m_errors_per_event
std::vector< ulonglong > m_errors_per_event
Definition: LArRawChannelBuilderStatistics.h:47
LArRawChannelBuilderStatistics::m_error_count
std::vector< ulonglong > m_error_count
Definition: LArRawChannelBuilderStatistics.h:44
LArRawChannelBuilderStatistics::m_events
unsigned long m_events
Definition: LArRawChannelBuilderStatistics.h:49
LArRawChannelBuilderStatistics::m_error_string
std::vector< std::string > m_error_string
Definition: LArRawChannelBuilderStatistics.h:45