I have a problem adding my own example class (called myClass) object to mySelector::fOutput when running on PROOF.
myClass is inherited from TObject and its rootcint dictionary is also generated. Please, have a look to myClass.h, myClass.C and the makefile (.h is a dummy extension) in the attachment.
Now, I do the following: In myTSelector::SlaveBegin() I create myClass object and add it to fOutput. In the Terminate()-method I unsuccessfully try to retrieve it: myClass * mc = (myClass*) fOutput->FindObject(“myClass”). Looking in the master log I can see the following errors:
[quote]15:33:11 19221 Mst-0 | Error in TClass::Load: dictionary of class myClass not found
15:33:11 19221 Mst-0 | Error in TClass::Load: dictionary of class myClass not found[/quote]
Here is the way how I include myClass shared library in the main-script:
I solved the problem and just want to report how I did that in case somebody else needs to do the same.
I simply made myClass.par package similar to event.par existing in the root proof tutorial: http://root.cern.ch/viewvc/trunk/tutorials/proof/?pathrev=29492 . I used the same MakeFile(.arch) just needed to adjust the names and add -I./ to CXXFLAGS in order to see the local myClass.h. And it worked. Now, I am able to add and later retrieve myClass objects from TSelector::fOutput list.
One more comment, which might worth mentioning is that one should not have a package and its archive in the same directory if your master and slave nodes are the same machine (actually I don’t know what happens if they are on remote hosts). It will have a package uploading problem and will trow a message like this:
This happened because myClass-directory (untarzip event.par to see its similar structure) and its archive myClass.par both lived in /my/prog/location/myProg -directory. I created /my/prog/location/myProg/run - directory, copied myClass.par and myMain.cxx into it and run myMain.cxx (which calls proof and uploads myClass.par) staying in run/. This helps.
Cheers,
Gia
[quote=“gia”]Hello,
I have a problem adding my own example class (called myClass) object to mySelector::fOutput when running on PROOF.
myClass is inherited from TObject and its rootcint dictionary is also generated. Please, have a look to myClass.h, myClass.C and the makefile (.h is a dummy extension) in the attachment.
Now, I do the following: In myTSelector::SlaveBegin() I create myClass object and add it to fOutput. In the Terminate()-method I unsuccessfully try to retrieve it: myClass * mc = (myClass*) fOutput->FindObject(“myClass”). Looking in the master log I can see the following errors:
[quote]15:33:11 19221 Mst-0 | Error in TClass::Load: dictionary of class myClass not found
15:33:11 19221 Mst-0 | Error in TClass::Load: dictionary of class myClass not found[/quote]
Here is the way how I include myClass shared library in the main-script:
in the selector files.
But, of course, if locally you have already a directory with the same name the symlink cannot be created. The suggestion is to the PAR files sources under a different path, e.g. /MyFirstPAR.par, /MySecondPAR.par; you can then upload them directly from there