Skip to content
Snippets Groups Projects
Commit 2adb2afa authored by Johannes Junggeburth's avatar Johannes Junggeburth :dog2:
Browse files

Merge branch 'master' of ssh://gitlab.cern.ch:7999/jojungge/athena into large_d0_muons

parents eb6d8151 f58c75cf
No related branches found
No related tags found
6 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,!36175Add muons built from large d0 tracking.
Showing
with 133 additions and 182 deletions
......@@ -2,7 +2,6 @@
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
// $Id: CaloRunClusterCorrections.cxx,v 1.7 2009-05-20 20:48:52 ssnyder Exp $
/**
* @file CaloRunClusterCorrections.cxx
* @author scott snyder <snyder@bnl.gov>
......@@ -24,7 +23,6 @@
#include "AthenaKernel/getMessageSvc.h"
#include "Gaudi/Property.h"
#include "GaudiKernel/MsgStream.h"
#include "GaudiKernel/IJobOptionsSvc.h"
#include "GaudiKernel/IToolSvc.h"
#include <set>
......@@ -247,16 +245,9 @@ StatusCode CaloRunClusterCorrections::parseCorrspecs ATLAS_NOT_THREAD_SAFE ()
// We don't want the tool itself to register a callback; we'll
// do that ourselves and forward callbacks as appropriate.
if (!tool.sgkey.empty()) {
CHECK( m_jos->addPropertyToCatalogue (fullname,
StringProperty ("detStoreKey",
tool.sgkey)) );
CHECK( m_jos->addPropertyToCatalogue (fullname,
BooleanProperty ("useCallback",
false)) );
CHECK( m_jos->addPropertyToCatalogue (fullname,
StringProperty ("COOLFolder",
m_folderName)) );
m_jos->set (fullname + ".detStoreKey", tool.sgkey);
m_jos->set (fullname + ".useCallback", Gaudi::Utils::toString(false));
m_jos->set (fullname + ".COOLFolder", m_folderName);
}
++ispec;
......@@ -270,9 +261,7 @@ StatusCode CaloRunClusterCorrections::parseCorrspecs ATLAS_NOT_THREAD_SAFE ()
tool.prefix = m_corrspecs[ispec++];
tool.resolved_prefix = tool.prefix;
if (!tool.prefix.empty())
CHECK( m_jos->addPropertyToCatalogue (fullname,
StringProperty ("prefix",
tool.prefix)) );
m_jos->set (fullname + ".prefix", tool.prefix);
// -- Put properties in the JO service.
while (ispec < m_corrspecs.size()) {
......@@ -286,9 +275,7 @@ StatusCode CaloRunClusterCorrections::parseCorrspecs ATLAS_NOT_THREAD_SAFE ()
return StatusCode::FAILURE;
}
CHECK( m_jos->addPropertyToCatalogue (fullname,
StringProperty (key,
m_corrspecs[ispec++])) );
m_jos->set (fullname + "." + key, m_corrspecs[ispec++]);
}
// Done with this tool.
......@@ -299,8 +286,7 @@ StatusCode CaloRunClusterCorrections::parseCorrspecs ATLAS_NOT_THREAD_SAFE ()
// We don't need the property value any more, and it can be pretty long.
// Clear it out to reclaim memory.
if (!m_noClearProps) {
CHECK( m_jos->addPropertyToCatalogue (this->name(),
StringProperty ("CorrSpecs", "")) );
m_jos->set (this->name() + ".CorrSpecs", "");
}
m_corrspecs.clear();
......@@ -739,8 +725,7 @@ StatusCode CaloRunClusterCorrections::fixPrefix ATLAS_NOT_THREAD_SAFE (Tool& too
// Set the prefix.
std::string fullname = this->name() + "." + tool.name;
CHECK( m_jos->addPropertyToCatalogue (fullname,
StringProperty ("prefix", prefix)) );
m_jos->set (fullname + ".prefix", prefix);
tool.resolved_prefix = prefix;
return StatusCode::SUCCESS;
......@@ -769,17 +754,8 @@ CaloRunClusterCorrections::orderCorrections ATLAS_NOT_THREAD_SAFE (bool allowMis
}
else if (tool.sgkey.empty()) {
// Tool is being initialized from JO. Find the order property from JOS.
tool.order = -1;
std::string fullname = this->name() + "." + tool.name;
const std::vector<const Gaudi::Details::PropertyBase*>* props =
m_jos->getProperties (fullname);
for (size_t iprop = 0; iprop < props->size(); iprop++) {
const Gaudi::Details::PropertyBase& prop = *(*props)[iprop];
if (prop.name() == "order") {
tool.order = std::atoi (prop.toString().c_str());
break;
}
}
const std::string fullname = this->name() + "." + tool.name;
tool.order = std::stoi(m_jos->get(fullname + ".order", "-1"));
// It's an error if it wasn't set.
if (tool.order == -1) {
......
......@@ -4,7 +4,6 @@
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
// $Id: CaloRunClusterCorrections.h,v 1.4 2009-05-20 20:48:51 ssnyder Exp $
/* @file CaloRunClusterCorrections.h
* @author scott snyder <snyder@bnl.gov>
* @date Apr, 2009
......@@ -21,15 +20,13 @@
#include "CaloInterface/ISetCaloCellContainerName.h"
#include "StoreGate/DataHandle.h"
#include "AthenaKernel/IOVSvcDefs.h"
//#include "GaudiKernel/ServiceHandle.h"
#include <vector>
#include <string>
#include <set>
//#include "AthenaPoolUtilities/CondAttrListCollection.h"
#include "Gaudi/Interfaces/IOptionsSvc.h"
#include "GaudiKernel/ToolHandle.h"
#include "CaloRec/Blob2ToolConstants.h"
#include "GaudiKernel/IJobOptionsSvc.h"
#include "CaloConditions/CaloAffectedRegionInfoVec.h"
#include "TileConditions/TileBadChannels.h"
......@@ -362,7 +359,7 @@ private:
bool m_noClearProps;
/// The job options service.
ServiceHandle<IJobOptionsSvc> m_jos;
ServiceHandle<Gaudi::Interfaces::IOptionsSvc> m_jos;
/// The tool service.
ServiceHandle<IToolSvc> m_toolsvc;
......
Calorimeter/CaloSimEvent
......@@ -9,13 +9,6 @@ find_package( gdb )
find_package( gperftools )
find_package( libunwind )
# Skip building the package if an external is not available.
if( ( NOT Boost_FOUND ) OR ( NOT GDB_FOUND ) OR
( NOT GPERFTOOLS_FOUND ) OR ( NOT LIBUNWIND_FOUND ) )
message( WARNING "Not all externals available, not building AthenaAuditors." )
return()
endif()
# Component(s) in the package:
atlas_add_component( AthenaAuditors
src/*.h src/*.cxx src/components/*.cxx
......
......@@ -32,10 +32,20 @@ public: // Non-static members
virtual StatusCode metaDataStop() = 0;
/// Gaudi boilerplate
static const InterfaceID& interfaceID();
private: // Data
static const InterfaceID& interfaceID();
};
/** @class ILockableTool
* @brief This class provides the locking interface that MetaData tools can implement.
MetaDataSvc will use these methods when writing out MetaData
**/
class ILockableTool {
public:
virtual void lock_shared() const = 0;
virtual void unlock_shared() const = 0;
};
inline const InterfaceID& IMetaDataTool::interfaceID() {
static const InterfaceID IID("IMetaDataTool", 1, 0);
return(IID);
......
......@@ -418,6 +418,9 @@ void AthenaOutputStream::writeMetaData(const std::string outputFN)
if( m_metaDataSvc->prepareOutput(outputFN).isFailure() ) {
throw GaudiException("Failed on MetaDataSvc prepareOutput", name(), StatusCode::FAILURE);
}
// lock all metadata to prevent updates during writing
MetaDataSvc::ToolLockGuard tool_guard( *m_metaDataSvc );
// Always force a final commit in stop - mainly applies to AthenaPool
if (m_writeOnFinalize) {
if (write().isFailure()) { // true mean write AND commit
......
......@@ -581,6 +581,7 @@ StatusCode MetaDataSvc::initInputMetaDataStore(const std::string& fileName) {
}
for (SG::TransientAddress* tad : tList) {
CLID clid = tad->clID();
ATH_MSG_VERBOSE("initInputMetaDataStore: add proxy for clid = " << clid << ", key = " << tad->name());
if (m_inputDataStore->contains(tad->clID(), tad->name())) {
ATH_MSG_DEBUG("initInputMetaDataStore: MetaData Store already contains clid = " << clid << ", key = " << tad->name());
} else {
......@@ -620,3 +621,23 @@ CLID MetaDataSvc::remapMetaContCLID( const CLID& item_id ) const
}
return item_id;
}
void MetaDataSvc::lockTools() const
{
ATH_MSG_DEBUG("Locking metadata tools");
for(auto tool : m_metaDataTools ) {
ILockableTool *lockable = dynamic_cast<ILockableTool*>( tool.get() );
if( lockable ) lockable->lock_shared();
}
}
void MetaDataSvc::unlockTools() const
{
ATH_MSG_DEBUG("Unlocking metadata tools");
for(auto tool : m_metaDataTools ) {
ILockableTool *lockable = dynamic_cast<ILockableTool*>( tool.get() );
if( lockable ) lockable->unlock_shared();
}
}
......@@ -113,6 +113,19 @@ public: // Non-static members
CLID remapMetaContCLID( const CLID& item_id ) const;
class ToolLockGuard {
public:
ToolLockGuard(const MetaDataSvc& mds) : m_mds(mds) { m_mds.lockTools(); }
~ToolLockGuard() { m_mds.unlockTools(); }
ToolLockGuard(const ToolLockGuard&) = delete;
void operator=(const ToolLockGuard&) = delete;
private:
const MetaDataSvc& m_mds;
};
void lockTools() const;
void unlockTools() const;
private:
/// Add proxy to input metadata store - can be called directly or via BeginInputFile incident
StatusCode addProxyToInputMetaDataStore(const std::string& tokenStr);
......@@ -139,8 +152,9 @@ private: // data
private: // properties
/// MetaDataContainer, POOL container name for MetaData.
StringProperty m_metaDataCont;
/// MetaDataTools, vector with the MetaData tools.
/// MetaDataTools, vector with the MetaData tools
ToolHandleArray<IMetaDataTool> m_metaDataTools;
};
#endif
......@@ -12,9 +12,9 @@ def setup():
# make sure that 3rd party libraries can see Hephaestus symbols by letting
# python load the memory tracker in "broadcast" mode
import DLFCN, sys
import sys
dlflags = sys.getdlopenflags()
sys.setdlopenflags( DLFCN.RTLD_GLOBAL | DLFCN.RTLD_NOW )
sys.setdlopenflags( os.RTLD_GLOBAL | os.RTLD_NOW )
import MemoryTracker
sys.setdlopenflags( dlflags )
......
......@@ -1137,7 +1137,13 @@ static PyMethodDef gFreeStatisticsMethods[] = {
PyObject* initMemoryTrace();
PyObject* initDoubleDeleteChecker();
void initMemoryTracker() {
#if PY_MAJOR_VERSION >= 3
PyObject *
PyInit_MemoryTracker(void)
#else
void initMemoryTracker()
#endif
{
PyObject *memtrack;
PyObject *chkpoints, *freestat;
PyObject *ddcheck, *memtrace;
......@@ -1213,4 +1219,8 @@ void initMemoryTracker() {
/* double delete checker functionality */
ddcheck = initDoubleDeleteChecker();
PyModule_AddObject( memtrack, (char*)"DeleteChecker", ddcheck );
#if PY_MAJOR_VERSION >= 3
return memtrack;
#endif
}
......@@ -6,12 +6,6 @@ atlas_subdir( PerfMonGPerfTools )
# External dependencies:
find_package( gperftools COMPONENTS profiler )
# Don't build the package if GPerfTools is not available.
if( NOT GPERFTOOLS_FOUND )
message( WARNING "GPerfTools not available. Not building PerfMonGPerfTools." )
return()
endif()
# Component(s) in the package:
atlas_add_component( PerfMonGPerfTools
src/*.cxx
......@@ -23,4 +17,3 @@ atlas_add_component( PerfMonGPerfTools
atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
atlas_install_joboptions( share/*.py )
atlas_install_scripts( scripts/*.py scripts/gathena )
################################################################################
# Package: AtlasSealCLHEP
################################################################################
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( AtlasSealCLHEP )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Database/AthenaPOOL/AthenaPoolServices )
# External dependencies:
find_package( CLHEP )
find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
# Component(s) in the package:
atlas_add_library( AtlasSealCLHEP
src/OldCLHEPStreamers.cxx
PUBLIC_HEADERS AtlasSealCLHEP
INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
DEFINITIONS ${CLHEP_DEFINITIONS}
LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaPoolServicesLib
PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} )
LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaPoolServicesLib )
atlas_add_dictionary( AtlasSealCLHEPDict
AtlasSealCLHEP/AtlasSealCLHEPDict.h
AtlasSealCLHEP/selection.xml
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasSealCLHEP )
LINK_LIBRARIES AtlasSealCLHEP )
# Install files from the package:
atlas_install_python_modules( python/*.py )
......@@ -36,6 +26,4 @@ atlas_install_joboptions( share/*.py )
atlas_add_test( OldCLHEPStreamers_test
SOURCES
test/OldCLHEPStreamers_test.cxx
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasSealCLHEP )
LINK_LIBRARIES AtlasSealCLHEP )
################################################################################
# Package: CondDBObjects
################################################################################
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( CondDBObjects )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Control/AthenaKernel
GaudiKernel )
# Component(s) in the package:
atlas_add_library( CondDBObjects
src/*.cxx
PUBLIC_HEADERS CondDBObjects
LINK_LIBRARIES GaudiKernel )
LINK_LIBRARIES AthenaKernel GaudiKernel )
################################################################################
# Package: DBReplicaSvc
################################################################################
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( DBReplicaSvc )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
GaudiKernel
PRIVATE
Control/AthenaBaseComps
Tools/PathResolver )
# External dependencies:
find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
atlas_add_library( DBReplicaSvcLib
INTERFACE
PUBLIC_HEADERS DBReplicaSvc
INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
LINK_LIBRARIES GaudiKernel )
# Component(s) in the package:
atlas_add_component( DBReplicaSvc
src/DBReplicaSvc.cxx
src/components/*.cxx
INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
LINK_LIBRARIES ${CORAL_LIBRARIES} GaudiKernel AthenaBaseComps PathResolver )
LINK_LIBRARIES AthenaBaseComps DBReplicaSvcLib PathResolver )
################################################################################
# Package: CoolConvUtilities
################################################################################
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( CoolConvUtilities )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PRIVATE
Database/APR/FileCatalog
Database/APR/PersistencySvc
Database/CoraCool )
# External dependencies:
find_package( COOL COMPONENTS CoolKernel CoolApplication )
find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
......
################################################################################
# Package: CoolLumiUtilities
################################################################################
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( CoolLumiUtilities )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Control/AthenaBaseComps
Control/AthenaKernel
Control/StoreGate
GaudiKernel
PRIVATE
AtlasTest/TestTools
Database/AthenaPOOL/AthenaPoolUtilities )
# External dependencies:
find_package( COOL COMPONENTS CoolKernel )
find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
# Component(s) in the package:
atlas_add_library( CoolLumiUtilitiesLib
src/*.cxx
PUBLIC_HEADERS CoolLumiUtilities
INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} AthenaBaseComps AthenaKernel GaudiKernel StoreGateLib SGtests
PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolUtilities )
LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} AthenaBaseComps AthenaKernel AthenaPoolUtilities GaudiKernel
PRIVATE_LINK_LIBRARIES CxxUtils PersistentDataModel StoreGateLib )
atlas_add_component( CoolLumiUtilities
src/components/*.cxx
INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests GaudiKernel AthenaPoolUtilities CoolLumiUtilitiesLib )
LINK_LIBRARIES CoolLumiUtilitiesLib )
atlas_add_dictionary( CoolLumiUtilitiesDict
CoolLumiUtilities/CoolLumiUtilitiesDict.h
CoolLumiUtilities/selection.xml
INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests GaudiKernel AthenaPoolUtilities CoolLumiUtilitiesLib )
LINK_LIBRARIES CoolLumiUtilitiesLib )
# Install files from the package:
atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8})
atlas_install_scripts( share/*.py )
atlas_install_joboptions( share/*.txt )
atlas_add_test( OnlineLumiCalibrationCondData_test
SOURCES test/OnlineLumiCalibrationCondData_test.cxx
INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests GaudiKernel AthenaPoolUtilities CoolLumiUtilitiesLib TestTools )
LINK_LIBRARIES CoolLumiUtilitiesLib CxxUtils )
atlas_add_test( BunchGroupCondData_test
SOURCES test/BunchGroupCondData_test.cxx
INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests GaudiKernel AthenaPoolUtilities CoolLumiUtilitiesLib TestTools )
LINK_LIBRARIES CoolLumiUtilitiesLib )
atlas_add_test( BunchLumisCondData_test
SOURCES test/BunchLumisCondData_test.cxx
INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests GaudiKernel AthenaPoolUtilities CoolLumiUtilitiesLib TestTools )
LINK_LIBRARIES CoolLumiUtilitiesLib )
atlas_add_test( FillParamsCondData_test
SOURCES test/FillParamsCondData_test.cxx
INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests GaudiKernel AthenaPoolUtilities CoolLumiUtilitiesLib TestTools )
LINK_LIBRARIES CoolLumiUtilitiesLib )
atlas_add_test( OnlineLumiCalibrationCondAlg_test
SOURCES test/OnlineLumiCalibrationCondAlg_test.cxx
INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests GaudiKernel AthenaPoolUtilities CoolLumiUtilitiesLib TestTools )
LINK_LIBRARIES CoolLumiUtilitiesLib CxxUtils TestTools )
atlas_add_test( BunchGroupCondAlg_test
SOURCES test/BunchGroupCondAlg_test.cxx
INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests GaudiKernel AthenaPoolUtilities CoolLumiUtilitiesLib TestTools )
LINK_LIBRARIES CoolLumiUtilitiesLib PersistentDataModel TestTools )
atlas_add_test( BunchLumisCondAlg_test
SOURCES test/BunchLumisCondAlg_test.cxx
INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests GaudiKernel AthenaPoolUtilities CoolLumiUtilitiesLib TestTools )
LINK_LIBRARIES CoolLumiUtilitiesLib CxxUtils PersistentDataModel TestTools )
atlas_add_test( FillParamsCondAlg_test
SOURCES test/FillParamsCondAlg_test.cxx
INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests GaudiKernel AthenaPoolUtilities CoolLumiUtilitiesLib TestTools )
LINK_LIBRARIES CoolLumiUtilitiesLib PersistentDataModel TestTools )
atlas_add_test( OnlineLumiCalibrationCondAlgConfig_test
SCRIPT python -m CoolLumiUtilities.OnlineLumiCalibrationCondAlgConfig
LOG_SELECT_PATTERN "ComponentAccumulator|^---|^IOVDbSvc" )
LOG_SELECT_PATTERN "ComponentAccumulator|^---|^IOVDbSvc" )
atlas_add_test( FillParamsCondAlgConfig_test
SCRIPT python -m CoolLumiUtilities.FillParamsCondAlgConfig
......
################################################################################
# Package: EventIndexProducer
################################################################################
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( EventIndexProducer )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Tools/PyJobTransforms
Tools/PyJobTransformsCore )
# Install files from the package:
atlas_install_python_modules( python/*.py )
atlas_install_joboptions( share/*.py )
......
################################################################################
# Package: FileStager
################################################################################
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( FileStager )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
GaudiKernel )
# External dependencies:
find_package( ROOT COMPONENTS Hist Tree RIO Cint Core MathCore pthread MathMore Minuit Minuit2 Matrix Physics HistPainter Rint )
find_package( Boost )
# tag ROOTBasicLibs was not recognized in automatic conversion in cmt2cmake
# tag ROOTSTLDictLibs was not recognized in automatic conversion in cmt2cmake
find_package( ROOT COMPONENTS Hist Tree RIO Core )
# Component(s) in the package:
atlas_add_root_dictionary( FileStagerLib
......@@ -28,18 +17,16 @@ atlas_add_library( FileStagerLib
src/*.cxx
${FileStagerLibDictSource}
PUBLIC_HEADERS FileStager
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel )
atlas_add_component( FileStager
src/components/*.cxx
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel FileStagerLib )
LINK_LIBRARIES FileStagerLib )
atlas_add_executable( StageMonitor
bin/StageMonitor.cxx
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel FileStagerLib )
LINK_LIBRARIES FileStagerLib )
# Install files from the package:
atlas_install_python_modules( python/*.py )
......
......@@ -18,11 +18,12 @@
# define IOVDBMETADATATOOL_IIOVDBMETADATATOOL_H
// Gaudi
#include "GaudiKernel/IAlgTool.h"
#include "AthenaKernel/IMetaDataTool.h"
#include <string>
//<<<<<< CLASS DECLARATIONS >>>>>>
class CondAttrListCollection;
class IOVMetaDataContainer;
/**
** @class IIOVDbMetaDataTool
......@@ -38,10 +39,11 @@ class CondAttrListCollection;
** - EndEvent:<pre> End event number</pre>
**/
class IIOVDbMetaDataTool : virtual public IAlgTool
class IIOVDbMetaDataTool : virtual public IMetaDataTool,
virtual public ILockableTool
{
public:
public:
/// Retrieve interface ID
static const InterfaceID& interfaceID() {
......@@ -69,6 +71,7 @@ public:
/// occurs before BeginInputFile incident.
virtual StatusCode processInputFileMetaData(const std::string& fileName) = 0;
virtual IOVMetaDataContainer* findMetaDataContainer(const std::string& folderName) const = 0;
};
......
......@@ -231,10 +231,12 @@ StatusCode
IOVDbMetaDataTool::registerFolder(const std::string& folderName,
const std::string& folderDescription) const
{
// lock the tool before getMetaDataContainer() call
std::scoped_lock guard( m_mutex );
ATH_MSG_DEBUG("begin registerFolder ");
IOVMetaDataContainer* cont = getMetaDataContainer(folderName, folderDescription);
if (!cont) {
if( ! getMetaDataContainer(folderName, folderDescription) ) {
ATH_MSG_ERROR("Unable to register folder " << folderName);
return(StatusCode::FAILURE);
}
......@@ -250,6 +252,9 @@ IOVDbMetaDataTool::registerFolder(const std::string& folderName,
StatusCode IOVDbMetaDataTool::addPayload (const std::string& folderName
, CondAttrListCollection* payload) const
{
// lock the tool while it is modifying the folder
std::scoped_lock guard( m_mutex );
ATH_MSG_DEBUG("begin addPayload ");
// Check if the folder has already been found
......@@ -302,6 +307,7 @@ StatusCode
IOVDbMetaDataTool::modifyPayload ATLAS_NOT_THREAD_SAFE (const std::string& folderName,
CondAttrListCollection*& coll) const
{
// protected by lock in processInputFileMetaData()
/// Modify a Payload for a particular folder - replaces one of the
/// internal attributes
......@@ -384,10 +390,20 @@ IOVDbMetaDataTool::modifyPayload ATLAS_NOT_THREAD_SAFE (const std::string& fold
//--------------------------------------------------------------------------
IOVMetaDataContainer*
IOVDbMetaDataTool::findMetaDataContainer(const std::string& folderName) const
{
// lock the tool before this call
// Return the folder if it is in the meta data store
return m_metaDataStore->tryRetrieve<IOVMetaDataContainer>(folderName);
}
IOVMetaDataContainer*
IOVDbMetaDataTool::getMetaDataContainer(const std::string& folderName
, const std::string& folderDescription) const
{
// protected by locks in addPayload() and registerFolder()
ATH_MSG_DEBUG("begin getMetaDataContainer ");
IOVMetaDataContainer* cont{nullptr};
......@@ -419,6 +435,9 @@ IOVDbMetaDataTool::getMetaDataContainer(const std::string& folderName
StatusCode IOVDbMetaDataTool::processInputFileMetaData(const std::string& fileName)
{
// lock the tool while it is processing input metadata
std::scoped_lock guard( m_mutex );
ATH_MSG_DEBUG("processInputFileMetaData: file name " << fileName);
// Retrieve all meta data containers from InputMetaDataStore
......
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