This function can be used to quickly get an idea about the payload held by any type of xAOD object. It prints the type and name of each auxiliary variable associated with the object. And for some simple types (primitives and some vectors of primitives) it even prints the values of these variables.
69 out <<
"SG::AuxElement\n";
71 if(
obj.usingStandaloneStore() ) {
72 out <<
"using standalone store\n";
73 }
else if(
obj.usingPrivateStore() ) {
74 out <<
"using private store\n";
75 }
else if(
obj.container() ) {
76 out <<
"in container\n";
79 out <<
"standalone object, without auxiliary store";
84 if( !
obj.container()->getConstStore() ) {
95 (
obj.container()->getConstStore() ?
96 obj.container()->getConstStore()->getAuxIDs() :
97 obj.getConstStore()->getAuxIDs() );
100 std::vector<SG::auxid_t> auxids_v (auxids.
begin(), auxids.
end());
101 std::sort (auxids_v.begin(), auxids_v.end());
106 <<
", \tname: \"" << reg.
getName( auxid );
107 out <<
"\", \tvalue: ";
110 #define PRINTER( TYPE ) \
112 SG::ConstAccessor< TYPE > acc( auxid ); \
113 if( acc.isAvailable( obj ) ) { \
119 const std::type_info* ti = reg.
getType( auxid );
121 if( *ti ==
typeid(
unsigned int ) ) {
123 if (
acc.isAvailable(
obj )) {
128 out <<
"(Unsupported atomic type)\n";
130 }
else if( *ti ==
typeid( int8_t ) ) {
132 if(
acc.isAvailable(
obj ) ) {
133 out << static_cast< int >(
acc(
obj ) );
135 }
else if( *ti ==
typeid(
uint8_t ) ) {
137 if(
acc.isAvailable(
obj ) ) {
138 out << static_cast< int >(
acc(
obj ) );
140 }
else if( *ti ==
typeid(
int16_t ) ) {
142 }
else if( *ti ==
typeid(
uint16_t ) ) {
144 }
else if( *ti ==
typeid( int32_t ) ) {
146 }
else if( *ti ==
typeid(
uint32_t ) ) {
148 }
else if( *ti ==
typeid( int64_t ) ) {
150 }
else if( *ti ==
typeid(
uint64_t ) ) {
152 }
else if( *ti ==
typeid(
long ) ) {
154 }
else if( *ti ==
typeid(
unsigned long ) ) {
156 }
else if( *ti ==
typeid(
unsigned long long ) ) {
158 }
else if( *ti ==
typeid(
float ) ) {
160 }
else if( *ti ==
typeid(
double ) ) {
162 }
else if( *ti ==
typeid( std::vector< float > ) ) {
163 PRINTER( std::vector< float > );
164 }
else if( *ti ==
typeid( std::vector< double > ) ) {
165 PRINTER( std::vector< double > );
166 }
else if( *ti ==
typeid( std::vector< char > ) ) {
167 PRINTER( std::vector< char > );
168 }
else if( *ti ==
typeid( std::vector< int8_t > ) ) {
169 PRINTER( std::vector< int8_t > );
170 }
else if( *ti ==
typeid( std::vector< uint8_t > ) ) {
171 PRINTER( std::vector< uint8_t > );
172 }
else if( *ti ==
typeid( std::vector< int16_t > ) ) {
173 PRINTER( std::vector< int16_t > );
174 }
else if( *ti ==
typeid( std::vector< uint16_t > ) ) {
175 PRINTER( std::vector< uint16_t > );
176 }
else if( *ti ==
typeid( std::vector< int32_t > ) ) {
177 PRINTER( std::vector< int32_t > );
178 }
else if( *ti ==
typeid( std::vector< uint32_t > ) ) {
179 PRINTER( std::vector< uint32_t > );
180 }
else if( *ti ==
typeid( std::vector< int64_t > ) ) {
181 PRINTER( std::vector< int64_t > );
182 }
else if( *ti ==
typeid( std::vector< uint64_t > ) ) {
183 PRINTER( std::vector< uint64_t > );
184 }
else if( *ti ==
typeid( std::vector< std::string > ) ) {
185 PRINTER( std::vector< std::string > );
186 }
else if( *ti ==
typeid( std::vector< std::pair<std::string, std::string> > ) ) {
187 using Stringpair_t = std::pair<std::string, std::string>;
188 PRINTER( std::vector< Stringpair_t > );