diff --git a/core/clingutils/res/TClingUtils.h b/core/clingutils/res/TClingUtils.h index 91165709c5e69..e99e4990a7c55 100644 --- a/core/clingutils/res/TClingUtils.h +++ b/core/clingutils/res/TClingUtils.h @@ -568,13 +568,11 @@ void WriteClassInit(std::ostream& finalString, bool& needCollectionProxy); //______________________________________________________________________________ -void WriteStandaloneReadRules(std::ostream &finalString, bool rawrules, - std::vector &standaloneTargets, +void WriteStandaloneReadRules(std::ostream &finalString, bool rawrules, std::vector &standaloneTargets, const cling::Interpreter &interp); //______________________________________________________________________________ -void WriteRulesRegistration(std::ostream &finalString, - const std::string &dictName, +void WriteRulesRegistration(std::ostream &finalString, const std::string &dictName, const std::vector &standaloneTargets); //______________________________________________________________________________ diff --git a/core/clingutils/src/TClingUtils.cxx b/core/clingutils/src/TClingUtils.cxx index b73201de3c25c..1e1ce43a49588 100644 --- a/core/clingutils/src/TClingUtils.cxx +++ b/core/clingutils/src/TClingUtils.cxx @@ -1823,7 +1823,7 @@ void ROOT::TMetaUtils::WriteClassInit(std::ostream& finalString, int i = 0; finalString << "\n // Schema evolution read functions\n"; std::list::iterator rIt = rulesIt1->second.fRules.begin(); - while( rIt != rulesIt1->second.fRules.end() ) { + while (rIt != rulesIt1->second.fRules.end()) { //-------------------------------------------------------------------- // Check if the rules refer to valid data members @@ -1858,7 +1858,7 @@ void ROOT::TMetaUtils::WriteClassInit(std::ostream& finalString, int i = 0; finalString << "\n // Schema evolution read raw functions\n"; std::list::iterator rIt = rulesIt2->second.fRules.begin(); - while( rIt != rulesIt2->second.fRules.end() ) { + while (rIt != rulesIt2->second.fRules.end()) { //-------------------------------------------------------------------- // Check if the rules refer to valid data members @@ -2052,14 +2052,14 @@ void ROOT::TMetaUtils::WriteClassInit(std::ostream& finalString, if( rulesIt1 != ROOT::gReadRules.end() ) { finalString << "\n" << " // the io read rules" << "\n" << " std::vector<::ROOT::Internal::TSchemaHelper> readrules(" << rulesIt1->second.size() << ");" << "\n"; - ROOT::WriteSchemaList( rulesIt1->second.fRules, "readrules", finalString ); + ROOT::WriteSchemaList(rulesIt1->second.fRules, "readrules", finalString); finalString << " instance.SetReadRules( readrules );" << "\n"; rulesIt1->second.fGenerated = true; } if( rulesIt2 != ROOT::gReadRawRules.end() ) { finalString << "\n" << " // the io read raw rules" << "\n" << " std::vector<::ROOT::Internal::TSchemaHelper> readrawrules(" << rulesIt2->second.size() << ");" << "\n"; - ROOT::WriteSchemaList( rulesIt2->second.fRules, "readrawrules", finalString ); + ROOT::WriteSchemaList(rulesIt2->second.fRules, "readrawrules", finalString); finalString << " instance.SetReadRawRules( readrawrules );" << "\n"; rulesIt2->second.fGenerated = true; } @@ -2193,19 +2193,17 @@ void ROOT::TMetaUtils::WriteClassInit(std::ostream& finalString, void ROOT::TMetaUtils::WriteStandaloneReadRules(std::ostream &finalString, bool rawrules, std::vector &standaloneTargets, - const cling::Interpreter& interp) + const cling::Interpreter &interp) { - for (auto &rulesIt1 : rawrules? ROOT::gReadRawRules : ROOT::gReadRules) { + for (auto &rulesIt1 : rawrules ? ROOT::gReadRawRules : ROOT::gReadRules) { if (!rulesIt1.second.fGenerated) { const clang::Type *typeptr = nullptr; - const clang::CXXRecordDecl *target - = ROOT::TMetaUtils::ScopeSearch(rulesIt1.first.c_str(), interp, - true /*diag*/, &typeptr); - + const clang::CXXRecordDecl *target = + ROOT::TMetaUtils::ScopeSearch(rulesIt1.first.c_str(), interp, true /*diag*/, &typeptr); if (!target && !rulesIt1.second.fTargetDecl) { ROOT::TMetaUtils::Warning(nullptr, "%d Rule(s) for target class %s was not used!\n", rulesIt1.second.size(), - rulesIt1.first.c_str()); + rulesIt1.first.c_str()); continue; } @@ -2256,8 +2254,7 @@ void ROOT::TMetaUtils::WriteStandaloneReadRules(std::ostream &finalString, bool } } -void ROOT::TMetaUtils::WriteRulesRegistration(std::ostream &finalString, - const std::string &dictName, +void ROOT::TMetaUtils::WriteRulesRegistration(std::ostream &finalString, const std::string &dictName, const std::vector &standaloneTargets) { std::string functionname("RecordReadRules_"); @@ -2267,27 +2264,31 @@ void ROOT::TMetaUtils::WriteRulesRegistration(std::ostream &finalString, finalString << " // Registration Schema evolution read functions\n"; finalString << " int " << functionname << "() {" << "\n"; if (!standaloneTargets.empty()) - finalString << "\n" << " ::ROOT::Internal::TSchemaHelper* rule;" << "\n"; - for (const auto &target : standaloneTargets) - { + finalString << "\n" + << " ::ROOT::Internal::TSchemaHelper* rule;" << "\n"; + for (const auto &target : standaloneTargets) { std::string name; TClassEdit::GetNormalizedName(name, target); - ROOT::SchemaRuleClassMap_t::iterator rulesIt1 = ROOT::gReadRules.find( target.c_str() ); + ROOT::SchemaRuleClassMap_t::iterator rulesIt1 = ROOT::gReadRules.find(target.c_str()); finalString << " {\n"; if (rulesIt1 != ROOT::gReadRules.end()) { finalString << " // the io read rules for " << target << "\n"; - finalString << " std::vector<::ROOT::Internal::TSchemaHelper> readrules(" << rulesIt1->second.size() << ");" << "\n"; - ROOT::WriteSchemaList( rulesIt1->second.fRules, "readrules", finalString ); - finalString << " TClass::RegisterReadRules(TSchemaRule::kReadRule, \"" << name << "\", std::move(readrules));\n"; + finalString << " std::vector<::ROOT::Internal::TSchemaHelper> readrules(" << rulesIt1->second.size() + << ");" << "\n"; + ROOT::WriteSchemaList(rulesIt1->second.fRules, "readrules", finalString); + finalString << " TClass::RegisterReadRules(TSchemaRule::kReadRule, \"" << name + << "\", std::move(readrules));\n"; rulesIt1->second.fGenerated = true; } - ROOT::SchemaRuleClassMap_t::iterator rulesIt2 = ROOT::gReadRawRules.find( target.c_str() ); + ROOT::SchemaRuleClassMap_t::iterator rulesIt2 = ROOT::gReadRawRules.find(target.c_str()); if (rulesIt2 != ROOT::gReadRawRules.end()) { finalString << "\n // the io read raw rules for " << target << "\n"; - finalString << " std::vector<::ROOT::Internal::TSchemaHelper> readrawrules(" << rulesIt2->second.size() << ");" << "\n"; - ROOT::WriteSchemaList( rulesIt2->second.fRules, "readrawrules", finalString ); - finalString << " TClass::RegisterReadRules(TSchemaRule::kReadRawRule, \"" << name << "\", std::move(readrawrules));\n"; + finalString << " std::vector<::ROOT::Internal::TSchemaHelper> readrawrules(" << rulesIt2->second.size() + << ");" << "\n"; + ROOT::WriteSchemaList(rulesIt2->second.fRules, "readrawrules", finalString); + finalString << " TClass::RegisterReadRules(TSchemaRule::kReadRawRule, \"" << name + << "\", std::move(readrawrules));\n"; rulesIt2->second.fGenerated = true; } finalString << " }\n"; @@ -2295,7 +2296,7 @@ void ROOT::TMetaUtils::WriteRulesRegistration(std::ostream &finalString, finalString << " return 0;\n"; finalString << " }\n"; finalString << " static int _R__UNIQUE_DICT_(ReadRules_" << dictName << ") = " << functionname << "();"; - finalString<< "R__UseDummy(_R__UNIQUE_DICT_(ReadRules_" << dictName << "));" << "\n"; + finalString << "R__UseDummy(_R__UNIQUE_DICT_(ReadRules_" << dictName << "));" << "\n"; finalString << "} // namespace ROOT" << "\n"; } diff --git a/core/dictgen/src/rootcling_impl.cxx b/core/dictgen/src/rootcling_impl.cxx index d16093967c6cb..22fc097f59b15 100644 --- a/core/dictgen/src/rootcling_impl.cxx +++ b/core/dictgen/src/rootcling_impl.cxx @@ -2649,15 +2649,9 @@ int FinalizeStreamerInfoWriting(cling::Interpreter &interp, bool writeEmptyRootP //////////////////////////////////////////////////////////////////////////////// -int GenerateFullDict(std::ostream &dictStream, - std::string dictName, - cling::Interpreter &interp, - RScanner &scan, - const ROOT::TMetaUtils::RConstructorTypes &ctorTypes, - bool isSplit, - bool isGenreflex, - bool isSelXML, - bool writeEmptyRootPCM) +int GenerateFullDict(std::ostream &dictStream, std::string dictName, cling::Interpreter &interp, RScanner &scan, + const ROOT::TMetaUtils::RConstructorTypes &ctorTypes, bool isSplit, bool isGenreflex, + bool isSelXML, bool writeEmptyRootPCM) { ROOT::TMetaUtils::TNormalizedCtxt normCtxt(interp.getLookupHelper()); @@ -4967,15 +4961,8 @@ int RootClingMain(int argc, rootclingRetCode += FinalizeStreamerInfoWriting(interp); } } else { - rootclingRetCode += GenerateFullDict(*splitDictStream, - modGen.GetDictionaryName(), - interp, - scan, - constructorTypes, - gOptSplit, - isGenreflex, - isSelXML, - gOptWriteEmptyRootPCM); + rootclingRetCode += GenerateFullDict(*splitDictStream, modGen.GetDictionaryName(), interp, scan, constructorTypes, + gOptSplit, isGenreflex, isSelXML, gOptWriteEmptyRootPCM); } if (rootclingRetCode != 0) { diff --git a/core/foundation/res/RConversionRuleParser.h b/core/foundation/res/RConversionRuleParser.h index cf5c7c360da98..8d04040c039ec 100644 --- a/core/foundation/res/RConversionRuleParser.h +++ b/core/foundation/res/RConversionRuleParser.h @@ -15,7 +15,7 @@ #include "DllImport.h" namespace clang { - class CXXRecordDecl; +class CXXRecordDecl; } namespace ROOT diff --git a/core/foundation/src/RConversionRuleParser.cxx b/core/foundation/src/RConversionRuleParser.cxx index e0ccd0d1aa557..0e80dc8c093c5 100644 --- a/core/foundation/src/RConversionRuleParser.cxx +++ b/core/foundation/src/RConversionRuleParser.cxx @@ -864,7 +864,7 @@ namespace ROOT ////////////////////////////////////////////////////////////////////////// for( it = gReadRules.begin(); it != gReadRules.end(); ++it ) { - for( rule = it->second.fRules.begin(); rule != it->second.fRules.end(); ++rule ) { + for (rule = it->second.fRules.begin(); rule != it->second.fRules.end(); ++rule) { attr = rule->find( "include" ); if( attr == rule->end() ) continue; TSchemaRuleProcessor::SplitList( attr->second, tmp ); @@ -877,7 +877,7 @@ namespace ROOT ////////////////////////////////////////////////////////////////////////// for( it = gReadRawRules.begin(); it != gReadRawRules.end(); ++it ) { - for( rule = it->second.fRules.begin(); rule != it->second.fRules.end(); ++rule ) { + for (rule = it->second.fRules.begin(); rule != it->second.fRules.end(); ++rule) { attr = rule->find( "include" ); if( attr == rule->end() ) continue; TSchemaRuleProcessor::SplitList( attr->second, tmp ); @@ -926,7 +926,7 @@ namespace ROOT gReadRules[normalizedTargetName].fRules = lst; } else - it->second.fRules.push_back( rule ); + it->second.fRules.push_back(rule); } ///////////////////////////////////////////////////////////////////////////// @@ -961,7 +961,7 @@ namespace ROOT gReadRawRules[normalizedTargetName].fRules = lst; } else - it->second.fRules.push_back( rule ); + it->second.fRules.push_back(rule); } diff --git a/core/meta/inc/TClass.h b/core/meta/inc/TClass.h index 5d98f3b21ee22..6de61a9009f58 100644 --- a/core/meta/inc/TClass.h +++ b/core/meta/inc/TClass.h @@ -545,7 +545,8 @@ friend class TStreamerInfo; Long_t Property() const override; Int_t ReadBuffer(TBuffer &b, void *pointer, Int_t version, UInt_t start, UInt_t count); Int_t ReadBuffer(TBuffer &b, void *pointer); - static void RegisterReadRules(ROOT::TSchemaRule::RuleType_t, const char *classname, std::vector<::ROOT::Internal::TSchemaHelper> &&rules); + static void RegisterReadRules(ROOT::TSchemaRule::RuleType_t, const char *classname, + std::vector<::ROOT::Internal::TSchemaHelper> &&rules); void RegisterStreamerInfo(TVirtualStreamerInfo *info); void RemoveStreamerInfo(Int_t slot); void ReplaceWith(TClass *newcl) const; diff --git a/core/meta/inc/TSchemaRule.h b/core/meta/inc/TSchemaRule.h index 48c0d093b38cd..ad2da507eb0c5 100644 --- a/core/meta/inc/TSchemaRule.h +++ b/core/meta/inc/TSchemaRule.h @@ -15,9 +15,9 @@ class TVirtualObject; class TObjArray; namespace ROOT { namespace Internal { - struct TSchemaHelper; -} +struct TSchemaHelper; } +} // namespace ROOT namespace ROOT { @@ -47,17 +47,14 @@ namespace ROOT { Int_t GetPointerLevel() const { return fPointerLevel; } - const char* GetUnderlyingTypeName() const - { - return fTitle; - } + const char *GetUnderlyingTypeName() const { return fTitle; } // The source can be declared with: // "%s %s%s;", GetTypeForDeclaration().Data(), GetName(), GetDimensions); TString GetTypeForDeclaration() { TString type = fTitle; - for(Int_t s = 0; s < fPointerLevel; ++s) + for (Int_t s = 0; s < fPointerLevel; ++s) type.Append('*'); return type; } @@ -81,7 +78,7 @@ namespace ROOT { typedef void (*ReadRawFuncPtr_t)( char*, TBuffer&); TSchemaRule(); - TSchemaRule(RuleType_t type, const char *targetClass, const ROOT::Internal::TSchemaHelper& helper); + TSchemaRule(RuleType_t type, const char *targetClass, const ROOT::Internal::TSchemaHelper &helper); virtual ~TSchemaRule(); TSchemaRule( const TSchemaRule& rhs ); diff --git a/core/meta/src/TClass.cxx b/core/meta/src/TClass.cxx index 81e74c4c7966a..af551fbff7ec2 100644 --- a/core/meta/src/TClass.cxx +++ b/core/meta/src/TClass.cxx @@ -1719,17 +1719,19 @@ void TClass::Init(const char *name, Version_t cversion, // std::pairs have implicit conversions GetSchemaRules(kTRUE); } - for(auto ruletype : {ROOT::TSchemaRule::kReadRule, ROOT::TSchemaRule::kReadRawRule}) { + for (auto ruletype : {ROOT::TSchemaRule::kReadRule, ROOT::TSchemaRule::kReadRawRule}) { auto ®istry = GetReadRulesRegistry(ruletype); auto rulesiter = registry.find(GetName()); if (rulesiter != registry.end()) { - auto rset = GetSchemaRules( kTRUE ); - for(const auto &helper : rulesiter->second) { + auto rset = GetSchemaRules(kTRUE); + for (const auto &helper : rulesiter->second) { auto rule = new ROOT::TSchemaRule(ruletype, GetName(), helper); TString errmsg; - if( !rset->AddRule( rule, ROOT::Detail::TSchemaRuleSet::kCheckAll, &errmsg ) ) { - Warning( "Init", "The rule for class: \"%s\": version, \"%s\" and data members: \"%s\" has been skipped because %s.", - GetName(), helper.fVersion.c_str(), helper.fTarget.c_str(), errmsg.Data() ); + if (!rset->AddRule(rule, ROOT::Detail::TSchemaRuleSet::kCheckAll, &errmsg)) { + Warning( + "Init", + "The rule for class: \"%s\": version, \"%s\" and data members: \"%s\" has been skipped because %s.", + GetName(), helper.fVersion.c_str(), helper.fTarget.c_str(), errmsg.Data()); delete rule; } } @@ -3624,16 +3626,16 @@ TRealData* TClass::GetRealData(const char* name) const // Try ignoring the array dimensions. std::string::size_type firstBracket = givenName.find_first_of("["); std::string nameNoDim(givenName.substr(0, firstBracket)); - TObjLink* lnk = fRealData->FirstLink(); + TObjLink *lnk = fRealData->FirstLink(); while (lnk) { - TObject* obj = lnk->GetObject(); + TObject *obj = lnk->GetObject(); std::string objName(obj->GetName()); std::string::size_type pos = objName.find_first_of("["); if (pos != std::string::npos) { objName.erase(pos); } if (objName == nameNoDim) { - return static_cast(obj); + return static_cast(obj); } lnk = lnk->Next(); } @@ -6918,10 +6920,10 @@ void TClass::StreamerTObject(const TClass* pThis, void *object, TBuffer &b, cons //////////////////////////////////////////////////////////////////////////////// /// Case of TObjects when fIsOffsetStreamerSet is known to have been set. -void TClass::StreamerTObjectInitialized(const TClass* pThis, void *object, TBuffer &b, const TClass *onfile_class) +void TClass::StreamerTObjectInitialized(const TClass *pThis, void *object, TBuffer &b, const TClass *onfile_class) { if (R__likely(onfile_class == nullptr || pThis == onfile_class)) { - TObject *tobj = (TObject*)((Longptr_t)object + pThis->fOffsetStreamer); + TObject *tobj = (TObject *)((Longptr_t)object + pThis->fOffsetStreamer); tobj->Streamer(b); } else { // This is the case where we are reading an object of a derived class @@ -7409,20 +7411,22 @@ TVirtualStreamerInfo *TClass::FindConversionStreamerInfo( const TClass* cl, UInt /// Rules will end up here if they are created in a dictionary file that does not /// contain the dictionary for the target class. -void TClass::RegisterReadRules(ROOT::TSchemaRule::RuleType_t type, - const char *classname, std::vector<::ROOT::Internal::TSchemaHelper> &&rules) +void TClass::RegisterReadRules(ROOT::TSchemaRule::RuleType_t type, const char *classname, + std::vector<::ROOT::Internal::TSchemaHelper> &&rules) { R__WRITE_LOCKGUARD(ROOT::gCoreMutex); auto cl = TClass::GetClass(classname, false, false); if (cl) { - auto rset = cl->GetSchemaRules( kTRUE ); - for(const auto &it : rules) { + auto rset = cl->GetSchemaRules(kTRUE); + for (const auto &it : rules) { auto rule = new ROOT::TSchemaRule(type, cl->GetName(), it); TString errmsg; - if( !rset->AddRule( rule, ROOT::Detail::TSchemaRuleSet::kCheckAll, &errmsg ) ) { - ::Warning( "TGenericClassInfo", "The rule for class: \"%s\": version, \"%s\" and data members: \"%s\" has been skipped because %s.", - cl->GetName(), it.fVersion.c_str(), it.fTarget.c_str(), errmsg.Data() ); + if (!rset->AddRule(rule, ROOT::Detail::TSchemaRuleSet::kCheckAll, &errmsg)) { + ::Warning( + "TGenericClassInfo", + "The rule for class: \"%s\": version, \"%s\" and data members: \"%s\" has been skipped because %s.", + cl->GetName(), it.fVersion.c_str(), it.fTarget.c_str(), errmsg.Data()); delete rule; } } diff --git a/core/meta/src/TGenericClassInfo.cxx b/core/meta/src/TGenericClassInfo.cxx index 48d01304d1b29..534ff12ffd80d 100644 --- a/core/meta/src/TGenericClassInfo.cxx +++ b/core/meta/src/TGenericClassInfo.cxx @@ -334,7 +334,7 @@ namespace Internal { rule = new TSchemaRule(ProcessReadRules ? TSchemaRule::kReadRule : TSchemaRule::kReadRawRule, fClass->GetName(), *it); - if( !rset->AddRule( rule, TSchemaRuleSet::kCheckAll, &errmsg ) ) { + if (!rset->AddRule(rule, TSchemaRuleSet::kCheckAll, &errmsg)) { ::Warning( "TGenericClassInfo", "The rule for class: \"%s\": version, \"%s\" and data members: \"%s\" has been skipped because %s.", GetClassName(), it->fVersion.c_str(), it->fTarget.c_str(), errmsg.Data() ); delete rule; diff --git a/core/meta/src/TSchemaRule.cxx b/core/meta/src/TSchemaRule.cxx index 34f2e102c7df7..bf8a2a6ceace3 100644 --- a/core/meta/src/TSchemaRule.cxx +++ b/core/meta/src/TSchemaRule.cxx @@ -98,32 +98,35 @@ TSchemaRule::TSchemaRule(): fVersionVect( nullptr ), fChecksumVect( nullptr ), //////////////////////////////////////////////////////////////////////////////// /// Constructor. TSchemaRule::TSchemaRule(TSchemaRule::RuleType_t type, const char *targetClass, - const ROOT::Internal::TSchemaHelper& helper) : - fVersionVect( nullptr ), fChecksumVect( nullptr ), - fTargetVect( nullptr ), fSourceVect( nullptr ), - fIncludeVect( nullptr ), fEmbed( kTRUE ), - fReadFuncPtr( nullptr ), fReadRawFuncPtr( nullptr ), - fRuleType( type ) + const ROOT::Internal::TSchemaHelper &helper) + : fVersionVect(nullptr), + fChecksumVect(nullptr), + fTargetVect(nullptr), + fSourceVect(nullptr), + fIncludeVect(nullptr), + fEmbed(kTRUE), + fReadFuncPtr(nullptr), + fReadRawFuncPtr(nullptr), + fRuleType(type) { - SetTarget( helper.fTarget ); - SetTargetClass( targetClass ); - SetSourceClass( helper.fSourceClass ); - SetSource( helper.fSource ); - SetCode( helper.fCode ); - SetVersion( helper.fVersion ); - SetChecksum( helper.fChecksum ); - SetEmbed( helper.fEmbed ); - SetInclude( helper.fInclude ); - SetAttributes( helper.fAttributes ); - - if( type == TSchemaRule::kReadRule ) { - SetReadFunctionPointer( (TSchemaRule::ReadFuncPtr_t)helper.fFunctionPtr ); + SetTarget(helper.fTarget); + SetTargetClass(targetClass); + SetSourceClass(helper.fSourceClass); + SetSource(helper.fSource); + SetCode(helper.fCode); + SetVersion(helper.fVersion); + SetChecksum(helper.fChecksum); + SetEmbed(helper.fEmbed); + SetInclude(helper.fInclude); + SetAttributes(helper.fAttributes); + + if (type == TSchemaRule::kReadRule) { + SetReadFunctionPointer((TSchemaRule::ReadFuncPtr_t)helper.fFunctionPtr); } else { - SetReadRawFunctionPointer( (TSchemaRule::ReadRawFuncPtr_t)helper.fFunctionPtr ); + SetReadRawFunctionPointer((TSchemaRule::ReadRawFuncPtr_t)helper.fFunctionPtr); } } - //////////////////////////////////////////////////////////////////////////////// /// Destructor. diff --git a/core/meta/src/TSchemaRuleSet.cxx b/core/meta/src/TSchemaRuleSet.cxx index ca72b79adc060..b9f29feebe5b6 100644 --- a/core/meta/src/TSchemaRuleSet.cxx +++ b/core/meta/src/TSchemaRuleSet.cxx @@ -113,8 +113,7 @@ Bool_t TSchemaRuleSet::AddRule( TSchemaRule* rule, EConsistencyCheck checkConsis // Do not generate/build the StreamerInfo if it is not already there. TVirtualStreamerInfo *info = fClass->GetCurrentStreamerInfo(); - if (rule->GetTarget() && (fClass->GetState() > TClass::kEmulated || info)) - { + if (rule->GetTarget() && (fClass->GetState() > TClass::kEmulated || info)) { TObjArrayIter titer( rule->GetTarget() ); TObject* obj; while( (obj = titer.Next()) ) { @@ -125,7 +124,7 @@ Bool_t TSchemaRuleSet::AddRule( TSchemaRule* rule, EConsistencyCheck checkConsis // been set and would make detecting if the data member is local to // the current class (as opposed to a base class) more difficult. if (fClass->GetState() > TClass::kEmulated) { - found = fClass->GetDataMember( str->GetString() ) || fClass->GetBaseClass( str->GetString() ); + found = fClass->GetDataMember(str->GetString()) || fClass->GetBaseClass(str->GetString()); } else if (info) { found = info->GetElements()->FindObject(str->GetString()); } diff --git a/io/io/src/TBufferFile.cxx b/io/io/src/TBufferFile.cxx index 18ba00dbe8894..84081aa021a83 100644 --- a/io/io/src/TBufferFile.cxx +++ b/io/io/src/TBufferFile.cxx @@ -3411,9 +3411,9 @@ Int_t TBufferFile::ReadClassEmulated(const TClass *cl, void *object, const TClas Version_t v = ReadVersion(&start,&count); TStreamerInfo *sinfo = nullptr; - if( onFileClass ) { - sinfo = (TStreamerInfo*)cl->GetConversionStreamerInfo( onFileClass, v ); - if( !sinfo ) + if (onFileClass) { + sinfo = (TStreamerInfo *)cl->GetConversionStreamerInfo(onFileClass, v); + if (!sinfo) return 0; } if (!sinfo) diff --git a/io/io/src/TKey.cxx b/io/io/src/TKey.cxx index 7bc0c0e349571..6d0a2271523c6 100644 --- a/io/io/src/TKey.cxx +++ b/io/io/src/TKey.cxx @@ -1071,8 +1071,9 @@ void *TKey::ReadObjectAny(const TClass* expectedClass) baseOffset = 0; // For now we do not support requesting from a class that is the base of one of the class for which there is transformation to .... clOnfile = cl; cl = const_cast(expectedClass); - if (gDebug >0) - Info("ReadObjectAny","Using Converter StreamerInfo from %s to %s",clOnfile->GetName(),expectedClass->GetName()); + if (gDebug > 0) + Info("ReadObjectAny", "Using Converter StreamerInfo from %s to %s", clOnfile->GetName(), + expectedClass->GetName()); } if (cl->GetState() > TClass::kEmulated && expectedClass->GetState() <= TClass::kEmulated) { //we cannot mix a compiled class with an emulated class in the inheritance diff --git a/io/io/src/TStreamerInfo.cxx b/io/io/src/TStreamerInfo.cxx index f00ec70de9809..e01541e49846c 100644 --- a/io/io/src/TStreamerInfo.cxx +++ b/io/io/src/TStreamerInfo.cxx @@ -266,11 +266,8 @@ namespace { if (isStdArray) { totaldim = 1; std::array localMaxIndices; - TClassEdit::GetStdArrayProperties(memClass->GetName(), - localtypename, - localMaxIndices, - ndim); - for(Int_t i = 0; i < ndim; ++i) { + TClassEdit::GetStdArrayProperties(memClass->GetName(), localtypename, localMaxIndices, ndim); + for (Int_t i = 0; i < ndim; ++i) { auto d = localMaxIndices[i]; dimensions.push_back(d); totaldim *= d; @@ -278,7 +275,7 @@ namespace { memClass = TClass::GetClass(localtypename.c_str()); } if (memClass) { - //cached->SetNewType( cached->GetType() ); + // cached->SetNewType( cached->GetType() ); if (s->GetPointerLevel()) { if (memClass->IsTObject()) { memType = TVirtualStreamerInfo::kObjectP; @@ -290,7 +287,7 @@ namespace { } else { if (memClass->GetCollectionProxy()) { memType = TVirtualStreamerInfo::kSTL; - } else if(memClass->IsTObject() && memClass == element->GetClassPointer()) { + } else if (memClass->IsTObject() && memClass == element->GetClassPointer()) { // If there is a change in the class type, we can't use the TObject::Streamer // virtual function: it would streame the data using the in-memory type rather // than the onfile type. @@ -300,8 +297,7 @@ namespace { } } if ((!s->GetPointerLevel() || memType == TVirtualStreamerInfo::kSTLp) && - (isStdArray ? ndim >0 : s->GetDimensions()[0])) - { + (isStdArray ? ndim > 0 : s->GetDimensions()[0])) { memType += TVirtualStreamerInfo::kOffsetL; } datasize = memClass->GetClassSize(); @@ -321,7 +317,7 @@ namespace { if (!totaldim) totaldim = 1; auto dims = s->GetDimensions(); - while(*dims == '[') { + while (*dims == '[') { ++dims; uint32_t res = 0; do { @@ -339,9 +335,8 @@ namespace { } } if (element->GetType() == TStreamerInfo::kStreamLoop && - (memType == TStreamerInfo::kAnyp || memType == TStreamerInfo::kAnyP - || memType == TStreamerInfo::kObjectp || memType == TStreamerInfo::kObjectP)) - { + (memType == TStreamerInfo::kAnyp || memType == TStreamerInfo::kAnyP || memType == TStreamerInfo::kObjectp || + memType == TStreamerInfo::kObjectP)) { memType = TStreamerInfo::kStreamLoop; } if (element->GetType() == TStreamerInfo::kStreamer) @@ -352,20 +347,20 @@ namespace { void UpdateFromRule(const TStreamerInfo *info, const ROOT::TSchemaRule::TSources *s, TStreamerElement *element) { auto [memClass, memType, datasize, dimensions, totaldim] = GetSourceType(s, element); - if (element->GetType() == TVirtualStreamerInfo::kObject && memClass != element->GetClassPointer()) - { + if (element->GetType() == TVirtualStreamerInfo::kObject && memClass != element->GetClassPointer()) { // If there is a change in the class type, we can't use the TObject::Streamer // virtual function: it would streame the data using the in-memory type rather // than the onfile type. element->SetType(TVirtualStreamerInfo::kAny); } - element->SetNewType( memType ); - element->SetNewClass( memClass ); + element->SetNewType(memType); + element->SetNewClass(memClass); // We can not change the recorded dimensions. Let's check that // the total number of elements is still the same. if (totaldim != element->GetArrayLength()) { Error("UpdateFromRule", - "For %s::%s the number of array elements in the rule (%d) does not match the number in the StreamerElement (%d)", + "For %s::%s the number of array elements in the rule (%d) does not match the number in the " + "StreamerElement (%d)", info->GetName(), element->GetFullName(), totaldim, element->GetArrayLength()); } element->SetSize(totaldim ? totaldim * datasize : datasize); @@ -780,9 +775,9 @@ void TStreamerInfo::Build(Bool_t isTransient) cached->SetBit(TStreamerElement::kCache); // Get one of the potentially many rules applicable // We should check that we don't have a second rule - auto r = rules.GetRuleWithSource( element->GetName() ); + auto r = rules.GetRuleWithSource(element->GetName()); assert(r && r->GetSource()); - auto s = (ROOT::TSchemaRule::TSources*)(r->GetSource()->FindObject( element->GetName() )); + auto s = (ROOT::TSchemaRule::TSources *)(r->GetSource()->FindObject(element->GetName())); assert(s); UpdateFromRule(this, s, cached); } @@ -807,7 +802,7 @@ void TStreamerInfo::Build(Bool_t isTransient) if (rules.HasRuleWithSource(alloc_element->GetName(), kTRUE)) { auto r = rules.GetRuleWithSource(alloc_element->GetName()); assert(r && r->GetSource()); - auto s = (ROOT::TSchemaRule::TSources*)(r->GetSource()->FindObject( alloc_element->GetName() )); + auto s = (ROOT::TSchemaRule::TSources *)(r->GetSource()->FindObject(alloc_element->GetName())); assert(s); UpdateFromRule(this, s, alloc_element); } @@ -2650,7 +2645,8 @@ void TStreamerInfo::BuildOld() if (rules.HasRuleWithSource(alloc_element->GetName(), kTRUE)) { auto r = rules.GetRuleWithSource(alloc_element->GetName()); assert(r && r->GetSource()); - auto s = (ROOT::TSchemaRule::TSources*)(r->GetSource()->FindObject( alloc_element->GetName() )); + auto s = + (ROOT::TSchemaRule::TSources *)(r->GetSource()->FindObject(alloc_element->GetName())); assert(s); UpdateFromRule(this, s, alloc_element); } @@ -4735,7 +4731,7 @@ void TStreamerInfo::InsertArtificialElements(std::vectorGetAttributes()[0] != 0) { - TString attr( r->GetAttributes() ); + TString attr(r->GetAttributes()); attr.ToLower(); return attr.Contains("canignore"); } else @@ -4816,10 +4812,8 @@ void TStreamerInfo::InsertArtificialElements(std::vectorGetDataMember( newName ) ) { TRealData::GetName(realDataName, dm); - newel = new TStreamerArtificial(realDataName, "", - fClass->GetDataMemberOffset(realDataName), - TStreamerInfo::kArtificial, - dm->GetTypeName()); + newel = new TStreamerArtificial(realDataName, "", fClass->GetDataMemberOffset(realDataName), + TStreamerInfo::kArtificial, dm->GetTypeName()); newel->SetReadFunc( rule->GetReadFunctionPointer() ); newel->SetReadRawFunc( rule->GetReadRawFunctionPointer() ); toAdd.push_back(newel); @@ -4833,10 +4827,8 @@ void TStreamerInfo::InsertArtificialElements(std::vectorString(); if ( TDataMember* dm = fClass->GetDataMember( newName ) ) { TRealData::GetName(realDataName, dm); - newel = new TStreamerArtificial(realDataName, "", - fClass->GetDataMemberOffset(realDataName), - TStreamerInfo::kArtificial, - dm->GetTypeName()); + newel = new TStreamerArtificial(realDataName, "", fClass->GetDataMemberOffset(realDataName), + TStreamerInfo::kArtificial, dm->GetTypeName()); toAdd.push_back(newel); } } @@ -4991,7 +4983,7 @@ void* TStreamerInfo::New(void *obj) // Skip elements for which we do not have any class // information. FIXME: Document how this could happen. - TClass* cle = element->GetNewClass(); + TClass *cle = element->GetNewClass(); if (!cle) cle = element->GetClassPointer(); if (!cle) @@ -5179,7 +5171,6 @@ void TStreamerInfo::DestructorImpl(void* obj, Bool_t dtorOnly) if (ele->GetOffset() == kMissing) continue; char* eaddr = p + ele->GetOffset(); - Int_t etype = ele->GetNewType(); // in memory type if (etype == TStreamerInfo::kNoType) etype = ele->GetType(); @@ -5203,15 +5194,12 @@ void TStreamerInfo::DestructorImpl(void* obj, Bool_t dtorOnly) case TStreamerInfo::kCharStar: DeleteBasicPointer(eaddr,ele,Char_t); continue; } - - - TClass* cle = ele->GetNewClass(); // in memory type + TClass *cle = ele->GetNewClass(); // in memory type if (!cle) cle = ele->GetClassPointer(); if (!cle) continue; - if (etype == kObjectp || etype == kAnyp) { // Destroy an array of pre-allocated objects. Int_t len = ele->GetArrayLength(); diff --git a/io/io/src/TStreamerInfoReadBuffer.cxx b/io/io/src/TStreamerInfoReadBuffer.cxx index dc8930c9cb010..8135f9416fc82 100644 --- a/io/io/src/TStreamerInfoReadBuffer.cxx +++ b/io/io/src/TStreamerInfoReadBuffer.cxx @@ -327,10 +327,9 @@ Int_t TStreamerInfo::ReadBufferSkip(TBuffer &b, const T &arr, const TCompInfo *c // skip Class * not derived from TObject with comment field //-> case TStreamerInfo::kSkip + TStreamerInfo::kAnyp: - case TStreamerInfo::kSkip + TStreamerInfo::kAnyp + TStreamerInfo::kOffsetL: - { + case TStreamerInfo::kSkip + TStreamerInfo::kAnyp + TStreamerInfo::kOffsetL: { DOLOOP { - for (Int_t j=0;jfLength;j++) { + for (Int_t j = 0; j < compinfo->fLength; j++) { b.SkipObjectAny(); } } @@ -339,8 +338,7 @@ Int_t TStreamerInfo::ReadBufferSkip(TBuffer &b, const T &arr, const TCompInfo *c // skip Class* not derived from TObject case TStreamerInfo::kSkip + TStreamerInfo::kAnyP: - case TStreamerInfo::kSkip + TStreamerInfo::kAnyP + TStreamerInfo::kOffsetL: - { + case TStreamerInfo::kSkip + TStreamerInfo::kAnyP + TStreamerInfo::kOffsetL: { DOLOOP { for (Int_t j=0;jfLength;j++) { b.SkipObjectAny(); @@ -351,10 +349,9 @@ Int_t TStreamerInfo::ReadBufferSkip(TBuffer &b, const T &arr, const TCompInfo *c // skip Any Class not derived from TObject case TStreamerInfo::kSkip + TStreamerInfo::kAny: - case TStreamerInfo::kSkip + TStreamerInfo::kAny + TStreamerInfo::kOffsetL: - { + case TStreamerInfo::kSkip + TStreamerInfo::kAny + TStreamerInfo::kOffsetL: { DOLOOP { - for (Int_t j=0;jfLength;j++) { + for (Int_t j = 0; j < compinfo->fLength; j++) { b.SkipObjectAny(); } } @@ -382,8 +379,8 @@ Int_t TStreamerInfo::ReadBufferSkip(TBuffer &b, const T &arr, const TCompInfo *c case TStreamerInfo::kSkip + TStreamerInfo::kStreamLoop + TStreamerInfo::kOffsetL: case TStreamerInfo::kSkip + TStreamerInfo::kStreamer: { DOLOOP { - for (Int_t j=0;jfLength;j++) { - b.SkipObjectAny(); + for (Int_t j = 0; j < compinfo->fLength; j++) { + b.SkipObjectAny(); } } break; @@ -795,17 +792,17 @@ Int_t TStreamerInfo::ReadBuffer(TBuffer &b, const T &arr, if (R__TestUseCache(aElement)) { Int_t bufpos = b.Length(); - if (b.PeekDataCache()==0) { + if (b.PeekDataCache() == 0) { Warning("ReadBuffer","Skipping %s::%s because the cache is missing.",thisVar->GetName(),aElement->GetName()); thisVar->ReadBufferSkip(b,arr,compinfo[i],compinfo[i]->fType+TStreamerInfo::kSkip,aElement,narr,eoffset); } else { if (gDebug > 1) { printf("ReadBuffer, class:%s, name=%s, fType[%d]=%d," - " %s, bufpos=%d, arr=%p, eoffset=%d, Redirect=%p\n", - fClass->GetName(),aElement->GetName(),i,compinfo[i]->fType, - aElement->ClassName(),b.Length(),arr[0], eoffset,b.PeekDataCache()->GetObjectAt(0)); + " %s, bufpos=%d, arr=%p, eoffset=%d, Redirect=%p\n", + fClass->GetName(), aElement->GetName(), i, compinfo[i]->fType, aElement->ClassName(), b.Length(), + arr[0], eoffset, b.PeekDataCache()->GetObjectAt(0)); } - thisVar->ReadBuffer(b,*b.PeekDataCache(),compinfo,i,i+1,narr,eoffset, arrayMode); + thisVar->ReadBuffer(b, *b.PeekDataCache(), compinfo, i, i + 1, narr, eoffset, arrayMode); } if (aElement->TestBit(TStreamerElement::kRepeat)) { b.SetBufferOffset(bufpos); } continue; @@ -1095,7 +1092,8 @@ Int_t TStreamerInfo::ReadBuffer(TBuffer &b, const T &arr, case TStreamerInfo::kAnyP: // Class* not derived from TObject with no comment field NOTE:: Re-added by Phil case TStreamerInfo::kAnyP+TStreamerInfo::kOffsetL: { DOLOOP { - b.ReadFastArray((void**)(arr[k]+ioffset), newCle ? newCle : cle, compinfo[i]->fLength, isPreAlloc, pstreamer, cle); + b.ReadFastArray((void **)(arr[k] + ioffset), newCle ? newCle : cle, compinfo[i]->fLength, isPreAlloc, + pstreamer, cle); } } continue; @@ -1393,7 +1391,7 @@ Int_t TStreamerInfo::ReadBuffer(TBuffer &b, const T &arr, case TStreamerInfo::kAny+TStreamerInfo::kOffsetL: { DOLOOP { - b.ReadFastArray((void*)(arr[k]+ioffset), newCle ? newCle : cle, compinfo[i]->fLength, pstreamer, cle); + b.ReadFastArray((void *)(arr[k] + ioffset), newCle ? newCle : cle, compinfo[i]->fLength, pstreamer, cle); } continue; } @@ -1698,12 +1696,8 @@ Int_t TStreamerInfo::ReadBuffer(TBuffer &b, const T &arr, continue; } - case TStreamerInfo::kCacheNew: - b.PushDataCache( new TVirtualArray( aElement->GetClassPointer(), narr ) ); - continue; - case TStreamerInfo::kCacheDelete: - delete b.PopDataCache(); - continue; + case TStreamerInfo::kCacheNew: b.PushDataCache(new TVirtualArray(aElement->GetClassPointer(), narr)); continue; + case TStreamerInfo::kCacheDelete: delete b.PopDataCache(); continue; case -1: // -- Skip an ignored TObject base class. diff --git a/io/io/src/TStreamerInfoWriteBuffer.cxx b/io/io/src/TStreamerInfoWriteBuffer.cxx index ee5ff66cc08a1..7a62f21ae346b 100644 --- a/io/io/src/TStreamerInfoWriteBuffer.cxx +++ b/io/io/src/TStreamerInfoWriteBuffer.cxx @@ -146,16 +146,16 @@ Int_t TStreamerInfo::WriteBufferAux(TBuffer &b, const T &arr, if (R__TestUseCache(aElement)) { if (aElement->TestBit(TStreamerElement::kWrite)) { - if (b.PeekDataCache()==0) { + if (b.PeekDataCache() == 0) { Warning("WriteBuffer","Skipping %s::%s because the cache is missing.",GetName(),aElement->GetName()); } else { if (gDebug > 1) { printf("WriteBuffer, class:%s, name=%s, fType[%d]=%d," " %s, bufpos=%d, arr=%p, eoffset=%d, Redirect=%p\n", - fClass->GetName(),aElement->GetName(),i,compinfo[i]->fType, - aElement->ClassName(),b.Length(),arr[0], eoffset,b.PeekDataCache()->GetObjectAt(0)); + fClass->GetName(), aElement->GetName(), i, compinfo[i]->fType, aElement->ClassName(), + b.Length(), arr[0], eoffset, b.PeekDataCache()->GetObjectAt(0)); } - WriteBufferAux(b,*b.PeekDataCache(),compinfo,i,i+1,narr,eoffset, arrayMode); + WriteBufferAux(b, *b.PeekDataCache(), compinfo, i, i + 1, narr, eoffset, arrayMode); } continue; } else { @@ -800,12 +800,8 @@ Int_t TStreamerInfo::WriteBufferAux(TBuffer &b, const T &arr, continue; } - case TStreamerInfo::kCacheNew: - b.PushDataCache( new TVirtualArray( aElement->GetClassPointer(), narr ) ); - continue; - case TStreamerInfo::kCacheDelete: - delete b.PopDataCache(); - continue; + case TStreamerInfo::kCacheNew: b.PushDataCache(new TVirtualArray(aElement->GetClassPointer(), narr)); continue; + case TStreamerInfo::kCacheDelete: delete b.PopDataCache(); continue; case TStreamerInfo::kArtificial: #if 0 ROOT::TSchemaRule::WriteFuncPtr_t writefunc = ((TStreamerArtificial*)aElement)->GetWriteFunc(); diff --git a/tree/tree/src/TBranchElement.cxx b/tree/tree/src/TBranchElement.cxx index 6ff6a5b34eb93..38381476234fa 100644 --- a/tree/tree/src/TBranchElement.cxx +++ b/tree/tree/src/TBranchElement.cxx @@ -67,7 +67,8 @@ namespace { TBuffer &fBuffer; TVirtualArray *fOnfileObject; - R__PushCache(TBuffer &b, TVirtualArray *in, UInt_t size) : fBuffer(b), fOnfileObject(in) { + R__PushCache(TBuffer &b, TVirtualArray *in, UInt_t size) : fBuffer(b), fOnfileObject(in) + { if (fOnfileObject) { fOnfileObject->SetSize(size); fBuffer.PushDataCache( fOnfileObject ); @@ -2744,7 +2745,7 @@ Int_t TBranchElement::GetEntry(Long64_t entry, Int_t getall) if (clones->IsZombie()) { return -1; } - R__PushCache onfileObject(b,fOnfileObject,ndata); + R__PushCache onfileObject(b, fOnfileObject, ndata); char **arr = (char **)clones->GetObjectRef(); char **end = arr + fNdata; @@ -2757,7 +2758,7 @@ Int_t TBranchElement::GetEntry(Long64_t entry, Int_t getall) auto ndata = GetNdata(); - R__PushCache onfileObject(b,fOnfileObject,ndata); + R__PushCache onfileObject(b, fOnfileObject, ndata); TVirtualCollectionProxy *proxy = GetCollectionProxy(); TVirtualCollectionProxy::TPushPop helper(proxy, fObject); @@ -2767,7 +2768,7 @@ Int_t TBranchElement::GetEntry(Long64_t entry, Int_t getall) // Apply the unattached rules; by definition they do not need any // input from a buffer. TBufferFile b(TBufferFile::kRead, 1); - R__PushCache onfileObject(b,fOnfileObject,fNdata); + R__PushCache onfileObject(b, fOnfileObject, fNdata); b.ApplySequence(*fReadActionSequence, fObject); } } @@ -4289,7 +4290,7 @@ void TBranchElement::ReadLeavesCollection(TBuffer& b) } fNdata = n; - R__PushCache onfileObject(b,fOnfileObject,1); + R__PushCache onfileObject(b, fOnfileObject, 1); // Note: Proxy-helper needs to "embrace" the entire // streaming of this STL container if the container @@ -4379,7 +4380,7 @@ void TBranchElement::ReadLeavesCollectionSplitPtrMember(TBuffer& b) return; } - R__PushCache onfileObject(b,fOnfileObject,fNdata); + R__PushCache onfileObject(b, fOnfileObject, fNdata); TStreamerInfo *info = GetInfoImp(); if (info == nullptr) return; @@ -4411,7 +4412,7 @@ void TBranchElement::ReadLeavesCollectionSplitVectorPtrMember(TBuffer& b) if (!fNdata) { return; } - R__PushCache onfileObject(b,fOnfileObject,fNdata); + R__PushCache onfileObject(b, fOnfileObject, fNdata); TStreamerInfo *info = GetInfoImp(); if (info == nullptr) return; @@ -4442,7 +4443,7 @@ void TBranchElement::ReadLeavesCollectionMember(TBuffer& b) if (!fNdata) { return; } - R__PushCache onfileObject(b,fOnfileObject,fNdata); + R__PushCache onfileObject(b, fOnfileObject, fNdata); TStreamerInfo *info = GetInfoImp(); if (info == nullptr) return; @@ -4522,7 +4523,7 @@ void TBranchElement::ReadLeavesClonesMember(TBuffer& b) // Note, we could (possibly) save some more, by configuring the action // based on the value of fOnfileObject rather than pushing in on a stack. - R__PushCache onfileObject(b,fOnfileObject,fNdata); + R__PushCache onfileObject(b, fOnfileObject, fNdata); char **arr = (char **)clones->GetObjectRef(); char **end = arr + fNdata; @@ -4547,7 +4548,7 @@ void TBranchElement::ReadLeavesMember(TBuffer& b) return; } - R__PushCache onfileObject(b,fOnfileObject,1); + R__PushCache onfileObject(b, fOnfileObject, 1); // If not a TClonesArray or STL container master branch // or sub-branch and branch inherits from tobject, // then register with the buffer so that pointers are @@ -4599,8 +4600,9 @@ void TBranchElement::ReadLeavesMemberBranchCount(TBuffer& b) if (!info) { return; } - R__PushCache onfileObject(b,fOnfileObject,1); // Here we have a single object that contains a variable size C-style array. - // Since info is not null, fReadActionSequence is not null either. + R__PushCache onfileObject(b, fOnfileObject, + 1); // Here we have a single object that contains a variable size C-style array. + // Since info is not null, fReadActionSequence is not null either. b.ApplySequence(*fReadActionSequence, fObject); } @@ -4634,7 +4636,7 @@ void TBranchElement::ReadLeavesMemberCounter(TBuffer& b) return; } - R__PushCache onfileObject(b,fOnfileObject,1); + R__PushCache onfileObject(b, fOnfileObject, 1); // Since info is not null, fReadActionSequence is not null either. b.ApplySequence(*fReadActionSequence, fObject); @@ -4655,7 +4657,7 @@ void TBranchElement::ReadLeavesCustomStreamer(TBuffer& b) return; } - R__PushCache onfileObject(b,fOnfileObject,1); + R__PushCache onfileObject(b, fOnfileObject, 1); fBranchClass->Streamer(fObject,b); } diff --git a/tree/treeplayer/src/TBranchProxy.cxx b/tree/treeplayer/src/TBranchProxy.cxx index 671c27713c293..23f3f3a21c32f 100644 --- a/tree/treeplayer/src/TBranchProxy.cxx +++ b/tree/treeplayer/src/TBranchProxy.cxx @@ -523,9 +523,9 @@ bool ROOT::Detail::TBranchProxy::Setup() bcount?bcount->GetName():"unknown")); fMemberOffset = 0; } else if (fMemberOffset == TVirtualStreamerInfo::kMissing) { - Error("Setup","%s",Form("Missing data member in a TClonesArray, %s in %s and %s", - fDataMember.Data(), fBranch->GetName(), - bcount ? bcount->GetName() : "unknown")); + Error("Setup", "%s", + Form("Missing data member in a TClonesArray, %s in %s and %s", fDataMember.Data(), + fBranch->GetName(), bcount ? bcount->GetName() : "unknown")); fMemberOffset = 0; } @@ -545,21 +545,23 @@ bool ROOT::Detail::TBranchProxy::Setup() } if (fMemberOffset < 0) { - Error("Setup","%s",Form("Negative offset %d for %s in %s, class: %s", - fMemberOffset, fDataMember.Data(), fBranch->GetName(), fClass->GetName())); + Error("Setup", "%s", + Form("Negative offset %d for %s in %s, class: %s", fMemberOffset, fDataMember.Data(), + fBranch->GetName(), fClass->GetName())); fMemberOffset = 0; } else if (fMemberOffset == TVirtualStreamerInfo::kMissing) { - Error("Setup","%s",Form("Missing data member %s in %s, class: %s", - fDataMember.Data(), fBranch->GetName(), fClass->GetName())); + Error("Setup", "%s", + Form("Missing data member %s in %s, class: %s", fDataMember.Data(), fBranch->GetName(), + fClass->GetName())); fMemberOffset = 0; } // The extra condition (fElement is not a TStreamerSTL) is to handle the case where fBranch is a // TBranchElement and fElement is a TStreamerSTL. Without the extra condition we get an error // message, although the vector (i.e. the TBranchElement) is accessible. - } else if (fParent && fBranch->IsA() != TBranch::Class() && fElement->IsA() != TStreamerBasicType::Class() - && fElement->IsA() != TStreamerSTL::Class()) { - Error("Setup","%s",Form("Missing TClass object for %s",fClassName.Data())); + } else if (fParent && fBranch->IsA() != TBranch::Class() && fElement->IsA() != TStreamerBasicType::Class() && + fElement->IsA() != TStreamerSTL::Class()) { + Error("Setup", "%s", Form("Missing TClass object for %s", fClassName.Data())); } if ( fBranch->IsA()==TBranchElement::Class()