Skip to content

Commit

Permalink
Merge pull request #13066 from cms-l1t-offline/pr-l1tglobal-emulator-80x
Browse files Browse the repository at this point in the history
  • Loading branch information
cmsbuild committed Jan 31, 2016
2 parents e479f4a + d2a1f0e commit c2987b5
Showing 1 changed file with 36 additions and 36 deletions.
72 changes: 36 additions & 36 deletions L1Trigger/L1TGlobal/src/L1TGlobalUtil.cc
Expand Up @@ -96,7 +96,7 @@ void l1t::L1TGlobalUtil::retrieveL1(const edm::Event& iEvent, const edm::EventSe
m_PreScaleColumn = 1;
}
LogDebug("l1t|Global") << "Grabing prescale column "<< m_PreScaleColumn << endl;
const std::vector<int>& prescaleSet = (*m_prescaleFactorsAlgoTrig).at(m_PreScaleColumn-1);
const std::vector<int>& prescaleSet = (*m_prescaleFactorsAlgoTrig)[m_PreScaleColumn-1];

for (CItAlgo itAlgo = m_algorithmMap->begin(); itAlgo != m_algorithmMap->end(); itAlgo++) {

Expand All @@ -105,13 +105,13 @@ void l1t::L1TGlobalUtil::retrieveL1(const edm::Event& iEvent, const edm::EventSe
int algBit = (itAlgo->second).algoBitNumber();

(m_prescales[algBit]).first = algName;
(m_prescales[algBit]).second = prescaleSet.at(algBit);
(m_prescales[algBit]).second = prescaleSet[algBit];

(m_masks[algBit]).first = algName;
(m_masks[algBit]).second = m_triggerMaskAlgoTrig->at(algBit);
(m_masks[algBit]).second = (*m_triggerMaskAlgoTrig)[algBit];

(m_vetoMasks[algBit]).first = algName;
(m_vetoMasks[algBit]).second = m_triggerMaskVetoAlgoTrig->at(algBit);
(m_vetoMasks[algBit]).second = (*m_triggerMaskVetoAlgoTrig)[algBit];
}

m_filledPrescales = true;
Expand Down Expand Up @@ -327,14 +327,14 @@ void l1t::L1TGlobalUtil::resetDecisionVectors() {

for(unsigned int algBit = 0; algBit< m_numberPhysTriggers; algBit++) {

(m_decisionsInitial.at(algBit)).first = "NULL";
(m_decisionsInitial.at(algBit)).second = false;
(m_decisionsInitial[algBit]).first = "NULL";
(m_decisionsInitial[algBit]).second = false;

(m_decisionsPrescaled.at(algBit)).first = "NULL";
(m_decisionsPrescaled.at(algBit)).second = false;
(m_decisionsPrescaled[algBit]).first = "NULL";
(m_decisionsPrescaled[algBit]).second = false;

(m_decisionsFinal.at(algBit)).first = "NULL";
(m_decisionsFinal.at(algBit)).second = false;
(m_decisionsFinal[algBit]).first = "NULL";
(m_decisionsFinal[algBit]).second = false;

}

Expand All @@ -349,8 +349,8 @@ void l1t::L1TGlobalUtil::resetPrescaleVectors() {

for(unsigned int algBit = 0; algBit< m_numberPhysTriggers; algBit++) {

(m_prescales.at(algBit)).first = "NULL";
(m_prescales.at(algBit)).second = 1;
(m_prescales[algBit]).first = "NULL";
(m_prescales[algBit]).second = 1;

}

Expand All @@ -366,11 +366,11 @@ void l1t::L1TGlobalUtil::resetMaskVectors() {

for(unsigned int algBit = 0; algBit< m_numberPhysTriggers; algBit++) {

(m_masks.at(algBit)).first = "NULL";
(m_masks.at(algBit)).second = true;
(m_masks[algBit]).first = "NULL";
(m_masks[algBit]).second = true;

(m_vetoMasks.at(algBit)).first = "NULL";
(m_vetoMasks.at(algBit)).second = false;
(m_vetoMasks[algBit]).first = "NULL";
(m_vetoMasks[algBit]).second = false;

}

Expand All @@ -390,8 +390,8 @@ const bool l1t::L1TGlobalUtil::getAlgBitFromName(const std::string& algName, int
const bool l1t::L1TGlobalUtil::getAlgNameFromBit(int& bit, std::string& algName) const {

// since we are just looking up the name, doesn't matter which vector we get it from
if((m_decisionsInitial.at(bit)).first != "NULL") {
algName = (m_decisionsInitial.at(bit)).first;
if((m_decisionsInitial[bit]).first != "NULL") {
algName = (m_decisionsInitial[bit]).first;
return true;
}
return false; //No name associated with this bit
Expand All @@ -406,8 +406,8 @@ const bool l1t::L1TGlobalUtil::getInitialDecisionByBit(int& bit, bool& decision)
}
*/
// Need some check that this is a valid bit
if((m_decisionsInitial.at(bit)).first != "NULL") {
decision = (m_decisionsInitial.at(bit)).second;
if((m_decisionsInitial[bit]).first != "NULL") {
decision = (m_decisionsInitial[bit]).second;
return true;
}

Expand All @@ -416,8 +416,8 @@ const bool l1t::L1TGlobalUtil::getInitialDecisionByBit(int& bit, bool& decision)
const bool l1t::L1TGlobalUtil::getPrescaledDecisionByBit(int& bit, bool& decision) const {

// Need some check that this is a valid bit
if((m_decisionsPrescaled.at(bit)).first != "NULL") {
decision = (m_decisionsPrescaled.at(bit)).second;
if((m_decisionsPrescaled[bit]).first != "NULL") {
decision = (m_decisionsPrescaled[bit]).second;
return true;
}

Expand All @@ -426,8 +426,8 @@ const bool l1t::L1TGlobalUtil::getPrescaledDecisionByBit(int& bit, bool& decisio
const bool l1t::L1TGlobalUtil::getFinalDecisionByBit(int& bit, bool& decision) const {

// Need some check that this is a valid bit
if((m_decisionsFinal.at(bit)).first != "NULL") {
decision = (m_decisionsFinal.at(bit)).second;
if((m_decisionsFinal[bit]).first != "NULL") {
decision = (m_decisionsFinal[bit]).second;
return true;
}

Expand All @@ -436,8 +436,8 @@ const bool l1t::L1TGlobalUtil::getFinalDecisionByBit(int& bit, bool& decision) c
const bool l1t::L1TGlobalUtil::getPrescaleByBit(int& bit, int& prescale) const {

// Need some check that this is a valid bit
if((m_prescales.at(bit)).first != "NULL") {
prescale = (m_prescales.at(bit)).second;
if((m_prescales[bit]).first != "NULL") {
prescale = (m_prescales[bit]).second;
return true;
}

Expand All @@ -446,8 +446,8 @@ const bool l1t::L1TGlobalUtil::getPrescaleByBit(int& bit, int& prescale) const {
const bool l1t::L1TGlobalUtil::getMaskByBit(int& bit, bool& mask) const {

// Need some check that this is a valid bit
if((m_masks.at(bit)).first != "NULL") {
mask = (m_masks.at(bit)).second;
if((m_masks[bit]).first != "NULL") {
mask = (m_masks[bit]).second;
return true;
}

Expand All @@ -457,8 +457,8 @@ const bool l1t::L1TGlobalUtil::getMaskByBit(int& bit, bool& mask) const {
const bool l1t::L1TGlobalUtil::getVetoMaskByBit(int& bit, bool& veto) const {

// Need some check that this is a valid bit
if((m_vetoMasks.at(bit)).first != "NULL") {
veto = (m_vetoMasks.at(bit)).second;
if((m_vetoMasks[bit]).first != "NULL") {
veto = (m_vetoMasks[bit]).second;
return true;
}

Expand All @@ -469,7 +469,7 @@ const bool l1t::L1TGlobalUtil::getInitialDecisionByName(const std::string& algNa

int bit = -1;
if(getAlgBitFromName(algName,bit)) {
decision = (m_decisionsInitial.at(bit)).second;
decision = (m_decisionsInitial[bit]).second;
return true;
}

Expand All @@ -480,7 +480,7 @@ const bool l1t::L1TGlobalUtil::getPrescaledDecisionByName(const std::string& alg

int bit = -1;
if(getAlgBitFromName(algName,bit)) {
decision = (m_decisionsPrescaled.at(bit)).second;
decision = (m_decisionsPrescaled[bit]).second;
return true;
}

Expand All @@ -491,7 +491,7 @@ const bool l1t::L1TGlobalUtil::getFinalDecisionByName(const std::string& algName

int bit = -1;
if(getAlgBitFromName(algName,bit)) {
decision = (m_decisionsFinal.at(bit)).second;
decision = (m_decisionsFinal[bit]).second;
return true;
}

Expand All @@ -501,7 +501,7 @@ const bool l1t::L1TGlobalUtil::getPrescaleByName(const std::string& algName, int

int bit = -1;
if(getAlgBitFromName(algName,bit)) {
prescale = (m_prescales.at(bit)).second;
prescale = (m_prescales[bit]).second;
return true;
}

Expand All @@ -511,7 +511,7 @@ const bool l1t::L1TGlobalUtil::getMaskByName(const std::string& algName, bool& m

int bit = -1;
if(getAlgBitFromName(algName,bit)) {
mask = (m_masks.at(bit)).second;
mask = (m_masks[bit]).second;
return true;
}

Expand All @@ -521,7 +521,7 @@ const bool l1t::L1TGlobalUtil::getVetoMaskByName(const std::string& algName, boo

int bit = -1;
if(getAlgBitFromName(algName,bit)) {
veto = (m_vetoMasks.at(bit)).second;
veto = (m_vetoMasks[bit]).second;
return true;
}

Expand Down

0 comments on commit c2987b5

Please sign in to comment.