7 #include <boost/algorithm/string.hpp>
28 if ( nameVec.empty() )
return false;
30 if ( name.find_first_not_of(
wildcard_ ) == std::string::npos )
return true;
32 std::vector< std::string > namePartsVec;
33 boost::split( namePartsVec, name, boost::is_any_of( std::string( 1,
wildcard_ ) ), boost::token_compress_on );
35 for ( std::vector< std::string >::const_iterator iVec = nameVec.begin(); iVec != nameVec.end(); ++iVec ) {
41 for ( std::vector< std::string >::const_iterator iName = namePartsVec.begin(); iName != namePartsVec.end(); ++iName ) {
45 if ( iName->length() == 0 )
continue;
48 index = iVec->find( *iName, index );
52 if ( index == std::string::npos || ( iName == namePartsVec.begin() && index > 0 ) ) {
57 index += iName->length();
60 if (
index < iVec->length() && namePartsVec.back().length() != 0 ) failed =
true;
62 if ( ! failed )
return true;
88 std::vector< std::string > paths;
90 for (
unsigned iPath = 0; iPath <
pathNames_.size(); ++iPath ) {
118 if ( match ==
pathNames_.end() )
return false;
144 if ( collName.find(
wildcard_ ) != std::string::npos ) {
151 if ( collTag.
process().empty() ) {
virtual int pdgId() const
PDG identifier.
bool hasFiring() const
Checks, if the usage indicator vector has been filled.
virtual bool hasCollection(const std::string &collName) const
Checks, if a certain label of original collection is assigned (method overrides)
static const char wildcard_
Constants.
std::vector< std::string > pathNames_
Vector of names of all HLT paths or L1 algorithms the trigger objects has been used in...
std::vector< std::string > filterLabels_
Vector of labels of all HLT filters or names od L1 conditions the trigger objects has been used in...
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Analysis-level trigger object class.
bool hasAnyName(const std::string &name, const std::vector< std::string > &nameVec) const
Private methods.
TriggerObject triggerObject()
Gets the pat::TriggerObject (parent class)
void setCollection(const std::string &collName)
Methods.
virtual bool hasCollection(const std::string &collName) const
Checks, if a certain label of original collection is assigned.
std::string collection() const
Get the label of the collection the trigger object originates from.
unsigned int index
index type
bool hasPathOrAlgorithm(const std::string &name, bool firing=true) const
Checks, if a certain HLT path or L1 algorithm name is assigned.
std::vector< int > triggerObjectTypes() const
Get all trigger object type identifiers.
bool hasFilterOrCondition(const std::string &name) const
Checks, if a certain HLT filter label or L1 condition name is assigned.
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
void addPathOrAlgorithm(const std::string &name, bool firing=true)
Adds a new HLT path or L1 algorithm name.
void addTriggerObjectType(trigger::TriggerObjectType triggerObjectType)
Add a new trigger object type identifier.
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
std::vector< bool > pathLastFilterAccepted_
std::vector< std::string > pathsOrAlgorithms(bool firing=true) const
Gets all HLT path or L1 algorithm names.