CMS 3D CMS Logo

L1GtTriggerMenu.cc

Go to the documentation of this file.
00001 
00017 // this class header
00018 #include "CondFormats/L1TObjects/interface/L1GtTriggerMenu.h"
00019 
00020 // system include files
00021 #include <iomanip>
00022 
00023 
00024 // user include files
00025 #include "CondFormats/L1TObjects/interface/L1GtCondition.h"
00026 #include "CondFormats/L1TObjects/interface/L1GtAlgorithm.h"
00027 
00028 
00029 // forward declarations
00030 
00031 // constructor
00032 L1GtTriggerMenu::L1GtTriggerMenu() {
00033     // empty
00034 }
00035 
00036 L1GtTriggerMenu::L1GtTriggerMenu(
00037         const std::string& triggerMenuNameVal,
00038         const unsigned int numberConditionChips,
00039         const std::vector<std::vector<L1GtMuonTemplate> >& vecMuonTemplateVal,
00040         const std::vector<std::vector<L1GtCaloTemplate> >& vecCaloTemplateVal,
00041         const std::vector<std::vector<L1GtEnergySumTemplate> >& vecEnergySumTemplateVal,
00042         const std::vector<std::vector<L1GtJetCountsTemplate> >& vecJetCountsTemplateVal,
00043         const std::vector<std::vector<L1GtCastorTemplate> >& vecCastorTemplateVal,
00044         const std::vector<std::vector<L1GtHfBitCountsTemplate> >& vecHfBitCountsTemplateVal,
00045         const std::vector<std::vector<L1GtHfRingEtSumsTemplate> >& vecHfRingEtSumsTemplateVal,
00046         const std::vector<std::vector<L1GtCorrelationTemplate> >& vecCorrelationTemplateVal,
00047         const std::vector<std::vector<L1GtMuonTemplate> >& corMuonTemplateVal,
00048         const std::vector<std::vector<L1GtCaloTemplate> >& corCaloTemplateVal,
00049         const std::vector<std::vector<L1GtEnergySumTemplate> >& corEnergySumTemplateVal
00050 
00051 ) :
00052     m_triggerMenuName(triggerMenuNameVal),
00053             m_vecMuonTemplate(vecMuonTemplateVal),
00054             m_vecCaloTemplate(vecCaloTemplateVal),
00055             m_vecEnergySumTemplate(vecEnergySumTemplateVal),
00056             m_vecJetCountsTemplate(vecJetCountsTemplateVal),
00057             m_vecCastorTemplate(vecCastorTemplateVal),
00058             m_vecHfBitCountsTemplate(vecHfBitCountsTemplateVal),
00059             m_vecHfRingEtSumsTemplate(vecHfRingEtSumsTemplateVal),
00060             m_vecCorrelationTemplate(vecCorrelationTemplateVal),
00061             m_corMuonTemplate(corMuonTemplateVal),
00062             m_corCaloTemplate(corCaloTemplateVal),
00063             m_corEnergySumTemplate(corEnergySumTemplateVal) {
00064 
00065     m_conditionMap.resize(numberConditionChips);
00066     buildGtConditionMap();
00067 
00068 }
00069 
00070 // copy constructor
00071 L1GtTriggerMenu::L1GtTriggerMenu(const L1GtTriggerMenu& rhs)
00072 {
00073 
00074     m_triggerMenuName = rhs.m_triggerMenuName;
00075 
00076     // copy physics conditions
00077     m_vecMuonTemplate = rhs.m_vecMuonTemplate;
00078     m_vecCaloTemplate = rhs.m_vecCaloTemplate;
00079     m_vecEnergySumTemplate = rhs.m_vecEnergySumTemplate;
00080     m_vecJetCountsTemplate = rhs.m_vecJetCountsTemplate;
00081     m_vecCastorTemplate = rhs.m_vecCastorTemplate;
00082     m_vecHfBitCountsTemplate = rhs.m_vecHfBitCountsTemplate;
00083     m_vecHfRingEtSumsTemplate = rhs.m_vecHfRingEtSumsTemplate;
00084 
00085     m_vecCorrelationTemplate = rhs.m_vecCorrelationTemplate;
00086     m_corMuonTemplate = rhs.m_corMuonTemplate;
00087     m_corCaloTemplate = rhs.m_corCaloTemplate;
00088     m_corEnergySumTemplate = rhs.m_corEnergySumTemplate;
00089 
00090     // rebuild condition map to update the pointers
00091     // (only physics conditions are included in it)
00092     m_conditionMap.resize(rhs.m_conditionMap.size());
00093     (*this).buildGtConditionMap();
00094 
00095     // copy algorithm map
00096     m_algorithmMap = rhs.m_algorithmMap;
00097 
00098     // copy technical triggers
00099     // (separate map for technical triggers and physics triggers)
00100     m_technicalTriggerMap = rhs.m_technicalTriggerMap;
00101 
00102 }
00103 
00104 // destructor
00105 L1GtTriggerMenu::~L1GtTriggerMenu()
00106 {
00107 
00108     // loop over condition maps (one map per condition chip)
00109     for (std::vector<ConditionMap>::iterator
00110         itCondOnChip = m_conditionMap.begin(); itCondOnChip != m_conditionMap.end(); itCondOnChip++) {
00111 
00112         itCondOnChip->clear();
00113 
00114     }
00115 
00116     m_algorithmMap.clear();
00117 }
00118 
00119 // assignment operator
00120 L1GtTriggerMenu& L1GtTriggerMenu::operator=(const L1GtTriggerMenu& rhs) {
00121 
00122     if ( this != &rhs ) {
00123 
00124         m_triggerMenuName = rhs.m_triggerMenuName;
00125 
00126         m_vecMuonTemplate = rhs.m_vecMuonTemplate;
00127         m_vecCaloTemplate = rhs.m_vecCaloTemplate;
00128         m_vecEnergySumTemplate = rhs.m_vecEnergySumTemplate;
00129         m_vecJetCountsTemplate = rhs.m_vecJetCountsTemplate;
00130         m_vecCastorTemplate = rhs.m_vecCastorTemplate;
00131         m_vecHfBitCountsTemplate = rhs.m_vecHfBitCountsTemplate;
00132         m_vecHfRingEtSumsTemplate = rhs.m_vecHfRingEtSumsTemplate;
00133 
00134         m_vecCorrelationTemplate = rhs.m_vecCorrelationTemplate;
00135         m_corMuonTemplate = rhs.m_corMuonTemplate;
00136         m_corCaloTemplate = rhs.m_corCaloTemplate;
00137         m_corEnergySumTemplate = rhs.m_corEnergySumTemplate;
00138 
00139         m_algorithmMap = rhs.m_algorithmMap;
00140 
00141         m_technicalTriggerMap = rhs.m_technicalTriggerMap;
00142 
00143     }
00144 
00145     // rebuild condition map to update the pointers
00146     // (only physics conditions are included in it)
00147     m_conditionMap.resize(rhs.m_conditionMap.size());
00148     (*this).buildGtConditionMap();
00149 
00150     // return the object
00151     return *this;
00152 
00153 }
00154 
00155 // set the condition maps
00156 void L1GtTriggerMenu::setGtConditionMap(const std::vector<ConditionMap>& condMap) {
00157     m_conditionMap = condMap;
00158 }
00159 
00160 // build the condition maps
00161 void L1GtTriggerMenu::buildGtConditionMap() {
00162 
00163     // clear the conditions from the maps, if any
00164     for (std::vector<ConditionMap>::iterator itCondOnChip =
00165             m_conditionMap.begin(); itCondOnChip != m_conditionMap.end(); itCondOnChip++) {
00166 
00167         itCondOnChip->clear();
00168 
00169     }
00170 
00171     // always check that the size of the condition map is greater than the size
00172     // of the specific condition vector
00173     size_t condMapSize = m_conditionMap.size();
00174 
00175     //
00176     size_t vecMuonSize = m_vecMuonTemplate.size();
00177     if (condMapSize < vecMuonSize) {
00178         m_conditionMap.resize(vecMuonSize);
00179         condMapSize = m_conditionMap.size();
00180     }
00181 
00182     int chipNr = -1;
00183 
00184     for (std::vector<std::vector<L1GtMuonTemplate> >::iterator
00185             itCondOnChip = m_vecMuonTemplate.begin();
00186             itCondOnChip != m_vecMuonTemplate.end();
00187             itCondOnChip++) {
00188 
00189         chipNr++;
00190 
00191         for (std::vector<L1GtMuonTemplate>::iterator
00192                 itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
00193                 itCond++) {
00194 
00195             (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
00196         }
00197     }
00198 
00199     //
00200     size_t vecCaloSize = m_vecCaloTemplate.size();
00201     if (condMapSize < vecCaloSize) {
00202         m_conditionMap.resize(vecCaloSize);
00203         condMapSize = m_conditionMap.size();
00204     }
00205 
00206     chipNr = -1;
00207     for (std::vector<std::vector<L1GtCaloTemplate> >::iterator
00208             itCondOnChip = m_vecCaloTemplate.begin();
00209             itCondOnChip != m_vecCaloTemplate.end();
00210             itCondOnChip++) {
00211 
00212         chipNr++;
00213 
00214         for (std::vector<L1GtCaloTemplate>::iterator
00215                 itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
00216                 itCond++) {
00217 
00218             (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
00219         }
00220     }
00221 
00222     //
00223     size_t vecEnergySumSize = m_vecEnergySumTemplate.size();
00224     if (condMapSize < vecEnergySumSize) {
00225         m_conditionMap.resize(vecEnergySumSize);
00226         condMapSize = m_conditionMap.size();
00227     }
00228 
00229     chipNr = -1;
00230     for (std::vector<std::vector<L1GtEnergySumTemplate> >::iterator
00231             itCondOnChip = m_vecEnergySumTemplate.begin();
00232             itCondOnChip != m_vecEnergySumTemplate.end();
00233             itCondOnChip++) {
00234 
00235         chipNr++;
00236 
00237         for (std::vector<L1GtEnergySumTemplate>::iterator
00238                 itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
00239                 itCond++) {
00240 
00241             (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
00242         }
00243     }
00244 
00245     //
00246     size_t vecJetCountsSize = m_vecJetCountsTemplate.size();
00247     if (condMapSize < vecJetCountsSize) {
00248         m_conditionMap.resize(vecJetCountsSize);
00249         condMapSize = m_conditionMap.size();
00250     }
00251 
00252     chipNr = -1;
00253     for (std::vector<std::vector<L1GtJetCountsTemplate> >::iterator
00254             itCondOnChip = m_vecJetCountsTemplate.begin();
00255             itCondOnChip != m_vecJetCountsTemplate.end();
00256             itCondOnChip++) {
00257 
00258         chipNr++;
00259 
00260         for (std::vector<L1GtJetCountsTemplate>::iterator
00261                 itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
00262                 itCond++) {
00263 
00264             (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
00265         }
00266     }
00267 
00268 
00269     //
00270     size_t vecCastorSize = m_vecCastorTemplate.size();
00271     if (condMapSize < vecCastorSize) {
00272         m_conditionMap.resize(vecCastorSize);
00273         condMapSize = m_conditionMap.size();
00274     }
00275 
00276     chipNr = -1;
00277     for (std::vector<std::vector<L1GtCastorTemplate> >::iterator
00278             itCondOnChip = m_vecCastorTemplate.begin();
00279             itCondOnChip != m_vecCastorTemplate.end();
00280             itCondOnChip++) {
00281 
00282         chipNr++;
00283 
00284         for (std::vector<L1GtCastorTemplate>::iterator
00285                 itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
00286                 itCond++) {
00287 
00288             (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
00289         }
00290     }
00291 
00292     //
00293     size_t vecHfBitCountsSize = m_vecHfBitCountsTemplate.size();
00294     if (condMapSize < vecHfBitCountsSize) {
00295         m_conditionMap.resize(vecHfBitCountsSize);
00296         condMapSize = m_conditionMap.size();
00297     }
00298 
00299     chipNr = -1;
00300     for (std::vector<std::vector<L1GtHfBitCountsTemplate> >::iterator
00301             itCondOnChip = m_vecHfBitCountsTemplate.begin();
00302             itCondOnChip != m_vecHfBitCountsTemplate.end();
00303             itCondOnChip++) {
00304 
00305         chipNr++;
00306 
00307         for (std::vector<L1GtHfBitCountsTemplate>::iterator
00308                 itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
00309                 itCond++) {
00310 
00311             (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
00312         }
00313     }
00314 
00315     //
00316     size_t vecHfRingEtSumsSize = m_vecHfRingEtSumsTemplate.size();
00317     if (condMapSize < vecHfRingEtSumsSize) {
00318         m_conditionMap.resize(vecHfRingEtSumsSize);
00319         condMapSize = m_conditionMap.size();
00320     }
00321 
00322     chipNr = -1;
00323     for (std::vector<std::vector<L1GtHfRingEtSumsTemplate> >::iterator
00324             itCondOnChip = m_vecHfRingEtSumsTemplate.begin();
00325             itCondOnChip != m_vecHfRingEtSumsTemplate.end();
00326             itCondOnChip++) {
00327 
00328         chipNr++;
00329 
00330         for (std::vector<L1GtHfRingEtSumsTemplate>::iterator
00331                 itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
00332                 itCond++) {
00333 
00334             (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
00335         }
00336     }
00337 
00338     //
00339     size_t vecCorrelationSize = m_vecCorrelationTemplate.size();
00340     if (condMapSize < vecCorrelationSize) {
00341         m_conditionMap.resize(vecCorrelationSize);
00342         condMapSize = m_conditionMap.size();
00343     }
00344 
00345     chipNr = -1;
00346     for (std::vector<std::vector<L1GtCorrelationTemplate> >::iterator
00347             itCondOnChip = m_vecCorrelationTemplate.begin();
00348             itCondOnChip != m_vecCorrelationTemplate.end();
00349             itCondOnChip++) {
00350 
00351         chipNr++;
00352 
00353         for (std::vector<L1GtCorrelationTemplate>::iterator
00354                 itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
00355                 itCond++) {
00356 
00357             (m_conditionMap.at(chipNr))[itCond->condName()] = &(*itCond);
00358         }
00359     }
00360 
00361 
00362 
00363 
00364 }
00365 
00366 // set the trigger menu name
00367 void L1GtTriggerMenu::setGtTriggerMenuName(const std::string& menuName) {
00368     m_triggerMenuName = menuName;
00369 }
00370 
00371 // get / set the vectors containing the conditions
00372 void L1GtTriggerMenu::setVecMuonTemplate(
00373         const std::vector<std::vector<L1GtMuonTemplate> >& vecMuonTempl) {
00374 
00375     m_vecMuonTemplate = vecMuonTempl;
00376 }
00377 
00378 void L1GtTriggerMenu::setVecCaloTemplate(
00379         const std::vector<std::vector<L1GtCaloTemplate> >& vecCaloTempl) {
00380 
00381     m_vecCaloTemplate = vecCaloTempl;
00382 }
00383 
00384 void L1GtTriggerMenu::setVecEnergySumTemplate(
00385         const std::vector<std::vector<L1GtEnergySumTemplate> >& vecEnergySumTempl) {
00386 
00387     m_vecEnergySumTemplate = vecEnergySumTempl;
00388 }
00389 
00390 void L1GtTriggerMenu::setVecJetCountsTemplate(
00391         const std::vector<std::vector<L1GtJetCountsTemplate> >& vecJetCountsTempl) {
00392 
00393     m_vecJetCountsTemplate = vecJetCountsTempl;
00394 }
00395 
00396 void L1GtTriggerMenu::setVecCastorTemplate(
00397         const std::vector<std::vector<L1GtCastorTemplate> >& vecCastorTempl) {
00398 
00399     m_vecCastorTemplate = vecCastorTempl;
00400 }
00401 
00402 void L1GtTriggerMenu::setVecHfBitCountsTemplate(
00403         const std::vector<std::vector<L1GtHfBitCountsTemplate> >& vecHfBitCountsTempl) {
00404 
00405     m_vecHfBitCountsTemplate = vecHfBitCountsTempl;
00406 }
00407 
00408 void L1GtTriggerMenu::setVecHfRingEtSumsTemplate(
00409         const std::vector<std::vector<L1GtHfRingEtSumsTemplate> >& vecHfRingEtSumsTempl) {
00410 
00411     m_vecHfRingEtSumsTemplate = vecHfRingEtSumsTempl;
00412 }
00413 
00414 void L1GtTriggerMenu::setVecCorrelationTemplate(
00415         const std::vector<std::vector<L1GtCorrelationTemplate> >& vecCorrelationTempl) {
00416 
00417     m_vecCorrelationTemplate = vecCorrelationTempl;
00418 }
00419 
00420 // set the vectors containing the conditions for correlation templates
00421 void L1GtTriggerMenu::setCorMuonTemplate(
00422         const std::vector<std::vector<L1GtMuonTemplate> >& corMuonTempl) {
00423 
00424     m_corMuonTemplate = corMuonTempl;
00425 }
00426 
00427 void L1GtTriggerMenu::setCorCaloTemplate(
00428         const std::vector<std::vector<L1GtCaloTemplate> >& corCaloTempl) {
00429 
00430     m_corCaloTemplate = corCaloTempl;
00431 }
00432 
00433 void L1GtTriggerMenu::setCorEnergySumTemplate(
00434         const std::vector<std::vector<L1GtEnergySumTemplate> >& corEnergySumTempl) {
00435 
00436     m_corEnergySumTemplate = corEnergySumTempl;
00437 }
00438 
00439 
00440 
00441 // set the algorithm map
00442 void L1GtTriggerMenu::setGtAlgorithmMap(const AlgorithmMap& algoMap) {
00443     m_algorithmMap = algoMap;
00444 }
00445 
00446 // set the technical trigger map
00447 void L1GtTriggerMenu::setGtTechnicalTriggerMap(const AlgorithmMap& ttMap) {
00448     m_technicalTriggerMap = ttMap;
00449 }
00450 
00451 // print the trigger menu (bit number, algorithm name, logical expression)
00452 void L1GtTriggerMenu::print(std::ostream& myCout, int& printVerbosity) const {
00453 
00454     // use another map <int, L1GtAlgorithm> to get the menu sorted after bit number
00455     // both algorithm and bit numbers are unique
00456     std::map<int, const L1GtAlgorithm*> algoBitToAlgo;
00457     typedef std::map<int, const L1GtAlgorithm*>::const_iterator CItBit;
00458 
00459     for (CItAlgo itAlgo = m_algorithmMap.begin(); itAlgo != m_algorithmMap.end(); itAlgo++) {
00460 
00461         int bitNumber = (itAlgo->second).algoBitNumber();
00462         algoBitToAlgo[bitNumber] = &(itAlgo->second);
00463     }
00464 
00465     size_t nrDefinedAlgo = algoBitToAlgo.size();
00466 
00467     // idem for technical trigger map - only name and bit number are relevant for them
00468     std::map<int, const L1GtAlgorithm*> ttBitToTt;
00469 
00470     for (CItAlgo itAlgo = m_technicalTriggerMap.begin(); itAlgo
00471             != m_technicalTriggerMap.end(); itAlgo++) {
00472 
00473         int bitNumber = (itAlgo->second).algoBitNumber();
00474         ttBitToTt[bitNumber] = &(itAlgo->second);
00475     }
00476 
00477     size_t nrDefinedTechTrig = ttBitToTt.size();
00478 
00479     //
00480 
00481     switch (printVerbosity) {
00482 
00483         case 0: {
00484 
00485             // header for printing algorithms
00486 
00487             myCout << "\n   ********** L1 Trigger Menu - printing   ********** \n\n"
00488             << "L1 Trigger Menu Name: " << m_triggerMenuName << "\n\n"
00489             << "\nL1 Physics Algorithms: " << nrDefinedAlgo << " algorithms defined." << "\n\n"
00490             << "Bit Number " << " Algorithm Name " << std::endl;
00491 
00492             for (CItBit itBit = algoBitToAlgo.begin(); itBit != algoBitToAlgo.end(); itBit++) {
00493 
00494                 int bitNumber = itBit->first;
00495                 std::string aName = (itBit->second)->algoName();
00496 
00497                 myCout << std::setw(6) << bitNumber << "       " << aName << std::endl;
00498             }
00499 
00500             myCout
00501             << "\nL1 Technical Triggers: " << nrDefinedTechTrig
00502             << " technical triggers defined." << "\n\n" << std::endl;
00503             if (nrDefinedTechTrig) {
00504                 myCout << "Bit Number " << " Technical trigger name " << std::endl;
00505             }
00506 
00507             for (CItBit itBit = ttBitToTt.begin(); itBit != ttBitToTt.end(); itBit++) {
00508 
00509                 int bitNumber = itBit->first;
00510                 std::string aName = (itBit->second)->algoName();
00511 
00512                 myCout << std::setw(6) << bitNumber << "       " << aName << std::endl;
00513             }
00514 
00515         }
00516             break;
00517 
00518         case 1: {
00519 
00520             // header for printing algorithms
00521 
00522             myCout << "\n   ********** L1 Trigger Menu - printing   ********** \n\n"
00523             << "L1 Trigger Menu Name: " << m_triggerMenuName << "\n\n"
00524             << "\nL1 Physics Algorithms: " << nrDefinedAlgo << " algorithms defined." << "\n\n"
00525             << "Bit Number " << " Algorithm Name " << "\n  Logical Expresssion \n" << std::endl;
00526 
00527             for (CItBit itBit = algoBitToAlgo.begin(); itBit != algoBitToAlgo.end(); itBit++) {
00528 
00529                 int bitNumber = itBit->first;
00530                 std::string aName = (itBit->second)->algoName();
00531                 std::string aLogicalExpression = (itBit->second)->algoLogicalExpression();
00532 
00533                 myCout << std::setw(6) << bitNumber << "       " << aName
00534                     << "\n  Logical expression: " << aLogicalExpression << "\n" << std::endl;
00535             }
00536 
00537             myCout
00538             << "\nL1 Technical Triggers: " << nrDefinedTechTrig
00539             << " technical triggers defined." << "\n\n" << std::endl;
00540             if (nrDefinedTechTrig) {
00541                 myCout << "Bit Number " << " Technical trigger name " << std::endl;
00542             }
00543 
00544             for (CItBit itBit = ttBitToTt.begin(); itBit != ttBitToTt.end(); itBit++) {
00545 
00546                 int bitNumber = itBit->first;
00547                 std::string aName = (itBit->second)->algoName();
00548 
00549                 myCout << std::setw(6) << bitNumber << "       " << aName << std::endl;
00550             }
00551         }
00552             break;
00553 
00554         case 2: {
00555 
00556             // header for printing algorithms
00557 
00558             myCout << "\n   ********** L1 Trigger Menu - printing   ********** \n\n"
00559             << "L1 Trigger Menu Name: " << m_triggerMenuName << "\n\n"
00560             << "\nL1 Physics Algorithms: " << nrDefinedAlgo << " algorithms defined." << "\n\n"
00561             << std::endl;
00562 
00563             for (CItBit itBit = algoBitToAlgo.begin(); itBit != algoBitToAlgo.end(); itBit++) {
00564                 (itBit->second)->print(myCout);
00565             }
00566 
00567 
00568             myCout << "\nNumber of condition chips: " << m_conditionMap.size() << "\n"
00569             << std::endl;
00570 
00571             int chipNr = -1;
00572             int totalNrConditions = 0;
00573 
00574             for (std::vector<ConditionMap>::const_iterator
00575                     itCondOnChip = m_conditionMap.begin();
00576                     itCondOnChip != m_conditionMap.end(); itCondOnChip++) {
00577 
00578                 chipNr++;
00579 
00580                 int condMapSize = itCondOnChip->size();
00581                 totalNrConditions += condMapSize;
00582 
00583                 myCout << "\nTotal number of conditions on condition chip " << chipNr
00584                 << ": " << condMapSize
00585                 << " conditions.\n" << std::endl;
00586 
00587                 for (CItCond itCond = itCondOnChip->begin(); itCond != itCondOnChip->end();
00588                     itCond++) {
00589 
00590                     (itCond->second)->print(myCout);
00591 
00592                 }
00593 
00594             }
00595 
00596             myCout << "\nTotal number of conditions on all condition chips: "
00597             << totalNrConditions << "\n"
00598             << std::endl;
00599 
00600             myCout
00601             << "\nL1 Technical Triggers: " << nrDefinedTechTrig
00602             << " technical triggers defined." << "\n\n" << std::endl;
00603             if (nrDefinedTechTrig) {
00604                 myCout << "Bit Number " << " Technical trigger name " << std::endl;
00605             }
00606 
00607             for (CItBit itBit = ttBitToTt.begin(); itBit != ttBitToTt.end(); itBit++) {
00608 
00609                 int bitNumber = itBit->first;
00610                 std::string aName = (itBit->second)->algoName();
00611 
00612                 myCout << std::setw(6) << bitNumber << "       " << aName << std::endl;
00613             }
00614 
00615 
00616         }
00617             break;
00618 
00619         default: {
00620             myCout << "\n   ********** L1 Trigger Menu - printing   ********** \n\n"
00621             << "Verbosity level: " << printVerbosity << " not implemented.\n\n"
00622             << std::endl;
00623         }
00624             break;
00625     }
00626 
00627 }
00628 
00629 // get the result for algorithm with name algName
00630 // use directly the format of decisionWord (no typedef)
00631 const bool L1GtTriggerMenu::gtAlgorithmResult(const std::string& algName,
00632         const std::vector<bool>& decWord) const {
00633 
00634     bool algResult = false;
00635 
00636     CItAlgo itAlgo = m_algorithmMap.find(algName);
00637     if (itAlgo != m_algorithmMap.end()) {
00638         int bitNumber = (itAlgo->second).algoBitNumber();
00639         algResult = decWord.at(bitNumber);
00640         return algResult;
00641     }
00642 
00643     // return false if the algorithm name is not found in the menu
00644     // TODO throw exception or LogInfo would be better - but the class is used in
00645     // XDAQ Trigger Supervisor (outside CMSSW) hence no CMSSW dependence
00646     // is allowed here...
00647 
00648     return false;
00649 
00650 }
00651 
00652 

Generated on Tue Jun 9 17:26:38 2009 for CMSSW by  doxygen 1.5.4