CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
VarRangeCutColl< ObjType > Class Template Reference

#include <VarRangeCutColl.h>

Public Member Functions

bool operator() (const ObjType &obj) const
 
bool operator() (const ObjType &obj, const std::string &varToSkip) const
 
bool operator() (const ObjType &obj, const std::vector< std::string > &varsToSkip) const
 
 VarRangeCutColl (const std::vector< edm::ParameterSet > &configs)
 

Private Attributes

std::vector< VarRangeCut
< ObjType > > 
rangeCuts_
 

Detailed Description

template<typename ObjType>
class VarRangeCutColl< ObjType >

Definition at line 25 of file VarRangeCutColl.h.

Constructor & Destructor Documentation

template<typename ObjType>
VarRangeCutColl< ObjType >::VarRangeCutColl ( const std::vector< edm::ParameterSet > &  configs)
inlineexplicit

Definition at line 27 of file VarRangeCutColl.h.

27  {
28  for (const auto& cutConfig : configs)
29  rangeCuts_.emplace_back(VarRangeCut<ObjType>(cutConfig));
30  }
std::vector< VarRangeCut< ObjType > > rangeCuts_

Member Function Documentation

template<typename ObjType>
bool VarRangeCutColl< ObjType >::operator() ( const ObjType &  obj) const
inline

Definition at line 33 of file VarRangeCutColl.h.

33  {
34  for (auto& cut : rangeCuts_) {
35  if (!cut(obj))
36  return false;
37  }
38  return true;
39  }
std::vector< VarRangeCut< ObjType > > rangeCuts_
template<typename ObjType>
bool VarRangeCutColl< ObjType >::operator() ( const ObjType &  obj,
const std::string &  varToSkip 
) const
inline

Definition at line 47 of file VarRangeCutColl.h.

47  {
48  for (auto& cut : rangeCuts_) {
49  if (cut.varName() == varToSkip)
50  continue;
51  if (!cut(obj))
52  return false;
53  }
54  return true;
55  }
std::vector< VarRangeCut< ObjType > > rangeCuts_
template<typename ObjType>
bool VarRangeCutColl< ObjType >::operator() ( const ObjType &  obj,
const std::vector< std::string > &  varsToSkip 
) const
inline

Definition at line 57 of file VarRangeCutColl.h.

57  {
58  for (auto& cut : rangeCuts_) {
59  if (std::find(varsToSkip.begin(), varsToSkip.end(), cut.varName()) != varsToSkip.end())
60  continue;
61  if (!cut(obj))
62  return false;
63  }
64  return true;
65  }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
std::vector< VarRangeCut< ObjType > > rangeCuts_

Member Data Documentation

template<typename ObjType>
std::vector<VarRangeCut<ObjType> > VarRangeCutColl< ObjType >::rangeCuts_
private