I have a user defined class stored in ntuples. You can see the structure of the class(*).
I would like to access this class in root. In order to access this class in a root, I have to
make a dictionary of my class. Kinldy correct me if I am wrong.
Could someone please tell me how to make a dictionary of a class in a root and how I can access the
information which I have in the class(ie map. structure).
Any link or an example where it is described how to make a dictionary of the class and an example explaining how to access the class information in a root will help me a lot.
I followed the instructions which you sent,
Kindly see the trgobji.h file and Linkdef.h file (*).
When I am compiling, I am still getting errors(1).
What I understood I have to include map and struc also in the LinkDef.h.
Could someone pls provide any example how can I include map and struct in the
LinkDef.h which are present in the class.
#ifdefCINT #pragma link off all globals; #pragma link off all classes; #pragma link off all functions;
#pragma link C++ class trigobj;
(1)
Error :
undefined reference to typeinfo for trigobj' undefined reference toROOT::GenerateInitInstance(trigobj const*)‘
undefined reference to `vtable for trigobj’
[quote]undefined reference to typeinfo for trigobj' undefined reference toROOT::GenerateInitInstance(trigobj const*)‘
undefined reference to `vtable for trigobj’[/quote]Did you compile link and load both the dictionary and the source implementing your class. There is nothing special about the map and the nested class, so any example should do (see $ROOTSYS/test/Event)
Now its compiling fine, but when I am doing cmsRun config.py
then it is giving error:
Could you pls tell now where I am wrong?
Regards
Bhawna Gomber
%MSG
%MSG-s CMSException: AfterModBeginJob 13-May-2011 16:34:14 CEST pre-events
cms::Exception caught in cmsRun
---- FatalRootError BEGIN
Fatal Root Error: @SUB=TTree::Branch
The pointer specified for name is not of a class or type known to ROOT
A cms::Exception is going through WorkerT:
Analyzer/demo
---- FatalRootError END
The library that contains the dictionary is not loaded. See you local CMS software expert for the best way to load your library in the CMS environment.