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

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) rangeCuts_.emplace_back(VarRangeCut<ObjType>(cutConfig));
29  }
std::vector< VarRangeCut< ObjType > > rangeCuts_

Member Function Documentation

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

Definition at line 32 of file VarRangeCutColl.h.

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

Definition at line 45 of file VarRangeCutColl.h.

45  {
46  for(auto& cut : rangeCuts_){
47  if(cut.varName()==varToSkip) continue;
48  if(!cut(obj)) return false;
49  }
50  return true;
51  }
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 53 of file VarRangeCutColl.h.

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

Member Data Documentation

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