ATLAS Offline Software
Loading...
Searching...
No Matches
ParticleSortingTool.cxx File Reference

Go to the source code of this file.

Macros

#define COPY_AND_SORT_CONTAINER(CONTAINERTYPE)
#define OVERWRITE_AND_SORT_CONTAINER(CONTAINERTYPE)

Macro Definition Documentation

◆ COPY_AND_SORT_CONTAINER

#define COPY_AND_SORT_CONTAINER ( CONTAINERTYPE)
Value:
else if ( evtStore()->contains<CONTAINERTYPE>( m_inCollKey.value() ) ) { \
ATH_MSG_DEBUG("Trying to copy, sort, and record container of type "#CONTAINERTYPE ); \
const CONTAINERTYPE* inCont; \
ATH_CHECK( evtStore()->retrieve( inCont, m_inCollKey.value() ) ); \
CONTAINERTYPE* outCont = new CONTAINERTYPE( SG::VIEW_ELEMENTS ); \
*outCont = *inCont; \
ATH_CHECK( evtStore()->record ( outCont, m_outCollKey.value() ) ); \
ATH_CHECK( this->doSort(outCont) ); \
}
bool contains(const std::string &s, const std::string &regx)
does a string contain the substring
Definition hcg.cxx:114
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts

Definition at line 94 of file ParticleSortingTool.cxx.

94#define COPY_AND_SORT_CONTAINER( CONTAINERTYPE ) \
95else if ( evtStore()->contains<CONTAINERTYPE>( m_inCollKey.value() ) ) { \
96 ATH_MSG_DEBUG("Trying to copy, sort, and record container of type "#CONTAINERTYPE ); \
97 const CONTAINERTYPE* inCont; \
98 ATH_CHECK( evtStore()->retrieve( inCont, m_inCollKey.value() ) ); \
99 CONTAINERTYPE* outCont = new CONTAINERTYPE( SG::VIEW_ELEMENTS ); \
100 *outCont = *inCont; \
101 ATH_CHECK( evtStore()->record ( outCont, m_outCollKey.value() ) ); \
102 ATH_CHECK( this->doSort(outCont) ); \
103}

◆ OVERWRITE_AND_SORT_CONTAINER

#define OVERWRITE_AND_SORT_CONTAINER ( CONTAINERTYPE)
Value:
else if ( evtStore()->contains<CONTAINERTYPE>( m_inCollKey.value() ) ) { \
ATH_MSG_DEBUG("Trying to copy, sort, and overwrite container of type "#CONTAINERTYPE ); \
const CONTAINERTYPE* inCont; \
ATH_CHECK( evtStore()->retrieve( inCont, m_inCollKey.value() ) ); \
for ( const CONTAINERTYPE::base_value_type* inPart : *inCont ){ \
outCont->push_back(inPart); \
} \
ATH_CHECK( evtStore()->overwrite( outCont, m_inCollKey.value() ) ); \
ATH_CHECK( this->doSortConst<CONTAINERTYPE>(outCont) ); \
}
DataVector adapter that acts like it holds const pointers.
value_type push_back(value_type pElem)
Add an element to the end of the collection.

Definition at line 107 of file ParticleSortingTool.cxx.

107#define OVERWRITE_AND_SORT_CONTAINER( CONTAINERTYPE ) \
108else if ( evtStore()->contains<CONTAINERTYPE>( m_inCollKey.value() ) ) { \
109 ATH_MSG_DEBUG("Trying to copy, sort, and overwrite container of type "#CONTAINERTYPE ); \
110 const CONTAINERTYPE* inCont; \
111 ATH_CHECK( evtStore()->retrieve( inCont, m_inCollKey.value() ) ); \
112 ConstDataVector<CONTAINERTYPE>* outCont = new ConstDataVector<CONTAINERTYPE>( SG::VIEW_ELEMENTS ); \
113 for ( const CONTAINERTYPE::base_value_type* inPart : *inCont ){ \
114 outCont->push_back(inPart); \
115 } \
116 ATH_CHECK( evtStore()->overwrite( outCont, m_inCollKey.value() ) ); \
117 ATH_CHECK( this->doSortConst<CONTAINERTYPE>(outCont) ); \
118}