![]() |
![]() |
#include <Selections.h>
Public Member Functions | |
bool | accept (edm::Event &iEvent) const |
FilterOR (const std::string &filterORlist, const std::map< std::string, Filter * > &filters) | |
~FilterOR () | |
Private Attributes | |
std::vector< std::pair < std::string, const Filter * > > | filters_ |
Definition at line 59 of file Selections.h.
FilterOR::~FilterOR | ( | ) | [inline] |
Definition at line 61 of file Selections.h.
{}
FilterOR::FilterOR | ( | const std::string & | filterORlist, |
const std::map< std::string, Filter * > & | filters | ||
) | [inline] |
Definition at line 62 of file Selections.h.
References Filter::description_, align_tpl::filter, filters_, Filter::name_, and findQualityFiles::size.
{ std::string filterORlistCopy=filterORlist; name_ = filterORlist; std::stringstream ss; ss<<"Filter doing an OR of: "; //split the OR-separated string into vector of strings unsigned int size=0; bool OK=true; while( OK ){ size_t orPos = filterORlistCopy.find("_OR_"); if (orPos == std::string::npos && filterORlistCopy.size()!=0){ size=filterORlistCopy.size(); OK=false; } else size=orPos; std::string filter = filterORlistCopy.substr(0,size); //remove the filter name and the OR (4 characters) from the string if (OK) filterORlistCopy = filterORlistCopy.substr(0+size+4); std::map<std::string, Filter*>::const_iterator it=filters.find(filter); if (it==filters.end()){ edm::LogError("FilterOR")<<"cannot do an OR of: "<<filter <<" OR expression is: "<<filterORlist; break; } filters_.push_back(std::make_pair(it->first, it->second)); ss<<it->first<<" "; } description_.push_back(ss.str()); }
bool FilterOR::accept | ( | edm::Event & | iEvent | ) | const [inline, virtual] |
std::vector<std::pair<std::string , const Filter * > > FilterOR::filters_ [private] |
Definition at line 103 of file Selections.h.
Referenced by accept(), and FilterOR().