261{
264 {
266 brInfo.auxid = auxid;
267 brInfo.attribName =
r.getName(auxid);
268
269
270
271
272
273
274
275
276
277 if (
r.inputRename (
m_key, brInfo.attribName) != brInfo.attribName) {
279 return brInfo;
280 }
281
284 brInfo.branch =
it->second;
285 }
286 else {
288 brInfo.branch =
m_tree->GetBranch( aux_branch_name.c_str() );
289 }
290
291
292 if( !brInfo.branch ) {
294 return brInfo;
295 }
296 if( brInfo.branch->GetExpectedType( brInfo.tclass, brInfo.edtyp) ) {
298 throw string("Error getting branch type for ") + brInfo.branch->GetName();
299 }
300
301 if( !
store.standalone() )
302 if( brInfo.tclass && strncmp( brInfo.tclass->GetName(), "SG::PackedContainer<", 20) == 0)
303 brInfo.isPackedContainer = true;
304
305 string elem_tname, branch_tname;
306
307 const std::type_info* ti = getAuxElementType( brInfo.tclass, brInfo.edtyp,
store.standalone(),
308 elem_tname, branch_tname );
309 const std::type_info* reg_ti =
r.getType(auxid);
310
311 const std::type_info *io_tinf =
store.getIOType(auxid);
312 const std::type_info *tcls_tinf = brInfo.tclass ? brInfo.tclass->GetTypeInfo() : ti;
313
314 if (not io_tinf){
316 throw string("Error getting IO type for AUX branch ") + brInfo.branch->GetName();
317 }
318
319
320 brInfo.needsSE = brInfo.tclass ?
321 io_tinf != tcls_tinf && (!tcls_tinf || strcmp(io_tinf->name(), tcls_tinf->name()) != 0)
322 : ti && ti != reg_ti && strcmp(ti->
name(), reg_ti->
name()) != 0;
323 if( brInfo.needsSE ) {
324
325
326 errorcheck::ReportMessage msg (MSG::INFO, ERRORCHECK_ARGS, "TBranchAuxDynReader");
327 msg << "attribute '" << brInfo.attribName << "' (id=" << auxid
328 << " typename=" << SG::normalizedTypeinfoName(*reg_ti)
329 << ") has different type than the branch: " << branch_tname;
330 msg << " Marking for schema evolution.";
331
332 brInfo.SE_tclass = TClass::GetClass(*io_tinf);
333 brInfo.SE_edt = kOther_t;
334 if( !brInfo.SE_tclass ) {
335 brInfo.SE_edt = TDataType::GetType(*io_tinf);
336 if( brInfo.SE_edt <=0 ) {
337 brInfo.status = BranchInfo::TypeError;
338 throw string("Error getting ROOT type for AUX branch ") + brInfo.branch->GetName()
339 + " typeinfo=" + io_tinf->name();
340 }
341 }
342 }
344 }
345 return brInfo;
346}
std::map< SG::auxid_t, BranchInfo > m_branchInfos