Skip to content

Commit

Permalink
Update .clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed May 22, 2024
1 parent 7c4403c commit 974f618
Show file tree
Hide file tree
Showing 63 changed files with 260 additions and 248 deletions.
4 changes: 3 additions & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,10 @@ ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '<[[:alnum:]._]+>'
Priority: 5
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 4
- Regex: '.*'
Expand Down
6 changes: 3 additions & 3 deletions include/podio/CollectionBufferFactory.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#ifndef PODIO_COLLECTIONBUFFERFACTORY_H
#define PODIO_COLLECTIONBUFFERFACTORY_H

#include "podio/CollectionBuffers.h"
#include "podio/SchemaEvolution.h"

#include <functional>
#include <optional>
#include <string>
#include <unordered_map>
#include <vector>

#include "podio/CollectionBuffers.h"
#include "podio/SchemaEvolution.h"

namespace podio {

/// The CollectionBufferFactory allows one to create buffers of known datatypes,
Expand Down
4 changes: 2 additions & 2 deletions include/podio/GenericParameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#ifndef PODIO_GENERICPARAMETERS_H
#define PODIO_GENERICPARAMETERS_H 1

#include "podio/utilities/TypeHelpers.h"

#include <algorithm>
#include <cstddef>
#include <cstdint>
Expand All @@ -17,8 +19,6 @@
#include <utility>
#include <vector>

#include "podio/utilities/TypeHelpers.h"

namespace sio {
class read_device;
class write_device;
Expand Down
13 changes: 7 additions & 6 deletions include/podio/RNTupleReader.h
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
#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 <ROOT/RNTuple.hxx>
#include <ROOT/RNTupleModel.hxx>

#include <RVersion.h>
#include <memory>
#include <string>
#include <string_view>
#include <unordered_map>
#include <vector>

#include "podio/GenericParameters.h"
#include "podio/ROOTFrameData.h"
#include "podio/SchemaEvolution.h"
#include "podio/podioVersion.h"
#include "podio/utilities/DatamodelRegistryIOHelpers.h"
#if ROOT_VERSION_CODE >= ROOT_VERSION(6, 31, 0)
#include <ROOT/RNTupleReader.hxx>
#endif
Expand Down
11 changes: 6 additions & 5 deletions include/podio/RNTupleWriter.h
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
#ifndef PODIO_RNTUPLEWRITER_H
#define PODIO_RNTUPLEWRITER_H

#include <ROOT/RNTuple.hxx>
#include <ROOT/RNTupleModel.hxx>
#include <RVersion.h>
#include <cstdint>

#include "TFile.h"
#include "podio/CollectionBase.h"
#include "podio/Frame.h"
#include "podio/GenericParameters.h"
#include "podio/SchemaEvolution.h"
#include "podio/utilities/DatamodelRegistryIOHelpers.h"

#include <ROOT/RNTuple.hxx>
#include <ROOT/RNTupleModel.hxx>

#include <RVersion.h>
#include <cstdint>

namespace ROOT {
namespace Experimental {
class REntry;
Expand Down
3 changes: 1 addition & 2 deletions include/podio/ROOTLegacyReader.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#ifndef PODIO_ROOTLEGACYREADER_H
#define PODIO_ROOTLEGACYREADER_H

#include "TChain.h"
#include "podio/CollectionBranches.h"
#include "podio/ROOTFrameData.h"
#include "podio/podioVersion.h"

#include "TChain.h"

#include <memory>
#include <string>
#include <tuple>
Expand Down
14 changes: 7 additions & 7 deletions include/podio/ROOTReader.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
#ifndef PODIO_ROOTREADER_H
#define PODIO_ROOTREADER_H

#include "TChain.h"
#include "podio/CollectionBranches.h"
#include "podio/ROOTFrameData.h"
#include "podio/SchemaEvolution.h"
#include "podio/podioVersion.h"
#include "podio/utilities/DatamodelRegistryIOHelpers.h"

#include <cstddef>
#include <memory>
#include <string>
Expand All @@ -10,13 +17,6 @@
#include <utility>
#include <vector>

#include "TChain.h"
#include "podio/CollectionBranches.h"
#include "podio/ROOTFrameData.h"
#include "podio/SchemaEvolution.h"
#include "podio/podioVersion.h"
#include "podio/utilities/DatamodelRegistryIOHelpers.h"

// forward declarations
class TClass;
class TFile;
Expand Down
10 changes: 5 additions & 5 deletions include/podio/ROOTWriter.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#ifndef PODIO_ROOTWRITER_H
#define PODIO_ROOTWRITER_H

#include "TFile.h"
#include "podio/CollectionBranches.h"
#include "podio/CollectionIDTable.h"
#include "podio/utilities/DatamodelRegistryIOHelpers.h"

#include <cstdint>
#include <memory>
#include <string>
Expand All @@ -9,11 +14,6 @@
#include <utility>
#include <vector>

#include "TFile.h"
#include "podio/CollectionBranches.h"
#include "podio/CollectionIDTable.h"
#include "podio/utilities/DatamodelRegistryIOHelpers.h"

// forward declarations
class TTree;

Expand Down
15 changes: 8 additions & 7 deletions include/podio/SIOBlock.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
#ifndef PODIO_SIOBLOCK_H
#define PODIO_SIOBLOCK_H

#include <cstddef>
#include <cstdint>
#include <functional>
#include <map>
#include <memory>
#include "podio/CollectionBuffers.h"

#include <podio/CollectionBase.h>
#include <podio/CollectionIDTable.h>
#include <podio/GenericParameters.h>
Expand All @@ -15,15 +12,19 @@
#include <sio/definitions.h>
#include <sio/io_device.h>
#include <sio/version.h>

#include <cstddef>
#include <cstdint>
#include <functional>
#include <map>
#include <memory>
#include <string>
#include <string_view>
#include <tuple>
#include <unordered_map>
#include <utility>
#include <vector>

#include "podio/CollectionBuffers.h"

namespace podio {
class GenericParameters;

Expand Down
15 changes: 8 additions & 7 deletions include/podio/SIOBlockUserData.h
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
#ifndef PODIO_SIOBLOCKUSERDATA_H
#define PODIO_SIOBLOCKUSERDATA_H

#include <algorithm>
#include "podio/CollectionBufferFactory.h"
#include "podio/CollectionBuffers.h"
#include "podio/GenericParameters.h"
#include "podio/SIOBlock.h"
#include "podio/UserDataCollection.h"

#include <sio/api.h>
#include <sio/definitions.h>
#include <sio/io_device.h>
#include <sio/version.h>

#include <algorithm>
#include <string>
#include <typeindex>
#include <vector>

#include "podio/CollectionBufferFactory.h"
#include "podio/CollectionBuffers.h"
#include "podio/GenericParameters.h"
#include "podio/SIOBlock.h"
#include "podio/UserDataCollection.h"

namespace podio {
namespace detail {

Expand Down
15 changes: 8 additions & 7 deletions include/podio/SIOFrameData.h
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
#ifndef PODIO_SIOFRAMEDATA_H
#define PODIO_SIOFRAMEDATA_H

#include "podio/CollectionBuffers.h"
#include "podio/CollectionIDTable.h"
#include "podio/GenericParameters.h"
#include "podio/SIOBlock.h"

#include <sio/buffer.h>
#include <sio/definitions.h>

#include <cstddef>
#include <memory>
#include <numeric>
#include <optional>
#include <sio/buffer.h>
#include <sio/definitions.h>
#include <string>
#include <utility>
#include <vector>

#include "podio/CollectionBuffers.h"
#include "podio/CollectionIDTable.h"
#include "podio/GenericParameters.h"
#include "podio/SIOBlock.h"

namespace podio {
/// The Frame data container for the SIO backend. It is constructed from the
/// compressed sio::buffers that is read from file and does all the necessary
Expand Down
13 changes: 7 additions & 6 deletions include/podio/SIOLegacyReader.h
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
#ifndef PODIO_SIOLEGACYREADER_H
#define PODIO_SIOLEGACYREADER_H

#include <fstream>
#include <memory>
#include "podio/SIOBlock.h"
#include "podio/SIOFrameData.h"
#include "podio/podioVersion.h"

#include <sio/buffer.h>
#include <sio/definitions.h>

#include <fstream>
#include <memory>
#include <string>
#include <string_view>
#include <vector>

#include "podio/SIOBlock.h"
#include "podio/SIOFrameData.h"
#include "podio/podioVersion.h"

namespace podio {

class CollectionIDTable;
Expand Down
13 changes: 7 additions & 6 deletions include/podio/SIOReader.h
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
#ifndef PODIO_SIOREADER_H
#define PODIO_SIOREADER_H

#include "podio/SIOBlock.h"
#include "podio/SIOFrameData.h"
#include "podio/podioVersion.h"
#include "podio/utilities/DatamodelRegistryIOHelpers.h"

#include <sio/definitions.h>

#include <fstream>
#include <memory>
#include <sio/definitions.h>
#include <string>
#include <string_view>
#include <unordered_map>
#include <vector>

#include "podio/SIOBlock.h"
#include "podio/SIOFrameData.h"
#include "podio/podioVersion.h"
#include "podio/utilities/DatamodelRegistryIOHelpers.h"

namespace podio {

class CollectionIDTable;
Expand Down
9 changes: 5 additions & 4 deletions include/podio/SIOWriter.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
#ifndef PODIO_SIOWRITER_H
#define PODIO_SIOWRITER_H

#include <fstream>
#include "podio/SIOBlock.h"
#include "podio/utilities/DatamodelRegistryIOHelpers.h"

#include <sio/definitions.h>

#include <fstream>
#include <string>
#include <utility>
#include <vector>

#include "podio/SIOBlock.h"
#include "podio/utilities/DatamodelRegistryIOHelpers.h"

namespace podio {

class Frame;
Expand Down
12 changes: 6 additions & 6 deletions include/podio/UserDataCollection.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#ifndef PODIO_USERDATACOLLECTION_H
#define PODIO_USERDATACOLLECTION_H

#include "podio/CollectionBase.h"
#include "podio/CollectionBuffers.h"
#include "podio/DatamodelRegistry.h"
#include "podio/SchemaEvolution.h"
#include "podio/utilities/TypeHelpers.h"

#include <cstddef>
#include <cstdint>
#include <iostream>
Expand All @@ -10,12 +16,6 @@
#include <utility>
#include <vector>

#include "podio/CollectionBase.h"
#include "podio/CollectionBuffers.h"
#include "podio/DatamodelRegistry.h"
#include "podio/SchemaEvolution.h"
#include "podio/utilities/TypeHelpers.h"

namespace podio {
class ICollectionProvider;
} // namespace podio
Expand Down
4 changes: 2 additions & 2 deletions include/podio/utilities/DatamodelRegistryIOHelpers.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef PODIO_UTILITIES_DATAMODELREGISTRYIOHELPERS_H
#define PODIO_UTILITIES_DATAMODELREGISTRYIOHELPERS_H

#include "podio/CollectionBase.h"

#include <cstddef>
#include <set>
#include <string>
Expand All @@ -9,8 +11,6 @@
#include <utility>
#include <vector>

#include "podio/CollectionBase.h"

namespace podio {
class CollectionBase;

Expand Down
10 changes: 8 additions & 2 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
SET(podio_PYTHON_INSTALLDIR python)
SET(podio_PYTHON_INSTALLDIR ${podio_PYTHON_INSTALLDIR} PARENT_SCOPE)
find_package(Python3 REQUIRED)
set(PYTHON_LIB_DIR lib)
if("${Python3_SITEARCH}" MATCHES "/lib64/")
set(PYTHON_LIB_DIR lib64)
endif()

set(podio_PYTHON_INSTALLDIR "${CMAKE_INSTALL_PREFIX}/${PYTHON_LIB_DIR}/python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}/site-packages")
set(podio_PYTHON_INSTALLDIR ${podio_PYTHON_INSTALLDIR} PARENT_SCOPE)

set(to_install
podio_class_generator.py
Expand Down
Loading

0 comments on commit 974f618

Please sign in to comment.