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;
66 if (obj !=
nullptr)
ATH_MSG_WARNING( obj->GetName() <<
" is not null, yet we are now attempting to initialize from " << rootFileName );
67 std::unique_ptr<TFile>
F =
getFile(rootFileName);
68 if(!
F ||
F->IsZombie()) {
70 return StatusCode::FAILURE;
73 F->GetObject(objName.data(), tempObj);
74 if(tempObj==
nullptr) {
75 ATH_MSG_ERROR(
"Could not retrieve " << objName <<
" from file " << rootFileName );
76 return StatusCode::FAILURE;
78 obj = std::unique_ptr<T>(
static_cast<T*
>(tempObj->Clone()));
82 return StatusCode::SUCCESS;
#define ATH_MSG_WARNING(x)
Class to wrap a set of SystematicVariations.