EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
compareRootFiles.hpp File Reference
#include <cmath>
#include <exception>
#include <functional>
#include <sstream>
#include <vector>
#include "TDictionary.h"
#include "TTreeReaderValue.h"
+ Include dependency graph for compareRootFiles.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  AnyVector
 
struct  BranchComparisonHarness
 
struct  BranchComparisonHarness::TreeMetadata
 
class  BranchComparisonHarness::UnsupportedBranchType
 
class  BranchComparisonHarness::IEventLoader
 
class  BranchComparisonHarness::EventLoaderT< T >
 

Macros

#define CREATE_VECTOR__HANDLE_TYPE(type_name)
 
#define CREATE_VECTOR__HANDLE_INTEGER_TYPE(integer_type_name)
 

Typedefs

template<typename T >
using HomogeneousPair = std::pair< T, T >
 
using IndexComparator = std::function< Ordering(std::size_t, std::size_t)>
 
using IndexSwapper = std::function< void(std::size_t, std::size_t)>
 

Enumerations

enum  Ordering { SMALLER, EQUAL, GREATER }
 

Functions

template<typename T >
Ordering compare (const T &x, const T &y)
 
template<typename T >
Ordering compareFloat (const T &x, const T &y)
 
template<>
Ordering compare (const float &x, const float &y)
 
template<>
Ordering compare (const double &x, const double &y)
 
template<typename U >
Ordering compare (const std::vector< U > &v1, const std::vector< U > &v2)
 
void selectionSort (const std::size_t firstIndex, const std::size_t lastIndex, const IndexComparator &compare, const IndexSwapper &swap)
 
void quickSort (const std::size_t firstIndex, const std::size_t lastIndex, const IndexComparator &compare, const IndexSwapper &swap)
 

Macro Definition Documentation

#define CREATE_VECTOR__HANDLE_INTEGER_TYPE (   integer_type_name)
Value:
CREATE_VECTOR__HANDLE_TYPE(integer_type_name) \
else CREATE_VECTOR__HANDLE_TYPE(unsigned integer_type_name)

Referenced by BranchComparisonHarness::createVector().

#define CREATE_VECTOR__HANDLE_TYPE (   type_name)
Value:
if (elemType == #type_name) { \
return BranchComparisonHarness::create<std::vector<type_name>>( \
treeMetadata, branchName); \
}

Referenced by BranchComparisonHarness::createVector().

Typedef Documentation

template<typename T >
using HomogeneousPair = std::pair<T, T>

Definition at line 22 of file compareRootFiles.hpp.

View newest version in sPHENIX GitHub at line 22 of file compareRootFiles.hpp

using IndexComparator = std::function<Ordering(std::size_t, std::size_t)>

Definition at line 150 of file compareRootFiles.hpp.

View newest version in sPHENIX GitHub at line 150 of file compareRootFiles.hpp

using IndexSwapper = std::function<void(std::size_t, std::size_t)>

Definition at line 151 of file compareRootFiles.hpp.

View newest version in sPHENIX GitHub at line 151 of file compareRootFiles.hpp

Enumeration Type Documentation

enum Ordering
Enumerator:
SMALLER 
EQUAL 
GREATER 

Definition at line 82 of file compareRootFiles.hpp.

View newest version in sPHENIX GitHub at line 82 of file compareRootFiles.hpp

Function Documentation

template<typename T >
Ordering compare ( const T x,
const T y 
)

Definition at line 87 of file compareRootFiles.hpp.

View newest version in sPHENIX GitHub at line 87 of file compareRootFiles.hpp

Referenced by BranchComparisonHarness::create(), PHGenFitTrackProjection::process_event(), quickSort(), and selectionSort().

+ Here is the caller graph for this function:

template<>
Ordering compare ( const float &  x,
const float &  y 
)

Definition at line 110 of file compareRootFiles.hpp.

View newest version in sPHENIX GitHub at line 110 of file compareRootFiles.hpp

References compareFloat().

+ Here is the call graph for this function:

template<>
Ordering compare ( const double &  x,
const double &  y 
)

Definition at line 115 of file compareRootFiles.hpp.

View newest version in sPHENIX GitHub at line 115 of file compareRootFiles.hpp

References compareFloat().

+ Here is the call graph for this function:

template<typename U >
Ordering compare ( const std::vector< U > &  v1,
const std::vector< U > &  v2 
)

Definition at line 122 of file compareRootFiles.hpp.

View newest version in sPHENIX GitHub at line 122 of file compareRootFiles.hpp

template<typename T >
Ordering compareFloat ( const T x,
const T y 
)

Definition at line 99 of file compareRootFiles.hpp.

View newest version in sPHENIX GitHub at line 99 of file compareRootFiles.hpp

Referenced by compare().

+ Here is the caller graph for this function:

void quickSort ( const std::size_t  firstIndex,
const std::size_t  lastIndex,
const IndexComparator compare,
const IndexSwapper swap 
)

Definition at line 173 of file compareRootFiles.hpp.

View newest version in sPHENIX GitHub at line 173 of file compareRootFiles.hpp

References compare(), selectionSort(), and boost::swap().

Referenced by compareRootFiles().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void selectionSort ( const std::size_t  firstIndex,
const std::size_t  lastIndex,
const IndexComparator compare,
const IndexSwapper swap 
)

Definition at line 155 of file compareRootFiles.hpp.

View newest version in sPHENIX GitHub at line 155 of file compareRootFiles.hpp

References compare(), and boost::swap().

Referenced by quickSort().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: