CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes
HcalZeroSuppressionAlgo Class Referenceabstract

#include <HcalZeroSuppressionAlgo.h>

Inheritance diagram for HcalZeroSuppressionAlgo:
HcalZSAlgoRealistic

Public Member Functions

void clearDbService ()
 
void setDbService (const HcalDbService *db)
 
virtual bool shouldKeep (const HBHEDataFrame &digi) const =0
 
virtual bool shouldKeep (const HODataFrame &digi) const =0
 
virtual bool shouldKeep (const HFDataFrame &digi) const =0
 
virtual bool shouldKeep (const QIE10DataFrame &digi) const =0
 
virtual bool shouldKeep (const QIE11DataFrame &digi) const =0
 
void suppress (const HBHEDigiCollection &input, HBHEDigiCollection &output)
 
void suppress (const HODigiCollection &input, HODigiCollection &output)
 
void suppress (const HFDigiCollection &input, HFDigiCollection &output)
 
void suppress (const QIE10DigiCollection &input, QIE10DigiCollection &output)
 
void suppress (const QIE11DigiCollection &input, QIE11DigiCollection &output)
 
virtual ~HcalZeroSuppressionAlgo ()=default
 

Protected Member Functions

 HcalZeroSuppressionAlgo (bool markAndPass)
 

Protected Attributes

const HcalDbServicem_dbService
 

Private Attributes

bool m_markAndPass
 

Detailed Description

Definition at line 15 of file HcalZeroSuppressionAlgo.h.

Constructor & Destructor Documentation

◆ ~HcalZeroSuppressionAlgo()

virtual HcalZeroSuppressionAlgo::~HcalZeroSuppressionAlgo ( )
virtualdefault

◆ HcalZeroSuppressionAlgo()

HcalZeroSuppressionAlgo::HcalZeroSuppressionAlgo ( bool  markAndPass)
protected

Definition at line 3 of file HcalZeroSuppressionAlgo.cc.

References m_dbService.

3 : m_markAndPass(mp) { m_dbService = nullptr; }
const HcalDbService * m_dbService

Member Function Documentation

◆ clearDbService()

void HcalZeroSuppressionAlgo::clearDbService ( )
inline

Definition at line 29 of file HcalZeroSuppressionAlgo.h.

References m_dbService.

29 { m_dbService = nullptr; }
const HcalDbService * m_dbService

◆ setDbService()

void HcalZeroSuppressionAlgo::setDbService ( const HcalDbService db)
inline

◆ shouldKeep() [1/5]

virtual bool HcalZeroSuppressionAlgo::shouldKeep ( const HBHEDataFrame digi) const
pure virtual

Implemented in HcalZSAlgoRealistic.

Referenced by suppress().

◆ shouldKeep() [2/5]

virtual bool HcalZeroSuppressionAlgo::shouldKeep ( const HODataFrame digi) const
pure virtual

Implemented in HcalZSAlgoRealistic.

◆ shouldKeep() [3/5]

virtual bool HcalZeroSuppressionAlgo::shouldKeep ( const HFDataFrame digi) const
pure virtual

Implemented in HcalZSAlgoRealistic.

◆ shouldKeep() [4/5]

virtual bool HcalZeroSuppressionAlgo::shouldKeep ( const QIE10DataFrame digi) const
pure virtual

Implemented in HcalZSAlgoRealistic.

◆ shouldKeep() [5/5]

virtual bool HcalZeroSuppressionAlgo::shouldKeep ( const QIE11DataFrame digi) const
pure virtual

Implemented in HcalZSAlgoRealistic.

◆ suppress() [1/5]

void HcalZeroSuppressionAlgo::suppress ( const HBHEDigiCollection input,
HBHEDigiCollection output 
)

Definition at line 5 of file HcalZeroSuppressionAlgo.cc.

References hgcalPerformanceValidation::df, mps_fire::i, input, m_markAndPass, convertSQLitetoXML_cfg::output, and shouldKeep().

5  {
7 
8  for (i = input.begin(); i != input.end(); ++i) {
9  if (shouldKeep((*i))) {
10  if (!m_markAndPass) {
11  output.push_back(*i);
12  } else {
13  HBHEDataFrame df(*i);
14  df.setZSInfo(true, false);
15  output.push_back(df);
16  }
17  } else if (m_markAndPass) {
18  HBHEDataFrame df(*i);
19  df.setZSInfo(true, true);
20  output.push_back(df);
21  }
22  }
23 }
std::vector< T >::const_iterator const_iterator
static std::string const input
Definition: EdmProvDump.cc:50
virtual bool shouldKeep(const HBHEDataFrame &digi) const =0

◆ suppress() [2/5]

void HcalZeroSuppressionAlgo::suppress ( const HODigiCollection input,
HODigiCollection output 
)

Definition at line 45 of file HcalZeroSuppressionAlgo.cc.

References hgcalPerformanceValidation::df, mps_fire::i, input, m_markAndPass, convertSQLitetoXML_cfg::output, and shouldKeep().

45  {
47 
48  for (i = input.begin(); i != input.end(); ++i) {
49  if (shouldKeep((*i))) {
50  if (!m_markAndPass) {
51  output.push_back(*i);
52  } else {
53  HODataFrame df(*i);
54  df.setZSInfo(true, false);
55  output.push_back(df);
56  }
57  } else if (m_markAndPass) {
58  HODataFrame df(*i);
59  df.setZSInfo(true, true);
60  output.push_back(df);
61  }
62  }
63 }
std::vector< T >::const_iterator const_iterator
static std::string const input
Definition: EdmProvDump.cc:50
virtual bool shouldKeep(const HBHEDataFrame &digi) const =0

◆ suppress() [3/5]

void HcalZeroSuppressionAlgo::suppress ( const HFDigiCollection input,
HFDigiCollection output 
)

Definition at line 25 of file HcalZeroSuppressionAlgo.cc.

References hgcalPerformanceValidation::df, mps_fire::i, input, m_markAndPass, convertSQLitetoXML_cfg::output, and shouldKeep().

25  {
27 
28  for (i = input.begin(); i != input.end(); ++i) {
29  if (shouldKeep((*i))) {
30  if (!m_markAndPass) {
31  output.push_back(*i);
32  } else {
33  HFDataFrame df(*i);
34  df.setZSInfo(true, false);
35  output.push_back(df);
36  }
37  } else if (m_markAndPass) {
38  HFDataFrame df(*i);
39  df.setZSInfo(true, true);
40  output.push_back(df);
41  }
42  }
43 }
std::vector< T >::const_iterator const_iterator
static std::string const input
Definition: EdmProvDump.cc:50
virtual bool shouldKeep(const HBHEDataFrame &digi) const =0

◆ suppress() [4/5]

void HcalZeroSuppressionAlgo::suppress ( const QIE10DigiCollection input,
QIE10DigiCollection output 
)

Definition at line 65 of file HcalZeroSuppressionAlgo.cc.

References hgcalPerformanceValidation::df, mps_fire::i, input, m_markAndPass, convertSQLitetoXML_cfg::output, and shouldKeep().

65  {
66  for (QIE10DigiCollection::const_iterator i = input.begin(); i != input.end(); ++i) {
68  if (shouldKeep(df)) {
69  if (!m_markAndPass) {
70  output.push_back(df);
71  } else {
72  df.setZSInfo(false);
73  output.push_back(df);
74  }
75  } else if (m_markAndPass) {
76  df.setZSInfo(true);
77  output.push_back(df);
78  }
79  }
80 }
static std::string const input
Definition: EdmProvDump.cc:50
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
virtual bool shouldKeep(const HBHEDataFrame &digi) const =0

◆ suppress() [5/5]

void HcalZeroSuppressionAlgo::suppress ( const QIE11DigiCollection input,
QIE11DigiCollection output 
)

Definition at line 82 of file HcalZeroSuppressionAlgo.cc.

References hgcalPerformanceValidation::df, mps_fire::i, input, m_markAndPass, convertSQLitetoXML_cfg::output, and shouldKeep().

82  {
83  for (QIE11DigiCollection::const_iterator i = input.begin(); i != input.end(); ++i) {
85  if (shouldKeep(df)) {
86  if (!m_markAndPass) {
87  output.push_back(df);
88  } else {
89  df.setZSInfo(false);
90  output.push_back(df);
91  }
92  } else if (m_markAndPass) {
93  df.setZSInfo(true);
94  output.push_back(df);
95  }
96  }
97 }
static std::string const input
Definition: EdmProvDump.cc:50
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
virtual bool shouldKeep(const HBHEDataFrame &digi) const =0

Member Data Documentation

◆ m_dbService

const HcalDbService* HcalZeroSuppressionAlgo::m_dbService
protected

◆ m_markAndPass

bool HcalZeroSuppressionAlgo::m_markAndPass
private

Definition at line 37 of file HcalZeroSuppressionAlgo.h.

Referenced by suppress().