Skip to content
Snippets Groups Projects
Commit ad3d3ace authored by Walter Lampl's avatar Walter Lampl
Browse files

Merge branch 'master-AthExHive-EventInfo' into 'master'

EventInfo to xAOD::EventInfo migration (II)

See merge request atlas/athena!20912
parents 0de9d15d 803dd7e8
9 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!28528Revert 63f845ae,!27054Atr20369 210,!26342Monopole: Handle fractionally charged particles,!20912EventInfo to xAOD::EventInfo migration (II)
Showing
with 59 additions and 63 deletions
......@@ -24,6 +24,13 @@ def _setupAtlasUnixGeneratorJob():
# Persistency services
svcMgr.EventPersistencySvc.CnvServices += [ "McCnvSvc" ]
# Temporarily inject the xAOD::EventInfo converter here to allow for adiabatic migration of the clients
from AthenaCommon.AlgSequence import AthSequencer
topSequence = AthSequencer("AthAlgSeq")
from xAODEventInfoCnv.xAODEventInfoCnvConf import xAODMaker__EventInfoCnvAlg
topSequence += xAODMaker__EventInfoCnvAlg()
return
## load basic services configuration at module import
......
......@@ -12,14 +12,14 @@ atlas_depends_on_subdirs( PUBLIC
Control/AthenaBaseComps
Control/CxxUtils
Control/StoreGate
Event/EventInfo
Event/xAOD/xAODEventInfo
GaudiKernel )
# Component(s) in the package:
atlas_add_component( AthExHive
src/*.cxx
src/components/*.cxx
LINK_LIBRARIES AthenaKernel AthenaBaseComps EventInfo )
LINK_LIBRARIES AthenaKernel AthenaBaseComps xAODEventInfo )
# Install files from the package:
atlas_install_headers( AthExHive )
......
......@@ -12,6 +12,9 @@ from SGComps.SGCompsConf import SGInputLoader
job += SGInputLoader(OutputLevel=INFO, ShowEventDump=False)
job.SGInputLoader.Load = [ ('EventInfo','McEventInfo') ]
from xAODEventInfoCnv.xAODEventInfoCnvConf import xAODMaker__EventInfoCnvAlg
job += xAODMaker__EventInfoCnvAlg()
from AthExHive.AthExHiveConf import *
job += HiveAlgA(OutputLevel=DEBUG,Time=20)
job += HiveAlgB(OutputLevel=DEBUG,Time=10)
......
......@@ -51,6 +51,9 @@ from SGComps.SGCompsConf import SGInputLoader
topSequence+=SGInputLoader(OutputLevel=DEBUG, ShowEventDump=False)
topSequence.SGInputLoader.Load = [ ('EventInfo','StoreGateSvc+McEventInfo') ]
from xAODEventInfoCnv.xAODEventInfoCnvConf import xAODMaker__EventInfoCnvAlg
topSequence += xAODMaker__EventInfoCnvAlg()
from AthExHive.AthExHiveConf import *
topSequence+=AlgT(OutputLevel=DEBUG)
......
......@@ -72,6 +72,9 @@ from SGComps.SGCompsConf import SGInputLoader
topSequence+=SGInputLoader(OutputLevel=INFO, ShowEventDump=False)
topSequence.SGInputLoader.Load = [ ('EventInfo','McEventInfo') ]
from xAODEventInfoCnv.xAODEventInfoCnvConf import xAODMaker__EventInfoCnvAlg
topSequence += xAODMaker__EventInfoCnvAlg()
from AthExHive.AthExHiveConf import *
topSequence+=HiveAlgR(OutputLevel=DEBUG)
topSequence+=HiveAlgA(OutputLevel=DEBUG,Time=20)
......
......@@ -3,8 +3,6 @@
*/
#include "AlgA.h"
#include "EventInfo/EventInfo.h"
#include "EventInfo/EventID.h"
#include "StoreGate/ReadHandle.h"
#include "StoreGate/WriteHandle.h"
......@@ -48,9 +46,9 @@ StatusCode AlgA::execute() {
ATH_MSG_DEBUG("execute " << name());
SG::ReadHandle<EventInfo> evt(m_evt);
ATH_MSG_INFO(" EventInfo: r: " << evt->event_ID()->run_number()
<< " e: " << evt->event_ID()->event_number()
SG::ReadHandle<xAOD::EventInfo> evt(m_evt);
ATH_MSG_INFO(" EventInfo: r: " << evt->runNumber()
<< " e: " << evt->eventNumber()
<< " evt: " << Gaudi::Hive::currentContextEvt() );
......@@ -59,7 +57,7 @@ StatusCode AlgA::execute() {
SG::WriteHandle<HiveDataObj> wh1(m_wrh1);
ATH_CHECK( wh1.record( std::make_unique<HiveDataObj>
( HiveDataObj(10000 +
evt->event_ID()->event_number()*100 +
evt->eventNumber()*100 +
i) ) )
);
ATH_MSG_INFO(" write: " << wh1.key() << " = " << wh1->val() );
......
......@@ -10,7 +10,7 @@
#include "StoreGate/ReadHandleKey.h"
#include "AthExHive/HiveDataObj.h"
#include "EventInfo/EventInfo.h"
#include "xAODEventInfo/EventInfo.h"
#include <string>
......@@ -31,7 +31,6 @@ private:
SG::WriteHandleKey<HiveDataObj> m_wrh1 {this, "Key_W1", "a1", "write key 1"};
SG::WriteHandleKey<HiveDataObj> m_wrh2 {this, "Key_W2", "a2", "write key 2"};
SG::ReadHandleKey<EventInfo> m_evt {this, "EvtInfo", "McEventInfo",
"EventInfo name"};
SG::ReadHandleKey<xAOD::EventInfo> m_evt {this, "EvtInfo", "EventInfo", "EventInfo name"};
};
#endif
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
#include "AlgC.h"
#include "StoreGate/ReadCondHandleKey.h"
#include "EventInfo/EventInfo.h"
#include "EventInfo/EventID.h"
#include "GaudiKernel/ServiceHandle.h"
#include <thread>
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
#include "AlgD.h"
#include "StoreGate/ReadHandle.h"
#include "StoreGate/ReadCondHandle.h"
#include "EventInfo/EventInfo.h"
#include "EventInfo/EventID.h"
#include "GaudiKernel/ServiceHandle.h"
#include <thread>
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
#include "AlgT.h"
#include "EventInfo/EventInfo.h"
#include "EventInfo/EventID.h"
#include "StoreGate/ReadHandle.h"
#include "StoreGate/WriteHandle.h"
......@@ -77,15 +75,15 @@ StatusCode AlgT::execute() {
ATH_MSG_DEBUG("execute " << name());
SG::ReadHandle<EventInfo> evt(m_evt);
ATH_MSG_INFO(" EventInfo: r: " << evt->event_ID()->run_number()
<< " e: " << evt->event_ID()->event_number() );
SG::ReadHandle<xAOD::EventInfo> evt(m_evt);
ATH_MSG_INFO(" EventInfo: r: " << evt->runNumber()
<< " e: " << evt->eventNumber() );
SG::WriteHandle<HiveDataObj> wh1(m_wrh1);
ATH_CHECK( wh1.record( std::make_unique<HiveDataObj>
( HiveDataObj(10000 +
evt->event_ID()->event_number()) ) )
evt->eventNumber()) ) )
);
ATH_MSG_INFO(" write: " << wh1.key() << " = " << wh1->val() );
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
#ifndef CONDALGS_ALGT_H
......@@ -11,7 +11,7 @@
#include "AthExHive/HiveDataObj.h"
#include "AthExHive/IHiveTool.h"
#include "EventInfo/EventInfo.h"
#include "xAODEventInfo/EventInfo.h"
#include "GaudiKernel/ToolHandle.h"
......@@ -32,7 +32,7 @@ public:
private:
SG::ReadHandleKey<EventInfo> m_evt{this, "EvtInfo", "McEventInfo", "EventInfo name"};
SG::ReadHandleKey<xAOD::EventInfo> m_evt{this, "EvtInfo", "EventInfo", "EventInfo name"};
SG::ReadHandleKey<HiveDataObj> m_rdh1{this,"Key_R1","","read key"};
SG::WriteHandleKey<HiveDataObj> m_wrh1{this,"Key_W1","t1","write key"};
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
#include "CondAlgX.h"
......@@ -12,9 +12,6 @@
#include "GaudiKernel/EventIDBase.h"
#include "GaudiKernel/EventIDRange.h"
#include "EventInfo/EventInfo.h"
#include "EventInfo/EventID.h"
#include <thread>
#include <chrono>
#include <memory>
......@@ -66,21 +63,21 @@ StatusCode CondAlgX::finalize() {
StatusCode CondAlgX::execute() {
ATH_MSG_DEBUG("execute " << name());
SG::ReadHandle<EventInfo> evt( m_evt );
SG::ReadHandle<xAOD::EventInfo> evt( m_evt );
if (!evt.isValid()) {
ATH_MSG_ERROR ("Could not retrieve EventInfo");
return StatusCode::FAILURE;
}
ATH_MSG_DEBUG(" EventInfo: r: " << evt->event_ID()->run_number()
<< " e: " << evt->event_ID()->event_number() );
ATH_MSG_DEBUG(" EventInfo: r: " << evt->runNumber()
<< " e: " << evt->eventNumber() );
SG::WriteCondHandle<CondDataObj> wch(m_wchk);
EventIDBase now(getContext().eventID());
if (evt->event_ID()->event_number() == 10) {
if (evt->eventNumber() == 10) {
std::this_thread::sleep_for(std::chrono::milliseconds( 500 ));
}
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
#ifndef CONDALGS_CONDALGX_H
......@@ -12,7 +12,7 @@
#include "AthExHive/CondDataObj.h"
#include "AthExHive/IASCIICondDbSvc.h"
#include "EventInfo/EventInfo.h"
#include "xAODEventInfo/EventInfo.h"
#include "GaudiKernel/ICondSvc.h"
#include <string>
......@@ -32,7 +32,7 @@ public:
private:
SG::ReadHandleKey<EventInfo> m_evt {this,"EvtInfo", "McEventInfo", "EventInfo name"};
SG::ReadHandleKey<xAOD::EventInfo> m_evt {this,"EvtInfo", "EventInfo", "EventInfo name"};
SG::WriteCondHandleKey<CondDataObj> m_wchk {this, "Key_CH", "X2", "cond handle key"};
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
#include "CondAlgY.h"
......@@ -8,9 +8,6 @@
#include "GaudiKernel/ServiceHandle.h"
#include "EventInfo/EventInfo.h"
#include "EventInfo/EventID.h"
#include <thread>
#include <chrono>
#include <memory>
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
#ifndef CONDALGS_CONDALGY_H
......@@ -12,7 +12,6 @@
#include "AthExHive/CondDataObjY.h"
#include "AthExHive/IASCIICondDbSvc.h"
#include "EventInfo/EventInfo.h"
#include "GaudiKernel/ICondSvc.h"
#include <string>
......
/*
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
#include "HiveAlgA.h"
#include "GaudiKernel/ThreadLocalContext.h"
#include "EventInfo/EventInfo.h"
#include "EventInfo/EventID.h"
#include <thread>
#include <chrono>
......@@ -39,13 +37,13 @@ StatusCode HiveAlgA::execute() {
ATH_MSG_DEBUG("execute " << name());
SG::ReadHandle<EventInfo> evt( m_evt );
SG::ReadHandle<xAOD::EventInfo> evt( m_evt );
if (!evt.isValid()) {
ATH_MSG_ERROR ("Could not retrieve EventInfo");
return StatusCode::FAILURE;
} else {
ATH_MSG_INFO(" EventInfo: r: " << evt->event_ID()->run_number()
<< " e: " << evt->event_ID()->event_number() );
ATH_MSG_INFO(" EventInfo: r: " << evt->runNumber()
<< " e: " << evt->eventNumber() );
}
sleep();
......@@ -54,7 +52,7 @@ StatusCode HiveAlgA::execute() {
SG::WriteHandle<HiveDataObj> wrh1( m_wrh1 );
wrh1 = std::make_unique< HiveDataObj >
( HiveDataObj(10000 + evt->event_ID()->event_number()*100 + i) );
( HiveDataObj(10000 + evt->eventNumber()*100 + i) );
SG::WriteHandle<HiveDataObj> wrh2( m_wrh2 );
wrh2 = std::make_unique< HiveDataObj >( HiveDataObj(10050+i) );
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
#ifndef ATHEXHIVE_ALGA_H
......@@ -10,7 +10,7 @@
#include "StoreGate/WriteHandleKey.h"
#include "AthExHive/HiveDataObj.h"
#include "EventInfo/EventInfo.h"
#include "xAODEventInfo/EventInfo.h"
#include <string>
......@@ -31,7 +31,7 @@ public:
private:
SG::ReadHandleKey<EventInfo> m_evt {this,"EvtInfo", "McEventInfo", "EventInfo name"};
SG::ReadHandleKey<xAOD::EventInfo> m_evt {this,"EvtInfo", "EventInfo", "xAOD EventInfo name"};
SG::WriteHandleKey<HiveDataObj> m_wrh1 {this, "Key_W1", "a1", "WHK 1"};
SG::WriteHandleKey<HiveDataObj> m_wrh2 {this, "Key_W2", "a2", "WHK 2"};
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
#ifdef REENTRANT_GAUDI
#include "HiveAlgR.h"
#include "GaudiKernel/ServiceHandle.h"
#include "EventInfo/EventInfo.h"
#include "EventInfo/EventID.h"
#include <thread>
#include <chrono>
......@@ -43,9 +41,9 @@ StatusCode HiveAlgR::execute(const EventContext& ctx) const {
info() << "execute_R: " << index() << " on " << ctx << endmsg;
SG::ReadHandle<EventInfo> evt(m_evt);
ATH_MSG_INFO(" EventInfo: r: " << evt->event_ID()->run_number()
<< " e: " << evt->event_ID()->event_number() );
SG::ReadHandle<xAOD::EventInfo> evt(m_evt);
ATH_MSG_INFO(" EventInfo: r: " << evt->runNumber()
<< " e: " << evt->eventNumber() );
SG::WriteHandle<HiveDataObj> wh1(m_wrh1);
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
#ifndef ATHEXHIVE_HIVEALGR_H
......@@ -10,7 +10,7 @@
#include "StoreGate/WriteHandleKey.h"
#include "StoreGate/ReadHandleKey.h"
#include "AthExHive/HiveDataObj.h"
#include "EventInfo/EventInfo.h"
#include "xAODEventInfo/EventInfo.h"
class HiveAlgR : public AthReentrantAlgorithm {
......@@ -29,7 +29,7 @@ public:
private:
SG::ReadHandleKey<EventInfo> m_evt{this, "EvtInfo", "McEventInfo", "event info key"};
SG::ReadHandleKey<xAOD::EventInfo> m_evt{this, "EvtInfo", "EventInfo", "event info key"};
SG::WriteHandleKey<HiveDataObj> m_wrh1 {this, "Key_W1", "ar1", "write handle key"};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment