15 TriggerElement::TriggerElement()
16 : m_state(activeState), m_id(0), m_transient(0) {
20 : m_state(activeState), m_id(
id), m_transient(0) {
42 const static size_t max_features_per_te = 0xfff;
43 if (
m_uses.size() == max_features_per_te-1 ) {
44 std::cout <<
"ERROR - count of features per TE exceeds the limitation, further attach operations are ignored" << std::endl;
46 if (
m_uses.size() == max_features_per_te ) {
72 std::vector<TriggerElement*>::const_iterator
it;
74 (*it)->setActiveState(
false);
97 std::vector<TriggerElement*>::const_iterator
it;
98 for (
it = tes.begin();
it != tes.end(); ++
it ) {
117 if (
count % 2 == 0 ) {
126 if (
count % 2 == 0 ) {
127 val = ((*it) >> 16 ) & 0xffff;
129 val = (*it) & 0xffff;
138 unsigned summaryIndex =
output.size();
142 std::vector<TriggerElement*> dumvec;
143 const std::vector<TriggerElement*>& relvec =
146 std::vector<TriggerElement*>::const_iterator teIt;
147 unsigned relationsCount = 0;
149 for ( teIt = relvec.begin(); teIt != relvec.end(); ++teIt ) {
150 std::map<TriggerElement*, uint16_t>::const_iterator
key =
keys.find(*teIt);
161 std::vector< FeatureAccessHelper >::const_iterator featuresIt;
162 unsigned featuresCount = 0;
164 for ( featuresIt =
m_uses.begin(); featuresIt !=
m_uses.end(); ++featuresIt ) {
165 if ( ! featuresIt->forget() ) {
166 output.push_back ( featuresIt->getCLID() );
167 featuresIt->getIndex().serialize(
output);
171 uint32_t seedingUsesStateWord = ((relvec.size() << 20)) | (featuresCount << 8) | (
m_state & 0xf);
172 output[summaryIndex] = seedingUsesStateWord;
186 uint32_t seedingUsesStateWord = *inputIt++;
187 m_state = seedingUsesStateWord & 0xf;
188 unsigned int size = (seedingUsesStateWord & 0xfff00000) >> 20;
189 unsigned int featuresAttached = (seedingUsesStateWord & 0x000fff00) >> 8;
194 std::map<uint16_t, TriggerElement*>::const_iterator
id;
195 unsigned relationsCount = 0;
197 for (
unsigned int i = 0 ;
i <
size; ++
i ) {
202 if (
id !=
keys.end() ) {
211 if ( relationsCount %2 == 1 ) inputIt++;
216 for (
unsigned int i = 0 ;
i < featuresAttached; ++
i ) {
217 unsigned int clid = *inputIt++;
235 : m_subTypeIndex(invalid_sub_index), m_objIndexBegin(invalid_index), m_objIndexEnd(invalid_index) {}
239 : m_subTypeIndex(subType), m_objIndexBegin(
begin), m_objIndexEnd(
end)
241 if (subType >= invalid_sub_index)
242 throw std::runtime_error(
"To many collections of one type: " +
std::to_string(subType)+
" >= 0xffff" );
248 return m_subTypeIndex;
257 return m_objIndexBegin;
261 return m_objIndexEnd;
265 m_objIndexBegin =
begin;
270 if ( m_subTypeIndex !=
obj.m_subTypeIndex )
271 return m_subTypeIndex <
obj.m_subTypeIndex;
272 if ( m_objIndexBegin !=
obj.m_objIndexBegin )
273 return m_objIndexBegin <
obj.m_objIndexBegin;
275 return m_objIndexEnd <
obj.m_objIndexEnd;
285 if ( (0 == (m_subTypeIndex & ~0xf)) && (0 == (objectsBegin() & ~0x1fff)) && ( 0 == (objectsEnd() & ~0x3fff)) ) {
286 output.push_back(0x80000000 | m_subTypeIndex | objectsEnd()<< 4 | objectsBegin() << 18);
289 }
else if ( (0 == (objectsBegin() & ~0xffff)) && (0 == (objectsEnd() & ~0xffff)) ) {
296 output.push_back(m_subTypeIndex);
297 output.push_back((objectsBegin() << 16) | (objectsEnd()) );
300 output.push_back(m_subTypeIndex | 0x40000000);
301 output.push_back(objectsBegin());
302 output.push_back(objectsEnd());
309 if (
w & 0x80000000 ) {
311 m_subTypeIndex =
w & 0xf;
312 m_objIndexBegin = ( (
w>>18) & 0x1fff );
313 m_objIndexEnd = (
w>>4) & 0x3fff;
315 }
else if ( (
w & 0x40000000) == 0 ) {
317 m_subTypeIndex =
w & 0xffff;
319 m_objIndexBegin = w2 >> 16;
320 m_objIndexEnd = w2 & 0xffff;
324 m_subTypeIndex =
w & 0xffff;
325 m_objIndexBegin = *inputIt++;
326 m_objIndexEnd = *inputIt++;
333 if ( this->subTypeIndex() !=
idx->subTypeIndex() )
335 if ( this->objectsBegin() >
idx->objectsBegin() )
337 if ( this->objectsEnd() <
idx->objectsEnd() )
343 if ( m_subTypeIndex == invalid_sub_index && m_objIndexBegin == invalid_index && m_objIndexEnd == invalid_index )