Does anyone have a TSelector that works with cmssw?

The MakeSelector segfaults when run against a cms root file? I was just wanting to know if someone has had success with this or not.

Is there another way to get proof to run with a TSelector? My examples have been based the TChain Process method. I also found that the Process method for the TSelector object is not implemented?

Hi,

Well, if you want to process a tree you need the corresponding TSelector.
But what is the problem with MakeSelector? Could you put somewhere a sample of CMS root file so that we can try to reproduce the problem?

Not sure to understand this: TSelector::Process() does nothing because it should be implemented in the real TSelector-derived implementation.

G. Ganis

I’ve included the example code that I have been using.

The Process method I’m thinking of is the TProofChain::Process method that takes a pointer to a TSelector. This method throws and exception that its not implemented, sorry about that.

Currently I’m trying to get the cms TFWLiteSelector example to work as well. No luck yet.

I’m running under cms_1_6_0_pre9. I’m just looking for a solid example that works such that I can test the proof cluster.

Example Macro ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
{
gSystem->Load(“libFWCoreFWLite”);
AutoLibraryLoader::enable();

gSystem->Load(“libPhysicsToolsParallelAnalysis”);
TString dcache = TString(“root://dcache-00.rcac.purdue.edu/pnfs/rcac.purdue.edu/data”);
char *files[] = {
"/store/RelVal/2007/8/2/RelVal-RelVal160pre7SingleMuPlusPt100-1186055203/0000/ECF4535E-0241-DC11-B787-0030485610BC.root",
NULL
};

TChain chain(“Events”);

int index = 0;
while(files[index]!=NULL){
TString filename = TString(files[index]);
filename.Prepend(dcache);
std::cout<<filename<<endl;
chain.Add(filename);//
index++;
}

cout<<“There are “<<chain.GetEntries()<<” events”<<endl;
chain.MakeSelector(“TestSelector”);
}

OUTPUT::::::::::::::::::::::::::::::::::::::::::::::::::::;;

-bash-3.00$ root -b


  •                                     *
    
  •    W E L C O M E  to  R O O T       *
    
  •                                     *
    
  • Version 5.14/00f 29 May 2007 *
  •                                     *
    
  • You are welcome to visit our Web site *
  •      [root.cern.ch](http://root.cern.ch)            *
    
  •                                     *
    

Compiled on 29 June 2007 for linux with thread support.

CINT/ROOT C/C++ Interpreter version 5.16.16, November 24, 2006
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
root [0] .x main.C
root://dcache-00.rcac.purdue.edu/pnfs/r … 610BC.root
There are 2500 events

*** Break *** segmentation violation
(no debugging symbols found)
Using host libthread_db library “/lib/tls/libthread_db.so.1”.
Attaching to program: /proc/31216/exe, process 31216
(no debugging symbols found)…done.
(no debugging symbols found)…done.
[Thread debugging using libthread_db enabled]
[New Thread -1208928576 (LWP 31216)]
[New Thread -1231287392 (LWP 31228)]
[New Thread -1220797536 (LWP 31227)]
[New Thread -1210172512 (LWP 31226)]
0x00b887a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
Thread 4 (Thread -1210172512 (LWP 31226)):
#0 0x00b887a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1 0x011bef06 in __nanosleep_nocancel () from /lib/tls/libc.so.6
#2 0x011f5f4a in usleep () from /lib/tls/libc.so.6
#3 0x07560ca1 in GarbageCollectorThread (arg=0xb4c33d0, thr=0x9c2ebc8) at XrdClientConnMgr.cc:66
#4 0x07572256 in XrdClientThreadDispatcher (arg=0x9c2ebd4) at XrdClientThread.cc:29
#5 0x0758b657 in XrdOucThread_Xeq () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libNetx.so
#6 0x00b153cc in start_thread () from /lib/tls/libpthread.so.0
#7 0x011fcc3e in clone () from /lib/tls/libc.so.6

Thread 3 (Thread -1220797536 (LWP 31227)):
#0 0x00b887a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1 0x011f2df4 in poll () from /lib/tls/libc.so.6
#2 0x07587a16 in XrdClientSock::RecvRaw (this=0xb4c3690, buffer=0xd21ed54, length=8, substreamid=-1, usedsubstreamid=0xb73c0f0c)
at XrdClientSock.cc:112
#3 0x0756ae66 in XrdClientPhyConnection::ReadRaw (this=0xb4c53f0, buf=0xd21ed54, len=-4, substreamid=-4,
usedsubstreamid=0xfffffffc) at XrdClientPhyConnection.cc:323
#4 0x0756618a in XrdClientMessage::ReadRaw (this=0xd21ed48, phy=0xb4c53f0) at XrdClientMessage.cc:139
#5 0x07569e48 in XrdClientPhyConnection::BuildMessage (this=0xb4c53f0, IgnoreTimeouts=true, Enqueue=true)
at XrdClientPhyConnection.cc:403
#6 0x0756f03d in SocketReaderThread (arg=0xb4c53f0, thr=0xb4c1a48) at XrdClientPhyConnection.cc:52
#7 0x07572256 in XrdClientThreadDispatcher (arg=0xb4c1a54) at XrdClientThread.cc:29
#8 0x0758b657 in XrdOucThread_Xeq () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libNetx.so
#9 0x00b153cc in start_thread () from /lib/tls/libpthread.so.0
#10 0x011fcc3e in clone () from /lib/tls/libc.so.6

Thread 2 (Thread -1231287392 (LWP 31228)):
#0 0x00b887a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1 0x011f2df4 in poll () from /lib/tls/libc.so.6
#2 0x07587a16 in XrdClientSock::RecvRaw (this=0xb4c64f8, buffer=0xb4c481c, length=8, substreamid=-1, usedsubstreamid=0xb69bff0c)
at XrdClientSock.cc:112
#3 0x0756ae66 in XrdClientPhyConnection::ReadRaw (this=0xb4c6b30, buf=0xb4c481c, len=-4, substreamid=-4,
usedsubstreamid=0xfffffffc) at XrdClientPhyConnection.cc:323
#4 0x0756618a in XrdClientMessage::ReadRaw (this=0xb4c4810, phy=0xb4c6b30) at XrdClientMessage.cc:139
#5 0x07569e48 in XrdClientPhyConnection::BuildMessage (this=0xb4c6b30, IgnoreTimeouts=true, Enqueue=true)
at XrdClientPhyConnection.cc:403
#6 0x0756f03d in SocketReaderThread (arg=0xb4c6b30, thr=0xb4c5860) at XrdClientPhyConnection.cc:52
#7 0x07572256 in XrdClientThreadDispatcher (arg=0xb4c586c) at XrdClientThread.cc:29
#8 0x0758b657 in XrdOucThread_Xeq () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libNetx.so
#9 0x00b153cc in start_thread () from /lib/tls/libpthread.so.0
#10 0x011fcc3e in clone () from /lib/tls/libc.so.6

Thread 1 (Thread -1208928576 (LWP 31216)):
#0 0x00b887a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1 0x011be7fb in __waitpid_nocancel () from /lib/tls/libc.so.6
#2 0x01168649 in do_system () from /lib/tls/libc.so.6
#3 0x011689c1 in system () from /lib/tls/libc.so.6
#4 0x00b1b8bd in system () from /lib/tls/libpthread.so.0
#5 0x003d2df5 in TUnixSystem::Exec () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libCore.so
#6 0x003d32b9 in TUnixSystem::StackTrace () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libCore.so
#7 0x003d1064 in TUnixSystem::DispatchSignals () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libCore.so
#8 0x003cee64 in SigHandler () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libCore.so
#9 0x003d5c6c in sighandler () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libCore.so
#10
#11 0x002c15b3 in TString::Index () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libCore.so
#12 0x01f99103 in TTreePlayer::MakeClass () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libTreePlayer.so
#13 0x02e5fc21 in TTree::MakeClass () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libTree.so
#14 0x02e5fdc5 in TTree::MakeSelector () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libTree.so
#15 0x02e8a7b0 in G__G__Tree_131_0_122 () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libTree.so
#16 0x00be6051 in Cint::G__ExceptionWrapper () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libCint.so
#17 0x00cc7fc8 in G__call_cppfunc () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libCint.so
#18 0x00cb388e in G__interpret_func () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libCint.so
#19 0x00c971f6 in G__getfunction () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libCint.so
#20 0x00d49817 in G__getstructmem () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libCint.so
#21 0x00d3f9f5 in G__getvariable () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libCint.so
#22 0x00c8930d in G__getitem () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libCint.so
#23 0x00c86c5d in G__getexpr () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libCint.so
#24 0x00ce633a in G__exec_function () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libCint.so
#25 0x00cf0fe9 in G__exec_statement () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libCint.so
#26 0x00c64205 in G__exec_tempfile_core () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libCint.so
#27 0x00c6450f in G__exec_tempfile () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libCint.so
#28 0x00cfaabe in G__process_cmd () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libCint.so
#29 0x00324de3 in TCint::ProcessLine () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libCore.so
#30 0x00324f7d in TCint::ProcessLineSynch () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libCore.so
#31 0x00246fc0 in TApplication::ProcessFile () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libCore.so
#32 0x00246824 in TApplication::ProcessLine () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libCore.so
#33 0x00ac3054 in TRint::HandleTermInput () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libRint.so
#34 0x00ac15bb in TTermInputHandler::Notify () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libRint.so
#35 0x00ac350e in TTermInputHandler::ReadNotify () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libRint.so
#36 0x003d14f5 in TUnixSystem::CheckDescriptors () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libCore.so
#37 0x003d022e in TUnixSystem::DispatchOneEvent () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libCore.so
#38 0x002d2c9c in TSystem::InnerLoop () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libCore.so
#39 0x002d2c35 in TSystem::Run () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libCore.so
#40 0x00247119 in TApplication::Run () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libCore.so
#41 0x00ac29c0 in TRint::Run () from /grp/cms/purdueCMS/slc4_ia32_gcc345/lcg/root/5.14.00f-CMS1//lib/libRint.so
#42 0x08048d81 in main ()

Hi,

If I remember correctly there are one or two official CMS effort to provide a proper TSelector for cmssw. Please check with your favorite cms software documentation/person :slight_smile:.

Alternatively, you could try MakeProxy (instead of MakeSelector) from ROOT 5.17/02.

Cheers,
Philippe.

Hi,

I could open the file in your example and reproduce the problem, which is related to the length of some of the variable names in the ‘Events’ tree, like

TrackCandidatesrecoSuperClustersuintedmOneToOneedmAssociationMap_conversionTrackCandidates_inOutTrackCandidateSCBarrelAssociatio

Currently TProofPlayer::MakeClass assumes that the names are max 127 chars.

We will provide soon a fix for this and let you know how to benefit from it.

G. Ganis

Hi,

To allow to go to the next step while we are fixing the problem, I attach the testSelector that I got from your file after a quick temporary fix.

G. Ganis
testSelector.h (1.45 MB)
testSelector.C (3.2 KB)