CMS 3D CMS Logo

Public Member Functions | Private Attributes

L1GlobalTriggerObjectMap Class Reference

#include <L1GlobalTriggerObjectMap.h>

List of all members.

Public Member Functions

int algoBitNumber () const
 get / set bit number for algorithm in the object map
bool algoGtlResult () const
const std::string & algoName () const
 get / set name for algorithm in the object map
const std::vector
< CombinationsInCond > & 
combinationVector () const
const CombinationsInCondgetCombinationsInCond (const int condNumberVal) const
 return all the combinations passing the requirements imposed in condition condNumberVal
const CombinationsInCondgetCombinationsInCond (const std::string &condNameVal) const
 return all the combinations passing the requirements imposed in condition condNameVal
const bool getConditionResult (const std::string &condNameVal) const
 return the result for the condition condNameVal
 L1GlobalTriggerObjectMap ()
 constructor(s)
const std::vector
< L1GtLogicParser::OperandToken > & 
operandTokenVector () const
void print (std::ostream &myCout) const
 print the full object map
void reset ()
 reset the object map
void setAlgoBitNumber (int algoBitNumberValue)
void setAlgoGtlResult (bool algoGtlResultValue)
void setAlgoName (const std::string &algoNameValue)
void setCombinationVector (const std::vector< CombinationsInCond > &combinationVectorValue)
void setOperandTokenVector (const std::vector< L1GtLogicParser::OperandToken > &operandTokenVectorValue)
void swapCombinationVector (std::vector< CombinationsInCond > &combinationVectorValue)
void swapOperandTokenVector (std::vector< L1GtLogicParser::OperandToken > &operandTokenVectorValue)
 ~L1GlobalTriggerObjectMap ()
 destructor

Private Attributes

int m_algoBitNumber
bool m_algoGtlResult
std::string m_algoName
std::vector< CombinationsInCondm_combinationVector
std::vector
< L1GtLogicParser::OperandToken
m_operandTokenVector

Detailed Description

Description: map trigger objects to an algorithm and the conditions therein.

Implementation: <TODO: enter implementation details>

Author:
: Vasile Mihai Ghete - HEPHY Vienna

$Date$ $Revision$

Description: group typedefs used by L1GlobalTriggerObjectMap.

Implementation: <TODO: enter implementation details>

Author:
: Vasile Mihai Ghete - HEPHY Vienna

$Date$ $Revision$

Description: see header file.

Implementation: <TODO: enter implementation details>

Author:
: Vasile Mihai Ghete - HEPHY Vienna

$Date$ $Revision$

Definition at line 35 of file L1GlobalTriggerObjectMap.h.


Constructor & Destructor Documentation

L1GlobalTriggerObjectMap::L1GlobalTriggerObjectMap ( ) [inline]

constructor(s)

Definition at line 41 of file L1GlobalTriggerObjectMap.h.

{}
L1GlobalTriggerObjectMap::~L1GlobalTriggerObjectMap ( ) [inline]

destructor

Definition at line 44 of file L1GlobalTriggerObjectMap.h.

{}

Member Function Documentation

int L1GlobalTriggerObjectMap::algoBitNumber ( ) const [inline]

get / set bit number for algorithm in the object map

Definition at line 59 of file L1GlobalTriggerObjectMap.h.

References m_algoBitNumber.

    {
        return m_algoBitNumber;
    }
bool L1GlobalTriggerObjectMap::algoGtlResult ( ) const [inline]

get / set the GTL result for algorithm NOTE: FDL can mask an algorithm!

Definition at line 71 of file L1GlobalTriggerObjectMap.h.

References m_algoGtlResult.

                                      {
        return m_algoGtlResult;
    }
const std::string& L1GlobalTriggerObjectMap::algoName ( ) const [inline]

get / set name for algorithm in the object map

Definition at line 49 of file L1GlobalTriggerObjectMap.h.

References m_algoName.

    {
        return m_algoName;
    }
const std::vector<CombinationsInCond>& L1GlobalTriggerObjectMap::combinationVector ( ) const [inline]

get / set the vector of combinations for the algorithm return a constant reference to the vector of combinations for the algorithm

Definition at line 81 of file L1GlobalTriggerObjectMap.h.

References m_combinationVector.

    {
        return m_combinationVector;
    }
const CombinationsInCond * L1GlobalTriggerObjectMap::getCombinationsInCond ( const std::string &  condNameVal) const

return all the combinations passing the requirements imposed in condition condNameVal

Definition at line 40 of file L1GlobalTriggerObjectMap.cc.

References i, m_combinationVector, and m_operandTokenVector.

Referenced by HLTLevel1GTSeed::seedsL1TriggerObjectMaps().

                                        {

    for (size_t i = 0; i < m_operandTokenVector.size(); ++i) {

        if ((m_operandTokenVector[i]).tokenName == condNameVal) {
            return &(m_combinationVector.at((m_operandTokenVector[i]).tokenNumber));
        }

    }

    // return a null address - should not arrive here
    edm::LogError("L1GlobalTriggerObjectMap")
        << "\n\n  ERROR: The requested condition with tokenName = " << condNameVal
        << "\n  does not exists in the operand token vector."
        << "\n  Returning zero pointer for getCombinationsInCond\n\n" << std::endl;

    return 0;

}
const CombinationsInCond * L1GlobalTriggerObjectMap::getCombinationsInCond ( const int  condNumberVal) const

return all the combinations passing the requirements imposed in condition condNumberVal

Definition at line 62 of file L1GlobalTriggerObjectMap.cc.

References i, m_combinationVector, and m_operandTokenVector.

                                                                                                       {

    for (size_t i = 0; i < m_operandTokenVector.size(); ++i) {

        if ((m_operandTokenVector[i]).tokenNumber == condNumberVal) {
            return &(m_combinationVector.at((m_operandTokenVector[i]).tokenNumber));
        }

    }

    // return a null address - should not arrive here
    edm::LogError("L1GlobalTriggerObjectMap")
        << "\n\n  ERROR: The requested condition with tokenNumber = " << condNumberVal
        << "\n  does not exists in the operand token vector."
        << "\n  Returning zero pointer for getCombinationsInCond\n\n" << std::endl;

    return 0;

}
const bool L1GlobalTriggerObjectMap::getConditionResult ( const std::string &  condNameVal) const

return the result for the condition condNameVal

Definition at line 82 of file L1GlobalTriggerObjectMap.cc.

References i, and m_operandTokenVector.

                                                                                          {

    for (size_t i = 0; i < m_operandTokenVector.size(); ++i) {

        if ((m_operandTokenVector[i]).tokenName == condNameVal) {
            return (m_operandTokenVector[i]).tokenResult;
        }
    }

    // return false - should not arrive here
    edm::LogError("L1GlobalTriggerObjectMap")
        << "\n\n  ERROR: The requested condition with name = " << condNameVal
        << "\n  does not exists in the operand token vector."
        << "\n  Returning false for getConditionResult\n\n" << std::endl;
    return false;

}
const std::vector<L1GtLogicParser::OperandToken>& L1GlobalTriggerObjectMap::operandTokenVector ( ) const [inline]

get / set the vector of operand tokens return a constant reference to the vector of operand tokens

Definition at line 95 of file L1GlobalTriggerObjectMap.h.

References m_operandTokenVector.

Referenced by HLTLevel1GTSeed::seedsL1TriggerObjectMaps().

                                                                                    {
        return m_operandTokenVector;
    }
void L1GlobalTriggerObjectMap::print ( std::ostream &  myCout) const

print the full object map

Definition at line 121 of file L1GlobalTriggerObjectMap.cc.

References filterCSVwithJSON::copy, i, m_algoBitNumber, m_algoGtlResult, m_algoName, m_combinationVector, and m_operandTokenVector.

Referenced by L1GlobalTriggerGTL::run().

{

    myCout << "L1GlobalTriggerObjectMap: print " << std::endl;

    myCout << "  Algorithm name: " << m_algoName << std::endl;
    myCout << "    Bit number: " << m_algoBitNumber << std::endl;
    myCout << "    GTL result: " << m_algoGtlResult << std::endl;

    int operandTokenVectorSize = m_operandTokenVector.size();

    myCout << "    Operand token vector size: " << operandTokenVectorSize;

    if (operandTokenVectorSize == 0) {
        myCout << "   - not properly initialized! " << std::endl;
    }
    else {
        myCout << std::endl;

        for (int i = 0; i < operandTokenVectorSize; ++i) {

            myCout << "      " << std::setw(5) << (m_operandTokenVector[i]).tokenNumber << "\t"
            << std::setw(25) << (m_operandTokenVector[i]).tokenName << "\t" 
            << (m_operandTokenVector[i]).tokenResult 
            << std::endl;
        }

    }

    myCout << "    CombinationVector size: " << m_combinationVector.size() << std::endl;

    myCout << "  conditions: "  << std::endl;

    std::vector<CombinationsInCond>::const_iterator itVVV;
    int iCond = 0;
    for(itVVV  = m_combinationVector.begin();
            itVVV != m_combinationVector.end(); itVVV++) {

        std::string condName = (m_operandTokenVector[iCond]).tokenName;
        bool condResult = (m_operandTokenVector[iCond]).tokenResult;

        myCout << "    Condition " << condName << " evaluated to " << condResult
        << std::endl;

        myCout << "    List of combinations passing all requirements for this condition:"
        << std::endl;

        myCout << "    ";

        if ((*itVVV).size() == 0) {
            myCout << "(none)";
        } else {

            CombinationsInCond::const_iterator itVV;
            for(itVV  = (*itVVV).begin(); itVV != (*itVVV).end(); itVV++) {

                myCout << "( ";

                std::copy((*itVV).begin(), (*itVV).end(),
                          std::ostream_iterator<int> (myCout, " "));

                myCout << "); ";

            }

        }
        iCond++;
        myCout << "\n\n";
    }
}
void L1GlobalTriggerObjectMap::reset ( void  )

reset the object map

Definition at line 101 of file L1GlobalTriggerObjectMap.cc.

References m_algoBitNumber, m_algoGtlResult, m_algoName, m_combinationVector, and m_operandTokenVector.

{

    // name of the algorithm
    m_algoName.clear();

    // bit number for algorithm
    m_algoBitNumber = -1;

    // GTL result of the algorithm
    m_algoGtlResult = false;

    // vector of operand tokens for an algorithm 
    m_operandTokenVector.clear();
    
    // vector of combinations for all conditions in an algorithm
    m_combinationVector.clear();

}
void L1GlobalTriggerObjectMap::setAlgoBitNumber ( int  algoBitNumberValue) [inline]

Definition at line 64 of file L1GlobalTriggerObjectMap.h.

References m_algoBitNumber.

Referenced by L1GlobalTriggerGTL::run().

    {
        m_algoBitNumber = algoBitNumberValue;
    }
void L1GlobalTriggerObjectMap::setAlgoGtlResult ( bool  algoGtlResultValue) [inline]

Definition at line 75 of file L1GlobalTriggerObjectMap.h.

References m_algoGtlResult.

Referenced by L1GlobalTriggerGTL::run().

                                                   {
        m_algoGtlResult = algoGtlResultValue;
    }
void L1GlobalTriggerObjectMap::setAlgoName ( const std::string &  algoNameValue) [inline]

Definition at line 54 of file L1GlobalTriggerObjectMap.h.

References m_algoName.

Referenced by L1GlobalTriggerGTL::run().

                                                     {
        m_algoName = algoNameValue;
    }
void L1GlobalTriggerObjectMap::setCombinationVector ( const std::vector< CombinationsInCond > &  combinationVectorValue) [inline]

Definition at line 86 of file L1GlobalTriggerObjectMap.h.

References m_combinationVector.

Referenced by L1GlobalTriggerGTL::run().

                                                                                           {
        m_combinationVector = combinationVectorValue;
    }
void L1GlobalTriggerObjectMap::setOperandTokenVector ( const std::vector< L1GtLogicParser::OperandToken > &  operandTokenVectorValue) [inline]

Definition at line 99 of file L1GlobalTriggerObjectMap.h.

References m_operandTokenVector.

Referenced by L1GlobalTriggerGTL::run().

                                                                                                      {
        m_operandTokenVector = operandTokenVectorValue;
    }
void L1GlobalTriggerObjectMap::swapCombinationVector ( std::vector< CombinationsInCond > &  combinationVectorValue) [inline]

Definition at line 89 of file L1GlobalTriggerObjectMap.h.

References m_combinationVector.

                                                                                      {
      m_combinationVector.swap(combinationVectorValue);
    }
void L1GlobalTriggerObjectMap::swapOperandTokenVector ( std::vector< L1GtLogicParser::OperandToken > &  operandTokenVectorValue) [inline]

Definition at line 102 of file L1GlobalTriggerObjectMap.h.

References m_operandTokenVector.

                                                                                                 {
      m_operandTokenVector.swap(operandTokenVectorValue);
    }

Member Data Documentation

Definition at line 131 of file L1GlobalTriggerObjectMap.h.

Referenced by algoBitNumber(), print(), reset(), and setAlgoBitNumber().

Definition at line 134 of file L1GlobalTriggerObjectMap.h.

Referenced by algoGtlResult(), print(), reset(), and setAlgoGtlResult().

std::string L1GlobalTriggerObjectMap::m_algoName [private]

Definition at line 128 of file L1GlobalTriggerObjectMap.h.

Referenced by algoName(), print(), reset(), and setAlgoName().

vector of operand tokens for an algorithm (condition name, condition index, condition result)

Definition at line 138 of file L1GlobalTriggerObjectMap.h.

Referenced by getCombinationsInCond(), getConditionResult(), operandTokenVector(), print(), reset(), setOperandTokenVector(), and swapOperandTokenVector().