/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
CondFormats/PPSObjects/src/TotemT2FramePosition.cc
61 строка
2 KB
Fredrik
Get New T2 unpacker working, have an accessible test, and remove diamond time calibration from T2
09 май 2023, 13:42
09 май 2023, 13:42
3a2b1d6
Код
Авторство
О чём код?
/**************************************************************************** * * This is a part of the TOTEM offline software. * Authors: * Jan Kašpar (jan.kaspar@gmail.com) * ****************************************************************************/ #include "CondFormats/PPSObjects/interface/TotemT2FramePosition.h" #include <iomanip> #include <cstdlib> using namespace std; //---------------------------------------------------------------------------------------------------- std::ostream &operator<<(std::ostream &s, const TotemT2FramePosition &fp) { return s << fp.getFEDId() << ":" << fp.getGOHId() << ":" << fp.getIdxInFiber() << ":" << fp.getPayload(); } //---------------------------------------------------------------------------------------------------- void TotemT2FramePosition::printXML() { cout << "\" FEDId=\"" << getFEDId() << "\" GOHId=\"" << getGOHId() << "\" IdxInFiber=\"" << getIdxInFiber() << "\" pay=\"" << getPayload() << "\""; } //---------------------------------------------------------------------------------------------------- unsigned char TotemT2FramePosition::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 == "pay") { setPayload(v); flag |= 0x20; //T2 payload return 0; } if (attribute == "GOHId") { setGOHId(v); flag |= 0x2; return 0; } if (attribute == "IdxInFiber") { setIdxInFiber(v); flag |= 0x1; return 0; } return 1; }