Motif application

From: Luca Sfarzo (l.sfarzo@agora.smt.it.cern.ch)
Date: Thu Jul 17 1997 - 14:34:17 MEST


Hello,

I'm trying to realize a stand-alone application using Root and Motif,
I have some questions:

1) Can you let me see a simple example on how to open the TMotifBrowser
in a stand-alone application?

2) How to manage the TMotifApplication?, is it the corresponding class
of TApllication under a Motif enviroment?

3) Where I can learn something about the Seek_t objects? 

4) Last (but not least!): I'm learning how to write an app. to browse in
a Root file (a simple stand-alone text browser) but I'm having some
troubles with the cd() method to change a directory in a file.
I've got a file (test_subdir.root) convertd via h2root.
The file is divided in various sub-directory two main directory and so
on...) and I have not been able to set a subdir like the current dir to
read the histos it contains in order to display it; the following code
seems not to work well:
1.{
2.gROOT->Reset();
3. TFile f("("~/root/histos/test_subdir.root"); 
4. f.cd("/BARREL/ADC/PHI1_4_A");
5. f.ls();
6.  TIter next(f.GetListOfKeys());

and so on..
The output of f.ls() is:
 
TFile**         /users/sfarzo/root/histos/test_subdir.root
 TFile*         /users/sfarzo/root/histos/test_subdir.root
  TDirectory*           BARREL  BARREL
   TDirectory*          ADC     ADC
    KEY: TDirectory     PHI1_4_A;1      PHI1_4_A
    KEY: TDirectory     PHI1_4_B;1      PHI1_4_B
   KEY: TDirectory      ADC;1   ADC
   KEY: TDirectory      TDC;1   TDC
  TDirectory*           BARREL  BARREL
   TDirectory*          ADC     ADC
    TDirectory*         PHI1_4_A        PHI1_4_A
     KEY: TH1F  h1001;1 PHI  1 PL 1 A   
     KEY: TH1F  h1002;1 PHI  1 PL 2 A   
     .............................................
     KEY: TH1F  h1020;1 PHI  4 PL 5 A   
    KEY: TDirectory     PHI1_4_A;1      PHI1_4_A
    KEY: TDirectory     PHI1_4_B;1      PHI1_4_B
   KEY: TDirectory      ADC;1   ADC
   KEY: TDirectory      TDC;1   TDC
  KEY: TDirectory       BARREL;1        BARREL
  KEY: TDirectory       ENDCAP;1        ENDCAP
 but when i iterate in the list I discover that the only two objects in
it are TDirectory BARREL and TDirectory ENDCAP.
So, how can I set like the current TDirectory i.e. PHI1_4_A to read the
histos in it?

Many thanks, Luca Sfarzo



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:20 MET