18 constexpr std::array<int, 6> wheelIds = {{1, 2, 0, 0, -1, -2}};
25 for (
int k = 0;
k < m_maxWheels; ++
k)
26 m_Wheels[
k].setProperties(wheelIds[(
id * 2) + (
k - 2)]);
34 m_ttuconf{std::make_unique<TTUBasicConfig>(ttulogic_type)},
36 for (
int k = 0;
k < m_maxWheels; ++
k)
37 m_Wheels[
k].setProperties(wheelIds[(
id * 2) + (
k - 2)], rbclogic_type);
45 m_ttuconf{std::make_unique<TTUBasicConfig>(ttulogic_type)},
47 for (
int k = 0;
k < m_maxWheels; ++
k)
48 m_Wheels[
k].setProperties(wheelIds[(
id * 2) + (
k - 2)], f_name, rbclogic_type);
53 m_ttuconf = std::make_unique<TTUBasicConfig>(ttuspecs);
58 std::vector<TTUBoardSpecs::TTUBoardConfig>::const_iterator
itr;
61 m_mode = (*itr).m_triggerMode;
73 std::cout <<
"TTUEmulator> Problem initialising the Configuration \n";
94 std::cout <<
"TTUEmulator::processTtu starts" <<
'\n';
99 std::vector<int> bxVec;
100 std::vector<int>::iterator bxItr;
101 std::map<int, RBCInput*>* linkboardin;
102 std::map<int, RBCInput*>::iterator inItr;
104 linkboardin = dynamic_cast<RBCLinkBoardGLSignal*>(signal)->m_linkboardin;
106 for (inItr = (*linkboardin).begin(); inItr != (*linkboardin).end(); ++inItr) {
107 if ((*inItr).first < 0)
108 bx = (
int)
ceil((*inItr).first / 1000000.0);
110 bx = (
int)floor((*inItr).first / 1000000.0);
114 bxItr =
unique(bxVec.begin(), bxVec.end());
115 bxVec.resize(bxItr - bxVec.begin());
118 for (bxItr = bxVec.begin(); bxItr != bxVec.end(); ++bxItr) {
129 trg =
m_ttuconf->ttulogic()->isTriggered();
134 std::cout <<
"TTUEmulator::processTtu ttuid: " <<
m_id <<
" bx: " << (*bxItr)
135 <<
" wheel: " <<
m_Wheels[
k].getid() <<
" response: " << trg << std::endl;
141 triggerResponse.setTriggerBits((*bxItr),
m_trigger);
146 std::cout <<
"TTUEmulator::processTtu> size of trigger map " <<
m_triggerBx.size() << std::endl;
149 std::cout <<
"TTUEmulator::processTtu> done with this TTU: " <<
m_id << std::endl;
154 std::cout <<
"TTUEmulator::processTtu ends" <<
'\n';
163 std::cout <<
"TTUEmulator::processTtu( Pointing ) starts " <<
'\n';
168 std::vector<int> bxVec;
169 std::vector<int>::iterator bxItr;
170 std::map<int, RBCInput*>* linkboardin;
171 std::map<int, RBCInput*>::iterator inItr;
173 linkboardin = dynamic_cast<RBCLinkBoardGLSignal*>(signal)->m_linkboardin;
175 for (inItr = (*linkboardin).begin(); inItr != (*linkboardin).end(); ++inItr) {
176 if ((*inItr).first < 0)
177 bx = (
int)
ceil((*inItr).first / 1000000.0);
179 bx = (
int)floor((*inItr).first / 1000000.0);
183 bxItr =
unique(bxVec.begin(), bxVec.end());
184 bxVec.resize(bxItr - bxVec.begin());
188 for (bxItr = bxVec.begin(); bxItr != bxVec.end(); ++bxItr) {
191 (*bxItr), (*linkboardin))) {
201 trg =
m_ttuconf->ttulogic()->isTriggered();
206 std::cout <<
"TTUEmulator::processTtu( Pointing ) ttuid: " <<
m_id <<
" bx: " << (*bxItr)
207 <<
" wheel: " <<
m_Wheels[
k].getid() <<
" response: " << trg << std::endl;
212 triggerResponse.setTriggerBits((*bxItr), wedgeId,
m_trigger);
217 std::cout <<
"TTUEmulator::processTtu (Pointing) > size of trigger map " <<
m_triggerBx.size() << std::endl;
220 std::cout <<
"TTUEmulator::processTtu (Pointing) > done with this TTU: " <<
m_id << std::endl;
225 std::cout <<
"TTUEmulator::processTtu( Pointing ) end" <<
'\n';