CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/DataFormats/PatCandidates/src/TriggerAlgorithm.cc

Go to the documentation of this file.
00001 //
00002 // $Id: TriggerAlgorithm.cc,v 1.3 2011/02/22 18:29:50 vadler Exp $
00003 //
00004 
00005 
00006 #include "DataFormats/PatCandidates/interface/TriggerAlgorithm.h"
00007 
00008 
00009 using namespace pat;
00010 
00011 
00012 // Constructors and Destructor
00013 
00014 
00015 // Default constructor
00016 TriggerAlgorithm::TriggerAlgorithm() :
00017   name_(),
00018   alias_(),
00019   logic_(),
00020   tech_(),
00021   bit_(),
00022   prescale_(),
00023   mask_(),
00024   decisionBeforeMask_(),
00025   decisionAfterMask_()
00026 {
00027   conditionKeys_.clear();
00028 }
00029 
00030 
00031 // Constructor from algorithm name only
00032 TriggerAlgorithm::TriggerAlgorithm( const std::string & name ) :
00033   name_( name ),
00034   alias_(),
00035   logic_(),
00036   tech_(),
00037   bit_(),
00038   gtlResult_(),
00039   prescale_(),
00040   mask_(),
00041   decisionBeforeMask_(),
00042   decisionAfterMask_()
00043 {
00044   conditionKeys_.clear();
00045 }
00046 
00047 
00048 // Constructors from values
00049 TriggerAlgorithm::TriggerAlgorithm( const std::string & name, const std::string & alias, bool tech, unsigned bit, unsigned prescale, bool mask, bool decisionBeforeMask, bool decisionAfterMask ) :
00050   name_( name ),
00051   alias_( alias),
00052   logic_(),
00053   tech_( tech ),
00054   bit_( bit ),
00055   gtlResult_(),
00056   prescale_( prescale ),
00057   mask_( mask ),
00058   decisionBeforeMask_( decisionBeforeMask ),
00059   decisionAfterMask_( decisionAfterMask )
00060 {
00061   conditionKeys_.clear();
00062 }
00063 TriggerAlgorithm::TriggerAlgorithm( const std::string & name, const std::string & alias, bool tech, unsigned bit, bool gtlResult, unsigned prescale, bool mask, bool decisionBeforeMask, bool decisionAfterMask ) :
00064   name_( name ),
00065   alias_( alias),
00066   logic_(),
00067   tech_( tech ),
00068   bit_( bit ),
00069   gtlResult_( gtlResult ),
00070   prescale_( prescale ),
00071   mask_( mask ),
00072   decisionBeforeMask_( decisionBeforeMask ),
00073   decisionAfterMask_( decisionAfterMask )
00074 {
00075   conditionKeys_.clear();
00076 }
00077 
00078 
00079 // Methods
00080 
00081 
00082 // Checks, if a certain trigger condition collection index is assigned
00083 bool TriggerAlgorithm::hasConditionKey( unsigned conditionKey ) const
00084 {
00085   for ( size_t iO = 0; iO < conditionKeys().size(); ++iO ) {
00086     if ( conditionKeys().at( iO ) == conditionKey ) {
00087       return true;
00088     }
00089   }
00090   return false;
00091 }