Re: [ROOT] Tree not readable

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Mar 22 2002 - 16:07:21 MET


You seem to be reading the file with a program where the dictionary is missing.
Could you check ?

I also strongly suggest you change your two members:

    TString                *fLogString;  // the log message itself
    TString                *fPrefix;     // prefix (origin) of the msg.
to
    TString                fLogString;  // the log message itself
    TString                fPrefix;     // prefix (origin) of the msg.


Rene Brun

Hermann-Josef.Mathes@ik.fzk.de wrote:
> 
> Hello Rene,
> 
> thanks for the quick reply. The test results are attached, write.log for
> writing and read.log until the SegFault.
> 
> The TString fields fLogString and fPrefix might be NULL. Could this be the
> reason for the problems .. ?
> 
> Here is a shortened declaration of the class LogMessage:
> class LogMessage : public TObject {
> private:
>     LogMessage(LogMessage&);  // these two we don't want
>     LogMessage& operator=(LogMessage&);
> 
>     UChar_t                 fEyeId;      // the Eye from where the msg
> came
>     TString                *fLogString;  // the log message itself
>     UInt_t                  fLogTime;    // time when message was
> generated
>     UChar_t                 fMirrorId;   // the Mirror from where the msg
> came
>     TString                *fPrefix;     // prefix (origin) of the msg.
>     enum EMessageSeverity   fSeverity;   // severity level of log message
> 
>     ClassDef(LogMessage,1)
> };
> 
> On Fri, 22 Mar 2002, Rene Brun wrote:
> 
> > Hi,
> >
> > Could you add a statement:
> >    fTree->Print();
> >  just after fTree->Write(..
> > then in the program reading the file, do:
> >
> >   TFile *file = new TFile( argv[1] );
> >   f->ShowTreamerInfo();  //<===add this line
> >
> > and
> >     TBranch *logb = tree->GetBranch( "LogBranch" );
> >     logb->SetAddress( &logm );    // I assume you have LogMessage *logm = 0;
> 
> I have now done it, but on the Example page it was not done instead I read
> there:
>    Event *event = new Event();   //object must be created before setting the branch address
> 
> >     gDebug=2;   //(need #include "Tsystem.h") <===add this line
> >
> > Send me the output
> >
> > Rene Brun
> >
> 
>   --------------------------------------------------------------------------------
> 
>                    Name: write.log
>    write.log       Type: Plain Text (TEXT/PLAIN)
>                Encoding: BASE64
> 
>                   Name: read.log
>    read.log       Type: Plain Text (TEXT/PLAIN)
>               Encoding: BASE64



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:47 MET