CMS 3D CMS Logo

TriggerObjectStandAlone.cc

Go to the documentation of this file.
00001 //
00002 // $Id: TriggerObjectStandAlone.cc,v 1.1.2.1 2009/03/27 21:34:45 vadler Exp $
00003 //
00004 
00005 #include "DataFormats/PatCandidates/interface/TriggerObjectStandAlone.h"
00006 
00007 
00008 using namespace pat;
00009 
00011 
00012 bool TriggerObjectStandAlone::hasFilterLabel( const std::string & filterLabel ) const
00013 {
00014   for ( unsigned iFilter = 0; iFilter < filterLabels().size(); ++iFilter ) {
00015     if ( filterLabel == filterLabels().at( iFilter ) ) {
00016       return true;
00017     }
00018   }
00019   return false;
00020 }
00021 
00022 bool TriggerObjectStandAlone::hasPathName( const std::string & pathName ) const
00023 {
00024   for ( unsigned iPath = 0; iPath < pathNames().size(); ++iPath ) {
00025     if ( pathName == pathNames().at( iPath ) ) {
00026       return true;
00027     }
00028   }
00029   return false;
00030 }
00031 
00032 // returns "pure" pat::TriggerObject w/o add-on
00033 TriggerObject TriggerObjectStandAlone::triggerObject()
00034 {
00035   TriggerObject theObj( p4(), pdgId() );
00036   theObj.setCollection( collection() );
00037   for ( size_t i = 0; i < filterIds().size(); ++i ) theObj.addFilterId( filterIds().at( i ) );
00038   return theObj;
00039 }

Generated on Tue Jun 9 17:31:28 2009 for CMSSW by  doxygen 1.5.4