|
ATLAS Offline Software
|
Go to the documentation of this file.
10 #include "THashList.h"
12 #include <sys/types.h>
20 std::string full_path;
32 #ifndef XAOD_STANDALONE
33 bool configPathDeclared =
false;
34 for (Gaudi::Details::PropertyBase* property : getProperties())
36 if (property->name() ==
"ConfigPath")
38 configPathDeclared =
true;
42 if (!configPathDeclared)
43 #elif defined(XAOD_STANDALONE)
44 PropertyMgr::PropMap_t property_map = getPropertyMgr()->getProperties();
45 if (property_map.find(
"ConfigPath") == property_map.end())
47 # error "What environment are we in?!?"
48 #endif // XAOD_STANDALONE
50 ATH_MSG_INFO(
"No config file path property declared yet, this is not recommended");
51 return StatusCode::SUCCESS;
55 const std::string* config_file_path_property;
58 config_file_path_property = getProperty<std::string>(
"ConfigPath");
59 std::string config_file_path =
find_file(*config_file_path_property);
63 THashList* lList =
env.GetTable();
64 for( Int_t
i = 0; lList &&
i < lList->GetEntries(); ++
i )
68 #ifndef XAOD_STANDALONE
70 const std::type_info*
type =
getProperty(lList->At(
i )->GetName()).type_info();
73 if (*
type ==
typeid(
bool))
74 sc = this->setProperty(lList->At(
i )->GetName(),
75 bool(
env.GetValue(lList->At(
i )->GetName(),
bool(
true))));
76 else if (*
type ==
typeid(
int))
77 sc = this->setProperty(lList->At(
i )->GetName(),
78 env.GetValue(lList->At(
i )->GetName(),
int(0)));
79 else if (*
type ==
typeid(
float))
80 sc = this->setProperty(lList->At(
i )->GetName(),
81 env.GetValue(lList->At(
i )->GetName(),
float(0)));
82 else if (*
type ==
typeid(
double))
83 sc = this->setProperty(lList->At(
i )->GetName(),
84 env.GetValue(lList->At(
i )->GetName(),
double(0)));
85 else if (*
type ==
typeid(std::string))
86 sc = this->setProperty(lList->At(
i )->GetName(),
87 env.GetValue(lList->At(
i )->GetName(),
""));
93 sc = this->setProperty(lList->At(
i )->GetName(),
94 bool(
env.GetValue(lList->At(
i )->GetName(),
bool(
true))));
96 sc = this->setProperty(lList->At(
i )->GetName(),
97 env.GetValue(lList->At(
i )->GetName(),
int(0)));
99 sc = this->setProperty(lList->At(
i )->GetName(),
100 env.GetValue(lList->At(
i )->GetName(),
float(0)));
102 sc = this->setProperty(lList->At(
i )->GetName(),
103 env.GetValue(lList->At(
i )->GetName(),
double(0)));
105 sc = this->setProperty(lList->At(
i )->GetName(),
106 env.GetValue(lList->At(
i )->GetName(),
""));
107 #endif // XAOD_STANDALONE
110 #ifndef XAOD_STANDALONE
111 ATH_MSG_FATAL(
"there was a problem to find the correct type enum: "<<
type->name());
114 #endif // XAOD_STANDALONE
115 return StatusCode::FAILURE;
117 if (!
sc.isSuccess()) {
118 ATH_MSG_FATAL(
"failed to set property: " << lList->At(
i )->GetName());
119 return StatusCode::FAILURE;
122 return StatusCode::SUCCESS;
130 return StatusCode::SUCCESS;
134 return StatusCode::SUCCESS;
140 return StatusCode::FAILURE;
146 return StatusCode::FAILURE;
151 return StatusCode::FAILURE;
157 return StatusCode::FAILURE;
162 return StatusCode::FAILURE;
167 return StatusCode::FAILURE;
172 return StatusCode::FAILURE;
179 return StatusCode::FAILURE;
184 return StatusCode::FAILURE;
189 return StatusCode::FAILURE;
194 return StatusCode::FAILURE;
199 return StatusCode::FAILURE;
203 return StatusCode::SUCCESS;
207 return StatusCode::SUCCESS;
Type
Property type enumeration.
::StatusCode StatusCode
StatusCode definition for legacy code.
Class describing a tau jet.
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
CaloCellContainer that can accept const cell pointers.