Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals

tleaf_helpers.h

Go to the documentation of this file.
00001 
00002 #include <TLeafI.h>
00003 #include <TLeafC.h>
00004 
00005 void _writeleaf(char *name, char *title, char *type,void *addr) {
00006   TLeaf* f=new TLeaf(name,type);
00007   f->SetTitle(title);
00008   f->SetAddress(addr);
00009   f->Write();
00010   delete f;
00011 }
00012 
00013 void _writeleafI(char *name, char *title,Int_t val) {
00014   TString tit=" = ";
00015   tit+=val;
00016   tit.Append(" (");
00017   tit.Append(title);
00018   tit.Append(")");
00019   TLeafI* f=new TLeafI(name,"/I");
00020   f->SetTitle(tit.Data());
00021   f->SetAddress(&val);
00022   f->Write();
00023   delete f;
00024 }
00025 void _writeleafC(char *name, char *title, char *val) {
00026   TString tit=" = ";
00027   tit.Append(val);
00028   tit.Append(" (");
00029   tit.Append(title);
00030   tit.Append(")"); 
00031   TLeafC* f=new TLeafC(name,"/C");
00032   f->SetTitle(tit.Data());
00033   f->SetAddress(val);
00034   f->Write();
00035   delete f;
00036 }
00037 
00038 
00039 /* void _readleaf(char *name, char *type, void *addr) { */
00040 /*   TLeaf* f=new TLeaf(); */
00041 /*   f->SetAddress(addr); */
00042 /*   f->Read(); */
00043 /*   delete f; */
00044 /* } */
00045 
00046 /* void _readleafC(char *name, char *title, char *type,TString& val) { */
00047 /*   TLeaf* f=new TLeaf(name,type); */
00048 /*   f-> */
00049 /*   f->SetAddress(addr.Data()); */
00050 /*   f->Read(); */
00051 /*   delete f; */
00052 /* } */
00053 
00054 /* Int_t _readleafI(char *name, char *title) { */
00055 /*   Int_t i; */
00056 /*   _readleaf(name,(char*)tit.Data(),"/I",&i); */
00057 /*   return i; */
00058 /* } */
00059 

Generated on Fri Apr 23 16:23:44 2004 by doxygen 1.3.2