CMS 3D CMS Logo

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

◆ VarRangeCutColl()

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  }

Member Function Documentation

◆ operator()() [1/3]

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  }

◆ operator()() [2/3]

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  }

◆ operator()() [3/3]

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  }

Member Data Documentation

◆ rangeCuts_

template<typename ObjType>
std::vector<VarRangeCut<ObjType> > VarRangeCutColl< ObjType >::rangeCuts_
private
VarRangeCutColl::rangeCuts_
std::vector< VarRangeCut< ObjType > > rangeCuts_
Definition: VarRangeCutColl.h:68
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
trigObjTnPSource_cfi.configs
configs
Definition: trigObjTnPSource_cfi.py:75
getGTfromDQMFile.obj
obj
Definition: getGTfromDQMFile.py:32
PA_MinBiasSkim_cff.cut
cut
Definition: PA_MinBiasSkim_cff.py:13
VarRangeCut
Definition: VarRangeCut.h:29