Hello Philippe, not to risk anything, I write the whole commands in one file which is a script as you guess : creating structures, declaring variables and so on is just in one file. There can not be a problem originating from an in-existance of a header : I am not loading the header, I am writing the header within the file. The result is that CINT can not parse or interpret some of the declarations truly and all I would like to know is that if you face such an event or not. Because I could not make it and I did find another solution : I read the file and get its address and by moving a pointer on the file I am assigning the values without using structure; I know this is not a good idea(?) but all I can do is this, maybe there is a problem with the installation which tells that everything is ok but in reality it is not, this is the only problem I had. Thank you for your interest... Cheers, özgür >From: "Philippe Canal" <pcanal@fnal.gov> >To: "ozgur cobanoglu" ><ozgur_cobanoglu@hotmail.com>,<roottalk@pcroot.cern.ch> >Subject: RE: [ROOT] how to assign a void pointer to a structured pointer in >ROOT(3.03/09) >Date: Thu, 3 Apr 2003 11:43:40 -0600 > > > When I use this in an ordinary c++ source it is working. What is the >problem > > with this code ?.. > >In which other did you try you code and how did it fail? > >My best guess at this point is that you tried it in CINT. In that case you >may be missing the dictionary for DATEevent so that CINT does not know >about >it. To generate the dictionary it might be as simple as doing (assuming >that DATEevent is defined in an header file named DATEevent.h): > > .L DATEevent.h+ > >Cheers, >Philippe > >-----Original Message----- >From: owner-roottalk@pcroot.cern.ch >[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of ozgur cobanoglu >Sent: Monday, March 24, 2003 10:22 AM >To: roottalk@pcroot.cern.ch >Subject: [ROOT] how to assign a void pointer to a structured pointer in >ROOT(3.03/09) > > >Hello, > >how can I assign a void pointer to a structured pointer in a ROOT session? >When I do below and try to get the >variables declared in the structure, it gives me crazy numbers; I am using >an external library (libmonitor.so, >libshift.so) to load the file and first I must load (the library, very >first) the file and get its start point by a void pointer >-this is the only way in my case- after that I must assign it to a variable >that has embedded structure like that : > >... >// headers are included, *.so files are loaded > >struct DATEevent { // embedded structure > struct eventHeaderStruct header; // ordinary structs > struct equipmentStructMy payload; > }; > >void* ptr; >struct DATEevent* event; >// here, make the pointer 'ptr' point the start of file in memory >event = (struct DATEevent*)ptr; > >printf("%08x \n",event->payload.whatever.whatever.array[5]); // which is a >specific number like da1e5afe >... > >When I use this in an ordinary c++ source it is working. What is the >problem >with this code ?.. > >Thank you. > >(pentium 3, linux7.2, ROOT 3.03/09) > >-- >---------------------------------------------------------------- >Ozgur Cobanoglu E-posta: ozgur@nucleus.istanbul.edu.tr >Istanbul Universitesi Tel: 0090-212-511-84-80 >Nukleer Fizik Bolumu Fax: 0090-212-519-08-34 >Vezneciler Istanbul Mobil: 0090-505-512-72-90 >34459 Turkiye >---------------------------------------------------------------- >Ozgur Cobanoglu E-mail: Ozgur.Cobanoglu@cern.ch >CERN EP/AID Tel: +41 (22) 767 2382 >CH-1211 Geneva 23 Fax: +41 (22) 767 9585 >Switzerland Building: 53-R-024 >---------------------------------------------------------------- > > > > > >_________________________________________________________________ >Protect your PC - get McAfee.com VirusScan Online >http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 > _________________________________________________________________ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:10 MET