CMS 3D CMS Logo

Public Member Functions | Protected Attributes | Friends

L1GtCondition Class Reference

#include <L1GtCondition.h>

Inheritance diagram for L1GtCondition:
L1GtBptxTemplate L1GtCaloTemplate L1GtCastorTemplate L1GtCorrelationTemplate L1GtEnergySumTemplate L1GtExternalTemplate L1GtHfBitCountsTemplate L1GtHfRingEtSumsTemplate L1GtJetCountsTemplate L1GtMuonTemplate

List of all members.

Public Member Functions

const L1GtConditionCategorycondCategory () const
 get / set the category of the condition
const int & condChipNr () const
 get / set the condition-chip number the condition is located on
const bool condGEq () const
 get / set condition GEq flag
const std::string & condName () const
 get / set condition name
const L1GtConditionTypecondType () const
 get / set the type of the condition (1s, etc)
const bool corr () const
 L1GtCondition ()
 L1GtCondition (const std::string &)
 constructor from condition name
 L1GtCondition (const std::string &, const L1GtConditionCategory &, const L1GtConditionType &)
 constructor from condition name, category and type
const int nrObjects () const
 get number of trigger objects
const std::vector< L1GtObject > & objectType () const
 get / set the trigger object type(s) in the condition
virtual void print (std::ostream &myCout) const
 print condition
void setCondCategory (const L1GtConditionCategory &cCategory)
void setCondChipNr (const int &cChipNr)
void setCondGEq (const bool &cGEq)
void setCondName (const std::string &cName)
void setCondType (const L1GtConditionType &cType)
void setObjectType (const std::vector< L1GtObject > &objType)
const bool wsc () const
virtual ~L1GtCondition ()
 destructor

Protected Attributes

L1GtConditionCategory m_condCategory
 the category of the condition
int m_condChipNr
 condition is located on condition chip m_condChipNr
bool m_condGEq
 the operator used for the condition (>=, =): true for >=
std::string m_condName
 the name of the condition
L1GtConditionType m_condType
 the type of the condition (1s, etc)
std::vector< L1GtObjectm_objectType
 the trigger object type(s)

Friends

std::ostream & operator<< (std::ostream &, const L1GtCondition &)
 output stream operator

Detailed Description

Description: base class for L1 Global Trigger object templates (condition).

Implementation: <TODO: enter implementation details>

Author:
: Vasile Mihai Ghete - HEPHY Vienna

$Date$ $Revision$

Definition at line 33 of file L1GtCondition.h.


Constructor & Destructor Documentation

L1GtCondition::L1GtCondition ( )

constructor(s)

Definition at line 28 of file L1GtCondition.cc.

References CondNull, m_condCategory, m_condChipNr, m_condType, and TypeNull.

{

    m_condCategory = CondNull;
    m_condType = TypeNull;
    m_condChipNr = -1;

    // the rest of private members are C++ initialized
}
L1GtCondition::L1GtCondition ( const std::string &  cName)

constructor from condition name

Definition at line 39 of file L1GtCondition.cc.

References CondNull, m_condCategory, m_condChipNr, m_condName, m_condType, and TypeNull.

L1GtCondition::L1GtCondition ( const std::string &  cName,
const L1GtConditionCategory cCategory,
const L1GtConditionType cType 
)

constructor from condition name, category and type

Definition at line 49 of file L1GtCondition.cc.

References m_condCategory, m_condChipNr, m_condName, and m_condType.

{

    m_condName = cName;
    m_condCategory = cCategory;
    m_condType = cType;

    m_condChipNr = -1;

}
L1GtCondition::~L1GtCondition ( ) [virtual]

destructor

Definition at line 64 of file L1GtCondition.cc.

{
    // empty
}

Member Function Documentation

const L1GtConditionCategory& L1GtCondition::condCategory ( ) const [inline]
const int& L1GtCondition::condChipNr ( ) const [inline]
const bool L1GtCondition::condGEq ( ) const [inline]
const std::string& L1GtCondition::condName ( ) const [inline]
const L1GtConditionType& L1GtCondition::condType ( ) const [inline]
const bool L1GtCondition::corr ( ) const

get logic flag for conditions, different type of trigger objects, and with spatial correlations

Definition at line 139 of file L1GtCondition.cc.

References m_condType, and Type2cor.

{

    if (m_condType == Type2cor) {
        return true;
    }

    return false;
}
const int L1GtCondition::nrObjects ( ) const

get number of trigger objects

Definition at line 70 of file L1GtCondition.cc.

References m_condType, Type1s, Type2cor, Type2s, Type2wsc, Type3s, Type4s, TypeBptx, TypeCastor, TypeETM, TypeETT, TypeExternal, TypeHfBitCounts, TypeHfRingEtSums, TypeHTM, TypeHTT, TypeJetCounts, and TypeNull.

Referenced by L1GtTriggerMenuConfigOnlineProd::addCaloCondition(), L1GtTriggerMenuConfigOnlineProd::addMuonCondition(), L1GtMuonCondition::checkObjectParameter(), L1GtCaloCondition::checkObjectParameter(), L1GtCaloCondition::evaluateCondition(), L1GtMuonCondition::evaluateCondition(), L1GtVhdlWriterCore::getCondChipVhdContentFromTriggerMenu(), L1GtBptxTemplate::L1GtBptxTemplate(), L1GtCaloTemplate::L1GtCaloTemplate(), L1GtCastorTemplate::L1GtCastorTemplate(), L1GtCorrelationTemplate::L1GtCorrelationTemplate(), L1GtEnergySumTemplate::L1GtEnergySumTemplate(), L1GtExternalTemplate::L1GtExternalTemplate(), L1GtHfBitCountsTemplate::L1GtHfBitCountsTemplate(), L1GtHfRingEtSumsTemplate::L1GtHfRingEtSumsTemplate(), L1GtJetCountsTemplate::L1GtJetCountsTemplate(), L1GtMuonTemplate::L1GtMuonTemplate(), L1GtEnergySumTemplate::print(), L1GtJetCountsTemplate::print(), L1GtHfBitCountsTemplate::print(), L1GtHfRingEtSumsTemplate::print(), L1GtMuonTemplate::print(), and L1GtCaloTemplate::print().

{

    switch (m_condType) {

        case TypeNull:
        case TypeExternal:
        case TypeCastor:
        case TypeBptx: {
                return 0;
            }

            break;
        case Type1s: {
                return 1;
            }

            break;
        case Type2s:
        case Type2wsc:
        case Type2cor: {
                return 2;
            }

            break;
        case Type3s: {
                return 3;
            }

            break;
        case Type4s: {
                return 4;
            }

            break;
        case TypeETT:
        case TypeETM:
        case TypeHTT:
        case TypeHTM:
        case TypeJetCounts:
        case TypeHfBitCounts:
        case TypeHfRingEtSums: {
                return 1;
            }

            break;
        default: {
                // TODO no such type, throw exception?
                return 0;
            }
            break;
    }

}
const std::vector<L1GtObject>& L1GtCondition::objectType ( ) const [inline]
void L1GtCondition::print ( std::ostream &  myCout) const [virtual]

print condition

Reimplemented in L1GtBptxTemplate, L1GtCaloTemplate, L1GtCastorTemplate, L1GtCorrelationTemplate, L1GtEnergySumTemplate, L1GtExternalTemplate, L1GtHfBitCountsTemplate, L1GtHfRingEtSumsTemplate, L1GtJetCountsTemplate, and L1GtMuonTemplate.

Definition at line 150 of file L1GtCondition.cc.

References BPTX, CenJet, CondBptx, CondCalo, CondCastor, CondCorrelation, CondEnergySum, CondExternal, CondHfBitCounts, CondHfRingEtSums, CondJetCounts, CondMuon, CondNull, ETM, ETT, ForJet, GtExternal, HfBitCounts, HfRingEtSums, HTM, HTT, i, IsoEG, JetCounts, m_condCategory, m_condChipNr, m_condGEq, m_condName, m_condType, m_objectType, Mu, NoIsoEG, TauJet, Type1s, Type2cor, Type2s, Type2wsc, Type3s, Type4s, TypeBptx, TypeCastor, TypeETM, TypeETT, TypeExternal, TypeHfBitCounts, TypeHfRingEtSums, TypeHTM, TypeHTT, TypeJetCounts, and TypeNull.

Referenced by operator<<().

{

    myCout << "\n  Condition name:     " << m_condName << std::endl;

    switch (m_condCategory) {
        case CondNull: {
                myCout << "  Condition category: " << "CondNull"
                << " - it means not defined!"
                << std::endl;
            }

            break;
        case CondMuon: {
                myCout << "  Condition category: " << "CondMuon"  << std::endl;
            }

            break;
        case CondCalo: {
                myCout << "  Condition category: " << "CondCalo"  << std::endl;
            }

            break;
        case CondEnergySum: {
                myCout << "  Condition category: " << "CondEnergySum"  << std::endl;
            }

            break;
        case CondJetCounts: {
                myCout << "  Condition category: " << "CondJetCounts"  << std::endl;
            }

            break;
        case CondCorrelation: {
                myCout << "  Condition category: " << "CondCorrelation"  << std::endl;
            }

            break;
        case CondCastor: {
                myCout << "  Condition category: " << "CondCastor"  << std::endl;
            }

            break;
        case CondHfBitCounts: {
                myCout << "  Condition category: " << "CondHfBitCounts"  << std::endl;
            }

            break;
        case CondHfRingEtSums: {
                myCout << "  Condition category: " << "CondHfRingEtSums"  << std::endl;
            }

            break;
        case CondBptx: {
                myCout << "  Condition category: " << "CondBptx"  << std::endl;
            }

            break;
        case CondExternal: {
                myCout << "  Condition category: " << "CondExternal"  << std::endl;
            }

            break;
        default: {
                myCout << "  Condition category: " << m_condCategory
                << "  - no such category defined. Check L1GtConditionCategory enum."
                << std::endl;

            }
            break;
    }

    switch (m_condType) {

        case TypeNull: {
                myCout << "  Condition type:     " << "TypeNull"
                << " - it means not defined!"
                << std::endl;
            }

            break;
        case Type1s: {
                myCout << "  Condition type:     " << "Type1s"  << std::endl;
            }

            break;
        case Type2s: {
                myCout << "  Condition type:     " << "Type2s"  << std::endl;
            }

            break;
        case Type2wsc: {
                myCout << "  Condition type:     " << "Type2wsc"  << std::endl;
            }

            break;
        case Type2cor: {
                myCout << "  Condition type:     " << "Type2cor"  << std::endl;
            }

            break;
        case Type3s: {
                myCout << "  Condition type:     " << "Type3s"  << std::endl;
            }

            break;
        case Type4s: {
                myCout << "  Condition type:     " << "Type4s"  << std::endl;
            }

            break;
        case TypeETM: {
                myCout << "  Condition type:     " << "TypeETM"  << std::endl;
            }

            break;
        case TypeETT: {
                myCout << "  Condition type:     " << "TypeETT"  << std::endl;
            }

            break;
        case TypeHTT: {
                myCout << "  Condition type:     " << "TypeHTT"  << std::endl;
            }

            break;
        case TypeHTM: {
                myCout << "  Condition type:     " << "TypeHTM"  << std::endl;
            }

            break;
        case TypeJetCounts: {
                myCout << "  Condition type:     " << "TypeJetCounts"  << std::endl;
            }

            break;
        case TypeCastor: {
                myCout << "  Condition type:     " << "TypeCastor"  << std::endl;
            }

            break;
        case TypeHfBitCounts: {
                myCout << "  Condition type:     " << "TypeHfBitCounts"  << std::endl;
            }

            break;
        case TypeHfRingEtSums: {
                myCout << "  Condition type:     " << "TypeHfRingEtSums"  << std::endl;
            }

            break;
        case TypeBptx: {
                myCout << "  Condition type:     " << "TypeBptx"  << std::endl;
            }

            break;
        case TypeExternal: {
                myCout << "  Condition type:     " << "TypeExternal"  << std::endl;
            }

            break;
        default: {
                myCout << "  Condition type:     " << m_condType
                << " - no such type defined. Check L1GtConditionType enum."
                << std::endl;
            }
            break;
    }


    myCout << "  Object types:      ";

    for (unsigned int i = 0; i < m_objectType.size(); ++i) {

        switch (m_objectType[i]) {
            case Mu: {
                    myCout << " Mu ";
                }

                break;
            case NoIsoEG: {
                    myCout << " NoIsoEG ";
                }

                break;
            case IsoEG: {
                    myCout << " IsoEG ";
                }

                break;
            case CenJet: {
                    myCout << " CenJet ";
                }

                break;
            case ForJet: {
                    myCout << " ForJet ";
                }

                break;
            case TauJet: {
                    myCout << " TauJet ";
                }

                break;
            case ETM: {
                    myCout << " ETM ";
                }

                break;
            case ETT: {
                    myCout << " ETT ";
                }

                break;
            case HTT: {
                    myCout << " HTT ";
                }

                break;
            case HTM: {
                    myCout << " HTM ";
                }

                break;
            case JetCounts: {
                    myCout << " JetCounts ";
                }

                break;
            case HfBitCounts: {
                    myCout << " HfBitCounts ";
                }

                break;
            case HfRingEtSums: {
                    myCout << " HfRingEtSums ";
                }

                break;
            case BPTX: {
                    myCout << " BPTX ";
                }

                break;
            case GtExternal: {
                    myCout << " GtExternal ";
                }

                break;
            default: {
                    myCout << " Unknown type " << m_objectType[i];
                }
                break;
        }
    }

    myCout << std::endl;

    myCout << "  \" >= \" flag:        " << m_condGEq << std::endl;

    myCout << "  Condition chip:     " << m_condChipNr;

    if (m_condChipNr < 0) {
        myCout << "   - not properly initialized! ";
    }

    myCout << std::endl;

}
void L1GtCondition::setCondCategory ( const L1GtConditionCategory cCategory) [inline]

Definition at line 71 of file L1GtCondition.h.

References m_condCategory.

    {
        m_condCategory = cCategory;
    }
void L1GtCondition::setCondChipNr ( const int &  cChipNr) [inline]
void L1GtCondition::setCondGEq ( const bool &  cGEq) [inline]
void L1GtCondition::setCondName ( const std::string &  cName) [inline]

Definition at line 60 of file L1GtCondition.h.

References m_condName.

    {
        m_condName = cName;
    }
void L1GtCondition::setCondType ( const L1GtConditionType cType) [inline]
void L1GtCondition::setObjectType ( const std::vector< L1GtObject > &  objType) [inline]
const bool L1GtCondition::wsc ( ) const

get logic flag for conditions, same type of trigger objects, and with spatial correlations

Definition at line 127 of file L1GtCondition.cc.

References m_condType, and Type2wsc.

Referenced by L1GtTriggerMenuConfigOnlineProd::addCaloCondition(), L1GtTriggerMenuConfigOnlineProd::addMuonCondition(), L1GtCaloCondition::evaluateCondition(), L1GtMuonCondition::evaluateCondition(), L1GtMuonTemplate::print(), and L1GtCaloTemplate::print().

{

    if (m_condType == Type2wsc) {
        return true;
    }

    return false;
}

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const L1GtCondition result 
) [friend]

output stream operator

Definition at line 422 of file L1GtCondition.cc.

{
    result.print(os);
    return os;

}

Member Data Documentation

int L1GtCondition::m_condChipNr [protected]
bool L1GtCondition::m_condGEq [protected]
std::string L1GtCondition::m_condName [protected]
std::vector<L1GtObject> L1GtCondition::m_objectType [protected]