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 HFDataFrame &digi) const =0
 
virtual bool shouldKeep (const HODataFrame &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 HFDigiCollection &input, HFDigiCollection &output)
 
void suppress (const HODigiCollection &input, HODigiCollection &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.

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

References m_dbService.

Member Function Documentation

◆ clearDbService()

void HcalZeroSuppressionAlgo::clearDbService ( )
inline

Definition at line 29 of file HcalZeroSuppressionAlgo.h.

29 { m_dbService = nullptr; }

References m_dbService.

◆ setDbService()

void HcalZeroSuppressionAlgo::setDbService ( const HcalDbService db)
inline

Definition at line 28 of file HcalZeroSuppressionAlgo.h.

28 { m_dbService = db; }

References dqmiodatasetharvest::db, and m_dbService.

◆ 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 HFDataFrame digi) const
pure virtual

Implemented in HcalZSAlgoRealistic.

◆ shouldKeep() [3/5]

virtual bool HcalZeroSuppressionAlgo::shouldKeep ( const HODataFrame 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.

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 }

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

◆ suppress() [2/5]

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

Definition at line 25 of file HcalZeroSuppressionAlgo.cc.

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 }

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

◆ suppress() [3/5]

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

Definition at line 45 of file HcalZeroSuppressionAlgo.cc.

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 }

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

◆ suppress() [4/5]

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

Definition at line 65 of file HcalZeroSuppressionAlgo.cc.

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 }

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

◆ suppress() [5/5]

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

Definition at line 82 of file HcalZeroSuppressionAlgo.cc.

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 }

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

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().

HcalZeroSuppressionAlgo::shouldKeep
virtual bool shouldKeep(const HBHEDataFrame &digi) const =0
mps_fire.i
i
Definition: mps_fire.py:428
edm::SortedCollection::const_iterator
std::vector< T >::const_iterator const_iterator
Definition: SortedCollection.h:80
input
static const std::string input
Definition: EdmProvDump.cc:48
edm::DataFrameContainer::const_iterator
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
Definition: DataFrameContainer.h:61
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
dqmiodatasetharvest.db
db
Definition: dqmiodatasetharvest.py:119
HBHEDataFrame
Definition: HBHEDataFrame.h:14
HFDataFrame
Definition: HFDataFrame.h:14
HcalZeroSuppressionAlgo::m_markAndPass
bool m_markAndPass
Definition: HcalZeroSuppressionAlgo.h:37
hgcalPerformanceValidation.df
df
Definition: hgcalPerformanceValidation.py:640
QIE10DataFrame
Definition: QIE10DataFrame.h:11
HODataFrame
Definition: HODataFrame.h:14
QIE11DataFrame
Definition: QIE11DataFrame.h:11
HcalZeroSuppressionAlgo::m_dbService
const HcalDbService * m_dbService
Definition: HcalZeroSuppressionAlgo.h:34