CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
egHLT::EgMultiCut< T > Struct Template Reference

#include <EgHLTDQMCut.h>

Inheritance diagram for egHLT::EgMultiCut< T >:
egHLT::EgHLTDQMCut< T >

Public Member Functions

EgHLTDQMCut< T > * clone () const override
 
 EgMultiCut ()=default
 
 EgMultiCut (const EgMultiCut< T > &rhs)
 
EgMultiCut< T > & operator<< (const EgHLTDQMCut< T > *inputCut)
 
bool pass (const T &obj, const OffEvt &evt) const override
 
 ~EgMultiCut () override
 
- Public Member Functions inherited from egHLT::EgHLTDQMCut< T >
 EgHLTDQMCut ()=default
 
virtual ~EgHLTDQMCut ()=default
 

Private Attributes

std::vector< const EgHLTDQMCut< T > * > cuts_
 

Additional Inherited Members

- Protected Member Functions inherited from egHLT::EgHLTDQMCut< T >
 EgHLTDQMCut (const EgHLTDQMCut &rhs)=default
 

Detailed Description

template<class T>
struct egHLT::EgMultiCut< T >

Definition at line 117 of file EgHLTDQMCut.h.

Constructor & Destructor Documentation

◆ EgMultiCut() [1/2]

template<class T>
egHLT::EgMultiCut< T >::EgMultiCut ( )
default

◆ EgMultiCut() [2/2]

template<class T >
egHLT::EgMultiCut< T >::EgMultiCut ( const EgMultiCut< T > &  rhs)

Definition at line 139 of file EgHLTDQMCut.h.

References egHLT::EgMultiCut< T >::cuts_.

139  {
140  for (size_t cutNr = 0; cutNr < rhs.cuts_.size(); cutNr++) {
141  cuts_.push_back(rhs.cuts_[cutNr]->clone());
142  }
143  }
std::vector< const EgHLTDQMCut< T > * > cuts_
Definition: EgHLTDQMCut.h:119

◆ ~EgMultiCut()

template<class T>
egHLT::EgMultiCut< T >::~EgMultiCut ( )
inlineoverride

Definition at line 124 of file EgHLTDQMCut.h.

References egHLT::EgMultiCut< T >::cuts_, and mps_fire::i.

124  {
125  for (size_t i = 0; i < cuts_.size(); i++)
126  delete cuts_[i];
127  }
std::vector< const EgHLTDQMCut< T > * > cuts_
Definition: EgHLTDQMCut.h:119

Member Function Documentation

◆ clone()

template<class T>
EgHLTDQMCut<T>* egHLT::EgMultiCut< T >::clone ( void  ) const
inlineoverridevirtual

Implements egHLT::EgHLTDQMCut< T >.

Definition at line 135 of file EgHLTDQMCut.h.

References egHLT::EgMultiCut< T >::EgMultiCut().

135 { return new EgMultiCut(*this); }
EgMultiCut()=default

◆ operator<<()

template<class T >
EgMultiCut< T > & egHLT::EgMultiCut< T >::operator<< ( const EgHLTDQMCut< T > *  inputCut)

Definition at line 146 of file EgHLTDQMCut.h.

146  {
147  if (typeid(*inputCut) == typeid(EgMultiCut)) {
148  edm::LogError("EgMultiCut") << " Error can not currently load an EgMultiCut inside a EgMultiCut, the practical "
149  "upshot is that the selection you think is being loaded isnt ";
150  } else if (inputCut == nullptr) {
151  edm::LogError("EgMultiCut") << "Error, cut being loaded is null, ignoring";
152  } else
153  cuts_.push_back(inputCut);
154  return *this;
155  }
std::vector< const EgHLTDQMCut< T > * > cuts_
Definition: EgHLTDQMCut.h:119
EgMultiCut()=default
Log< level::Error, false > LogError

◆ pass()

template<class T >
bool egHLT::EgMultiCut< T >::pass ( const T obj,
const OffEvt evt 
) const
overridevirtual

Implements egHLT::EgHLTDQMCut< T >.

Definition at line 158 of file EgHLTDQMCut.h.

References mps_fire::i, and getGTfromDQMFile::obj.

158  {
159  for (size_t i = 0; i < cuts_.size(); i++) {
160  if (!cuts_[i]->pass(obj, evt))
161  return false;
162  }
163  return true;
164  }
std::vector< const EgHLTDQMCut< T > * > cuts_
Definition: EgHLTDQMCut.h:119
bool pass(const T &obj, const OffEvt &evt) const override
Definition: EgHLTDQMCut.h:158

Member Data Documentation

◆ cuts_

template<class T>
std::vector<const EgHLTDQMCut<T>*> egHLT::EgMultiCut< T >::cuts_
private