Project
Loading...
Searching...
No Matches
standalone-cluster-dump-entropy-analysed.cxx File Reference
#include <stdio.h>
#include <stdlib.h>
#include <memory.h>
#include <math.h>
#include <queue>
#include <map>
#include <iterator>
#include <algorithm>
#include <iostream>

Go to the source code of this file.

Classes

union  cluster_struct
 
class  INode
 
class  InternalNode
 
class  LeafNode
 
struct  NodeCmp
 

Macros

#define EVENT   0
 
#define SECTOR   1
 
#define PATCH   2
 
#define ROW   3
 
#define PAD   4
 
#define TIME   5
 
#define SIGMA_PAD   6
 
#define SIGMA_TIME   7
 
#define QMAX   8
 
#define QTOT   9
 
#define FLAG_PADTIME   10
 
#define CLUSTER_ID   11
 
#define RES_PAD   12
 
#define RES_TIME   13
 
#define AVG_TOT   14
 
#define AVG_MAX   15
 
#define QMAX_QTOT   16
 
#define SIGMA_PAD_TIME   17
 
#define DIFF_SIGMA_PAD   18
 
#define DIFF_SIGMA_TIME   19
 
#define DIFF_SIGMA_PAD_TIME   20
 
#define AVG_TOT_MAX   21
 
#define ROW_TRACK_FIRST   22
 
#define ROW_TRACK   23
 
#define PAD_80   24
 
#define PAD_92   25
 
#define PAD_104   26
 
#define PAD_116   27
 
#define PAD_128   28
 
#define PAD_140   29
 

Typedefs

typedef std::vector< bool > HuffCode
 
typedef std::map< uint32_t, HuffCodeHuffCodeMap
 

Functions

INodeBuildTree (const double *frequencies, uint32_t UniqueSymbols)
 
void GenerateCodes (const INode *node, const HuffCode &prefix, HuffCodeMap &outCodes)
 
bool clustercompare_padtime (cluster_struct a, cluster_struct b)
 
bool clustercompare_timepad (cluster_struct a, cluster_struct b)
 
bool clustercompare_padtime_mixed (cluster_struct a, cluster_struct b)
 
bool clustercompare_timepad_mixed (cluster_struct a, cluster_struct b)
 
bool clustercompare_inevent (cluster_struct a, cluster_struct b)
 
void do_diff (uint32_t &val, int32_t &last, uint32_t bits, uint32_t maxval=0)
 
uint32_t truncate (int32_t j, uint32_t val)
 
int32_t main (int argc, char **argv)
 

Variables

const int32_t sort_method = 1
 
const int32_t sector_diff = 1
 
const int32_t row_diff = 1
 
const int32_t pad_diff = 1
 
const int32_t time_diff = 1
 
const int32_t res_diff = 0
 
const int32_t approximate_qtot = 0
 
const int32_t combine_maxtot = 1
 
const int32_t combine_sigmapadtime = 1
 
const int32_t track_based = 1
 
const int32_t track_avgtot = track_based && 0
 
const int32_t track_avgmax = track_based && 0
 
const int32_t track_diffqtot = track_based && 0
 
const int32_t track_diffqmax = track_based && 0
 
const int32_t track_separate_q = track_based && 1
 
const int32_t track_diffsigma = track_based && 0
 
const int32_t track_separate_sigma = track_based && 1
 
const int32_t truncate_bits = 1
 
const int32_t separate_sectors = 0
 
const int32_t separate_patches = 0
 
const int32_t separate_sides = 0
 
const int32_t full_row_numbers = 1
 
const int32_t distinguish_rows = 0
 
const int32_t optimized_negative_values = 1
 
const int32_t print_clusters = 0
 
const charfile = "clusters-pbpb.dump"
 
const int32_t max_clusters = 2000000
 
const int32_t truncate_sigma = 3
 
const int32_t truncate_charge = 4
 
const int32_t sort_pad_mixed_bins = 100
 
const int32_t sort_time_mixed_bins = 400
 
const int32_t rr = optimized_negative_values && 0 ? 13 : 14
 
const uint32_t field_bits [] = {0, 6, 0, 8, 14, 15, 8, 8, 10, 16, 2, 0, 14, 15, 16, 10, 26, 16, 8, 8, 16, 26, 8, 8, rr, rr, rr, rr, rr, 14}
 
const uint32_t significant_bits [] = {0, 6, 0, 8, 14, 15, truncate_sigma, truncate_sigma, truncate_charge, truncate_charge, 2, 0, 14, 15, truncate_charge, truncate_charge, 26, 16, truncate_sigma, truncate_sigma, 16, 26, 8, 8, rr, rr, rr, rr, rr, 14}
 
const int32_t nFields = sizeof(field_bits) / sizeof(field_bits[0])
 
const charfield_names []
 
int32_t fgRows [6][2] = {{0, 30}, {30, 62}, {63, 90}, {90, 116}, {117, 139}, {139, 158}}
 
int32_t fgNRows [6] = {31, 33, 28, 27, 23, 20}
 
int32_t fgNPads [159]
 
int32_t fgNPadsMod [159]
 

Detailed Description

Author
David Rohr

Definition in file standalone-cluster-dump-entropy-analysed.cxx.

Macro Definition Documentation

◆ AVG_MAX

#define AVG_MAX   15

Definition at line 76 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ AVG_TOT

#define AVG_TOT   14

Definition at line 75 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ AVG_TOT_MAX

#define AVG_TOT_MAX   21

Definition at line 82 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ CLUSTER_ID

#define CLUSTER_ID   11

Definition at line 72 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ DIFF_SIGMA_PAD

#define DIFF_SIGMA_PAD   18

Definition at line 79 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ DIFF_SIGMA_PAD_TIME

#define DIFF_SIGMA_PAD_TIME   20

Definition at line 81 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ DIFF_SIGMA_TIME

#define DIFF_SIGMA_TIME   19

Definition at line 80 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ EVENT

#define EVENT   0

Definition at line 61 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ FLAG_PADTIME

#define FLAG_PADTIME   10

Definition at line 71 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ PAD

#define PAD   4

Definition at line 65 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ PAD_104

#define PAD_104   26

Definition at line 88 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ PAD_116

#define PAD_116   27

Definition at line 89 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ PAD_128

#define PAD_128   28

Definition at line 90 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ PAD_140

#define PAD_140   29

Definition at line 91 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ PAD_80

#define PAD_80   24

Definition at line 86 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ PAD_92

#define PAD_92   25

Definition at line 87 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ PATCH

#define PATCH   2

Definition at line 63 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ QMAX

#define QMAX   8

Definition at line 69 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ QMAX_QTOT

#define QMAX_QTOT   16

Definition at line 77 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ QTOT

#define QTOT   9

Definition at line 70 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ RES_PAD

#define RES_PAD   12

Definition at line 73 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ RES_TIME

#define RES_TIME   13

Definition at line 74 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ ROW

#define ROW   3

Definition at line 64 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ ROW_TRACK

#define ROW_TRACK   23

Definition at line 84 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ ROW_TRACK_FIRST

#define ROW_TRACK_FIRST   22

Definition at line 83 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ SECTOR

#define SECTOR   1

Definition at line 62 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ SIGMA_PAD

#define SIGMA_PAD   6

Definition at line 67 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ SIGMA_PAD_TIME

#define SIGMA_PAD_TIME   17

Definition at line 78 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ SIGMA_TIME

#define SIGMA_TIME   7

Definition at line 68 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ TIME

#define TIME   5

Definition at line 66 of file standalone-cluster-dump-entropy-analysed.cxx.

Typedef Documentation

◆ HuffCode

typedef std::vector<bool> HuffCode

◆ HuffCodeMap

typedef std::map<uint32_t, HuffCode> HuffCodeMap

Function Documentation

◆ BuildTree()

INode * BuildTree ( const double *  frequencies,
uint32_t  UniqueSymbols 
)

◆ clustercompare_inevent()

bool clustercompare_inevent ( cluster_struct  a,
cluster_struct  b 
)

◆ clustercompare_padtime()

bool clustercompare_padtime ( cluster_struct  a,
cluster_struct  b 
)

◆ clustercompare_padtime_mixed()

bool clustercompare_padtime_mixed ( cluster_struct  a,
cluster_struct  b 
)

◆ clustercompare_timepad()

bool clustercompare_timepad ( cluster_struct  a,
cluster_struct  b 
)

◆ clustercompare_timepad_mixed()

bool clustercompare_timepad_mixed ( cluster_struct  a,
cluster_struct  b 
)

◆ do_diff()

void do_diff ( uint32_t &  val,
int32_t &  last,
uint32_t  bits,
uint32_t  maxval = 0 
)

◆ GenerateCodes()

void GenerateCodes ( const INode node,
const HuffCode prefix,
HuffCodeMap outCodes 
)

◆ main()

int32_t main ( int  argc,
char **  argv 
)

◆ truncate()

uint32_t truncate ( int32_t  j,
uint32_t  val 
)

Variable Documentation

◆ approximate_qtot

const int32_t approximate_qtot = 0

Definition at line 31 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ combine_maxtot

const int32_t combine_maxtot = 1

Definition at line 32 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ combine_sigmapadtime

const int32_t combine_sigmapadtime = 1

Definition at line 33 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ distinguish_rows

const int32_t distinguish_rows = 0

Definition at line 47 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ fgNPads

int32_t fgNPads[159]
Initial value:
= {68, 68, 68, 68, 70, 70, 70, 72, 72, 72, 74, 74, 74, 76, 76, 76, 78, 78, 78, 80, 80, 80, 82, 82, 82, 84, 84, 84, 86, 86, 86, 88, 88, 88, 90, 90, 90, 92, 92, 92, 94, 94, 94, 96, 96, 96, 98, 98, 98, 100, 100, 100, 102,
102, 102, 104, 104, 104, 106, 106, 106, 108, 108, 74, 76, 76, 76, 76, 78, 78, 78, 80, 80, 80, 80, 82, 82, 82, 84, 84, 84, 86, 86, 86, 86, 88, 88, 88, 90, 90, 90, 90, 92, 92, 92, 94, 94, 94, 96, 96, 96, 96, 98, 98, 98, 100,
100, 100, 100, 102, 102, 102, 104, 104, 104, 106, 106, 106, 106, 108, 108, 108, 110, 110, 110, 110, 112, 112, 114, 114, 114, 116, 116, 118, 118, 120, 120, 122, 122, 122, 124, 124, 126, 126, 128, 128, 130, 130, 130, 132, 132, 134, 134, 136, 136, 138, 138, 138, 140}

Definition at line 115 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ fgNPadsMod

int32_t fgNPadsMod[159]
Initial value:
= {80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
104, 104, 104, 104, 104, 116, 116, 116, 116, 116, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
104, 104, 104, 104, 104, 104, 104, 104, 104, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 128, 128, 128, 128, 128, 128, 128, 128, 128, 126, 126, 128, 128, 140, 140, 140, 140, 140, 134, 134, 140, 140, 140, 140, 140, 140}

Definition at line 119 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ fgNRows

int32_t fgNRows[6] = {31, 33, 28, 27, 23, 20}

◆ fgRows

int32_t fgRows[6][2] = {{0, 30}, {30, 62}, {63, 90}, {90, 116}, {117, 139}, {139, 158}}

◆ field_bits

const uint32_t field_bits[] = {0, 6, 0, 8, 14, 15, 8, 8, 10, 16, 2, 0, 14, 15, 16, 10, 26, 16, 8, 8, 16, 26, 8, 8, rr, rr, rr, rr, rr, 14}

Definition at line 95 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ field_names

const char* field_names[]
Initial value:
= {"event", "sector", "patch", "row", "pad", "time", "sigmaPad", "sigmaTime", "qmax", "qtot", "flagPadTime", "trackID", "resTrackPad",
"resTrackTime", "trackQTot", "trackQMax", "qmaxtot", "sigmapadtime", "diffsigmapad", "diffsigmatime", "diffsigmapadtime", "tracktotmax", "trackfirstrow", "trackrow", "pad_80", "pad_92",
"pad_104", "pad_116", "pad_128", "pad_140"}

Definition at line 98 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ file

const char* file = "clusters-pbpb.dump"

Definition at line 52 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ full_row_numbers

const int32_t full_row_numbers = 1

Definition at line 46 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ max_clusters

const int32_t max_clusters = 2000000

Definition at line 53 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ nFields

const int32_t nFields = sizeof(field_bits) / sizeof(field_bits[0])

Definition at line 97 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ optimized_negative_values

const int32_t optimized_negative_values = 1

Definition at line 48 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ pad_diff

const int32_t pad_diff = 1

Definition at line 28 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ print_clusters

const int32_t print_clusters = 0

Definition at line 50 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ res_diff

const int32_t res_diff = 0

Definition at line 30 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ row_diff

const int32_t row_diff = 1

Definition at line 27 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ rr

const int32_t rr = optimized_negative_values && 0 ? 13 : 14

Definition at line 93 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ sector_diff

const int32_t sector_diff = 1

Definition at line 26 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ separate_patches

const int32_t separate_patches = 0

Definition at line 44 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ separate_sectors

const int32_t separate_sectors = 0

Definition at line 43 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ separate_sides

const int32_t separate_sides = 0

Definition at line 45 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ significant_bits

const uint32_t significant_bits[] = {0, 6, 0, 8, 14, 15, truncate_sigma, truncate_sigma, truncate_charge, truncate_charge, 2, 0, 14, 15, truncate_charge, truncate_charge, 26, 16, truncate_sigma, truncate_sigma, 16, 26, 8, 8, rr, rr, rr, rr, rr, 14}

Definition at line 96 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ sort_method

const int32_t sort_method = 1

Definition at line 25 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ sort_pad_mixed_bins

const int32_t sort_pad_mixed_bins = 100

Definition at line 58 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ sort_time_mixed_bins

const int32_t sort_time_mixed_bins = 400

Definition at line 59 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ time_diff

const int32_t time_diff = 1

Definition at line 29 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ track_avgmax

const int32_t track_avgmax = track_based && 0

Definition at line 36 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ track_avgtot

const int32_t track_avgtot = track_based && 0

Definition at line 35 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ track_based

const int32_t track_based = 1

Definition at line 34 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ track_diffqmax

const int32_t track_diffqmax = track_based && 0

Definition at line 38 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ track_diffqtot

const int32_t track_diffqtot = track_based && 0

Definition at line 37 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ track_diffsigma

const int32_t track_diffsigma = track_based && 0

Definition at line 40 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ track_separate_q

const int32_t track_separate_q = track_based && 1

Definition at line 39 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ track_separate_sigma

const int32_t track_separate_sigma = track_based && 1

Definition at line 41 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ truncate_bits

const int32_t truncate_bits = 1

Definition at line 42 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ truncate_charge

const int32_t truncate_charge = 4

Definition at line 56 of file standalone-cluster-dump-entropy-analysed.cxx.

◆ truncate_sigma

const int32_t truncate_sigma = 3

Definition at line 55 of file standalone-cluster-dump-entropy-analysed.cxx.