CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
 
void suppress (const HBHEDigiCollection &input, HBHEDigiCollection &output)
 
void suppress (const HODigiCollection &input, HODigiCollection &output)
 
void suppress (const HFDigiCollection &input, HFDigiCollection &output)
 

Protected Member Functions

 HcalZeroSuppressionAlgo (bool markAndPass)
 

Protected Attributes

const HcalDbServicem_dbService
 

Private Attributes

bool m_markAndPass
 

Detailed Description

Definition at line 17 of file HcalZeroSuppressionAlgo.h.

Constructor & Destructor Documentation

HcalZeroSuppressionAlgo::HcalZeroSuppressionAlgo ( bool  markAndPass)
protected

Definition at line 3 of file HcalZeroSuppressionAlgo.cc.

References m_dbService.

3  : m_markAndPass(mp) {
4  m_dbService=0;
5 }
const HcalDbService * m_dbService

Member Function Documentation

void HcalZeroSuppressionAlgo::clearDbService ( )
inline

Definition at line 26 of file HcalZeroSuppressionAlgo.h.

References m_dbService.

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

Definition at line 25 of file HcalZeroSuppressionAlgo.h.

References EcalCondDB::db, and m_dbService.

25 { m_dbService=db; }
const HcalDbService * m_dbService
tuple db
Definition: EcalCondDB.py:151
virtual bool HcalZeroSuppressionAlgo::shouldKeep ( const HBHEDataFrame digi) const
pure virtual

Implemented in HcalZSAlgoEnergy, and HcalZSAlgoRealistic.

Referenced by suppress().

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

Implemented in HcalZSAlgoEnergy, and HcalZSAlgoRealistic.

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

Implemented in HcalZSAlgoEnergy, and HcalZSAlgoRealistic.

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

Definition at line 8 of file HcalZeroSuppressionAlgo.cc.

References edm::SortedCollection< T, SORT >::begin(), edm::SortedCollection< T, SORT >::end(), i, m_markAndPass, edm::SortedCollection< T, SORT >::push_back(), HBHEDataFrame::setZSInfo(), and shouldKeep().

8  {
10 
11  for (i=input.begin(); i!=input.end(); ++i)
12  if (shouldKeep((*i))) {
13  if (!m_markAndPass) output.push_back(*i);
14  else {
15  HBHEDataFrame df(*i);
16  df.setZSInfo(true,false);
17  output.push_back(df);
18  }
19  } else if (m_markAndPass) {
20  HBHEDataFrame df(*i);
21  df.setZSInfo(true,true);
22  output.push_back(df);
23  }
24 }
int i
Definition: DBlmapReader.cc:9
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(), i, m_markAndPass, edm::SortedCollection< T, SORT >::push_back(), HODataFrame::setZSInfo(), and shouldKeep().

45  {
47 
48 
49  for (i=input.begin(); i!=input.end(); ++i)
50  if (shouldKeep((*i))) {
51  if (!m_markAndPass) 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 }
int i
Definition: DBlmapReader.cc:9
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 26 of file HcalZeroSuppressionAlgo.cc.

References edm::SortedCollection< T, SORT >::begin(), edm::SortedCollection< T, SORT >::end(), i, m_markAndPass, edm::SortedCollection< T, SORT >::push_back(), HFDataFrame::setZSInfo(), and shouldKeep().

26  {
28 
29 
30  for (i=input.begin(); i!=input.end(); ++i)
31  if (shouldKeep((*i))) {
32  if (!m_markAndPass) output.push_back(*i);
33  else {
34  HFDataFrame df(*i);
35  df.setZSInfo(true,false);
36  output.push_back(df);
37  }
38  } else if (m_markAndPass) {
39  HFDataFrame df(*i);
40  df.setZSInfo(true,true);
41  output.push_back(df);
42  }
43 }
int i
Definition: DBlmapReader.cc:9
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

Member Data Documentation

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

Definition at line 34 of file HcalZeroSuppressionAlgo.h.

Referenced by suppress().