6#ifndef INDETTRACKSYSTEMATICSTOOLS_INDETTRACKSYSTEMATICSTOOL_H
7#define INDETTRACKSYSTEMATICSTOOLS_INDETTRACKSYSTEMATICSTOOL_H
45 std::unique_ptr<TFile>
getFile(
const std::string& )
const;
48 template <
class T> StatusCode
initObject(std::unique_ptr<T>& obj,
const std::string& rootFileName,
const std::string& objName)
const;
56 bool isActive( TrackSystematic )
const;
79 if (obj !=
nullptr)
ATH_MSG_WARNING( obj->GetName() <<
" is not null, yet we are now attempting to initialize from " << rootFileName );
80 std::unique_ptr<TFile>
F =
getFile(rootFileName);
81 if(!
F ||
F->IsZombie()) {
83 return StatusCode::FAILURE;
86 F->GetObject(objName.data(), tempObj);
87 if(tempObj==
nullptr) {
88 ATH_MSG_ERROR(
"Could not retrieve " << objName <<
" from file " << rootFileName );
89 return StatusCode::FAILURE;
91 obj = std::unique_ptr<T>(
static_cast<T*
>(tempObj->Clone()));
95 return StatusCode::SUCCESS;
#define ATH_MSG_WARNING(x)
Class to wrap a set of SystematicVariations.