Wow, it actually gave different results this time. I made the following tests, in a new folder in which I put only my ntuple files:
root [0] TFile f("user.mfujimot.18125658._000001.myNTuple.root")
(TFile &) Name: user.mfujimot.18125658._000001.myNTuple.root Title:
root [1] TTreeReader r("tree", &f)
(TTreeReader &) Name: TTreeReader Title: A simple interface to read trees
root [2] TTreeReaderValue<Int_t> EventNumber = {r, "EventNumber"}
(TTreeReaderValue<Int_t> &) @0x7f39da5db540
root [3] TTree* t = (TTree*)f.Get("tree")
(TTree *) 0x5615a386fb50
root [4] t->MakeSelector("MySelector")
(int) 0
root [5] .L MySelector.C
root [6] t->Process("MySelector.C")
In file included from input_line_141:1:
In file included from /home/ets9/Desktop/TESI/my/MySelector.C:28:
/home/ets9/Desktop/TESI/my/MySelector.h:38:40: error: no matching constructor for initialization of 'TTreeReaderArray<int>'
TTreeReaderArray<int> HitsOnDisks = {fReader, "HitsOnDisks"};
^~~~~~~~~~~~~~~~~~~~~~~~
/home/ets9/root/include/TTreeReaderArray.h:75:30: note: candidate constructor (the implicit copy constructor) not viable: requires 1
argument, but 2 were provided
class R__CLING_PTRCHECK(off) TTreeReaderArray final : public ROOT::Inter...
^
/home/ets9/root/include/TTreeReaderArray.h:75:30: note: candidate constructor (the implicit move constructor) not viable: requires 1
argument, but 2 were provided
In file included from input_line_141:1:
In file included from /home/ets9/Desktop/TESI/my/MySelector.C:28:
/home/ets9/Desktop/TESI/my/MySelector.h:39:38: error: no matching constructor for initialization of 'TTreeReaderArray<int>'
TTreeReaderArray<int> sideDiskA = {fReader, "sideDiskA"};
^~~~~~~~~~~~~~~~~~~~~~
/home/ets9/root/include/TTreeReaderArray.h:75:30: note: candidate constructor (the implicit copy constructor) not viable: requires 1
argument, but 2 were provided
class R__CLING_PTRCHECK(off) TTreeReaderArray final : public ROOT::Inter...
^
/home/ets9/root/include/TTreeReaderArray.h:75:30: note: candidate constructor (the implicit move constructor) not viable: requires 1
argument, but 2 were provided
In file included from input_line_141:1:
In file included from /home/ets9/Desktop/TESI/my/MySelector.C:28:
/home/ets9/Desktop/TESI/my/MySelector.h:40:38: error: no matching constructor for initialization of 'TTreeReaderArray<int>'
TTreeReaderArray<int> sideDiskC = {fReader, "sideDiskC"};
^~~~~~~~~~~~~~~~~~~~~~
/home/ets9/root/include/TTreeReaderArray.h:75:30: note: candidate constructor (the implicit copy constructor) not viable: requires 1
argument, but 2 were provided
class R__CLING_PTRCHECK(off) TTreeReaderArray final : public ROOT::Inter...
^
/home/ets9/root/include/TTreeReaderArray.h:75:30: note: candidate constructor (the implicit move constructor) not viable: requires 1
argument, but 2 were provided
In file included from input_line_141:1:
In file included from /home/ets9/Desktop/TESI/my/MySelector.C:28:
/home/ets9/Desktop/TESI/my/MySelector.h:41:44: error: no matching constructor for initialization of 'TTreeReaderValue<Float_t>' (aka
'TTreeReaderValue<float>')
TTreeReaderValue<Float_t> BCMprescale = {fReader, "BCMprescale"};
^~~~~~~~~~~~~~~~~~~~~~~~
/home/ets9/root/include/TTreeReaderValue.h:140:30: note: candidate constructor (the implicit copy constructor) not viable: requires 1
argument, but 2 were provided
class R__CLING_PTRCHECK(off) TTreeReaderValue final: public ROOT::Intern...
^
/home/ets9/root/include/TTreeReaderValue.h:140:30: note: candidate constructor (the implicit move constructor) not viable: requires 1
argument, but 2 were provided
/home/ets9/root/include/TTreeReaderValue.h:145:4: note: candidate constructor not viable: requires 0 arguments, but 2 were provided
TTreeReaderValue() = delete;
^
In file included from input_line_141:1:
In file included from /home/ets9/Desktop/TESI/my/MySelector.C:28:
/home/ets9/Desktop/TESI/my/MySelector.h:45:44: error: no matching constructor for initialization of 'TTreeReaderValue<Float_t>' (aka
'TTreeReaderValue<float>')
TTreeReaderValue<Float_t> HLTprescale = {fReader, "HLTprescale"};
^~~~~~~~~~~~~~~~~~~~~~~~
/home/ets9/root/include/TTreeReaderValue.h:140:30: note: candidate constructor (the implicit copy constructor) not viable: requires 1
argument, but 2 were provided
class R__CLING_PTRCHECK(off) TTreeReaderValue final: public ROOT::Intern...
^
/home/ets9/root/include/TTreeReaderValue.h:140:30: note: candidate constructor (the implicit move constructor) not viable: requires 1
argument, but 2 were provided
/home/ets9/root/include/TTreeReaderValue.h:145:4: note: candidate constructor not viable: requires 0 arguments, but 2 were provided
TTreeReaderValue() = delete;
^
In file included from input_line_141:1:
In file included from /home/ets9/Desktop/TESI/my/MySelector.C:28:
/home/ets9/Desktop/TESI/my/MySelector.h:48:46: error: no matching constructor for initialization of 'TTreeReaderValue<Float_t>' (aka
'TTreeReaderValue<float>')
TTreeReaderValue<Float_t> ZAsymmetryTRT = {fReader, "ZAsymmetryTRT"};
^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ets9/root/include/TTreeReaderValue.h:140:30: note: candidate constructor (the implicit copy constructor) not viable: requires 1
argument, but 2 were provided
class R__CLING_PTRCHECK(off) TTreeReaderValue final: public ROOT::Intern...
^
/home/ets9/root/include/TTreeReaderValue.h:140:30: note: candidate constructor (the implicit move constructor) not viable: requires 1
argument, but 2 were provided
/home/ets9/root/include/TTreeReaderValue.h:145:4: note: candidate constructor not viable: requires 0 arguments, but 2 were provided
TTreeReaderValue() = delete;
^
In file included from input_line_141:1:
In file included from /home/ets9/Desktop/TESI/my/MySelector.C:28:
/home/ets9/Desktop/TESI/my/MySelector.h:55:48: error: no matching constructor for initialization of 'TTreeReaderValue<Float_t>' (aka
'TTreeReaderValue<float>')
TTreeReaderValue<Float_t> ZAsymmetryPixel = {fReader, "ZAsymmetryPixel"};
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ets9/root/include/TTreeReaderValue.h:140:30: note: candidate constructor (the implicit copy constructor) not viable: requires 1
argument, but 2 were provided
class R__CLING_PTRCHECK(off) TTreeReaderValue final: public ROOT::Intern...
^
/home/ets9/root/include/TTreeReaderValue.h:140:30: note: candidate constructor (the implicit move constructor) not viable: requires 1
argument, but 2 were provided
/home/ets9/root/include/TTreeReaderValue.h:145:4: note: candidate constructor not viable: requires 0 arguments, but 2 were provided
TTreeReaderValue() = delete;
^
Error in <TSelector::GetSelector>: The file MySelector.C does not define a class named MySelector.
(long long) -1
root [14]
As you can see, the command .L MySelector.C
worked just fine while the command t->Process("MySelector.C")
gave me the same old errors as before. This time the first error given it is not referring to EventNumber line but to HitsOnDisks line.
EDIT: After that sequence of command, I tried using .L MySelector.C
again but this time the error appeared:
root [14] .L MySelector.C
In file included from input_line_142:1:
In file included from /home/ets9/Desktop/TESI/my/MySelector.C:28:
/home/ets9/Desktop/TESI/my/MySelector.h:38:40: error: no matching constructor for initialization of 'TTreeReaderArray<int>'
TTreeReaderArray<int> HitsOnDisks = {fReader, "HitsOnDisks"};
^~~~~~~~~~~~~~~~~~~~~~~~
/home/ets9/root/include/TTreeReaderArray.h:75:30: note: candidate constructor (the implicit copy constructor) not viable: requires 1
argument, but 2 were provided
class R__CLING_PTRCHECK(off) TTreeReaderArray final : public ROOT::Inter...
^
/home/ets9/root/include/TTreeReaderArray.h:75:30: note: candidate constructor (the implicit move constructor) not viable: requires 1
argument, but 2 were provided
In file included from input_line_142:1:
In file included from /home/ets9/Desktop/TESI/my/MySelector.C:28:
/home/ets9/Desktop/TESI/my/MySelector.h:39:38: error: no matching constructor for initialization of 'TTreeReaderArray<int>'
TTreeReaderArray<int> sideDiskA = {fReader, "sideDiskA"};
^~~~~~~~~~~~~~~~~~~~~~
/home/ets9/root/include/TTreeReaderArray.h:75:30: note: candidate constructor (the implicit copy constructor) not viable: requires 1
argument, but 2 were provided
class R__CLING_PTRCHECK(off) TTreeReaderArray final : public ROOT::Inter...
^
/home/ets9/root/include/TTreeReaderArray.h:75:30: note: candidate constructor (the implicit move constructor) not viable: requires 1
argument, but 2 were provided
In file included from input_line_142:1:
In file included from /home/ets9/Desktop/TESI/my/MySelector.C:28:
/home/ets9/Desktop/TESI/my/MySelector.h:40:38: error: no matching constructor for initialization of 'TTreeReaderArray<int>'
TTreeReaderArray<int> sideDiskC = {fReader, "sideDiskC"};
^~~~~~~~~~~~~~~~~~~~~~
/home/ets9/root/include/TTreeReaderArray.h:75:30: note: candidate constructor (the implicit copy constructor) not viable: requires 1
argument, but 2 were provided
class R__CLING_PTRCHECK(off) TTreeReaderArray final : public ROOT::Inter...
^
/home/ets9/root/include/TTreeReaderArray.h:75:30: note: candidate constructor (the implicit move constructor) not viable: requires 1
argument, but 2 were provided
In file included from input_line_142:1:
In file included from /home/ets9/Desktop/TESI/my/MySelector.C:28:
/home/ets9/Desktop/TESI/my/MySelector.h:41:44: error: no matching constructor for initialization of 'TTreeReaderValue<Float_t>' (aka
'TTreeReaderValue<float>')
TTreeReaderValue<Float_t> BCMprescale = {fReader, "BCMprescale"};
^~~~~~~~~~~~~~~~~~~~~~~~
/home/ets9/root/include/TTreeReaderValue.h:140:30: note: candidate constructor (the implicit copy constructor) not viable: requires 1
argument, but 2 were provided
class R__CLING_PTRCHECK(off) TTreeReaderValue final: public ROOT::Intern...
^
/home/ets9/root/include/TTreeReaderValue.h:140:30: note: candidate constructor (the implicit move constructor) not viable: requires 1
argument, but 2 were provided
/home/ets9/root/include/TTreeReaderValue.h:145:4: note: candidate constructor not viable: requires 0 arguments, but 2 were provided
TTreeReaderValue() = delete;
^
In file included from input_line_142:1:
In file included from /home/ets9/Desktop/TESI/my/MySelector.C:28:
/home/ets9/Desktop/TESI/my/MySelector.h:45:44: error: no matching constructor for initialization of 'TTreeReaderValue<Float_t>' (aka
'TTreeReaderValue<float>')
TTreeReaderValue<Float_t> HLTprescale = {fReader, "HLTprescale"};
^~~~~~~~~~~~~~~~~~~~~~~~
/home/ets9/root/include/TTreeReaderValue.h:140:30: note: candidate constructor (the implicit copy constructor) not viable: requires 1
argument, but 2 were provided
class R__CLING_PTRCHECK(off) TTreeReaderValue final: public ROOT::Intern...
^
/home/ets9/root/include/TTreeReaderValue.h:140:30: note: candidate constructor (the implicit move constructor) not viable: requires 1
argument, but 2 were provided
/home/ets9/root/include/TTreeReaderValue.h:145:4: note: candidate constructor not viable: requires 0 arguments, but 2 were provided
TTreeReaderValue() = delete;
^
In file included from input_line_142:1:
In file included from /home/ets9/Desktop/TESI/my/MySelector.C:28:
/home/ets9/Desktop/TESI/my/MySelector.h:48:46: error: no matching constructor for initialization of 'TTreeReaderValue<Float_t>' (aka
'TTreeReaderValue<float>')
TTreeReaderValue<Float_t> ZAsymmetryTRT = {fReader, "ZAsymmetryTRT"};
^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ets9/root/include/TTreeReaderValue.h:140:30: note: candidate constructor (the implicit copy constructor) not viable: requires 1
argument, but 2 were provided
class R__CLING_PTRCHECK(off) TTreeReaderValue final: public ROOT::Intern...
^
/home/ets9/root/include/TTreeReaderValue.h:140:30: note: candidate constructor (the implicit move constructor) not viable: requires 1
argument, but 2 were provided
/home/ets9/root/include/TTreeReaderValue.h:145:4: note: candidate constructor not viable: requires 0 arguments, but 2 were provided
TTreeReaderValue() = delete;
^
In file included from input_line_142:1:
In file included from /home/ets9/Desktop/TESI/my/MySelector.C:28:
/home/ets9/Desktop/TESI/my/MySelector.h:55:48: error: no matching constructor for initialization of 'TTreeReaderValue<Float_t>' (aka
'TTreeReaderValue<float>')
TTreeReaderValue<Float_t> ZAsymmetryPixel = {fReader, "ZAsymmetryPixel"};
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ets9/root/include/TTreeReaderValue.h:140:30: note: candidate constructor (the implicit copy constructor) not viable: requires 1
argument, but 2 were provided
class R__CLING_PTRCHECK(off) TTreeReaderValue final: public ROOT::Intern...
^
/home/ets9/root/include/TTreeReaderValue.h:140:30: note: candidate constructor (the implicit move constructor) not viable: requires 1
argument, but 2 were provided
/home/ets9/root/include/TTreeReaderValue.h:145:4: note: candidate constructor not viable: requires 0 arguments, but 2 were provided
TTreeReaderValue() = delete;
^