3#include "Identifier/HltID.h"
4#include "RawDataCnv/EventManagement/HltBuilder.h"
11 m_re2te =
new uint32_t[256];
12 memset((
void*)m_re2te, 0xFF, 256*
sizeof(uint32_t));
23 uint32_t &REId, uint32_t &TEData1, uint32_t &TEData2)
32 TEData1 = (reDigi&m_algMask) >> m_algIndex;
33 TEData2 = (reDigi&m_criMask) >> m_criIndex;
50 cerr <<
"HltBuilder::pack can't get digiCol" << endl;
51 return StatusCode::FAILURE;
57 uint32_t event_filter[4]={0,0,0,0};
59 HltRawCol::const_iterator pHltDigi = digiCol->begin();
60 for ( ; pHltDigi!= digiCol->end(); pHltDigi++) {
61 id = (*pHltDigi)->identify();
63 uint32_t alg= (*pHltDigi)->getIntChannel();
71 cri= (*pHltDigi)->getIntChannel();
73 hltdigi = ((alg<<m_algIndex)&m_algMask) | ((cri<<m_algIndex)&m_criMask);
74 event_filter[1] =hltdigi;
77 cerr<<
"HltBuilder::pack(): HLT raw data error!" << endl;
78 return StatusCode::FAILURE;
81 hltdigi = (*pHltDigi)->getIntChannel();
85 else m_buf[size++] = hltdigi;
93 return StatusCode::SUCCESS;
104 f.open( initFile.c_str());
108 cerr <<
"Error: could not open file " << initFile << endl;
113 cerr <<
"Error: could not find '##HltRawConf' in file " << initFile << endl;
114 return StatusCode::FAILURE;
125 cout<<
"HltBuilder:: #Index mask"<<endl
126 <<
" "<<m_idIndex<<
" "<<m_idMask<<endl
127 <<
" "<<m_algIndex<<
" "<<m_algMask<<endl
128 <<
" "<<m_criIndex<<
" "<<m_criMask<<endl
129 <<
" "<<m_varIndex<<
" "<<m_varMask<<endl;
133 for (uint32_t i = 0; i < 256; i++) {
134 m_re2te[i] = (0x50000000 | i);
136 m_te2reMap.insert(TE2REMAP::value_type(m_re2te[i], i)) ;
139 return StatusCode::SUCCESS;
146 TE2REMAP::iterator itr = m_te2reMap.find(teid);
149 if(itr!= m_te2reMap.end())
150 reid = (*itr).second;
153 cout<<
"wrong teid in emc "<<teid<<endl;
ObjectVector< HltRaw > HltRawCol
void append2event(WriteRawEvent *&re, uint32_t source_id, uint32_t size)
static bool expect(ifstream &f, string msg, string fname)
static bool expectInt(ifstream &f, string msg, string fname, uint32_t &val1, uint32_t &val2)
static bool find(ifstream &f, string msg, string fname)
void unPack(uint32_t reDigi, uint32_t n, uint32_t &REId, uint32_t &TEData1, uint32_t &TEData2)
uint32_t getREID(uint32_t teid)
StatusCode pack(HltRawCol *digiCol, WriteRawEvent *&re)
StatusCode initialize(string &initFile)
static bool is_version(const Identifier &id)
static bool is_eventtype(const Identifier &id)
static bool is_algorithm(const Identifier &id)
static bool is_criteria(const Identifier &id)
static bool is_energy(const Identifier &id)