Public Member Functions | Protected Attributes | Friends | List of all members
rb::FilterList< T > Class Template Reference

A simple list of products that have been marked "filtered out". More...

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-11-28/RecoBase/FilterList.h"

Public Member Functions

void Add (art::Ptr< T > prod)
 
void Add (art::Handle< std::vector< T > > h, int idx)
 

Protected Attributes

art::PtrVector< TfFiltered
 

Friends

bool IsFiltered (const art::Event &, art::Ptr< T >, const std::vector< std::string > &)
 Is this Ptr marked "filtered out"? More...
 

Detailed Description

template<class T>
class rb::FilterList< T >

A simple list of products that have been marked "filtered out".

Definition at line 74 of file FilterList.h.

Member Function Documentation

template<class T >
void rb::FilterList< T >::Add ( art::Ptr< T prod)
inline

Definition at line 82 of file FilterList.h.

References rb::FilterList< T >::fFiltered.

83  {
84  fFiltered.push_back(prod);
85  }
art::PtrVector< T > fFiltered
Definition: FilterList.h:92
template<class T >
void rb::FilterList< T >::Add ( art::Handle< std::vector< T > >  h,
int  idx 
)
inline

Definition at line 86 of file FilterList.h.

References rb::FilterList< T >::fFiltered, and make_syst_table_plots::h.

87  {
88  fFiltered.push_back(art::Ptr<T>(h, idx));
89  }
art::PtrVector< T > fFiltered
Definition: FilterList.h:92
Definition: fwd.h:28

Friends And Related Function Documentation

template<class T >
bool IsFiltered ( const art::Event evt,
art::Ptr< T x,
const std::vector< std::string > &  labels 
)
friend

Is this Ptr marked "filtered out"?

Parameters
evtThe current event
xCheck if this Ptr is marked "filtered"
labelsOnly check FilterLists under these labels. If empty check all labels.

Definition at line 96 of file FilterList.h.

99  {
100  std::vector<art::Handle<rb::FilterList<T> > > filts;
101  if(labels.empty()){
102  evt.getManyByType(filts);
103  }
104  else{
105  for(const std::string& label: labels){
106  filts.emplace_back();
107  evt.getByLabel(label, filts.back());
108  if(filts.back().failedToGet()){
109  // mf::LogWarning("FilterList")
110  // << "FilterList not found with label: "
111  // << label;
112  filts.pop_back();
113  }
114  }
115  }
116 
117  for(const art::Handle<rb::FilterList<T>>& filt: filts){
118  for(const art::Ptr<T>& ptr: filt->fFiltered){
119  if(x == ptr) return true;
120  }
121  }
122 
123  return false;
124  }
A simple list of products that have been marked "filtered out".
Definition: FilterList.h:74
const char * label
void getManyByType(std::vector< Handle< PROD >> &results) const
Definition: DataViewImpl.h:446
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Definition: DataViewImpl.h:344
TString filt[ntarg]
Definition: Style.C:28
Definition: fwd.h:28
enum BeamMode string

Member Data Documentation

template<class T >
art::PtrVector<T> rb::FilterList< T >::fFiltered
protected

Definition at line 92 of file FilterList.h.

Referenced by rb::FilterList< T >::Add().


The documentation for this class was generated from the following file: