diff --git a/.clang-format b/.clang-format index a22e5e692..192188e84 100644 --- a/.clang-format +++ b/.clang-format @@ -59,12 +59,12 @@ ForEachMacros: - foreach - Q_FOREACH - BOOST_FOREACH -IncludeBlocks: Preserve +IncludeBlocks: Regroup IncludeCategories: - - Regex: '^(<|"(gtest|gmock|isl|json)/)' - Priority: 4 - - Regex: '.*' - Priority: 3 + - Regex: '<[[:alnum:]._]+>' + Priority: 5 + - Regex: '^(<"podio/)' + Priority: 1 IncludeIsMainRegex: '(Test)?$' IndentCaseLabels: false IndentPPDirectives: BeforeHash diff --git a/include/podio/CollectionBufferFactory.h b/include/podio/CollectionBufferFactory.h index 531e54150..2828fa77d 100644 --- a/include/podio/CollectionBufferFactory.h +++ b/include/podio/CollectionBufferFactory.h @@ -6,6 +6,7 @@ #include #include +#include #include #include diff --git a/include/podio/DatamodelRegistry.h b/include/podio/DatamodelRegistry.h index cbfa294cd..a3d255543 100644 --- a/include/podio/DatamodelRegistry.h +++ b/include/podio/DatamodelRegistry.h @@ -1,6 +1,7 @@ #ifndef PODIO_DATAMODELREGISTRY_H #define PODIO_DATAMODELREGISTRY_H +#include #include #include #include diff --git a/include/podio/GenericParameters.h b/include/podio/GenericParameters.h index 4f41aad63..d935864d5 100644 --- a/include/podio/GenericParameters.h +++ b/include/podio/GenericParameters.h @@ -5,6 +5,8 @@ #include "podio/utilities/TypeHelpers.h" #include +#include +#include #include #include #include @@ -12,6 +14,9 @@ #include #include #include +#include +#include +#include #include #if PODIO_ENABLE_SIO diff --git a/include/podio/RNTupleReader.h b/include/podio/RNTupleReader.h index 373e7c45f..3c1279f12 100644 --- a/include/podio/RNTupleReader.h +++ b/include/podio/RNTupleReader.h @@ -1,23 +1,24 @@ #ifndef PODIO_RNTUPLEREADER_H #define PODIO_RNTUPLEREADER_H +#include "podio/GenericParameters.h" #include "podio/ROOTFrameData.h" #include "podio/SchemaEvolution.h" #include "podio/podioVersion.h" #include "podio/utilities/DatamodelRegistryIOHelpers.h" +#include +#if ROOT_VERSION_CODE >= ROOT_VERSION(6, 31, 0) + #include +#endif +#include #include #include #include #include -#include -#include -#if ROOT_VERSION_CODE >= ROOT_VERSION(6, 31, 0) - #include -#endif - namespace podio { +class CollectionIDTable; /** This class has the function to read available data from disk diff --git a/include/podio/RNTupleWriter.h b/include/podio/RNTupleWriter.h index b57eb09b3..011918afa 100644 --- a/include/podio/RNTupleWriter.h +++ b/include/podio/RNTupleWriter.h @@ -1,23 +1,33 @@ #ifndef PODIO_RNTUPLEWRITER_H #define PODIO_RNTUPLEWRITER_H -#include "podio/Frame.h" +#include "TFile.h" #include "podio/SchemaEvolution.h" #include "podio/utilities/DatamodelRegistryIOHelpers.h" #include "podio/utilities/RootHelpers.h" - -#include "TFile.h" -#include #include +#include + +#include + +namespace ROOT { +namespace Experimental { + class REntry; +} // namespace Experimental +} // namespace ROOT #if ROOT_VERSION_CODE >= ROOT_VERSION(6, 31, 0) #include #endif +#include #include +#include #include #include namespace podio { +class Frame; +class GenericParameters; /// The RNTupleWriter writes podio files into ROOT files using the new RNTuple /// format. diff --git a/include/podio/ROOTFrameData.h b/include/podio/ROOTFrameData.h index 502ff24ef..0b439b884 100644 --- a/include/podio/ROOTFrameData.h +++ b/include/podio/ROOTFrameData.h @@ -9,6 +9,7 @@ #include #include #include +#include namespace podio { diff --git a/include/podio/ROOTLegacyReader.h b/include/podio/ROOTLegacyReader.h index 9383ca51b..0794b10e5 100644 --- a/include/podio/ROOTLegacyReader.h +++ b/include/podio/ROOTLegacyReader.h @@ -1,12 +1,11 @@ #ifndef PODIO_ROOTLEGACYREADER_H #define PODIO_ROOTLEGACYREADER_H +#include "TChain.h" #include "podio/ROOTFrameData.h" #include "podio/podioVersion.h" #include "podio/utilities/RootHelpers.h" -#include "TChain.h" - #include #include #include diff --git a/include/podio/ROOTReader.h b/include/podio/ROOTReader.h index e6ecbd0e0..1af6884c2 100644 --- a/include/podio/ROOTReader.h +++ b/include/podio/ROOTReader.h @@ -1,25 +1,22 @@ #ifndef PODIO_ROOTREADER_H #define PODIO_ROOTREADER_H +#include "TChain.h" #include "podio/ROOTFrameData.h" +#include "podio/SchemaEvolution.h" #include "podio/podioVersion.h" #include "podio/utilities/DatamodelRegistryIOHelpers.h" #include "podio/utilities/RootHelpers.h" -#include "TChain.h" - +#include #include #include #include #include +#include #include #include -// forward declarations -class TClass; -class TFile; -class TTree; - namespace podio { namespace detail { @@ -30,7 +27,6 @@ namespace detail { } // namespace detail -class CollectionBase; class CollectionIDTable; class GenericParameters; struct CollectionReadBuffers; diff --git a/include/podio/ROOTWriter.h b/include/podio/ROOTWriter.h index 5ee23835f..e2f3d4b23 100644 --- a/include/podio/ROOTWriter.h +++ b/include/podio/ROOTWriter.h @@ -1,12 +1,11 @@ #ifndef PODIO_ROOTWRITER_H #define PODIO_ROOTWRITER_H +#include "TFile.h" #include "podio/CollectionIDTable.h" #include "podio/utilities/DatamodelRegistryIOHelpers.h" #include "podio/utilities/RootHelpers.h" -#include "TFile.h" - #include #include #include @@ -18,7 +17,6 @@ class TTree; namespace podio { class Frame; -class CollectionBase; class GenericParameters; /// The ROOTWriter writes podio files into ROOT files using TTrees. diff --git a/include/podio/Reader.h b/include/podio/Reader.h index ee8eaa682..6071c3a89 100644 --- a/include/podio/Reader.h +++ b/include/podio/Reader.h @@ -2,8 +2,16 @@ #define PODIO_READER_H #include "podio/Frame.h" +#include "podio/FrameCategories.h" #include "podio/podioVersion.h" +#include +#include +#include +#include +#include +#include + namespace podio { /// Generic (type erased) reader class that can handle different I/O backends diff --git a/include/podio/SIOBlock.h b/include/podio/SIOBlock.h index 3ae41651e..839748de6 100644 --- a/include/podio/SIOBlock.h +++ b/include/podio/SIOBlock.h @@ -6,7 +6,6 @@ #include #include #include - #include #include #include diff --git a/include/podio/SIOBlockUserData.h b/include/podio/SIOBlockUserData.h index 4d3110fba..f6618213e 100644 --- a/include/podio/SIOBlockUserData.h +++ b/include/podio/SIOBlockUserData.h @@ -5,7 +5,6 @@ #include "podio/CollectionBuffers.h" #include "podio/SIOBlock.h" #include "podio/UserDataCollection.h" - #include #include #include diff --git a/include/podio/SIOFrameData.h b/include/podio/SIOFrameData.h index 95b09d927..5e778b32d 100644 --- a/include/podio/SIOFrameData.h +++ b/include/podio/SIOFrameData.h @@ -5,7 +5,6 @@ #include "podio/CollectionIDTable.h" #include "podio/GenericParameters.h" #include "podio/SIOBlock.h" - #include #include diff --git a/include/podio/SIOLegacyReader.h b/include/podio/SIOLegacyReader.h index d490fcd5e..a77ffbb08 100644 --- a/include/podio/SIOLegacyReader.h +++ b/include/podio/SIOLegacyReader.h @@ -4,7 +4,6 @@ #include "podio/SIOBlock.h" #include "podio/SIOFrameData.h" #include "podio/podioVersion.h" - #include #include diff --git a/include/podio/SIOReader.h b/include/podio/SIOReader.h index 80970abbb..e01163f74 100644 --- a/include/podio/SIOReader.h +++ b/include/podio/SIOReader.h @@ -5,7 +5,6 @@ #include "podio/SIOFrameData.h" #include "podio/podioVersion.h" #include "podio/utilities/DatamodelRegistryIOHelpers.h" - #include #include diff --git a/include/podio/SIOWriter.h b/include/podio/SIOWriter.h index 6f680ffb8..381452c50 100644 --- a/include/podio/SIOWriter.h +++ b/include/podio/SIOWriter.h @@ -3,7 +3,6 @@ #include "podio/SIOBlock.h" #include "podio/utilities/DatamodelRegistryIOHelpers.h" - #include #include diff --git a/include/podio/SchemaEvolution.h b/include/podio/SchemaEvolution.h index cb8803d26..e82b96fb1 100644 --- a/include/podio/SchemaEvolution.h +++ b/include/podio/SchemaEvolution.h @@ -1,6 +1,7 @@ #ifndef PODIO_SCHEMAEVOLUTION_H #define PODIO_SCHEMAEVOLUTION_H +#include #include #include #include diff --git a/include/podio/UserDataCollection.h b/include/podio/UserDataCollection.h index 63660a72f..9e13ea8bd 100644 --- a/include/podio/UserDataCollection.h +++ b/include/podio/UserDataCollection.h @@ -7,6 +7,18 @@ #include "podio/SchemaEvolution.h" #include "podio/utilities/TypeHelpers.h" +#include +#include +#include +#include +#include +#include +#include + +namespace podio { +class ICollectionProvider; +} // namespace podio + #define PODIO_ADD_USER_TYPE(type) \ template <> \ constexpr const char* userDataTypeName() { \ diff --git a/include/podio/Writer.h b/include/podio/Writer.h index 9f2c4d85e..23ff6e56f 100644 --- a/include/podio/Writer.h +++ b/include/podio/Writer.h @@ -2,6 +2,11 @@ #define PODIO_WRITER_H #include "podio/Frame.h" +#include "podio/FrameCategories.h" + +#include +#include +#include namespace podio { diff --git a/include/podio/utilities/DatamodelRegistryIOHelpers.h b/include/podio/utilities/DatamodelRegistryIOHelpers.h index 77416a839..ae82bc716 100644 --- a/include/podio/utilities/DatamodelRegistryIOHelpers.h +++ b/include/podio/utilities/DatamodelRegistryIOHelpers.h @@ -1,15 +1,16 @@ #ifndef PODIO_UTILITIES_DATAMODELREGISTRYIOHELPERS_H #define PODIO_UTILITIES_DATAMODELREGISTRYIOHELPERS_H -#include "podio/CollectionBase.h" -#include "podio/DatamodelRegistry.h" - +#include #include #include +#include #include +#include #include namespace podio { +class CollectionBase; /// Helper class to collect the datamodel (JSON) definitions that should be /// written. diff --git a/include/podio/utilities/RootHelpers.h b/include/podio/utilities/RootHelpers.h index 360ef6674..684455bc3 100644 --- a/include/podio/utilities/RootHelpers.h +++ b/include/podio/utilities/RootHelpers.h @@ -3,13 +3,19 @@ #include "podio/GenericParameters.h" -#include "ROOT/RVec.hxx" -#include "TBranch.h" - +#include #include #include #include +class TBranch; +namespace ROOT { +namespace VecOps { + template + class RVec; +} // namespace VecOps +} // namespace ROOT + namespace podio { class CollectionBase; diff --git a/src/CollectionBufferFactory.cc b/src/CollectionBufferFactory.cc index 8c48ea083..e72419b9d 100644 --- a/src/CollectionBufferFactory.cc +++ b/src/CollectionBufferFactory.cc @@ -1,6 +1,10 @@ #include "podio/CollectionBufferFactory.h" + #include "podio/CollectionBuffers.h" +#include +#include + namespace podio { CollectionBufferFactory& CollectionBufferFactory::mutInstance() { static CollectionBufferFactory factory; diff --git a/src/CollectionIDTable.cc b/src/CollectionIDTable.cc index ace8a91fe..86670b4f7 100644 --- a/src/CollectionIDTable.cc +++ b/src/CollectionIDTable.cc @@ -4,7 +4,10 @@ #include "MurmurHash3.h" #include +#include #include +#include +#include namespace podio { diff --git a/src/DataSource.cc b/src/DataSource.cc index cdc678a98..ce52c1669 100644 --- a/src/DataSource.cc +++ b/src/DataSource.cc @@ -1,4 +1,5 @@ #include "podio/DataSource.h" + #include "podio/Reader.h" // podio diff --git a/src/DatamodelRegistryIOHelpers.cc b/src/DatamodelRegistryIOHelpers.cc index 1e7573a1f..0e438d436 100644 --- a/src/DatamodelRegistryIOHelpers.cc +++ b/src/DatamodelRegistryIOHelpers.cc @@ -1,5 +1,10 @@ #include "podio/utilities/DatamodelRegistryIOHelpers.h" + +#include "podio/CollectionBase.h" +#include "podio/DatamodelRegistry.h" + #include +#include #include namespace podio { diff --git a/src/RNTupleReader.cc b/src/RNTupleReader.cc index d391e578a..cd2153c09 100644 --- a/src/RNTupleReader.cc +++ b/src/RNTupleReader.cc @@ -1,14 +1,26 @@ #include "podio/RNTupleReader.h" + #include "podio/CollectionBufferFactory.h" #include "podio/CollectionBuffers.h" #include "podio/CollectionIDTable.h" #include "podio/DatamodelRegistry.h" #include "podio/GenericParameters.h" +#include "podio/ObjectID.h" #include "rootUtils.h" - +#include #include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include namespace podio { diff --git a/src/RNTupleWriter.cc b/src/RNTupleWriter.cc index caa18a5cb..f9a6d2cdb 100644 --- a/src/RNTupleWriter.cc +++ b/src/RNTupleWriter.cc @@ -1,15 +1,23 @@ #include "podio/RNTupleWriter.h" + +#include "TFile.h" +#include "podio/CollectionBuffers.h" #include "podio/DatamodelRegistry.h" +#include "podio/Frame.h" #include "podio/SchemaEvolution.h" #include "podio/podioVersion.h" #include "rootUtils.h" - -#include "TFile.h" - +#include +#include #include #include +#include +#include + namespace podio { +class CollectionBase; +class GenericParameters; RNTupleWriter::RNTupleWriter(const std::string& filename) : m_file(new TFile(filename.c_str(), "RECREATE", "data file")) { diff --git a/src/ROOTFrameData.cc b/src/ROOTFrameData.cc index 2fde64154..45ec57ebc 100644 --- a/src/ROOTFrameData.cc +++ b/src/ROOTFrameData.cc @@ -1,5 +1,8 @@ #include "podio/ROOTFrameData.h" +#include +#include + namespace podio { ROOTFrameData::ROOTFrameData(BufferMap&& buffers, CollIDPtr&& idTable, podio::GenericParameters&& params) : diff --git a/src/ROOTLegacyReader.cc b/src/ROOTLegacyReader.cc index 4a431dc42..df9232867 100644 --- a/src/ROOTLegacyReader.cc +++ b/src/ROOTLegacyReader.cc @@ -8,6 +8,8 @@ #include "podio/CollectionIDTable.h" #include "podio/GenericParameters.h" #include "podio/ROOTLegacyReader.h" +#include "podio/podioVersion.h" +#include "podio/utilities/RootHelpers.h" // ROOT specific includes #include "TChain.h" @@ -15,6 +17,18 @@ #include "TFile.h" #include "TTree.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + namespace podio { std::unique_ptr ROOTLegacyReader::readNextEntry(const std::string& name) { diff --git a/src/ROOTReader.cc b/src/ROOTReader.cc index 1b4971601..f84b209a5 100644 --- a/src/ROOTReader.cc +++ b/src/ROOTReader.cc @@ -1,4 +1,5 @@ #include "podio/ROOTReader.h" + #include "podio/CollectionBase.h" #include "podio/CollectionBufferFactory.h" #include "podio/CollectionBuffers.h" @@ -8,13 +9,19 @@ #include "podio/utilities/RootHelpers.h" #include "rootUtils.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include // ROOT specific includes #include "TChain.h" #include "TClass.h" -#include -#include - namespace podio { std::tuple, std::vector>> diff --git a/src/ROOTWriter.cc b/src/ROOTWriter.cc index 33f02741e..f858cdf83 100644 --- a/src/ROOTWriter.cc +++ b/src/ROOTWriter.cc @@ -1,13 +1,20 @@ #include "podio/ROOTWriter.h" + +#include "TTree.h" +#include "podio/CollectionBuffers.h" #include "podio/DatamodelRegistry.h" #include "podio/Frame.h" #include "podio/GenericParameters.h" #include "podio/podioVersion.h" - #include "rootUtils.h" -#include "TTree.h" +#include +#include +#include +#include +#include #include +#include namespace podio { diff --git a/src/Reader.cc b/src/Reader.cc index f43fc432a..d4f93144a 100644 --- a/src/Reader.cc +++ b/src/Reader.cc @@ -1,6 +1,10 @@ #include "podio/Reader.h" #include "podio/ROOTReader.h" + +#include +#include +#include #if PODIO_ENABLE_RNTUPLE #include "podio/RNTupleReader.h" #endif @@ -10,7 +14,9 @@ #include "TFile.h" #include "TKey.h" + #include +#include namespace podio { diff --git a/src/RootHelpers.cc b/src/RootHelpers.cc index a1a33484c..c933ec392 100644 --- a/src/RootHelpers.cc +++ b/src/RootHelpers.cc @@ -1,5 +1,9 @@ #include "podio/utilities/RootHelpers.h" +#include + +#include + namespace podio::root_utils { GenericParameters loadParamsFrom(ROOT::VecOps::RVec intKeys, ROOT::VecOps::RVec> intValues, diff --git a/src/SIOBlock.cc b/src/SIOBlock.cc index 61fb96182..60be3bcc7 100644 --- a/src/SIOBlock.cc +++ b/src/SIOBlock.cc @@ -1,10 +1,11 @@ #include "podio/SIOBlock.h" +#include "podio/GenericParameters.h" + #include #include #include #include -#include #include namespace podio { diff --git a/src/SIOFrameData.cc b/src/SIOFrameData.cc index 806639672..e542417bc 100644 --- a/src/SIOFrameData.cc +++ b/src/SIOFrameData.cc @@ -1,6 +1,6 @@ #include "podio/SIOFrameData.h" -#include "podio/SIOBlock.h" +#include "podio/SIOBlock.h" #include #include diff --git a/src/SIOLegacyReader.cc b/src/SIOLegacyReader.cc index dcf3d9d18..2c54e51e5 100644 --- a/src/SIOLegacyReader.cc +++ b/src/SIOLegacyReader.cc @@ -1,7 +1,6 @@ #include "podio/SIOLegacyReader.h" #include "sioUtils.h" - #include #include #include diff --git a/src/SIOReader.cc b/src/SIOReader.cc index 2609d611f..c2304e870 100644 --- a/src/SIOReader.cc +++ b/src/SIOReader.cc @@ -1,7 +1,6 @@ #include "podio/SIOReader.h" #include "sioUtils.h" - #include #include diff --git a/src/SIOWriter.cc b/src/SIOWriter.cc index aef6e52e6..6db167034 100644 --- a/src/SIOWriter.cc +++ b/src/SIOWriter.cc @@ -1,7 +1,7 @@ #include "podio/SIOWriter.h" + #include "podio/Frame.h" #include "podio/SIOBlock.h" - #include "sioUtils.h" #include diff --git a/src/SchemaEvolution.cc b/src/SchemaEvolution.cc index 4576cde1e..a12622a9b 100644 --- a/src/SchemaEvolution.cc +++ b/src/SchemaEvolution.cc @@ -1,7 +1,10 @@ #include "podio/SchemaEvolution.h" + #include "podio/CollectionBuffers.h" #include +#include +#include namespace podio { diff --git a/src/UserDataCollection.cc b/src/UserDataCollection.cc index 673e7969c..dfbf1c85e 100644 --- a/src/UserDataCollection.cc +++ b/src/UserDataCollection.cc @@ -1,9 +1,13 @@ #include "podio/UserDataCollection.h" + #include "podio/CollectionBufferFactory.h" #include "podio/CollectionBuffers.h" #include "podio/SchemaEvolution.h" +#include +#include #include +#include #include namespace podio { diff --git a/src/Writer.cc b/src/Writer.cc index 13f979ce8..740a79979 100644 --- a/src/Writer.cc +++ b/src/Writer.cc @@ -8,7 +8,11 @@ #include "podio/SIOWriter.h" #endif +#include +#include #include +#include +#include namespace podio { diff --git a/src/rootUtils.h b/src/rootUtils.h index a473c6f0c..774bc6f3a 100644 --- a/src/rootUtils.h +++ b/src/rootUtils.h @@ -1,11 +1,10 @@ #ifndef PODIO_ROOT_UTILS_H // NOLINT(llvm-header-guard): internal headers confuse clang-tidy #define PODIO_ROOT_UTILS_H // NOLINT(llvm-header-guard): internal headers confuse clang-tidy -#include "podio/CollectionIDTable.h" -#include "podio/utilities/RootHelpers.h" - #include "TBranch.h" #include "TTree.h" +#include "podio/CollectionIDTable.h" +#include "podio/utilities/RootHelpers.h" #include #include diff --git a/src/sioUtils.h b/src/sioUtils.h index 352a338b6..073aabf5c 100644 --- a/src/sioUtils.h +++ b/src/sioUtils.h @@ -4,7 +4,6 @@ #include "podio/CollectionBase.h" #include "podio/GenericParameters.h" #include "podio/SIOBlock.h" - #include #include #include diff --git a/src/test_hashes.cpp b/src/test_hashes.cpp index bcceafa56..7ca7cbcaf 100644 --- a/src/test_hashes.cpp +++ b/src/test_hashes.cpp @@ -1,11 +1,14 @@ #include "MurmurHash3.h" +#include +#include #include #include #include #include #include #include +#include #include #include diff --git a/tests/read_frame.h b/tests/read_frame.h index 0103afea1..06e50394c 100644 --- a/tests/read_frame.h +++ b/tests/read_frame.h @@ -3,13 +3,11 @@ #include "datamodel/ExampleWithInterfaceRelationCollection.h" #include "datamodel/ExampleWithVectorMemberCollection.h" -#include "read_test.h" - #include "extension_model/ContainedTypeCollection.h" #include "extension_model/ExternalComponentTypeCollection.h" #include "extension_model/ExternalRelationTypeCollection.h" - #include "podio/Frame.h" +#include "read_test.h" #include diff --git a/tests/read_frame_auxiliary.h b/tests/read_frame_auxiliary.h index 65bffad28..c755eed42 100644 --- a/tests/read_frame_auxiliary.h +++ b/tests/read_frame_auxiliary.h @@ -2,7 +2,6 @@ #define PODIO_TESTS_READ_FRAME_AUXILIARY_H // NOLINT(llvm-header-guard): folder structure not suitable #include "frame_test_common.h" - #include "podio/Frame.h" #include "podio/podioVersion.h" diff --git a/tests/read_interface.h b/tests/read_interface.h index 278e03742..3ec3d892d 100644 --- a/tests/read_interface.h +++ b/tests/read_interface.h @@ -1,9 +1,8 @@ #ifndef PODIO_TESTS_READ_INTERFACE_H // NOLINT(llvm-header-guard): folder structure not suitable #define PODIO_TESTS_READ_INTERFACE_H // NOLINT(llvm-header-guard): folder structure not suitable -#include "read_frame.h" - #include "podio/Reader.h" +#include "read_frame.h" int read_frames(podio::Reader& reader) { diff --git a/tests/read_python_frame.h b/tests/read_python_frame.h index 5c3220708..6cb1f02d3 100644 --- a/tests/read_python_frame.h +++ b/tests/read_python_frame.h @@ -3,7 +3,6 @@ #include "datamodel/ExampleClusterCollection.h" #include "datamodel/ExampleHitCollection.h" - #include "podio/Frame.h" #include diff --git a/tests/root_io/read_and_write_associated.cpp b/tests/root_io/read_and_write_associated.cpp index 9cf005c96..a9ddffbd8 100644 --- a/tests/root_io/read_and_write_associated.cpp +++ b/tests/root_io/read_and_write_associated.cpp @@ -1,13 +1,22 @@ -#include "podio/Frame.h" -#include "podio/ROOTReader.h" -#include "podio/ROOTWriter.h" - #include "datamodel/EventInfoCollection.h" +#include "datamodel/ExampleCluster.h" #include "datamodel/ExampleClusterCollection.h" +#include "datamodel/ExampleHit.h" #include "datamodel/ExampleHitCollection.h" +#include "datamodel/MutableEventInfo.h" +#include "datamodel/MutableExampleCluster.h" +#include "datamodel/MutableExampleHit.h" +#include "podio/Frame.h" +#include "podio/FrameCategories.h" +#include "podio/ROOTReader.h" +#include "podio/ROOTWriter.h" +#include "podio/RelationRange.h" #include +#include #include +#include +#include void writeCollection() { podio::ROOTWriter writer("associations.root"); diff --git a/tests/root_io/read_and_write_frame_root.cpp b/tests/root_io/read_and_write_frame_root.cpp index 7cde787b2..e38ff0e5f 100644 --- a/tests/root_io/read_and_write_frame_root.cpp +++ b/tests/root_io/read_and_write_frame_root.cpp @@ -1,7 +1,6 @@ -#include "read_and_write_frame.h" - #include "podio/ROOTReader.h" #include "podio/ROOTWriter.h" +#include "read_and_write_frame.h" int main() { return rewrite_frames("example_frame.root", "rewritten_frame.root") + diff --git a/tests/root_io/read_frame_legacy_root.cpp b/tests/root_io/read_frame_legacy_root.cpp index 6d98f79ac..0c1b8d82e 100644 --- a/tests/root_io/read_frame_legacy_root.cpp +++ b/tests/root_io/read_frame_legacy_root.cpp @@ -1,9 +1,11 @@ -#include "read_test.h" - #include "podio/Frame.h" #include "podio/ROOTLegacyReader.h" +#include "read_test.h" +#include #include +#include +#include int main(int argc, char* argv[]) { if (argc != 2) { diff --git a/tests/root_io/read_frame_root.cpp b/tests/root_io/read_frame_root.cpp index 40f8cdccf..71d8a34b3 100644 --- a/tests/root_io/read_frame_root.cpp +++ b/tests/root_io/read_frame_root.cpp @@ -1,8 +1,7 @@ +#include "podio/ROOTReader.h" #include "read_frame.h" #include "read_frame_auxiliary.h" -#include "podio/ROOTReader.h" - #include #include diff --git a/tests/root_io/read_frame_root_multiple.cpp b/tests/root_io/read_frame_root_multiple.cpp index 7c76e25ef..ba579a9c5 100644 --- a/tests/root_io/read_frame_root_multiple.cpp +++ b/tests/root_io/read_frame_root_multiple.cpp @@ -1,6 +1,14 @@ +#include "podio/Frame.h" +#include "podio/ROOTReader.h" +#include "podio/podioVersion.h" #include "read_frame.h" +#include "read_test.h" -#include "podio/ROOTReader.h" +#include +#include +#include +#include +#include int read_frames(podio::ROOTReader& reader) { if (reader.currentFileVersion() != podio::version::build_version) { diff --git a/tests/root_io/read_interface_rntuple.cpp b/tests/root_io/read_interface_rntuple.cpp index e2ee2a421..0aabee632 100644 --- a/tests/root_io/read_interface_rntuple.cpp +++ b/tests/root_io/read_interface_rntuple.cpp @@ -1,3 +1,4 @@ +#include "podio/Reader.h" #include "read_interface.h" int main(int, char**) { diff --git a/tests/root_io/read_interface_root.cpp b/tests/root_io/read_interface_root.cpp index 8d33ec1c3..707c698a7 100644 --- a/tests/root_io/read_interface_root.cpp +++ b/tests/root_io/read_interface_root.cpp @@ -1,3 +1,4 @@ +#include "podio/Reader.h" #include "read_interface.h" int main(int, char**) { diff --git a/tests/root_io/read_python_frame_rntuple.cpp b/tests/root_io/read_python_frame_rntuple.cpp index 0d21563d4..2fda6418b 100644 --- a/tests/root_io/read_python_frame_rntuple.cpp +++ b/tests/root_io/read_python_frame_rntuple.cpp @@ -1,6 +1,5 @@ -#include "read_python_frame.h" - #include "podio/RNTupleReader.h" +#include "read_python_frame.h" int main() { return read_frame("example_frame_with_py_rntuple.root"); diff --git a/tests/root_io/read_python_frame_root.cpp b/tests/root_io/read_python_frame_root.cpp index a3497831d..c4dd74726 100644 --- a/tests/root_io/read_python_frame_root.cpp +++ b/tests/root_io/read_python_frame_root.cpp @@ -1,6 +1,5 @@ -#include "read_python_frame.h" - #include "podio/ROOTReader.h" +#include "read_python_frame.h" int main() { return read_frame("example_frame_with_py.root"); diff --git a/tests/root_io/relation_range.cpp b/tests/root_io/relation_range.cpp index 6159e8cdc..59532b156 100644 --- a/tests/root_io/relation_range.cpp +++ b/tests/root_io/relation_range.cpp @@ -1,14 +1,21 @@ +#include "datamodel/ExampleMC.h" #include "datamodel/ExampleMCCollection.h" +#include "datamodel/ExampleReferencingType.h" +#include "datamodel/MutableExampleMC.h" #include "datamodel/MutableExampleReferencingType.h" #include "datamodel/MutableExampleWithVectorMember.h" - #include "podio/Frame.h" +#include "podio/FrameCategories.h" #include "podio/ROOTReader.h" #include "podio/ROOTWriter.h" +#include "podio/RelationRange.h" +#include +#include #include #include #include +#include #include #define LOCATION() \ diff --git a/tests/root_io/write_frame_root.cpp b/tests/root_io/write_frame_root.cpp index 2ad648e36..646d85386 100644 --- a/tests/root_io/write_frame_root.cpp +++ b/tests/root_io/write_frame_root.cpp @@ -1,6 +1,5 @@ -#include "write_frame.h" - #include "podio/ROOTWriter.h" +#include "write_frame.h" int main(int, char**) { write_frames("example_frame.root"); diff --git a/tests/root_io/write_interface_rntuple.cpp b/tests/root_io/write_interface_rntuple.cpp index c13658c61..5fab04b3b 100644 --- a/tests/root_io/write_interface_rntuple.cpp +++ b/tests/root_io/write_interface_rntuple.cpp @@ -1,3 +1,4 @@ +#include "podio/Writer.h" #include "write_interface.h" int main(int, char**) { diff --git a/tests/root_io/write_interface_root.cpp b/tests/root_io/write_interface_root.cpp index 84775e6de..2c9c5900e 100644 --- a/tests/root_io/write_interface_root.cpp +++ b/tests/root_io/write_interface_root.cpp @@ -1,3 +1,4 @@ +#include "podio/Writer.h" #include "write_interface.h" int main(int, char**) { diff --git a/tests/schema_evolution/read_new_data.h b/tests/schema_evolution/read_new_data.h index cdc3abf46..7805c48aa 100644 --- a/tests/schema_evolution/read_new_data.h +++ b/tests/schema_evolution/read_new_data.h @@ -5,7 +5,6 @@ #include "datamodel/ExampleWithARelationCollection.h" #include "datamodel/ExampleWithArrayComponentCollection.h" #include "datamodel/ExampleWithNamespaceCollection.h" - #include "podio/Frame.h" #include diff --git a/tests/schema_evolution/root_io/read_new_data_root.cpp b/tests/schema_evolution/root_io/read_new_data_root.cpp index b69306478..388075ee2 100644 --- a/tests/schema_evolution/root_io/read_new_data_root.cpp +++ b/tests/schema_evolution/root_io/read_new_data_root.cpp @@ -1,6 +1,5 @@ -#include "read_new_data.h" - #include "podio/ROOTReader.h" +#include "read_new_data.h" int main() { return read_new_data("example_data_old_schema.root"); diff --git a/tests/schema_evolution/root_io/write_old_data_root.cpp b/tests/schema_evolution/root_io/write_old_data_root.cpp index dcd971d08..3ca010a75 100644 --- a/tests/schema_evolution/root_io/write_old_data_root.cpp +++ b/tests/schema_evolution/root_io/write_old_data_root.cpp @@ -1,6 +1,5 @@ -#include "schema_evolution/write_old_data.h" - #include "podio/ROOTWriter.h" +#include "schema_evolution/write_old_data.h" int main() { return writeData("example_data_old_schema.root"); diff --git a/tests/schema_evolution/write_old_data.h b/tests/schema_evolution/write_old_data.h index 7676ae34b..9f0780b78 100644 --- a/tests/schema_evolution/write_old_data.h +++ b/tests/schema_evolution/write_old_data.h @@ -5,7 +5,6 @@ #include "datamodel/ExampleWithARelationCollection.h" #include "datamodel/ExampleWithArrayComponentCollection.h" #include "datamodel/ExampleWithNamespaceCollection.h" - #include "podio/Frame.h" #include diff --git a/tests/sio_io/read_and_write_frame_sio.cpp b/tests/sio_io/read_and_write_frame_sio.cpp index 003d80ea4..edb233a08 100644 --- a/tests/sio_io/read_and_write_frame_sio.cpp +++ b/tests/sio_io/read_and_write_frame_sio.cpp @@ -1,7 +1,6 @@ -#include "read_and_write_frame.h" - #include "podio/SIOReader.h" #include "podio/SIOWriter.h" +#include "read_and_write_frame.h" int main() { return rewrite_frames("example_frame.sio", "rewritten_frame.sio") + diff --git a/tests/sio_io/read_frame_legacy_sio.cpp b/tests/sio_io/read_frame_legacy_sio.cpp index 5dbc123d3..2414462c3 100644 --- a/tests/sio_io/read_frame_legacy_sio.cpp +++ b/tests/sio_io/read_frame_legacy_sio.cpp @@ -1,7 +1,6 @@ -#include "read_test.h" - #include "podio/Frame.h" #include "podio/SIOLegacyReader.h" +#include "read_test.h" #include diff --git a/tests/sio_io/read_frame_sio.cpp b/tests/sio_io/read_frame_sio.cpp index 8a27743ac..0b500af2f 100644 --- a/tests/sio_io/read_frame_sio.cpp +++ b/tests/sio_io/read_frame_sio.cpp @@ -1,8 +1,7 @@ +#include "podio/SIOReader.h" #include "read_frame.h" #include "read_frame_auxiliary.h" -#include "podio/SIOReader.h" - int main(int argc, char* argv[]) { std::string inputFile = "example_frame.sio"; bool assertBuildVersion = true; diff --git a/tests/sio_io/read_python_frame_sio.cpp b/tests/sio_io/read_python_frame_sio.cpp index 5307c1038..d3c5834e1 100644 --- a/tests/sio_io/read_python_frame_sio.cpp +++ b/tests/sio_io/read_python_frame_sio.cpp @@ -1,6 +1,5 @@ -#include "read_python_frame.h" - #include "podio/SIOReader.h" +#include "read_python_frame.h" int main() { return read_frame("example_frame_with_py.sio"); diff --git a/tests/sio_io/write_frame_sio.cpp b/tests/sio_io/write_frame_sio.cpp index 21cd740ca..10bdcbcef 100644 --- a/tests/sio_io/write_frame_sio.cpp +++ b/tests/sio_io/write_frame_sio.cpp @@ -1,6 +1,5 @@ -#include "write_frame.h" - #include "podio/SIOWriter.h" +#include "write_frame.h" int main(int, char**) { write_frames("example_frame.sio"); diff --git a/tests/unittests/buffer_factory.cpp b/tests/unittests/buffer_factory.cpp index d97c09bd0..dea1aaa1d 100644 --- a/tests/unittests/buffer_factory.cpp +++ b/tests/unittests/buffer_factory.cpp @@ -1,11 +1,19 @@ -#include "datamodel/ExampleHitCollectionData.h" -#include "podio/CollectionBufferFactory.h" - +#include "catch2/catch_test_macros.hpp" #include "datamodel/DatamodelDefinition.h" #include "datamodel/ExampleClusterCollection.h" -#include "datamodel/ExampleWithVectorMemberCollection.h" +#include "datamodel/ExampleClusterCollectionData.h" +#include "datamodel/ExampleClusterData.h" +#include "datamodel/ExampleHitCollectionData.h" +#include "datamodel/ExampleHitData.h" +#include "datamodel/ExampleWithVectorMemberCollectionData.h" +#include "podio/CollectionBufferFactory.h" +#include "podio/CollectionBuffers.h" +#include "podio/ObjectID.h" -#include "catch2/catch_test_macros.hpp" +#include +#include +#include +#include TEST_CASE("createBuffers", "[internals][memory-management]") { const auto& factory = podio::CollectionBufferFactory::instance(); diff --git a/tests/unittests/frame.cpp b/tests/unittests/frame.cpp index ac014a898..1edd5f31b 100644 --- a/tests/unittests/frame.cpp +++ b/tests/unittests/frame.cpp @@ -1,11 +1,19 @@ #include "podio/Frame.h" #include "catch2/catch_test_macros.hpp" - +#include "datamodel/ExampleCluster.h" #include "datamodel/ExampleClusterCollection.h" +#include "datamodel/ExampleHit.h" #include "datamodel/ExampleHitCollection.h" +#include "datamodel/MutableExampleCluster.h" +#include "podio/RelationRange.h" +#include +#include +#include #include +#include +#include #include #include #include diff --git a/tests/unittests/interface_types.cpp b/tests/unittests/interface_types.cpp index a98b55b5d..9978bc0a0 100644 --- a/tests/unittests/interface_types.cpp +++ b/tests/unittests/interface_types.cpp @@ -1,10 +1,11 @@ #include "catch2/catch_test_macros.hpp" - -#include "podio/ObjectID.h" - +#include "datamodel/ExampleCluster.h" +#include "datamodel/ExampleHit.h" #include "datamodel/ExampleHitCollection.h" #include "datamodel/MutableExampleCluster.h" +#include "datamodel/MutableExampleHit.h" #include "datamodel/TypeWithEnergy.h" +#include "podio/ObjectID.h" #include #include diff --git a/tests/unittests/std_interoperability.cpp b/tests/unittests/std_interoperability.cpp index b0a97843a..6c6241faa 100644 --- a/tests/unittests/std_interoperability.cpp +++ b/tests/unittests/std_interoperability.cpp @@ -2,11 +2,13 @@ #include "datamodel/ExampleHitCollection.h" #include "datamodel/MutableExampleHit.h" #include + #include #include #include #include #include +#include // DOCUMENTED_STATIC_FAILURE and DOCUMENTED_FAILURE macro are used to indicate checks that corresponds to requirements // imposed but the standard but currently not met by podio. These check use inverted logic (they pass when the diff --git a/tests/unittests/unittest.cpp b/tests/unittests/unittest.cpp index 733e42854..e5e486944 100644 --- a/tests/unittests/unittest.cpp +++ b/tests/unittests/unittest.cpp @@ -1,23 +1,56 @@ // STL +#include "catch2/catch_test_macros.hpp" +#include "catch2/matchers/catch_matchers_string.hpp" +#include "catch2/matchers/catch_matchers_vector.hpp" +#include +#include + +#include +#include +#include #include #include +#include #include +#include +#include +#include #include #include +#include #include +#include #include +#include #include - -#include "catch2/catch_test_macros.hpp" -#include "catch2/matchers/catch_matchers_string.hpp" -#include "catch2/matchers/catch_matchers_vector.hpp" - // podio specific includes +#include "datamodel/CompWithInit.h" +#include "datamodel/ExampleCluster.h" +#include "datamodel/ExampleForCyclicDependency1.h" +#include "datamodel/ExampleForCyclicDependency2.h" +#include "datamodel/ExampleHit.h" +#include "datamodel/ExampleHitData.h" +#include "datamodel/ExampleWithOneRelation.h" +#include "datamodel/ExampleWithVectorMember.h" +#include "datamodel/MutableEventInfo.h" +#include "datamodel/MutableExampleForCyclicDependency1.h" +#include "datamodel/MutableExampleForCyclicDependency2.h" +#include "datamodel/MutableExampleHit.h" +#include "datamodel/MutableExampleWithOneRelation.h" +#include "datamodel/MutableExampleWithUserInit.h" +#include "datamodel/MutableExampleWithVectorMember.h" +#include "datamodel/NamespaceStruct.h" +#include "datamodel/NotSoSimpleStruct.h" +#include "datamodel/SimpleStruct.h" +#include "podio/CollectionBuffers.h" #include "podio/Frame.h" +#include "podio/FrameCategories.h" #include "podio/GenericParameters.h" +#include "podio/ObjectID.h" #include "podio/ROOTLegacyReader.h" #include "podio/ROOTReader.h" #include "podio/ROOTWriter.h" +#include "podio/RelationRange.h" #include "podio/podioVersion.h" #ifndef PODIO_ENABLE_SIO @@ -42,7 +75,6 @@ #include "datamodel/ExampleHitCollection.h" #include "datamodel/ExampleWithArray.h" #include "datamodel/ExampleWithArrayComponent.h" -#include "datamodel/ExampleWithComponent.h" #include "datamodel/ExampleWithExternalExtraCode.h" #include "datamodel/ExampleWithFixedWidthIntegers.h" #include "datamodel/ExampleWithOneRelationCollection.h" @@ -53,7 +85,6 @@ #include "datamodel/MutableExampleWithComponent.h" #include "datamodel/MutableExampleWithExternalExtraCode.h" #include "datamodel/StructWithExtraCode.h" - #include "podio/UserDataCollection.h" TEST_CASE("AutoDelete", "[basics][memory-management]") { @@ -794,9 +825,6 @@ void checkCollections(/*const*/ ExampleHitCollection& hits, /*const*/ ExampleClu } } -template -struct TD; - TEST_CASE("Move-only collections", "[collections][move-semantics]") { // Setup a few collections that will be used throughout below auto [hitColl, clusterColl, vecMemColl, userDataColl] = createCollections(); diff --git a/tests/write_frame.h b/tests/write_frame.h index 1e1c9f966..d5ab77543 100644 --- a/tests/write_frame.h +++ b/tests/write_frame.h @@ -1,8 +1,6 @@ #ifndef PODIO_TESTS_WRITE_FRAME_H // NOLINT(llvm-header-guard): folder structure not suitable #define PODIO_TESTS_WRITE_FRAME_H // NOLINT(llvm-header-guard): folder structure not suitable -#include "frame_test_common.h" - #include "datamodel/EventInfoCollection.h" #include "datamodel/ExampleClusterCollection.h" #include "datamodel/ExampleHitCollection.h" @@ -15,11 +13,10 @@ #include "datamodel/ExampleWithNamespaceCollection.h" #include "datamodel/ExampleWithOneRelationCollection.h" #include "datamodel/ExampleWithVectorMemberCollection.h" - #include "extension_model/ContainedTypeCollection.h" #include "extension_model/ExternalComponentTypeCollection.h" #include "extension_model/ExternalRelationTypeCollection.h" - +#include "frame_test_common.h" #include "podio/Frame.h" #include "podio/UserDataCollection.h" diff --git a/tests/write_interface.h b/tests/write_interface.h index 1acaa2383..484395098 100644 --- a/tests/write_interface.h +++ b/tests/write_interface.h @@ -1,9 +1,8 @@ #ifndef PODIO_TESTS_WRITE_INTERFACE_H // NOLINT(llvm-header-guard): folder structure not suitable #define PODIO_TESTS_WRITE_INTERFACE_H // NOLINT(llvm-header-guard): folder structure not suitable -#include "write_frame.h" - #include "podio/Writer.h" +#include "write_frame.h" void write_frames(podio::Writer& frameWriter) {