Skip to content

Commit 1e2611f

Browse files
iarseneIonut Cristian Arsene
andauthored
[PWGDQ] Adding functionality to define histograms, cuts and MC signals in configurables via JSON formatted strings (#9692)
Co-authored-by: Ionut Cristian Arsene <iarsene@cern.ch>
1 parent 392f1f2 commit 1e2611f

20 files changed

+2375
-157
lines changed

PWGDQ/Core/AnalysisCompositeCut.cxx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,34 @@ AnalysisCompositeCut::AnalysisCompositeCut(const char* name, const char* title,
3535
//
3636
}
3737

38+
//____________________________________________________________________________
39+
AnalysisCompositeCut::AnalysisCompositeCut(const AnalysisCompositeCut& c) : AnalysisCut(c)
40+
{
41+
//
42+
// copy constructor
43+
//
44+
if (this != &c) {
45+
fOptionUseAND = c.fOptionUseAND;
46+
fCutList = c.fCutList;
47+
fCompositeCutList = c.fCompositeCutList;
48+
}
49+
}
50+
51+
//____________________________________________________________________________
52+
AnalysisCompositeCut& AnalysisCompositeCut::operator=(const AnalysisCompositeCut& c)
53+
{
54+
//
55+
// assignment
56+
//
57+
if (this != &c) {
58+
AnalysisCut::operator=(c);
59+
fOptionUseAND = c.fOptionUseAND;
60+
fCutList = c.fCutList;
61+
fCompositeCutList = c.fCompositeCutList;
62+
}
63+
return (*this);
64+
}
65+
3866
//____________________________________________________________________________
3967
AnalysisCompositeCut::~AnalysisCompositeCut() = default;
4068

PWGDQ/Core/AnalysisCompositeCut.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ class AnalysisCompositeCut : public AnalysisCut
2626
public:
2727
AnalysisCompositeCut(bool useAND = kTRUE);
2828
AnalysisCompositeCut(const char* name, const char* title, bool useAND = kTRUE);
29-
AnalysisCompositeCut(const AnalysisCompositeCut& c) = default;
30-
AnalysisCompositeCut& operator=(const AnalysisCompositeCut& c) = default;
29+
AnalysisCompositeCut(const AnalysisCompositeCut& c);
30+
AnalysisCompositeCut& operator=(const AnalysisCompositeCut& c);
3131
~AnalysisCompositeCut() override;
3232

3333
void AddCut(AnalysisCut* cut)

PWGDQ/Core/AnalysisCut.cxx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111

1212
#include "PWGDQ/Core/AnalysisCut.h"
1313

14+
#include <iostream>
15+
using std::cout;
16+
using std::endl;
17+
1418
ClassImp(AnalysisCut);
1519

1620
std::vector<int> AnalysisCut::fgUsedVars = {};
@@ -37,5 +41,22 @@ AnalysisCut& AnalysisCut::operator=(const AnalysisCut& c)
3741
return (*this);
3842
}
3943

44+
//____________________________________________________________________________
45+
AnalysisCut::AnalysisCut(const AnalysisCut& c) : TNamed(c)
46+
{
47+
//
48+
// copy constructor
49+
//
50+
if (this != &c) {
51+
fCuts = c.fCuts;
52+
}
53+
}
54+
4055
//____________________________________________________________________________
4156
AnalysisCut::~AnalysisCut() = default;
57+
58+
//____________________________________________________________________________
59+
void AnalysisCut::PrintCuts()
60+
{
61+
cout << "**************** AnalysisCut::PrintCuts" << endl;
62+
}

PWGDQ/Core/AnalysisCut.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class AnalysisCut : public TNamed
2626
public:
2727
AnalysisCut() = default;
2828
AnalysisCut(const char* name, const char* title);
29-
AnalysisCut(const AnalysisCut& c) = default;
29+
AnalysisCut(const AnalysisCut& c);
3030
AnalysisCut& operator=(const AnalysisCut& c);
3131
~AnalysisCut() override;
3232

@@ -42,6 +42,8 @@ class AnalysisCut : public TNamed
4242

4343
static std::vector<int> fgUsedVars; //! vector of used variables
4444

45+
void PrintCuts();
46+
4547
struct CutContainer {
4648
short fVar; // variable to be cut upon
4749
float fLow; // lower limit for the var

0 commit comments

Comments
 (0)