28 int tmp[6] = {1, 2, 0, 0, -1, -2};
55 int tmp[6] = {1, 2, 0, 0, -1, -2};
78 const char * ttulogic_type,
int mxw )
84 int tmp[6] = {1, 2, 0, 0, -1, -2};
127 std::vector<TTUBoardSpecs::TTUBoardConfig>::const_iterator itr;
130 m_mode = (*itr).m_triggerMode;
143 if(
m_debug )
std::cout <<
"TTUEmulator> Problem initialising the Configuration \n";
175 std::vector<int> bxVec;
176 std::vector<int>::iterator bxItr;
177 std::map<int,RBCInput*> * linkboardin;
178 std::map<int,RBCInput*>::iterator inItr;
182 for( inItr = (*linkboardin).begin(); inItr != (*linkboardin).end(); ++inItr)
185 if ( (*inItr).first < 0 ) bx = (int) ceil( (*inItr).first / 1000000.0 );
186 else bx = (int) floor( (*inItr).first / 1000000.0 );
191 bxItr = unique (bxVec.begin(), bxVec.end());
192 bxVec.resize(bxItr - bxVec.begin());
194 for ( bxItr = bxVec.begin(); bxItr != bxVec.end(); ++bxItr) {
216 <<
" bx: " << (*bxItr)
218 <<
" response: " << trg << std::endl;
237 if(
m_debug )
std::cout <<
"TTUEmulator::processTtu> done with this TTU: " <<
m_id << std::endl;
252 if(
m_debug )
std::cout <<
"TTUEmulator::processTtu( Pointing ) starts " <<
'\n';
257 std::vector<int> bxVec;
258 std::vector<int>::iterator bxItr;
259 std::map<int,RBCInput*> * linkboardin;
260 std::map<int,RBCInput*>::iterator inItr;
264 for( inItr = (*linkboardin).begin(); inItr != (*linkboardin).end(); ++inItr)
267 if ( (*inItr).first < 0 ) bx = (int) ceil( (*inItr).first / 1000000.0 );
268 else bx = (int) floor( (*inItr).first / 1000000.0 );
273 bxItr = unique (bxVec.begin(), bxVec.end());
274 bxVec.resize(bxItr - bxVec.begin());
276 for ( bxItr = bxVec.begin(); bxItr != bxVec.end(); ++bxItr) {
298 <<
" bx: " << (*bxItr)
300 <<
" response: " << trg << std::endl;
313 if(
m_debug )
std::cout <<
"TTUEmulator::processTtu (Pointing) > size of trigger map "
316 if(
m_debug )
std::cout <<
"TTUEmulator::processTtu (Pointing) > done with this TTU: " <<
m_id << std::endl;
320 if(
m_debug )
std::cout <<
"TTUEmulator::processTtu( Pointing ) end" <<
'\n';
328 std::vector<TriggerResponse*>::iterator itr;
330 if ( (*itr) )
delete (*itr);
std::bitset< 2 > m_trigger
TTUConfiguration * m_ttuconf
const TTUBoardSpecs * m_ttuboardspecs
std::vector< TriggerResponse * > m_triggerBxVec
void clearTriggerResponse()
void run(const TTUInput &)
std::vector< TTUBoardConfig > m_boardspecs
void retrieveWheelMap(TTUInput &)
void setTriggerBits(int bx, const std::bitset< 2 > &inbits)
void processTtu(RPCInputSignal *)
std::vector< std::vector< double > > tmp
virtual bool initialise(int, int)=0
TTULogicUnit * m_ttulogic
std::map< int, std::bitset< 2 > > m_triggerBx
virtual ~TTUEmulator()
Destructor.
void setSpecifications(const TTUBoardSpecs *, const RBCBoardSpecs *)
TTUEmulator()
Standard constructor.