CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/DataFormats/PatCandidates/src/TriggerAlgorithm.cc

Go to the documentation of this file.
00001 //
00002 // $Id: TriggerAlgorithm.cc,v 1.4 2011/11/30 13:41:14 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   gtlResult_(),
00023   prescale_(),
00024   mask_(),
00025   decisionBeforeMask_(),
00026   decisionAfterMask_()
00027 {
00028   conditionKeys_.clear();
00029 }
00030 
00031 
00032 // Constructor from algorithm name only
00033 TriggerAlgorithm::TriggerAlgorithm( const std::string & name ) :
00034   name_( name ),
00035   alias_(),
00036   logic_(),
00037   tech_(),
00038   bit_(),
00039   gtlResult_(),
00040   prescale_(),
00041   mask_(),
00042   decisionBeforeMask_(),
00043   decisionAfterMask_()
00044 {
00045   conditionKeys_.clear();
00046 }
00047 
00048 
00049 // Constructors from values
00050 TriggerAlgorithm::TriggerAlgorithm( const std::string & name, const std::string & alias, bool tech, unsigned bit, unsigned prescale, bool mask, bool decisionBeforeMask, bool decisionAfterMask ) :
00051   name_( name ),
00052   alias_( alias),
00053   logic_(),
00054   tech_( tech ),
00055   bit_( bit ),
00056   gtlResult_(),
00057   prescale_( prescale ),
00058   mask_( mask ),
00059   decisionBeforeMask_( decisionBeforeMask ),
00060   decisionAfterMask_( decisionAfterMask )
00061 {
00062   conditionKeys_.clear();
00063 }
00064 TriggerAlgorithm::TriggerAlgorithm( const std::string & name, const std::string & alias, bool tech, unsigned bit, bool gtlResult, unsigned prescale, bool mask, bool decisionBeforeMask, bool decisionAfterMask ) :
00065   name_( name ),
00066   alias_( alias),
00067   logic_(),
00068   tech_( tech ),
00069   bit_( bit ),
00070   gtlResult_( gtlResult ),
00071   prescale_( prescale ),
00072   mask_( mask ),
00073   decisionBeforeMask_( decisionBeforeMask ),
00074   decisionAfterMask_( decisionAfterMask )
00075 {
00076   conditionKeys_.clear();
00077 }
00078 
00079 
00080 // Methods
00081 
00082 
00083 // Checks, if a certain trigger condition collection index is assigned
00084 bool TriggerAlgorithm::hasConditionKey( unsigned conditionKey ) const
00085 {
00086   for ( size_t iO = 0; iO < conditionKeys().size(); ++iO ) {
00087     if ( conditionKeys().at( iO ) == conditionKey ) {
00088       return true;
00089     }
00090   }
00091   return false;
00092 }