diff --git a/Trigger/TrigConfiguration/TrigConfHLTData/CMakeLists.txt b/Trigger/TrigConfiguration/TrigConfHLTData/CMakeLists.txt index fc19d5e4f2384e17a95365043ea0b4c4f8cbcc3c..8b0318b6e8db3c0887b4c75544f328d93aedcb23 100644 --- a/Trigger/TrigConfiguration/TrigConfHLTData/CMakeLists.txt +++ b/Trigger/TrigConfiguration/TrigConfHLTData/CMakeLists.txt @@ -9,7 +9,7 @@ atlas_subdir( TrigConfHLTData ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC Trigger/TrigConfiguration/TrigConfL1Data - Trigger/TrigSteer/TrigCompositeUtils ) + Trigger/TrigConfiguration/TrigConfHLTUtils ) # External dependencies: find_package( Boost COMPONENTS system thread ) @@ -19,6 +19,6 @@ atlas_add_library( TrigConfHLTData TrigConfHLTData/*.h Root/*.cxx PUBLIC_HEADERS TrigConfHLTData INCLUDE_DIRS ${Boost_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} TrigConfL1Data TrigCompositeUtilsLib ) + LINK_LIBRARIES ${Boost_LIBRARIES} TrigConfL1Data TrigConfHLTUtilsLib ) atlas_install_python_modules( python/*.py ) diff --git a/Trigger/TrigConfiguration/TrigConfHLTData/TrigConfHLTData/HLTUtils.h b/Trigger/TrigConfiguration/TrigConfHLTData/TrigConfHLTData/HLTUtils.h index 071fc0824cfc52b86d33155e7d1fbd477fd67699..f7d4fb4e8890e0e790d0af758aefedfed682d69e 100644 --- a/Trigger/TrigConfiguration/TrigConfHLTData/TrigConfHLTData/HLTUtils.h +++ b/Trigger/TrigConfiguration/TrigConfHLTData/TrigConfHLTData/HLTUtils.h @@ -3,10 +3,10 @@ */ /// Hashing functions have moved here -#include "TrigCompositeUtils/HLTUtils.h" +#include "TrigConfHLTUtils/HLTUtils.h" -#ifndef TrigConf_HLTUtils -#define TrigConf_HLTUtils +#ifndef TrigConfHLTData_HLTUtils +#define TrigConfHLTData_HLTUtils #include <string> #include <inttypes.h> @@ -24,7 +24,7 @@ namespace TrigConf { class HLTFrame; /** - * @brief HLTUtils is renamed in r22 toHLTTEUtils. The hashing functionality remains in HLTUtils, which moves to the TrigCompositeUtils package + * @brief HLTUtils is renamed in r22 to HLTTEUtils. The hashing functionality remains in HLTUtils, which moves to the standalone HLTUtils package */ class HLTTEUtils { diff --git a/Trigger/TrigConfiguration/TrigConfHLTUtils/CMakeLists.txt b/Trigger/TrigConfiguration/TrigConfHLTUtils/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..7900acb1384c18de41eeac6c271535b9696abe43 --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfHLTUtils/CMakeLists.txt @@ -0,0 +1,15 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration. + +# Declare the package name. +atlas_subdir( TrigConfHLTUtils ) + +# Add the package's stand alone library +atlas_add_library( TrigConfHLTUtilsLib + TrigConfHLTUtils/*.h Root/*.cxx + PUBLIC_HEADERS TrigConfHLTUtils + LINK_LIBRARIES CxxUtils ) + +# Executable(s). +atlas_add_executable( trigconf_string2hash + util/trigconf_string2hash.cxx + LINK_LIBRARIES TrigConfHLTUtilsLib ) diff --git a/Trigger/TrigConfiguration/TrigConfHLTUtils/README.md b/Trigger/TrigConfiguration/TrigConfHLTUtils/README.md new file mode 100644 index 0000000000000000000000000000000000000000..1bf1dbbd41d2f72df6e190ed114ff16c48c58178 --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfHLTUtils/README.md @@ -0,0 +1,10 @@ +# TrigConfHLTUtils + +Package to host the `string2hash`, `hash2string`, `hashes2file` and `file2hashes` helper functions. + +In Run 2 these were hosted in the `Trigger/TriConfiguration/TrigConfHLTData` package along with Run 2 specific trigger element helper functions. + +For Run 3, the deprecated trigger element helper functions are moved under a new `HLTTEUtils` class, the hashing helper functions remain under the `HLTUtils` class and move into this package. + +This package cannot have any Gaudi dependencies. + diff --git a/Trigger/TrigSteer/TrigCompositeUtils/Root/HLTUtils.cxx b/Trigger/TrigConfiguration/TrigConfHLTUtils/Root/HLTUtils.cxx similarity index 98% rename from Trigger/TrigSteer/TrigCompositeUtils/Root/HLTUtils.cxx rename to Trigger/TrigConfiguration/TrigConfHLTUtils/Root/HLTUtils.cxx index 45ddbd7d9945f8e8aad0e63051dd539dc2dd266c..11c2109588c4f89a93e6afecca91023e2f4fdf12 100644 --- a/Trigger/TrigSteer/TrigCompositeUtils/Root/HLTUtils.cxx +++ b/Trigger/TrigConfiguration/TrigConfHLTUtils/Root/HLTUtils.cxx @@ -13,7 +13,7 @@ #include <vector> #include <fstream> -#include "TrigCompositeUtils/HLTUtils.h" +#include "TrigConfHLTUtils/HLTUtils.h" #include "CxxUtils/checker_macros.h" using namespace TrigConf; diff --git a/Trigger/TrigConfiguration/TrigConfHLTUtils/TrigConfHLTUtils/ATLAS_CHECK_THREAD_SAFETY b/Trigger/TrigConfiguration/TrigConfHLTUtils/TrigConfHLTUtils/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..838f0de3a53348c50c966a36f9272992df1246f0 --- /dev/null +++ b/Trigger/TrigConfiguration/TrigConfHLTUtils/TrigConfHLTUtils/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Trigger/TrigConfiguration/TrigConfHLTUtils diff --git a/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/HLTUtils.h b/Trigger/TrigConfiguration/TrigConfHLTUtils/TrigConfHLTUtils/HLTUtils.h similarity index 93% rename from Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/HLTUtils.h rename to Trigger/TrigConfiguration/TrigConfHLTUtils/TrigConfHLTUtils/HLTUtils.h index b7a2f3fdd2e9ea6f48b3acba8c5ccc9e38b6efbf..0bff5d721aad7ba5dc2d221612050d6103949f10 100644 --- a/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/HLTUtils.h +++ b/Trigger/TrigConfiguration/TrigConfHLTUtils/TrigConfHLTUtils/HLTUtils.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ -#ifndef TrigCompositeUtils_HLTUtils -#define TrigCompositeUtils_HLTUtils +#ifndef TrigConfHLTUtils_HLTUtils +#define TrigConfHLTUtils_HLTUtils #include <string> #include <inttypes.h> diff --git a/Trigger/TrigSteer/TrigCompositeUtils/util/trigconf_string2hash.cxx b/Trigger/TrigConfiguration/TrigConfHLTUtils/util/trigconf_string2hash.cxx similarity index 86% rename from Trigger/TrigSteer/TrigCompositeUtils/util/trigconf_string2hash.cxx rename to Trigger/TrigConfiguration/TrigConfHLTUtils/util/trigconf_string2hash.cxx index e48d0519ec8cfe6c87200e049738fb2254c753fc..47d61f034b1c0cb00af5a3a95dce3c0ff2ed6095 100644 --- a/Trigger/TrigSteer/TrigCompositeUtils/util/trigconf_string2hash.cxx +++ b/Trigger/TrigConfiguration/TrigConfHLTUtils/util/trigconf_string2hash.cxx @@ -3,7 +3,7 @@ */ #include <iostream> -#include "TrigCompositeUtils/HLTUtils.h" +#include "TrigConfHLTUtils/HLTUtils.h" int main (int argc, char *argv []) { if (argc > 1) { diff --git a/Trigger/TrigSteer/TrigCompositeUtils/CMakeLists.txt b/Trigger/TrigSteer/TrigCompositeUtils/CMakeLists.txt index b3c066388dd2956c29aadb78cfbfda10cbe969d4..e1fc6e80028ebed2a54cf606d609eb3a780ade0a 100644 --- a/Trigger/TrigSteer/TrigCompositeUtils/CMakeLists.txt +++ b/Trigger/TrigSteer/TrigCompositeUtils/CMakeLists.txt @@ -12,20 +12,15 @@ if( NOT XAOD_STANDALONE ) xAODTrigger ) endif() -# Add the package's library. +# Add the package's dual use library. atlas_add_library( TrigCompositeUtilsLib TrigCompositeUtils/*.h TrigCompositeUtils/*.icc Root/*.cxx ${extra_srcs} PUBLIC_HEADERS TrigCompositeUtils - LINK_LIBRARIES CxxUtils AsgMessagingLib ${extra_libs} ) + LINK_LIBRARIES TrigConfHLTUtilsLib CxxUtils AsgMessagingLib ${extra_libs} ) # Install files from the package. atlas_install_python_modules( python/*.py ) -# Executable(s). -atlas_add_executable( trigconf_string2hash - util/trigconf_string2hash.cxx - LINK_LIBRARIES TrigCompositeUtilsLib ) - # Unit test(s). if( NOT XAOD_STANDALONE ) atlas_add_test( TrigCompositeUtils_test diff --git a/Trigger/TrigSteer/TrigCompositeUtils/README.md b/Trigger/TrigSteer/TrigCompositeUtils/README.md new file mode 100644 index 0000000000000000000000000000000000000000..240dfa4388aa701a67346c7b5eea9f1e65be9ee9 --- /dev/null +++ b/Trigger/TrigSteer/TrigCompositeUtils/README.md @@ -0,0 +1,15 @@ +# TrigCompositeUtils + +Package to host helper classes used both online in HLT execution and offline in the analysis of the HLT result. + +## TrigCompositeUtils + +Quality of life helpers and navigation helpers to aid in creating and interpreting `xAOD::TrigComposite` (also known as `Decision`) objects linked together to form a directed acyclic graph structure. This graph is referred to as the trigger navigation. + +## HLTIdentifier + +Wrapper function around a HLT chain's name (or chain's leg's name), allowing easier access to both the `std::string` and hashed `uint32_t` representations along with iostream functions. + +## Combinators + +Placeholder for combinatoric iteration helper code over combined chains diff --git a/Trigger/TrigSteer/TrigCompositeUtils/Root/HLTIdentifier.cxx b/Trigger/TrigSteer/TrigCompositeUtils/Root/HLTIdentifier.cxx index 27461a455ec77708e1b89e24d93ced5de71c4c27..012b501896d1d451f22624a370465ad7b6d6e228 100644 --- a/Trigger/TrigSteer/TrigCompositeUtils/Root/HLTIdentifier.cxx +++ b/Trigger/TrigSteer/TrigCompositeUtils/Root/HLTIdentifier.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ -#include "TrigCompositeUtils/HLTUtils.h" +#include "TrigConfHLTUtils/HLTUtils.h" #include "TrigCompositeUtils/HLTIdentifier.h" using namespace HLT;