43 |
|
|
44 |
|
namespace oopse { |
45 |
|
|
46 |
< |
CrossTimeCorrFunc::CrossTimeCorrFunc(SimInfo * info, const std::string & filename, |
47 |
< |
const std :: string & sele1, const std :: string & sele2, int storageLayout) |
46 |
> |
CrossTimeCorrFunc::CrossTimeCorrFunc(SimInfo * info, const std::string & filename, |
47 |
> |
const std :: string & sele1, const std :: string & sele2, int storageLayout) |
48 |
|
: TimeCorrFunc(info, filename, sele1, sele2, storageLayout) { |
49 |
|
|
50 |
< |
nSelected1_ = seleMan1_.getSelectionCount(); |
51 |
< |
nSelected2_ = seleMan2_.getSelectionCount(); |
52 |
< |
nSelectedPairs_ = nSelected1_ * nSelected2_; |
53 |
< |
} |
50 |
> |
nSelected1_ = seleMan1_.getSelectionCount(); |
51 |
> |
nSelected2_ = seleMan2_.getSelectionCount(); |
52 |
> |
nSelectedPairs_ = nSelected1_ * nSelected2_; |
53 |
> |
} |
54 |
|
|
55 |
< |
void CrossTimeCorrFunc::correlateFrames(int frame1, int frame2) { |
55 |
> |
void CrossTimeCorrFunc::correlateFrames(int frame1, int frame2) { |
56 |
|
Snapshot* snapshot1 = bsMan_->getSnapshot(frame1); |
57 |
|
Snapshot* snapshot2 = bsMan_->getSnapshot(frame2); |
58 |
|
assert(snapshot1 && snapshot2); |
69 |
|
StuntDouble* sd2; |
70 |
|
for (sd1 = seleMan1_.beginSelected(i); sd1 != NULL; sd1 = seleMan1_.nextSelected(i)) { |
71 |
|
|
72 |
< |
for (sd2 = seleMan2_.beginSelected(j); sd2 != NULL; sd2 = seleMan2_.nextSelected(j)) { |
73 |
< |
double corrVal = calcCorrVal(frame1, frame2, sd1, sd2); |
74 |
< |
histogram_[timeBin] += corrVal; |
75 |
< |
} |
72 |
> |
for (sd2 = seleMan2_.beginSelected(j); sd2 != NULL; sd2 = seleMan2_.nextSelected(j)) { |
73 |
> |
double corrVal = calcCorrVal(frame1, frame2, sd1, sd2); |
74 |
> |
histogram_[timeBin] += corrVal; |
75 |
> |
} |
76 |
|
} |
77 |
< |
} |
77 |
> |
} |
78 |
|
|
79 |
|
} |