|
ATLAS Offline Software
|
Go to the documentation of this file.
11 #include "nlohmann/json.hpp"
12 #include "CoralBase/Blob.h"
25 return StatusCode::SUCCESS;
34 return StatusCode::SUCCESS;
37 bool validTimeStamp = (ctx.eventID().time_stamp() <
m_dbBeginTimestamp) ?
false :
true;
38 if (
m_isMC) validTimeStamp =
false;
42 bool useDBparams = (!anyKeyEmpty && validTimeStamp);
45 std::unique_ptr<gFEXDBCondData> writeDBTool(std::make_unique<gFEXDBCondData>() );
51 std::vector<std::string> myStringsNoise;
52 myStringsNoise = {
"Aslopes",
"Bslopes",
"Cslopes",
"AnoiseCuts",
"BnoiseCuts",
"CnoiseCuts"};
54 if (load_gFexNoiseCut.isValid()) {
58 for (
auto itr = load_gFexNoiseCut->begin(); itr != load_gFexNoiseCut->end(); ++itr) {
61 const std::string
s((
char*)
blob.startingAddress(),
blob.size());
66 bool allitemsPresent =
true;
67 for(
const auto &
name:myStringsNoise ) {
68 allitemsPresent = allitemsPresent && attrList.contains(
name);
71 if( allitemsPresent ) {
72 writeDBTool->set_Aslopes(attrList[
"Aslopes"]);
73 writeDBTool->set_Bslopes(attrList[
"Bslopes"]);
74 writeDBTool->set_Cslopes(attrList[
"Cslopes"]);
75 writeDBTool->set_AnoiseCuts(attrList[
"AnoiseCuts"]);
76 writeDBTool->set_BnoiseCuts(attrList[
"BnoiseCuts"]);
77 writeDBTool->set_CnoiseCuts(attrList[
"CnoiseCuts"]);
86 return StatusCode::FAILURE;
104 if (writeCHandle.
record(std::move(writeDBTool)).isFailure()) {
105 ATH_MSG_ERROR(
"Could not record " << writeCHandle.
key() <<
" with EventRange " << writeCHandle.
getRange() <<
" into Conditions Store");
106 return StatusCode::FAILURE;
109 ATH_MSG_INFO(
"Recorded " << writeCHandle.
key() <<
" with EventRange " << writeCHandle.
getRange() <<
" into Conditions Store");
111 return StatusCode::SUCCESS;
const EventIDRange & getRange() const
SG::ReadCondHandleKey< CondAttrListCollection > m_GfexNoiseCutsKey
bool empty() const
Test if the key is blank.
StatusCode record(const EventIDRange &range, T *t)
record handle, with explicit range DEPRECATED
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
setScaleOne setStatusOne setSaturated int16_t
SG::WriteCondHandleKey< gFEXDBCondData > m_gFEXDBParamsKey
constexpr static std::array< int, 12 > m_BslopesDefault
An algorithm that can be simultaneously executed in multiple threads.
gFEXCondAlgo(const std::string &name, ISvcLocator *svc)
Constructors.
virtual StatusCode execute(const EventContext &) const override
::StatusCode StatusCode
StatusCode definition for legacy code.
static EventIDRange infiniteRunLB()
Produces an EventIDRange that is infinite in RunLumi and invalid in Time.
Gaudi::Property< bool > m_isMC
AthROOTErrorHandlerSvc * svc
UnsignedIntegerProperty m_dbBeginTimestamp
constexpr static std::array< int, 12 > m_CslopesDefault
const std::string & key() const
constexpr static std::array< int, 12 > m_AnoiseCutsDefault
StatusCode initialize(bool used=true)
constexpr static std::array< int, 12 > m_CnoiseCutsDefault
constexpr static std::array< int, 12 > m_BnoiseCutsDefault
constexpr static std::array< int, 12 > m_AslopesDefault
virtual StatusCode initialize() override
void addDependency(const EventIDRange &range)