Skip to content
Snippets Groups Projects
Commit 164d0958 authored by Marcin Nowak's avatar Marcin Nowak :radioactive: Committed by Walter Lampl
Browse files

Remove TagInfo object from the DetectorStore

parent 9bfc72cc
No related branches found
No related tags found
No related merge requests found
Showing
with 485 additions and 1183 deletions
TagInfoMgr DEBUG initialize()
TagInfoMgr DEBUG OverrideEventInfoTags 'OverrideEventInfoTags':True
TagInfoMgr DEBUG TagInfoKey 'TagInfoKey':'ProcessingTags'
TagInfoMgr DEBUG ExtraTagValuePairs
TagInfoMgr DEBUG Value/tag pair: AtlasRelease Athena-22.0.21
TagInfoMgr DEBUG in queryInterface()
TagInfoMgr DEBUG in queryInterface()
TagInfoMgr DEBUG in queryInterface()
......@@ -18,23 +15,21 @@ TagInfoMgr DEBUG removeTagFromInput - adding tag name to be removed: /L
TagInfoMgr DEBUG addTag - adding name/value pairs: /LAR/Identifier/OnOffIdMap LARIdentifierOnOffIdMap-012
TagInfoMgr DEBUG removeTagFromInput - adding tag name to be removed: /LAR/Identifier/OnOffIdMap
TagInfoMgr DEBUG removeTagFromInput - adding tag name to be removed: /TagInfo
TagInfoMgr DEBUG preLoadAddresses - add transient address for TagInfo to detector store
TagInfoMgr DEBUG preLoadAddresses - Found CLID: 61780915 key from ioa ProcessingTags
TagInfoMgr DEBUG in queryInterface()
TagInfoMgr DEBUG matched ITagInfoMgr
TagInfoMgr DEBUG adding IOV callback object to DetStore
TagInfoMgr DEBUG Registered IOV callback for TagInfo changes
TagInfoMgr DEBUG in queryInterface()
TagInfoMgr DEBUG matched ITagInfoMgr
TagInfoMgr DEBUG start()
TagInfoMgr DEBUG Registered checkTagInfo callback for /TagInfo
TagInfoMgr DEBUG handle: entering handle(), incidence type BeginInputFile from EventSelector
TagInfoMgr DEBUG handle: entering handle(), incidence type BeginRun from AthenaEventLoopMgr
TagInfoMgr DEBUG handle: First BeginRun incident - Event ID: [1,1:0]
TagInfoMgr DEBUG handle: BeginRun incident - Event ID: [1,1:0]
TagInfoMgr DEBUG handle: currentRun = 1
TagInfoMgr DEBUG Signaled begin run to IOVDbSvc [1,1:0]
TagInfoMgr DEBUG Retrieve tag info
TagInfoMgr DEBUG in queryInterface()
TagInfoMgr DEBUG in queryInterface()
TagInfoMgr DEBUG in queryInterface()
TagInfoMgr DEBUG createObj: get TagInfo
TagInfoMgr DEBUG createObj: Retrieved TagInfo meta data from detStore. size 1
TagInfoMgr DEBUG updateTagInfo: getting /TagInfo
TagInfoMgr DEBUG updateTagInfo: Retrieved TagInfo meta data from detStore. size 1
TagInfoMgr DEBUG fillTagInfo:
TagInfoMgr DEBUG fillTagInfo: - tags coming from COOL file meta data
TagInfoMgr DEBUG fillTagInfo: Did NOT add tag - on remove list: name/tag: /LAR/Identifier/CalibIdMap LARIdentifierCalibIdMap-012
......@@ -43,8 +38,6 @@ TagInfoMgr DEBUG fillTagInfo: Did NOT add tag - on remove list: name/ta
TagInfoMgr DEBUG fillTagInfo: Added value/tag to TagInfo as input tag /LAR/Identifier/FebRodMap LARIdentifierFebRodMap-005
TagInfoMgr DEBUG fillTagInfo: Did NOT add tag - on remove list: name/tag: /LAR/Identifier/OnOffIdMap LARIdentifierOnOffIdMap-012
TagInfoMgr DEBUG fillTagInfo: Added value/tag to TagInfo as input tag /LAR/Identifier/OnOffIdMap LARIdentifierOnOffIdMap-012
TagInfoMgr DEBUG fillTagInfo: Added name/tag to TagInfo AtlasRelease Athena-22.0.21
TagInfoMgr DEBUG fillTagInfo: Added value/tag to TagInfo as input tag AtlasRelease Athena-22.0.21
TagInfoMgr DEBUG fillTagInfo: Added name/tag to TagInfo IOVDbGlobalTag OFLCOND-SDR-BS7T-04-00
TagInfoMgr DEBUG fillTagInfo: Added value/tag to TagInfo as input tag IOVDbGlobalTag OFLCOND-SDR-BS7T-04-00
TagInfoMgr DEBUG fillTagInfo: Added name/tag to TagInfo TagA1 A1
......@@ -58,20 +51,19 @@ TagInfoMgr DEBUG TagInfo tag:
TagInfoMgr DEBUG fillTagInfo: Adding extra value/tag pair: /LAR/Identifier/CalibIdMap LARIdentifierCalibIdMap-012
TagInfoMgr DEBUG fillTagInfo: Adding extra value/tag pair: /LAR/Identifier/FebRodMap LARIdentifierFebRodMap-005
TagInfoMgr DEBUG fillTagInfo: Adding extra value/tag pair: /LAR/Identifier/OnOffIdMap LARIdentifierOnOffIdMap-012
TagInfoMgr DEBUG fillTagInfo: Adding extra value/tag pair: AtlasRelease Athena-22.0.21
TagInfoMgr DEBUG fillTagInfo: print out tags
TagInfoMgr DEBUG TagInfo tag:
TagInfoMgr DEBUG createObj: Filled TagInfo from file meta data
TagInfoMgr DEBUG updateTagInfo: Filled TagInfo from file meta data
TagInfoMgr DEBUG entering fillMetaData
TagInfoMgr DEBUG fillMetaData: Adding value/tag pairs to file meta data:
TagInfoMgr DEBUG /LAR/Identifier/CalibIdMap LARIdentifierCalibIdMap-012
TagInfoMgr DEBUG /LAR/Identifier/FebRodMap LARIdentifierFebRodMap-005
TagInfoMgr DEBUG /LAR/Identifier/OnOffIdMap LARIdentifierOnOffIdMap-012
TagInfoMgr DEBUG AtlasRelease Athena-22.0.21
TagInfoMgr DEBUG IOVDbGlobalTag OFLCOND-SDR-BS7T-04-00
TagInfoMgr DEBUG TagA1 A1
TagInfoMgr DEBUG TagB1 B1
TagInfoMgr DEBUG TagD1 D1
TagInfoMgr DEBUG IOV minRange from IOVMetaData: {[1,0] - [3,0]}
TagInfoMgr DEBUG fillMetaData: run number is in previous IOVRange: 1 {[1,0] - [3,0]}
TagInfoMgr DEBUG fillMetaData: start, stop: [1,0] [3,0]
TagInfoMgr.IOVD... DEBUG begin registerFolder
......@@ -81,16 +73,14 @@ TagInfoMgr.IOVD... DEBUG IOVMetaDataContainer for folder /TagInfo has been reg
TagInfoMgr.IOVD... DEBUG begin addPayload
TagInfoMgr.IOVD... DEBUG Retrieved IOVMetaDataContainer from MetaDataStore for folder /TagInfo
TagInfoMgr.IOVD... DEBUG Could not add new payload for folder /TagInfo (may be duplicate payload).
TagInfoMgr DEBUG createObj: Wrote TagInfo to MetaDataStore
TagInfoMgr DEBUG createObj: created new TagInfo object
TagInfoMgr DEBUG Retrieved tag info
TagInfoMgr DEBUG updateTagInfo: Wrote TagInfo to MetaDataStore
TagInfoMgr DEBUG handle: TagInfo successfully processed by IOVDbSvc to register callback
TagInfoMgr DEBUG checkTagInfo: entering checkTagInfo
TagInfoMgr DEBUG checkTagInfo: retrieved TagInfo to save its contents
TagInfoMgr DEBUG checkTagInfo: saved TagInfo contents
TagInfoMgr DEBUG checkTagInfo: reset TagInfo
TagInfoMgr DEBUG createObj: get TagInfo
TagInfoMgr DEBUG createObj: Retrieved TagInfo meta data from detStore. size 1
TagInfoMgr DEBUG updateAddress
TagInfoMgr DEBUG IOV callback
TagInfoMgr DEBUG notifyListeners (1 registered)
TagInfoMgr DEBUG checkTagInfo IOV callback
TagInfoMgr DEBUG updateTagInfo: getting /TagInfo
TagInfoMgr DEBUG updateTagInfo: Retrieved TagInfo meta data from detStore. size 1
TagInfoMgr DEBUG fillTagInfo:
TagInfoMgr DEBUG fillTagInfo: - tags coming from COOL file meta data
TagInfoMgr DEBUG fillTagInfo: Did NOT add tag - on remove list: name/tag: /LAR/Identifier/CalibIdMap LARIdentifierCalibIdMap-012
......@@ -99,8 +89,6 @@ TagInfoMgr DEBUG fillTagInfo: Did NOT add tag - on remove list: name/ta
TagInfoMgr DEBUG fillTagInfo: Added value/tag to TagInfo as input tag /LAR/Identifier/FebRodMap LARIdentifierFebRodMap-005
TagInfoMgr DEBUG fillTagInfo: Did NOT add tag - on remove list: name/tag: /LAR/Identifier/OnOffIdMap LARIdentifierOnOffIdMap-012
TagInfoMgr DEBUG fillTagInfo: Added value/tag to TagInfo as input tag /LAR/Identifier/OnOffIdMap LARIdentifierOnOffIdMap-012
TagInfoMgr DEBUG fillTagInfo: Added name/tag to TagInfo AtlasRelease Athena-22.0.21
TagInfoMgr DEBUG fillTagInfo: Added value/tag to TagInfo as input tag AtlasRelease Athena-22.0.21
TagInfoMgr DEBUG fillTagInfo: Added name/tag to TagInfo IOVDbGlobalTag OFLCOND-SDR-BS7T-04-00
TagInfoMgr DEBUG fillTagInfo: Added value/tag to TagInfo as input tag IOVDbGlobalTag OFLCOND-SDR-BS7T-04-00
TagInfoMgr DEBUG fillTagInfo: Added name/tag to TagInfo TagA1 A1
......@@ -114,16 +102,14 @@ TagInfoMgr DEBUG TagInfo tag:
TagInfoMgr DEBUG fillTagInfo: Adding extra value/tag pair: /LAR/Identifier/CalibIdMap LARIdentifierCalibIdMap-012
TagInfoMgr DEBUG fillTagInfo: Adding extra value/tag pair: /LAR/Identifier/FebRodMap LARIdentifierFebRodMap-005
TagInfoMgr DEBUG fillTagInfo: Adding extra value/tag pair: /LAR/Identifier/OnOffIdMap LARIdentifierOnOffIdMap-012
TagInfoMgr DEBUG fillTagInfo: Adding extra value/tag pair: AtlasRelease Athena-22.0.21
TagInfoMgr DEBUG fillTagInfo: print out tags
TagInfoMgr DEBUG TagInfo tag:
TagInfoMgr DEBUG createObj: Filled TagInfo from file meta data
TagInfoMgr DEBUG updateTagInfo: Filled TagInfo from file meta data
TagInfoMgr DEBUG entering fillMetaData
TagInfoMgr DEBUG fillMetaData: Adding value/tag pairs to file meta data:
TagInfoMgr DEBUG /LAR/Identifier/CalibIdMap LARIdentifierCalibIdMap-012
TagInfoMgr DEBUG /LAR/Identifier/FebRodMap LARIdentifierFebRodMap-005
TagInfoMgr DEBUG /LAR/Identifier/OnOffIdMap LARIdentifierOnOffIdMap-012
TagInfoMgr DEBUG AtlasRelease Athena-22.0.21
TagInfoMgr DEBUG IOVDbGlobalTag OFLCOND-SDR-BS7T-04-00
TagInfoMgr DEBUG TagA1 A1
TagInfoMgr DEBUG TagB1 B1
......@@ -137,19 +123,41 @@ TagInfoMgr.IOVD... DEBUG IOVMetaDataContainer for folder /TagInfo has been reg
TagInfoMgr.IOVD... DEBUG begin addPayload
TagInfoMgr.IOVD... DEBUG Retrieved IOVMetaDataContainer from MetaDataStore for folder /TagInfo
TagInfoMgr.IOVD... DEBUG Could not add new payload for folder /TagInfo (may be duplicate payload).
TagInfoMgr DEBUG createObj: Wrote TagInfo to MetaDataStore
TagInfoMgr DEBUG createObj: created new TagInfo object
TagInfoMgr DEBUG checkTagInfo: retrieved TagInfo
TagInfoMgr DEBUG updateTagInfo: Wrote TagInfo to MetaDataStore
TagInfoMgr DEBUG handle: entering handle(), incidence type BeginRun from AthenaEventLoopMgr
TagInfoMgr DEBUG handle: secondary BeginRun incident - Event ID: [2,1:85]
TagInfoMgr DEBUG handle: BeginRun incident - Event ID: [2,1:85]
TagInfoMgr DEBUG handle: currentRun = 2
TagInfoMgr DEBUG handle - BeginRun: Retrieved TagInfo meta data from detStore
TagInfoMgr DEBUG updateTagInfo: getting /TagInfo
TagInfoMgr DEBUG updateTagInfo: Retrieved TagInfo meta data from detStore. size 1
TagInfoMgr DEBUG fillTagInfo:
TagInfoMgr DEBUG fillTagInfo: - tags coming from COOL file meta data
TagInfoMgr DEBUG fillTagInfo: Did NOT add tag - on remove list: name/tag: /LAR/Identifier/CalibIdMap LARIdentifierCalibIdMap-012
TagInfoMgr DEBUG fillTagInfo: Added value/tag to TagInfo as input tag /LAR/Identifier/CalibIdMap LARIdentifierCalibIdMap-012
TagInfoMgr DEBUG fillTagInfo: Did NOT add tag - on remove list: name/tag: /LAR/Identifier/FebRodMap LARIdentifierFebRodMap-005
TagInfoMgr DEBUG fillTagInfo: Added value/tag to TagInfo as input tag /LAR/Identifier/FebRodMap LARIdentifierFebRodMap-005
TagInfoMgr DEBUG fillTagInfo: Did NOT add tag - on remove list: name/tag: /LAR/Identifier/OnOffIdMap LARIdentifierOnOffIdMap-012
TagInfoMgr DEBUG fillTagInfo: Added value/tag to TagInfo as input tag /LAR/Identifier/OnOffIdMap LARIdentifierOnOffIdMap-012
TagInfoMgr DEBUG fillTagInfo: Added name/tag to TagInfo IOVDbGlobalTag OFLCOND-SDR-BS7T-04-00
TagInfoMgr DEBUG fillTagInfo: Added value/tag to TagInfo as input tag IOVDbGlobalTag OFLCOND-SDR-BS7T-04-00
TagInfoMgr DEBUG fillTagInfo: Added name/tag to TagInfo TagA1 A1
TagInfoMgr DEBUG fillTagInfo: Added value/tag to TagInfo as input tag TagA1 A1
TagInfoMgr DEBUG fillTagInfo: Added name/tag to TagInfo TagB1 B1
TagInfoMgr DEBUG fillTagInfo: Added value/tag to TagInfo as input tag TagB1 B1
TagInfoMgr DEBUG fillTagInfo: Added name/tag to TagInfo TagD1 D1
TagInfoMgr DEBUG fillTagInfo: Added value/tag to TagInfo as input tag TagD1 D1
TagInfoMgr DEBUG fillTagInfo: print out tags before adding extra tags
TagInfoMgr DEBUG TagInfo tag:
TagInfoMgr DEBUG fillTagInfo: Adding extra value/tag pair: /LAR/Identifier/CalibIdMap LARIdentifierCalibIdMap-012
TagInfoMgr DEBUG fillTagInfo: Adding extra value/tag pair: /LAR/Identifier/FebRodMap LARIdentifierFebRodMap-005
TagInfoMgr DEBUG fillTagInfo: Adding extra value/tag pair: /LAR/Identifier/OnOffIdMap LARIdentifierOnOffIdMap-012
TagInfoMgr DEBUG fillTagInfo: print out tags
TagInfoMgr DEBUG TagInfo tag:
TagInfoMgr DEBUG updateTagInfo: Filled TagInfo from file meta data
TagInfoMgr DEBUG entering fillMetaData
TagInfoMgr DEBUG fillMetaData: Adding value/tag pairs to file meta data:
TagInfoMgr DEBUG /LAR/Identifier/CalibIdMap LARIdentifierCalibIdMap-012
TagInfoMgr DEBUG /LAR/Identifier/FebRodMap LARIdentifierFebRodMap-005
TagInfoMgr DEBUG /LAR/Identifier/OnOffIdMap LARIdentifierOnOffIdMap-012
TagInfoMgr DEBUG AtlasRelease Athena-22.0.21
TagInfoMgr DEBUG IOVDbGlobalTag OFLCOND-SDR-BS7T-04-00
TagInfoMgr DEBUG TagA1 A1
TagInfoMgr DEBUG TagB1 B1
......@@ -163,5 +171,5 @@ TagInfoMgr.IOVD... DEBUG IOVMetaDataContainer for folder /TagInfo has been reg
TagInfoMgr.IOVD... DEBUG begin addPayload
TagInfoMgr.IOVD... DEBUG Retrieved IOVMetaDataContainer from MetaDataStore for folder /TagInfo
TagInfoMgr.IOVD... DEBUG Could not add new payload for folder /TagInfo (may be duplicate payload).
TagInfoMgr DEBUG handle - BeginRun: Wrote TagInfo to MetaDataStore
TagInfoMgr DEBUG updateTagInfo: Wrote TagInfo to MetaDataStore
TagInfoMgr DEBUG finalize()
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
/**
......@@ -9,9 +9,6 @@
* geometry and conditions tags in EventInfo, checks tags on reading
*
* @author RD Schaffer <R.D.Schaffer@cern.ch>
*
* $Id: EventInfoReader.cxx,v 1.10 2007-04-07 17:48:49 schaffer Exp $
*
*/
#include "EventInfoReader.h"
......@@ -20,16 +17,13 @@
#include "EventInfo/EventInfo.h"
#include "EventInfo/EventID.h"
#include "EventInfo/EventType.h"
#include "EventInfo/TagInfo.h"
// GeoModel
#include "GeoModelInterfaces/IGeoModelSvc.h"
// Constructor with parameters:
EventInfoReader::EventInfoReader(const std::string &name,
ISvcLocator *pSvcLocator) :
AthAlgorithm(name,pSvcLocator),
m_geoModel("GeoModelSvc", name)
m_geoModel("GeoModelSvc", name),
m_tagInfoMgr("TagInfoMgr", name)
{}
// Initialize method:
......@@ -37,6 +31,7 @@ StatusCode EventInfoReader::initialize()
{
ATH_MSG_INFO( "EventInfoReader::initialize()" );
ATH_CHECK( m_geoModel.retrieve() );
ATH_CHECK( m_tagInfoMgr.retrieve() );
return StatusCode::SUCCESS;
}
......@@ -66,29 +61,13 @@ StatusCode EventInfoReader::execute()
ATH_MSG_DEBUG( name << " : " << tag );
}
// Get TagInfo and add tags
TagInfo tagInfo_local;
const TagInfo* tagInfo = 0;
// Try to get tagInfo if there, otherwise create
if (detStore()->retrieve( tagInfo ).isFailure()) {
ATH_MSG_DEBUG("No TagInfo in DetectorStore - creating one" );
tagInfo = &tagInfo_local;
}
else {
ATH_MSG_DEBUG("Retrieved TagInfo" );
}
// Dump out contents of TagInfo
ATH_MSG_DEBUG("Tags from TagInfo:" );
tagInfo->printTags(msg());
// Dump out Tags
ATH_MSG_DEBUG("Tags from TagInfoMgr:");
ATH_MSG_DEBUG( m_tagInfoMgr->dumpTagInfoToStr() );
// Print out current Release version
std::string releaseVersion;
tagInfo->findTag("AtlasRelease", releaseVersion);
ATH_MSG_DEBUG( "Found Release version from TagInfo: " << releaseVersion );
std::string releaseVersion = m_tagInfoMgr->findTag("AtlasRelease");
ATH_MSG_DEBUG("Found Release version from TagInfoMgr: " << releaseVersion);
return StatusCode::SUCCESS;
}
......
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
#ifndef SRC_EVENTINFOREADER_H
......@@ -12,9 +12,6 @@
* geometry and conditions tags in EventInfo, checks tags on reading
*
* @author RD Schaffer <R.D.Schaffer@cern.ch>
*
* $Id: EventInfoReader.h,v 1.3 2005-03-16 14:54:02 schaffer Exp $
*
*/
/**
......@@ -26,10 +23,13 @@
*/
#include "GaudiKernel/ServiceHandle.h"
#include "AthenaBaseComps/AthAlgorithm.h"
#include "EventInfoMgt/ITagInfoMgr.h"
// GeoModel
#include "GeoModelInterfaces/IGeoModelSvc.h"
class EventInfoReader : public AthAlgorithm {
public:
......@@ -65,6 +65,8 @@ private:
private:
/// Access to GeoModelSvc for tags
ServiceHandle<IGeoModelSvc> m_geoModel;
/// Access to TagInfoMgr for tags
ServiceHandle<ITagInfoMgr> m_tagInfoMgr;
};
......
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
/**
......@@ -9,9 +9,6 @@
* geometry and conditions tags in EventInfo, writes extra tags.
*
* @author RD Schaffer <R.D.Schaffer@cern.ch>
*
* $Id: EventInfoWriter.cxx,v 1.9 2009-04-29 07:49:45 schaffer Exp $
*
*/
//<<<<<< INCLUDES >>>>>>
......@@ -22,7 +19,6 @@
#include "EventInfo/EventInfo.h"
#include "EventInfo/EventID.h"
#include "EventInfo/EventType.h"
#include "EventInfo/TagInfo.h"
#include "EventInfoMgt/ITagInfoMgr.h"
// Constructor with parameters:
......@@ -116,54 +112,16 @@ StatusCode EventInfoWriter::execute()
if (m_tagInfoMgr->addTag("TagD1", "D2").isFailure()) {
ATH_MSG_WARNING("TagD1 NOT added");
}
ATH_MSG_DEBUG("execute: reset TagInfo proxy");
SG::DataProxy* tagInfoProxy =
detStore()->proxy( ClassID_traits<TagInfo>::ID() );
if (0 == tagInfoProxy) {
ATH_MSG_ERROR("execute: Unable to retrieve TagInfo object with clid/key: "
<< ClassID_traits<TagInfo>::ID());
return StatusCode::FAILURE;
}
// reset and retrieve
tagInfoProxy->reset();
const TagInfo* tagInfo = 0;
if (detStore()->retrieve( tagInfo ).isFailure() ) {
ATH_MSG_ERROR("execute: Could not retrieve TagInfo object from the detector store");
return StatusCode::FAILURE;
}
else {
ATH_MSG_DEBUG("execute: retrieved TagInfo");
}
}
// Get TagInfo and add tags
TagInfo tagInfo_local;
const TagInfo* tagInfo = 0;
// Try to get tagInfo if there, otherwise create
if (detStore()->retrieve( tagInfo ).isFailure()) {
ATH_MSG_DEBUG("No TagInfo in DetectorStore - creating one");
tagInfo = &tagInfo_local;
}
else {
ATH_MSG_DEBUG("Retrieved TagInfo");
}
// Dump out contents of TagInfo
ATH_MSG_DEBUG("Tags from TagInfo:");
// Dump out Tags
ATH_MSG_DEBUG("Tags from TagInfoMgr:");
MsgStream log(msgSvc(), name());
tagInfo->printTags(log);
m_tagInfoMgr->printTags(log);
// Print out current Release version
std::string releaseVersion;
tagInfo->findTag("AtlasRelease", releaseVersion);
ATH_MSG_DEBUG("Found Release version from TagInfo: "
<< releaseVersion);
std::string releaseVersion = m_tagInfoMgr->findTag("AtlasRelease");
ATH_MSG_DEBUG("Found Release version from TagInfoMgr: " << releaseVersion);
return StatusCode::SUCCESS;
}
......@@ -214,16 +172,4 @@ EventInfoWriter::fillTagInfo () const
}
return StatusCode::SUCCESS;
}
StatusCode
EventInfoWriter::checkTagInfo(IOVSVC_CALLBACK_ARGS)
{
// Get the messaging service, print where you are
ATH_MSG_DEBUG("EventInfoWriter::checkTagInfo - called by IOVSvc");
return (fillTagInfo());
}
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
#ifndef SRC_EVENTINFOWRITER_H
......@@ -12,9 +12,6 @@
* geometry and conditions tags in EventInfo, writes extra tags.
*
* @author RD Schaffer <R.D.Schaffer@cern.ch>
*
* $Id: EventInfoWriter.h,v 1.6 2009-04-29 07:49:45 schaffer Exp $
*
*/
/**
......@@ -28,7 +25,6 @@
//<<<<<< INCLUDES >>>>>>
#include "AthenaKernel/IOVSvcDefs.h"
#include "AthenaBaseComps/AthAlgorithm.h"
//<<<<<< PUBLIC TYPES >>>>>>
......@@ -53,9 +49,6 @@ public:
/// Algorithm finalize at end of job
virtual StatusCode finalize();
/// Callback method for TagInfo access
StatusCode checkTagInfo(IOVSVC_CALLBACK_ARGS);
///////////////////////////////////////////////////////////////////
// Private methods:
///////////////////////////////////////////////////////////////////
......
......@@ -265,6 +265,12 @@ PP="$PP"'|MetaInputLoader *INFO ( address|.*is still valid for|.*and sid)'
# Message useless for judging test success
PP="$PP"'|^FileMgr +DEBUG Successfully registered handler for tech'
# TagInfoMgr not longer a ConversionSvc
# this line is gone
PP="$PP"'|Added successfully Conversion service:TagInfoMgr'
# this line moved around
PP="$PP"'|Added successfully Conversion service:AthenaPoolCnvSvc'
########################################### END #####################################################
# Always use default ignore list
......@@ -305,6 +311,7 @@ else
fi
fi
echo "Reference log taken from: $reflog"
if [ -r $reflog ]; then
jobdiff=${joblog}-todiff
refdiff=`basename ${reflog}`-todiff
......
......@@ -996,9 +996,13 @@ IOVSvcTool::preLoadProxies() {
ATH_MSG_VERBOSE("preloading data for ("
<< dp->clID() << "/"
<< dp->name() << ")");
sc = ( dp->accessData() != nullptr ?
StatusCode::SUCCESS : StatusCode::FAILURE );
if( dp->accessData() != nullptr ) {
sc = StatusCode::SUCCESS;
} else {
sc = StatusCode::FAILURE;
ATH_MSG_ERROR("preLoading proxies: accessData() failed for " <<
dp->clID() << "/" << dp->name() << ")");
}
}
}
......
......@@ -695,7 +695,8 @@ StatusCode IOVDbSvc::processTagInfo() {
// Set GlobalTag and any folder-specific overrides if given
// dump out contents of TagInfo
ATH_MSG_DEBUG( "Tags from input TagInfo:" << std::endl << m_h_tagInfoMgr->dumpTagInfoToStr() );
ATH_MSG_DEBUG( "Tags from input TagInfo:");
if( msg().level()>=MSG::DEBUG ) m_h_tagInfoMgr->printTags(msg());
// check IOVDbSvc GlobalTag, if not already set
if (m_globalTag=="") {
......
......@@ -35,6 +35,7 @@
#include "AthenaKernel/IIOVDbSvc.h"
#include "IOVDbSvc/IIOVCondDbSvc.h"
#include "AthenaKernel/IOVTime.h"
#include "AthenaKernel/IAddressProvider.h"
#include "CoolKernel/IDatabase.h"
#include "CoolKernel/ValidityKey.h"
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
#ifndef GEOMODELINTERFACES_IGEOMODELSVC_H
......@@ -9,21 +9,15 @@
#include "GeoModelInterfaces/IGeoDbTagSvc.h"
#include "GaudiKernel/IInterface.h"
#include "GaudiKernel/StatusCode.h"
#include "AthenaKernel/IOVSvcDefs.h"
#include <string>
// Forward declarations
class IIncidentListener;
class Incident;
class IGeoModelTool;
class IGeoModelSvc : virtual public IInterface {
public:
/// Retrieve interface ID
static const InterfaceID& interfaceID();
static const InterfaceID& interfaceID();
virtual const std::string & atlasVersion() const =0;
virtual const std::string & inDetVersion() const =0;
......@@ -52,10 +46,6 @@ public:
virtual GeoModel::GeoConfig geoConfig() const = 0;
// Callback functions
virtual StatusCode align (IOVSVC_CALLBACK_ARGS) = 0;
virtual StatusCode compareTags (IOVSVC_CALLBACK_ARGS) = 0;
// Access to subsystem tool for callback registration
virtual const IGeoModelTool* getTool(std::string toolName) const = 0;
......
......@@ -17,7 +17,7 @@ atlas_add_component( GeoModelSvc
src/RDBMaterialManager.cxx
src/components/GeoModelSvc_entries.cxx
INCLUDE_DIRS ${CORAL_INCLUDE_DIRS} ${GEOMODELCORE_INCLUDE_DIRS}
LINK_LIBRARIES ${CORAL_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaBaseComps AthenaKernel SGTools StoreGateLib SGtests GeoModelUtilities EventInfo GaudiKernel RDBAccessSvcLib EventInfoMgtLib )
LINK_LIBRARIES ${CORAL_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaBaseComps AthenaKernel SGTools StoreGateLib SGtests GeoModelUtilities GaudiKernel RDBAccessSvcLib EventInfoMgtLib )
# Install files from the package:
atlas_install_joboptions( share/*.py )
......
......@@ -20,14 +20,13 @@
#include "RDBAccessSvc/IRDBRecordset.h"
#include "RDBAccessSvc/IRDBRecord.h"
#include "EventInfo/TagInfo.h"
#include "GeoModelKernel/GeoPerfUtils.h"
#include <fstream>
#include "AthenaKernel/ClassID_traits.h"
#include "SGTools/DataProxy.h"
GeoModelSvc::GeoModelSvc(const std::string& name,ISvcLocator* svc)
: AthService(name,svc),
m_detectorTools(this),
......@@ -103,13 +102,8 @@ StatusCode GeoModelSvc::initialize()
ToolHandleArray< IGeoModelTool >::iterator itPriv = m_detectorTools.begin(),
itPrivEnd = m_detectorTools.end();
// **** **** **** TagInfo **** **** ****
std::string tagInfoKey = "";
if(m_useTagInfo) {
// get the key
ATH_CHECK( m_tagInfoMgr.retrieve() );
tagInfoKey = m_tagInfoMgr->tagInfoKey();
}
// build regular geometry
......@@ -134,12 +128,6 @@ StatusCode GeoModelSvc::initialize()
}
}
else {
// _________________ Align functions NOT registered as callbacks _____________
// We want to register IGeoModelSvc::align() even if no alignment callback is registered by
// subsystem tools, such that clients like CaloTowerBuilder can simply go after IGeoModelSvc::align()
bool alignRegistered = false;
// Register align() functions for all Tools
for (; itPriv!=itPrivEnd; ++itPriv) {
IGeoModelTool* theTool = &(**itPriv);
......@@ -148,19 +136,10 @@ StatusCode GeoModelSvc::initialize()
ATH_MSG_DEBUG("IGeoModelTool::align() was not registerred on CondDB object for the tool " << theTool->name());
}
else {
if(StatusCode::SUCCESS == m_detStore->regFcn(&IGeoModelTool::align,theTool,
&IGeoModelSvc::align,dynamic_cast<IGeoModelSvc*>(this))) {
ATH_MSG_DEBUG("IGeoModelSvc::align() callback registered for the tool " << theTool->name());
alignRegistered = true;
// Set useCaloAlign flag if the successful tool is LAr
if((*itPriv).typeAndName().find("LAr")!=std::string::npos) {
m_useCaloAlign = true;
}
}
else {
ATH_MSG_DEBUG("Unable to register callback on IGeoModelSvc::align() for the tool " << theTool->name());
}
// Set useCaloAlign flag if the successful tool is LAr
if((*itPriv).typeAndName().find("LAr")!=std::string::npos) {
m_useCaloAlign = true;
}
}
}
......@@ -178,28 +157,9 @@ StatusCode GeoModelSvc::initialize()
// Register a callback on TagInfo in order to compare geometry configurations defined in job options
// to the one read from the input file
if(m_useTagInfo) {
const DataHandle<TagInfo> tagInfoH;
if(m_detStore->regFcn(&IGeoModelSvc::compareTags,dynamic_cast<IGeoModelSvc*>(this), tagInfoH, tagInfoKey) != StatusCode::SUCCESS) {
ATH_MSG_WARNING("Cannot register compareTags function for key " << tagInfoKey);
}
else {
ATH_MSG_DEBUG("Registered compareTags callback for key: " << tagInfoKey);
if(!alignRegistered) {
// There is no successfull alignment callback registration from subsystems
// Register IGeoModelSvc::align() after IGeoModelSvc::compareTags() then
if(m_detStore->regFcn(&IGeoModelSvc::compareTags,dynamic_cast<IGeoModelSvc*>(this),
&IGeoModelSvc::align,dynamic_cast<IGeoModelSvc*>(this)) == StatusCode::SUCCESS) {
ATH_MSG_DEBUG("Registered IGeoModelSvc::align() after IGeoModelSvc::compareTags()");
}
else {
ATH_MSG_WARNING("Cannot register IGeoModelSvc::align() after IGeoModelSvc::compareTags()");
}
}
}
// Fill in the contents of TagInfo
ATH_CHECK(fillTagInfo());
m_tagInfoMgr->addListener( this );
// Fill in the contents of TagInfo
ATH_CHECK(fillTagInfo());
}
}
......@@ -208,6 +168,7 @@ StatusCode GeoModelSvc::initialize()
StatusCode GeoModelSvc::finalize()
{
m_tagInfoMgr->removeListener(this);
return StatusCode::SUCCESS;
}
......@@ -374,24 +335,21 @@ StatusCode GeoModelSvc::geoInit()
return StatusCode::SUCCESS;
}
StatusCode GeoModelSvc::align(IOVSVC_CALLBACK_ARGS)
void GeoModelSvc::tagInfoUpdated()
{
ATH_MSG_DEBUG("GeoModelSvc::align() called");
return StatusCode::SUCCESS;
compareTags().ignore();
}
StatusCode GeoModelSvc::compareTags(IOVSVC_CALLBACK_ARGS)
StatusCode GeoModelSvc::compareTags()
{
bool tagsMatch = true;
ATH_MSG_DEBUG("GeoModelSvc::compareTags() callback trigerred");
// Get TagInfo and retrieve tags
const TagInfo* tagInfo = 0;
ATH_CHECK( m_detStore->retrieve(tagInfo) );
ATH_MSG_DEBUG("in compareTags()");
TagInfo::NameTagPairVec pairs;
tagInfo->getInputTags(pairs);
// Get tags from TagInfoMgr
const ITagInfoMgr::NameTagPairVec pairs = m_tagInfoMgr->getInputTags();
for( const auto& pair : pairs ) {
std::string tagPairName = pair.first;
if(tagPairName=="GeoAtlas") {
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
#ifndef GEOMODELSVC_GEOMODELSVC_H
......@@ -22,8 +22,9 @@ class ISvcLocator;
template <class TYPE> class SvcFactory;
class GeoModelSvc : public AthService, virtual public IGeoModelSvc {
class GeoModelSvc : public AthService, virtual public IGeoModelSvc,
virtual public ITagInfoMgr::Listener
{
public:
virtual StatusCode initialize();
......@@ -36,8 +37,10 @@ public:
// N.B. Don't forget to release the interface after use!!!
virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface );
virtual StatusCode align (IOVSVC_CALLBACK_ARGS);
virtual StatusCode compareTags (IOVSVC_CALLBACK_ARGS);
/// Callback from TagInfoMgr on TagInfo change
virtual void tagInfoUpdated() override final;
StatusCode compareTags();
virtual const IGeoModelTool* getTool(std::string toolName) const;
......@@ -127,3 +130,4 @@ private:
};
#endif // GEOMODELSVC_GEOMODELSVC_H
......@@ -8,19 +8,16 @@
* @file TagInfoMgr.h
*
* @brief This is a Athena service which manages detector description
* tag information. It maintains a TagInfo object in the Detector
* Store with current tag values.
* tag information. It maintains a private TagInfo object
*
* @author RD Schaffer <R.D.Schaffer@cern.ch>
*/
//<<<<<< INCLUDES >>>>>>
#include "AthenaKernel/IOVSvcDefs.h"
#include "GaudiKernel/Service.h"
#include "GaudiKernel/IIncidentListener.h"
#include "AthenaKernel/IAddressProvider.h"
class MsgStream;
//<<<<<< CLASS DECLARATIONS >>>>>>
......@@ -28,8 +25,7 @@
* @class ITagInfoMgr
*
* @brief This is a Athena service which manages detector description
* tag information. It maintains a TagInfo object in the Detector
* Store with current tag values.
* tag information. It maintains a TagInfo object with current tag values.
*
* The tags to fill the TagInfo object may come from a variety of
* sources: i.e. the tags specified by the GeoModelSvc and IOVDbSvc,
......@@ -51,14 +47,11 @@
* Some clients need to know when detector description tags change
* so that they may update their descriptions, such as the geometry
* description. The TagInfo object will change in this case. So
* clients that need to know when tags change should set up a
* callback to the TagInfo object. This is done with regFcn of the
* StoreGate service (for the DetectorStore). The method
*
* virtual std::string& tagInfoKey() = 0;
*
* provides access to the SG key of TagInfo which is needed to
* register a data handle for the callback.
* clients that need to know when tags change should register themselves
* by calling ITagInfoMgr::addListener(listener*) method.
* These clients need to implement the ITagInfoMgr::Listener interface and
* ITagInfoMgr::Listener::tagInfoUpdated() method which will be called
* when the TagInfo changes.
*
*/
class ITagInfoMgr : virtual public IInterface
......@@ -70,6 +63,21 @@ public:
typedef std::vector<NameTagPair> NameTagPairVec;
//@}
/// Listener interface class that client who want to be notified about TagInfo
/// update should implement (and then register themselves calliing addListener())
class Listener {
public:
virtual void tagInfoUpdated() = 0;
};
/// Add a Listener to the notification list for TagInfo changes
virtual void addListener(Listener* listener) = 0;
/// Remove a Listener from the notification list for TagInfo changes
virtual void removeListener(Listener* listener) = 0;
/// Retrieve interface ID
static const InterfaceID& interfaceID();
......@@ -81,20 +89,20 @@ public:
/// on the input
virtual StatusCode removeTagFromInput(const std::string& tagName) = 0;
/// Method to allow clients to access the TagInfo object key.
virtual std::string& tagInfoKey() = 0;
/// Find tag by its name, return by value - empty string if not found
virtual std::string findTag(const std::string & name) const = 0;
/// callback from IOVSvc - only used as test of callback
virtual StatusCode checkTagInfo(IOVSVC_CALLBACK_ARGS) = 0;
/// Find tag by name, return by value
virtual std::string findTag(const std::string & name) const = 0;
/// Find INPUT tag by its name, return by value - empty string if not found
virtual std::string findInputTag(const std::string& name) const = 0;
/// Return a vector with all current input tags
virtual NameTagPairVec getInputTags() const = 0;
virtual NameTagPairVec getInputTags() const = 0;
/// Dump the content of the current TagInfo to std::string for debug
virtual std::string dumpTagInfoToStr() const = 0;
virtual std::string dumpTagInfoToStr() const = 0;
/// Printout method
virtual void printTags(MsgStream& log) const = 0;
};
......
......@@ -76,18 +76,6 @@ def _loadBasicEventInfoMgt():
print ("EventInfoMgtInit: Got release version ",release)
svcMgr.TagInfoMgr.ExtraTagValuePairs = {"AtlasRelease" : release }
# Add TagInfoMgr as cnv svc
from GaudiCommonSvc.GaudiCommonSvcConf import EvtPersistencySvc
if not hasattr (svcMgr, 'EventPersistencySvc'):
svcMgr += EvtPersistencySvc( "EventPersistencySvc" )
svcMgr.EventPersistencySvc.CnvServices += [ "TagInfoMgr" ]
# Set TagInfoMgr as proxy provider
from AthenaCommon.ConfigurableDb import getConfigurable
if not hasattr (svcMgr, 'ProxyProviderSvc'):
svcMgr += getConfigurable("ProxyProviderSvc")()
svcMgr.ProxyProviderSvc.ProviderNames += [ "TagInfoMgr" ]
msg.debug( "Loading basic services for EventInfoMgt... [DONE]" )
return
......
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