Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
FemtoSerializationInterface3D.cxx
1/*
2 * FemtoSerializationInterface3D.cxx
3 *
4 * Created on: 17 sty 2024
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9#include "FemtoSerializationInterface3D.h"
10
11#include "Cout.h"
12
13namespace Hal {
14
15 Bool_t FemtoSerializationInterface3D::GetBinsNo() {
16 fBinStart = 1;
17 fBinStop = fCF->GetNum()->GetNbinsZ();
18 return kTRUE;
19 }
20
21 void FemtoSerializationInterface3D::ConvertCF(ECopyDir dir) {
22 TH3D* n = (TH3D*) fCF->GetNum();
23 TH3D* d = (TH3D*) fCF->GetDen();
24 ExpandArrayIfSerialize(n->GetNbinsX() * n->GetNbinsY() * (fBinHi - fBinLow - 1) * 2, dir);
25 int count = 0;
26 std::vector<TH3*> cfs;
27 cfs.push_back(n);
28 cfs.push_back(d);
29 for (int i = 1; i <= n->GetNbinsX(); i++) {
30 for (int j = 1; j <= n->GetNbinsY(); j++) {
31 for (int k = fBinLow; k <= fBinHi; k++) {
32 CopyData3D(cfs, i, j, k, dir, false);
33 }
34 }
35 }
36 }
37
38 void FemtoSerializationInterface3D::ConvertSlice(ECopyDir dir) {
39 ExpandArrayIfSerialize(fSlice->fOutBins * fSlice->fSideBins * 2, dir);
40 for (unsigned int iO = 0; iO < fSlice->fOutBins; iO++) {
41 for (unsigned int iS = 0; iS < fSlice->fSideBins; iS++) {
42 CopyDataSingle(fSlice->fNum[fBinLow][iO][iS], dir);
43 CopyDataSingle(fSlice->fDen[fBinLow][iO][iS], dir);
44 }
45 }
46 }
47
48 void FemtoSerializationInterface3D::ConvertCFSimple(ECopyDir dir) {
49 TH3D* n = (TH3D*) fCF->GetNum();
50 TH3D* d = (TH3D*) fCF->GetDen();
51 ExpandArrayIfSerialize(n->GetNbinsX() * n->GetNbinsY() * (fBinHi - fBinLow + 1), dir);
52 Hal::Cout::DebugInfo(fBinHi - fBinLow + 1);
53 std::vector<TH3*> cfsN, cfsD;
54 cfsN.push_back(n);
55 cfsD.push_back(d);
56 for (int i = 1; i <= n->GetNbinsX(); i++) {
57 for (int j = 1; j <= n->GetNbinsY(); j++) {
58 for (int k = 1; k <= n->GetNbinsZ(); k++) {
59 CopyData3D2(cfsN, cfsD, i, j, k, dir);
60 }
61 }
62 }
63 }
64
65 void FemtoSerializationInterface3D::ConvertSliceSimple(ECopyDir dir) {
66 ExpandArrayIfSerialize(fSlice->fOutBins * fSlice->fSideBins, dir);
67 for (unsigned int iO = 0; iO < fSlice->fOutBins; iO++) {
68 for (unsigned int iS = 0; iS < fSlice->fSideBins; iS++) {
69 CopyDataPair(fSlice->fNum[fBinLow][iO][iS], fSlice->fDen[fBinLow][iO][iS], dir);
70 }
71 }
72 }
73
74} /* namespace Hal */
static void DebugInfo(Int_t i)
Definition Cout.cxx:249