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:
HcalZSAlgoEnergy 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

virtual HcalZeroSuppressionAlgo::~HcalZeroSuppressionAlgo ( )
virtualdefault
HcalZeroSuppressionAlgo::HcalZeroSuppressionAlgo ( bool  markAndPass)
protected

Definition at line 3 of file HcalZeroSuppressionAlgo.cc.

References m_dbService.

Referenced by clearDbService().

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

Member Function Documentation

void HcalZeroSuppressionAlgo::clearDbService ( )
inline

Definition at line 29 of file HcalZeroSuppressionAlgo.h.

References HcalZeroSuppressionAlgo(), m_dbService, and hcalDigis_cfi::markAndPass.

29 { m_dbService = nullptr; }
const HcalDbService * m_dbService
void HcalZeroSuppressionAlgo::setDbService ( const HcalDbService db)
inline

Definition at line 28 of file HcalZeroSuppressionAlgo.h.

References m_dbService.

28 { m_dbService = db; }
const HcalDbService * m_dbService
virtual bool HcalZeroSuppressionAlgo::shouldKeep ( const HBHEDataFrame digi) const
pure virtual

Implemented in HcalZSAlgoRealistic, and HcalZSAlgoEnergy.

Referenced by suppress().

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

Implemented in HcalZSAlgoRealistic, and HcalZSAlgoEnergy.

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

Implemented in HcalZSAlgoRealistic, and HcalZSAlgoEnergy.

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

Implemented in HcalZSAlgoRealistic, and HcalZSAlgoEnergy.

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

Implemented in HcalZSAlgoRealistic, and HcalZSAlgoEnergy.

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

Definition at line 5 of file HcalZeroSuppressionAlgo.cc.

References edm::SortedCollection< T, SORT >::begin(), edm::SortedCollection< T, SORT >::end(), mps_fire::i, m_markAndPass, edm::SortedCollection< T, SORT >::push_back(), HBHEDataFrame::setZSInfo(), 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
void push_back(T const &t)
const_iterator end() const
virtual bool shouldKeep(const HBHEDataFrame &digi) const =0
const_iterator begin() const
void HcalZeroSuppressionAlgo::suppress ( const HODigiCollection input,
HODigiCollection output 
)

Definition at line 45 of file HcalZeroSuppressionAlgo.cc.

References edm::SortedCollection< T, SORT >::begin(), edm::SortedCollection< T, SORT >::end(), mps_fire::i, m_markAndPass, edm::SortedCollection< T, SORT >::push_back(), HODataFrame::setZSInfo(), 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
void push_back(T const &t)
const_iterator end() const
virtual bool shouldKeep(const HBHEDataFrame &digi) const =0
const_iterator begin() const
void HcalZeroSuppressionAlgo::suppress ( const HFDigiCollection input,
HFDigiCollection output 
)

Definition at line 25 of file HcalZeroSuppressionAlgo.cc.

References edm::SortedCollection< T, SORT >::begin(), edm::SortedCollection< T, SORT >::end(), mps_fire::i, m_markAndPass, edm::SortedCollection< T, SORT >::push_back(), HFDataFrame::setZSInfo(), 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
void push_back(T const &t)
const_iterator end() const
virtual bool shouldKeep(const HBHEDataFrame &digi) const =0
const_iterator begin() const
void HcalZeroSuppressionAlgo::suppress ( const QIE10DigiCollection input,
QIE10DigiCollection output 
)

Definition at line 65 of file HcalZeroSuppressionAlgo.cc.

References edm::DataFrameContainer::begin(), edm::DataFrameContainer::end(), mps_fire::i, m_markAndPass, HcalDataFrameContainer< Digi >::push_back(), QIE10DataFrame::setZSInfo(), and shouldKeep().

65  {
66  for (QIE10DigiCollection::const_iterator i = input.begin(); i != input.end(); ++i) {
67  QIE10DataFrame df(*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 }
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
const_iterator begin() const
const_iterator end() const
void push_back(const Digi &digi)
virtual bool shouldKeep(const HBHEDataFrame &digi) const =0
void HcalZeroSuppressionAlgo::suppress ( const QIE11DigiCollection input,
QIE11DigiCollection output 
)

Definition at line 82 of file HcalZeroSuppressionAlgo.cc.

References edm::DataFrameContainer::begin(), edm::DataFrameContainer::end(), mps_fire::i, m_markAndPass, HcalDataFrameContainer< Digi >::push_back(), QIE11DataFrame::setZSInfo(), and shouldKeep().

82  {
83  for (QIE11DigiCollection::const_iterator i = input.begin(); i != input.end(); ++i) {
84  QIE11DataFrame df(*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 }
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
const_iterator begin() const
const_iterator end() const
void push_back(const Digi &digi)
virtual bool shouldKeep(const HBHEDataFrame &digi) const =0

Member Data Documentation

const HcalDbService* HcalZeroSuppressionAlgo::m_dbService
protected
bool HcalZeroSuppressionAlgo::m_markAndPass
private

Definition at line 37 of file HcalZeroSuppressionAlgo.h.

Referenced by suppress().