/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
CondFormats/PPSObjects/src/TotemFramePosition.cc
72 строки
2 KB
Silvio Donato
Revert "Revert "PPS: rename directories with misleading names""
06 мар 2020, 19:21
Не верифицирован
06 мар 2020, 19:21
ab43201
Код
Авторство
О чём код?
/**************************************************************************** * * This is a part of the TOTEM offline software. * Authors: * Jan Kašpar (jan.kaspar@gmail.com) * ****************************************************************************/ #include "CondFormats/PPSObjects/interface/TotemFramePosition.h" #include <iomanip> #include <cstdlib> using namespace std; //---------------------------------------------------------------------------------------------------- std::ostream &operator<<(std::ostream &s, const TotemFramePosition &fp) { return s << fp.getFEDId() << ":" << fp.getGOHId() << ":" << fp.getIdxInFiber(); } //---------------------------------------------------------------------------------------------------- void TotemFramePosition::printXML() { cout << "\" FEDId=\"" << getFEDId() << "\" GOHId=\"" << getGOHId() << "\" IdxInFiber=\"" << getIdxInFiber() << "\""; } //---------------------------------------------------------------------------------------------------- unsigned char TotemFramePosition::setXMLAttribute(const std::string &attribute, const std::string &value, unsigned char &flag) { unsigned int v = atoi(value.c_str()); if (attribute == "FEDId") { setFEDId(v); flag |= 0x1C; // SubSystem + TOTFED + OptoRx return 0; } if (attribute == "SubSystemId") { setSubSystemId(v); flag |= 0x10; return 0; } if (attribute == "TOTFEDId") { setTOTFEDId(v); flag |= 0x8; return 0; } if (attribute == "OptoRxId") { setOptoRxId(v); flag |= 0x4; return 0; } if (attribute == "GOHId") { setGOHId(v); flag |= 0x2; return 0; } if (attribute == "IdxInFiber") { setIdxInFiber(v); flag |= 0x1; return 0; } return 1; }