You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DECLARE_SOA_TABLE(JWeights, "AOD", "JWEIGHT", jweight::WeightNUA, jweight::WeightEff); //! JFluc table for weights
61
-
} // namespace o2::aod
62
-
63
-
// The standalone jfluc code expects the entire list of tracks for an event. At the same time, it expects weights together with other track attributes.
64
-
// This workflow creates a table of weights that can be joined with track tables.
65
-
structjflucWeightsLoader {
66
-
O2_DEFINE_CONFIGURABLE(pathPhiWeights, std::string, "", "Local (local://) or CCDB path for the phi acceptance correction histogram");
67
-
68
-
structMap {
69
-
Map(THnF* _ph, int _runNumber) : ph(_ph), runNumber(_runNumber) {}
70
-
~Map() { delete ph; }
71
-
THnF* ph;
72
-
int runNumber;
73
-
};
74
-
std::deque<Map> nuaCache;
75
-
TFile* pf = 0;
76
-
77
-
~jflucWeightsLoader()
78
-
{
79
-
if (pf) {
80
-
nuaCache.clear();
81
-
pf->Close();
82
-
delete pf;
83
-
}
84
-
}
85
-
86
-
Produces<aod::JWeights> output;
87
-
voidinit(InitContext const&)
88
-
{
89
-
if (!doprocessLoadWeights && !doprocessLoadWeightsCF)
90
-
return;
91
-
if (doprocessLoadWeights && doprocessLoadWeightsCF)
92
-
LOGF(fatal, "Only one weights loader process switch can be enabled at a time.");
93
-
if (pathPhiWeights.value.substr(0, 8) == "local://") {
// The standalone jfluc code expects the entire list of tracks for an event. At the same time, it expects weights together with other track attributes.
41
+
// This workflow creates a table of weights that can be joined with track tables.
42
+
structjflucWeightsLoader {
43
+
O2_DEFINE_CONFIGURABLE(pathPhiWeights, std::string, "", "Local (local://) or CCDB path for the phi acceptance correction histogram");
44
+
45
+
THnF* ph = 0;
46
+
TFile* pf = 0;
47
+
int runNumber = 0;
48
+
49
+
~jflucWeightsLoader()
50
+
{
51
+
if (ph)
52
+
delete ph;
53
+
if (pf) {
54
+
pf->Close();
55
+
delete pf;
56
+
}
57
+
}
58
+
59
+
Produces<aod::JWeights> output;
60
+
voidinit(InitContext const&)
61
+
{
62
+
if (!doprocessLoadWeights && !doprocessLoadWeightsCF)
63
+
return;
64
+
if (doprocessLoadWeights && doprocessLoadWeightsCF)
65
+
LOGF(fatal, "Only one weights loader process switch can be enabled at a time.");
66
+
if (pathPhiWeights.value.substr(0, 8) == "local://") {
0 commit comments