Analysis Software
Documentation for sPHENIX simulation 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 151 of file compareRootFiles.hpp.

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

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

Definition at line 152 of file compareRootFiles.hpp.

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

Enumeration Type Documentation

enum Ordering
Enumerator:
SMALLER 
EQUAL 
GREATER 

Definition at line 83 of file compareRootFiles.hpp.

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

Function Documentation

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

Definition at line 88 of file compareRootFiles.hpp.

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

Referenced by BranchComparisonHarness::create(), ActsExamples::TGeoDetectorWithOptions::finalize(), find_json_token(), ParameterReader::phraseEquationWithoutComments(), ParameterReader::phraseOneLine(), 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 111 of file compareRootFiles.hpp.

View newest version in sPHENIX GitHub at line 111 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 116 of file compareRootFiles.hpp.

View newest version in sPHENIX GitHub at line 116 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 123 of file compareRootFiles.hpp.

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

References i.

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

Definition at line 100 of file compareRootFiles.hpp.

View newest version in sPHENIX GitHub at line 100 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 175 of file compareRootFiles.hpp.

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

References compare(), i, j, selectionSort(), and 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 156 of file compareRootFiles.hpp.

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

References compare(), and swap().

Referenced by quickSort().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: