GRIFFINCollaboration / GRSISort

A lean, mean, sorting machine.
MIT License
21 stars 54 forks source link

TChannel not available in grsiproof #1214

Closed VinzenzBildstein closed 1 year ago

VinzenzBildstein commented 2 years ago

When running the new AlphanumericSelector it is necessary to provide a cal-file on the command line because it tries to read the channel map in the CreateHistograms function.

This should not be necessary because the TChannel information gets read from the provided root-files. This is probably either an issue of timing (maybe the CreateHistograms function is called before that information is read), or which thread this happens in (CreateHistograms runs in the worker threads, but maybe the TChannel information is read in the master thread).

This is mainly a reminded to myself to look into this at some point because it shouldn't be necessary to provide the cal-file on the command line since the same information is also in the root-files.

VinzenzBildstein commented 2 years ago

Still not sure where this comes from. I tried changing grsiproof so that it passes the channel from the first input file as input to the selector, but that doesn't seem to help. Putting in a number of cout statements and stacktraces, the output from grsiproof looks always okay (whether with or without cal-file), but in the selector itself it looks like this w/o cal-file:

virtual TClass* TMnemonic::GetClassType() const: class type 0 = None
0x200: settting class type null
stack trace:
/helioshome/vbildste/Guelph/GRSISort-dev/lib/libGRSI.so: TChannel::TChannel(TChannel*)+0x598
/helioshome/vbildste/Guelph/GRSISort-dev/lib/libGRSI.so: bool __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(TChannel const&, TChannel const&)>::operator()<__gnu_cxx::__normal_iterator<TChannel**, std::vector<TChannel*, std::allocator<TChannel*> > >, __gnu_cxx::__normal_iterator<TChannel**, std::vector<TChannel*, std::allocator<TChannel*> > > >(__gnu_cxx::__normal_iterator<TChannel**, std::vector<TChannel*, std::allocator<TChannel*> > >, __gnu_cxx::__normal_iterator<TChannel**, std::vector<TChannel*, std::allocator<TChannel*> > >)+0x29
/helioshome/vbildste/Guelph/GRSISort-dev/lib/libGRSI.so: void std::__introsort_loop<__gnu_cxx::__normal_iterator<TChannel**, std::vector<TChannel*, std::allocator<TChannel*> > >, long, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(TChannel const&, TChannel const&)> >(__gnu_cxx::__normal_iterator<TChannel**, std::vector<TChannel*, std::allocator<TChannel*> > >, __gnu_cxx::__normal_iterator<TChannel**, std::vector<TChannel*, std::allocator<TChannel*> > >, long, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(TChannel const&, TChannel const&)>)+0x7d
/helioshome/vbildste/Guelph/GRSISort-dev/lib/libGRSI.so: TChannel::SortedChannels()+0xb5
/helioshome/vbildste/Guelph/GRSISort-dev/lib/libGRSI.so: TChannel::WriteCalFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)+0x1e
/helioshome/vbildste/.proof/cache/AlphanumericSelector_C.so: AlphanumericSelector::CreateHistograms()+0xe4
/helioshome/vbildste/Guelph/GRSISort-dev/lib/libGRSI.so: TGRSISelector::SlaveBegin(TTree*)+0x15a0
/opt/cern/root/root_v6.24.04/lib/libProofPlayer.so: TProofPlayer::Process(TDSet*, char const*, char const*, long long, long long)+0xda3
/opt/cern/root/root_v6.24.04/lib/libProof.so: TProofServ::HandleProcess(TMessage*, TString*)+0x197f
/opt/cern/root/root_v6.24.04/lib/libProof.so: TProofServ::HandleSocketInput(TMessage*, bool)+0x22c2
/opt/cern/root/root_v6.24.04/lib/libProof.so: TProofServ::HandleSocketInput()+0xd7
/opt/cern/root/root_v6.24.04/lib/libProof.so: TProofServLiteInputHandler::ReadNotify()+0x27
/opt/cern/root/root_v6.24.04/lib/libCore.so: TUnixSystem::CheckDescriptors()+0x8b
/opt/cern/root/root_v6.24.04/lib/libCore.so: TUnixSystem::DispatchOneEvent(bool)+0x558
/opt/cern/root/root_v6.24.04/lib/libCore.so: TSystem::Run()+0xe1
/opt/cern/root/root_v6.24.04/lib/libCore.so: TApplication::Run(bool)+0x1f
/opt/cern/root/root_v6.24.04/bin/proofserv.exe: main()+0x362
/lib64/libc.so.6: __libc_start_main()+0xf3
/opt/cern/root/root_v6.24.04/bin/proofserv.exe: _start()+0x2e

and with cal-file:

virtual TClass* TMnemonic::GetClassType() const: class type 0x32787a0 = TGriffin
0x200: settting class type TGriffin
stack trace:
/helioshome/vbildste/Guelph/GRSISort-dev/lib/libGRSI.so: TChannel::TChannel(TChannel*)+0x598
/helioshome/vbildste/Guelph/GRSISort-dev/lib/libGRSI.so: bool __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(TChannel const&, TChannel const&)>::operator()<__gnu_cxx::__normal_iterator<TChannel**, std::vector<TChannel*, std::allocator<TChannel*> > >, __gnu_cxx::__normal_iterator<TChannel**, std::vector<TChannel*, std::allocator<TChannel*> > > >(__gnu_cxx::__normal_iterator<TChannel**, std::vector<TChannel*, std::allocator<TChannel*> > >, __gnu_cxx::__normal_iterator<TChannel**, std::vector<TChannel*, std::allocator<TChannel*> > >)+0x29
/helioshome/vbildste/Guelph/GRSISort-dev/lib/libGRSI.so: void std::__introsort_loop<__gnu_cxx::__normal_iterator<TChannel**, std::vector<TChannel*, std::allocator<TChannel*> > >, long, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(TChannel const&, TChannel const&)> >(__gnu_cxx::__normal_iterator<TChannel**, std::vector<TChannel*, std::allocator<TChannel*> > >, __gnu_cxx::__normal_iterator<TChannel**, std::vector<TChannel*, std::allocator<TChannel*> > >, long, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(TChannel const&, TChannel const&)>)+0x7d
/helioshome/vbildste/Guelph/GRSISort-dev/lib/libGRSI.so: TChannel::SortedChannels()+0xb5
/helioshome/vbildste/Guelph/GRSISort-dev/lib/libGRSI.so: TChannel::WriteCalFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)+0x1e
/helioshome/vbildste/.proof/cache/AlphanumericSelector_C.so: AlphanumericSelector::CreateHistograms()+0xe4
/helioshome/vbildste/Guelph/GRSISort-dev/lib/libGRSI.so: TGRSISelector::SlaveBegin(TTree*)+0x15a0
/opt/cern/root/root_v6.24.04/lib/libProofPlayer.so: TProofPlayer::Process(TDSet*, char const*, char const*, long long, long long)+0xda3
/opt/cern/root/root_v6.24.04/lib/libProof.so: TProofServ::HandleProcess(TMessage*, TString*)+0x197f
/opt/cern/root/root_v6.24.04/lib/libProof.so: TProofServ::HandleSocketInput(TMessage*, bool)+0x22c2
/opt/cern/root/root_v6.24.04/lib/libProof.so: TProofServ::HandleSocketInput()+0xd7
/opt/cern/root/root_v6.24.04/lib/libProof.so: TProofServLiteInputHandler::ReadNotify()+0x27
/opt/cern/root/root_v6.24.04/lib/libCore.so: TUnixSystem::CheckDescriptors()+0x8b
/opt/cern/root/root_v6.24.04/lib/libCore.so: TUnixSystem::DispatchOneEvent(bool)+0x558
/opt/cern/root/root_v6.24.04/lib/libCore.so: TSystem::Run()+0xe1
/opt/cern/root/root_v6.24.04/lib/libCore.so: TApplication::Run(bool)+0x1f
/opt/cern/root/root_v6.24.04/bin/proofserv.exe: main()+0x362
/lib64/libc.so.6: __libc_start_main()+0xf3
/opt/cern/root/root_v6.24.04/bin/proofserv.exe: _start()+0x2e

So it seems there is no difference in the stack trace, indicating that this happens before we even get here, but outside the selector things look okay?

VinzenzBildstein commented 1 year ago

I'm closing this issue since GRSIProof is deprecated and I would encourage everyone to use grsiframe instead.