Changes to accommodate the set of PHOS folders and tasks (Y.Schutz)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 4 Oct 2001 15:30:56 +0000 (15:30 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 4 Oct 2001 15:30:56 +0000 (15:30 +0000)
STEER/AliConfig.cxx
STEER/AliConfig.h
STEER/AliDetector.cxx
STEER/AliRun.cxx

index 3fd0491..699cd4a 100644 (file)
 
 /*
 $Log$
+Revision 1.2  2001/05/21 17:22:50  buncic
+Fixed problem with missing AliConfig while reading galice.root
+
 Revision 1.1  2001/05/16 14:57:22  alibrary
 New files for folders and Stack
 
 */
 
-#include "TString.h"
-
 #include "AliConfig.h"
 #include "AliDetector.h"
-
-#include <iostream.h>
+#include "TObjString.h" 
+#include "TString.h"
+#include "TTask.h" 
+#include "AliGenerator.h" 
+#include "AliMC.h" 
 
 ClassImp(AliConfig)
 
 
-static char* gPDGFolder= 
-               "Constants/DatabasePDG";
-
-static char* gGeneratorFolder =  
-               "RunMC/Configuration/Generators";
-
-static char* gMCFolder = 
-               "RunMC/Configuration/VirtualMC";
-
-static char* gModuleFolder =
-               "Run/Configuration/Modules";
-
-static char* gDetectorFolder[] = {
-               "Run/Conditions/Calibration",
-               "Run/Event/Data",
-               "Run/Event/RecData",
-               "RunMC/Event/Data",0};
-
 AliConfig* AliConfig::fInstance = 0;
 
+//____________________________________________________________________________
 AliConfig* AliConfig::Instance ()
 {
   //
@@ -65,224 +52,303 @@ AliConfig* AliConfig::Instance ()
 AliConfig::AliConfig(const char *name, const char *title)
 {
   //
-  // Default constructor
+  // Constructor
   //
   //
-           fInstance=this;
-           
-               fTopFolder = gROOT->GetRootFolder ()->AddFolder (name,title);
-
-               gROOT->GetListOfBrowsables ()->Add (fTopFolder, name);
-               
-           TFolder *subfolder;
-
-               TFolder *constants =
-                   fTopFolder->AddFolder ("Constants", "Detector constants");
-
-               subfolder = 
-                       constants->AddFolder ("DatabasePDG", "PDG database");
-
-               TFolder *run = 
-                       fTopFolder->AddFolder ("Run", "Run dependent folders");
-
-               TFolder *conditions = 
-                       run->AddFolder ("Conditions", "Run conditions");
-
-               subfolder =
-                   conditions->AddFolder ("Calibration","Detector calibration data");
-
-               subfolder =
-                   conditions->AddFolder ("Aligment", "Detector aligment");
-
-               TFolder *configuration =
-                   run->AddFolder ("Configuration", "Run configuration");
-
-               subfolder =
-                   configuration->AddFolder ("Modules", "Detector objects");
-
-               subfolder =
-                   configuration->AddFolder ("Field", "Magnetic field maps");
-
-               TFolder *event = 
-                       run->AddFolder ("Event", "Event folders");
-
-               subfolder = 
-                       event->AddFolder ("Data", "Detector raw data");
-
-               subfolder =
-                   event->AddFolder ("RecData", "Detectors reconstucted data");
-
-               TFolder *run_mc =
-                   fTopFolder->AddFolder ("RunMC", "MonteCarlo run dependent folders");
-
-               TFolder *configuration_mc =
-                   run_mc->AddFolder ("Configuration","MonteCarlo run configuration");
-
-               subfolder =
-                   configuration_mc->AddFolder ("Generators","list of generator objects");
-
-               subfolder =
-                   configuration_mc->AddFolder ("VirtualMC", "the Virtual MC");
-
-               TFolder *event_mc =
-                   run_mc->AddFolder ("Event", "MonteCarlo event folders");
-
-               subfolder =
-                   event_mc->AddFolder ("Header", "MonteCarlo event header");
-
-//             subfolder =
-//                 event_mc->AddFolder ("Kinematics", "MonteCarlo generated particles");
-
-               subfolder =
-                   event_mc->AddFolder ("Data", "MonteCarlo data");
+  fInstance=this;
+  SetName(name) ; 
+  SetTitle(title) ; 
+  
+  fPDGFolder         =  "Constants/DatabasePDG" ;
+  fGeneratorFolder   =  "RunMC/Configuration/Generators" ;
+  fMCFolder          =  "RunMC/Configuration/VirtualMC" ;
+  fModuleFolder      =  "Run/Configuration/Modules" ;
+  fDetectorFolder    =  new char*[7] ; 
+  fDetectorFolder[0] = "Run/Conditions/Calibration" ;
+  fDetectorFolder[1] = "Run/Event/Data" ;
+  fDetectorFolder[2] = "Run/Event/RecData" ;
+  fDetectorFolder[3] = "RunMC/Event/Data/Hits" ;
+  fDetectorFolder[4] = "RunMC/Event/Data/SDigits" ;
+  fDetectorFolder[5] = "Run/Conditions/QA" ;  
+  fDetectorFolder[6] = 0 ;  
+  fDetectorTask    =  new char*[5] ; 
+  fDetectorTask[0] = "Tasks/QA" ;  
+  fDetectorTask[1] = "Tasks/SDigitizer" ;  
+  fDetectorTask[2] = "Tasks/Digitizer" ;  
+  fDetectorTask[3] = "Tasks/Reconstructioner" ;  
+  fDetectorTask[4] = 0 ;  
+
+  fTopFolder = gROOT->GetRootFolder ()->AddFolder (name,title);
+  fTopFolder->SetOwner() ; 
+  gROOT->GetListOfBrowsables ()->Add (fTopFolder, name);
+  
+  TFolder *subfolder;
+  
+  TFolder *constants =
+    fTopFolder->AddFolder ("Constants", "Detector constants");
+  
+  subfolder = 
+    constants->AddFolder ("DatabasePDG", "PDG database");
+  
+  TFolder *run = 
+    fTopFolder->AddFolder ("Run", "Run dependent folders");
+  
+  TFolder *conditions = 
+    run->AddFolder ("Conditions", "Run conditions");
+  
+  subfolder =
+    conditions->AddFolder ("Calibration","Detector calibration data");
+  
+  subfolder =
+    conditions->AddFolder ("Aligment", "Detector aligment");
+  
+  subfolder =
+    conditions->AddFolder ("QA", "Detector QA");
+  
+  TFolder *configuration =
+    run->AddFolder ("Configuration", "Run configuration");
+  
+  subfolder =
+    configuration->AddFolder ("Modules", "Detector objects");
+  
+  subfolder =
+    configuration->AddFolder ("Field", "Magnetic field maps");
+  
+  TFolder *event = 
+    run->AddFolder ("Event", "Event folders");
+  
+  subfolder = 
+    event->AddFolder ("Data", "Detector raw data");
+  
+  subfolder =
+    event->AddFolder ("RecData", "Detectors reconstucted data");
+  
+  TFolder *run_mc =
+    fTopFolder->AddFolder ("RunMC", "MonteCarlo run dependent folders");
+  
+  TFolder *configuration_mc =
+    run_mc->AddFolder ("Configuration","MonteCarlo run configuration");
+  
+  subfolder =
+    configuration_mc->AddFolder ("Generators","list of generator objects");
+  
+  subfolder =
+    configuration_mc->AddFolder ("VirtualMC", "the Virtual MC");
+  
+  TFolder *event_mc =
+    run_mc->AddFolder ("Event", "MonteCarlo event folders");
+  
+  subfolder =
+    event_mc->AddFolder ("Header", "MonteCarlo event header");
+  
+  //           subfolder =
+  //               event_mc->AddFolder ("Kinematics", "MonteCarlo generated particles");
+  
+  TFolder *data_mc =
+    event_mc->AddFolder ("Data", "MonteCarlo data");
+  
+  subfolder = 
+    data_mc->AddFolder ("Hits", "MonteCarlo Hits") ; 
+ subfolder = 
+    data_mc->AddFolder ("SDigits", "MonteCarlo SDigits") ; 
+
+
+  
+  // Add the tasks to //Folders
+  
+  TFolder * tasksfolder = fTopFolder->AddFolder("Tasks", "ALICE Tasks") ; 
+  
+  TTask * qa = new TTask("QA", "Alice QA tasks") ;
+  tasksfolder->Add(qa); 
+  
+  TTask * sd = new TTask("SDigitizer", "Alice SDigitizer") ;
+  tasksfolder->Add(sd); 
+
+  TTask * di = new TTask("Digitizer", "Alice Digitizer") ;
+  tasksfolder->Add(di); 
+
+  TTask * re = new TTask("Reconstructioner", "Alice Reconstructioner") ;
+  tasksfolder->Add(re); 
 
 }
 
+//____________________________________________________________________________
 AliConfig::~AliConfig()
 { 
+  delete fDetectorFolder ;  
+  delete fDetectorTask ;  
+  delete fTopFolder ; 
 }
 
+//____________________________________________________________________________
 void    AliConfig::AddInFolder (char *dir, TObject *obj)
 {
-           TFolder *folder =
-               (TFolder *) fTopFolder->FindObject (dir);
-        if (folder)
-               folder->Add ((TObject *)obj);
+  TFolder *folder =
+    dynamic_cast<TFolder *>(fTopFolder->FindObject(dir));
+  if (folder)
+    folder->Add (static_cast<TObject *>(obj));
 }
 
-void    AliConfig::AddSubFolder(char *dir[], TObject *obj)
+//____________________________________________________________________________
+void    AliConfig::AddSubFolder(char * dir[], TObject *obj)
 {
-        int iDir = 0;
-        
-               while (dir[iDir]) 
-               {
-                   TFolder * folder = (TFolder *) fTopFolder->FindObject (dir[iDir++]);
-                   if (folder) {
-                       TFolder * subfolder = (TFolder *) folder->FindObject (obj->GetName());
-                      if (!subfolder)
-                               subfolder = folder->AddFolder (obj->GetName(),obj->GetTitle());                    
-            }
-               }
+  int iDir = 0;
+  
+  while (dir[iDir]) 
+    {
+      TFolder * folder = dynamic_cast<TFolder *>(fTopFolder->FindObject (dir[iDir++]));
+      if (folder) {
+       TFolder * subfolder = dynamic_cast<TFolder *>(folder->FindObject (obj->GetName()));
+       if (!subfolder)
+         subfolder = folder->AddFolder (obj->GetName(),obj->GetTitle());                          
+      }
+    }
+}
 
+//____________________________________________________________________________
+void    AliConfig::AddSubTask(char * dir[], TObject *obj)
+{
+  int iDir = 0;
+  
+  while (dir[iDir]) 
+    {
+      TTask * task = dynamic_cast<TTask *>(fTopFolder->FindObject (dir[iDir++]));
+      if (task) {
+       TTask * subtask = static_cast<TTask*>(task->GetListOfTasks()->FindObject (obj->GetName()));
+       if (!subtask) {
+         subtask = new TTask(obj->GetName(), obj->GetTitle()) ; 
+         task->Add(subtask);                      
+       }
+      }
+    }
 }
 
+//____________________________________________________________________________
 TObject* AliConfig::FindInFolder (char *dir, const char *name)
 {
-      if(!name) return(fTopFolder->FindObject(name));
-         TFolder * folder = (TFolder *) fTopFolder->FindObject (dir);
-      if (!folder) return (NULL);
-      return(folder->FindObject(name));
+  if(!name) return(fTopFolder->FindObject(name));
+  TFolder * folder = dynamic_cast<TFolder *>(fTopFolder->FindObject(dir));
+  if (!folder) return (NULL);
+  return(folder->FindObject(name));
 }
 
+//____________________________________________________________________________
 void    AliConfig::Add (AliGenerator * obj)
 {
-               AddInFolder(gGeneratorFolder, (TObject *) obj);
+  AddInFolder(fGeneratorFolder, obj);
 }
 
+//____________________________________________________________________________
 void    AliConfig::Add (AliMC * obj)
 {
-               AddInFolder(gMCFolder, (TObject *) obj);
+  AddInFolder(fMCFolder, obj);
 }
 
+//____________________________________________________________________________
 void    AliConfig::Add (TDatabasePDG * obj)
 {
-               AddInFolder(gPDGFolder, (TObject *) obj);
+  AddInFolder(fPDGFolder, obj);
 }
 
+//____________________________________________________________________________
 void    AliConfig::Add (AliModule* obj)
 {
-               AddInFolder(gModuleFolder, (TObject *) obj);
+  AddInFolder(fModuleFolder, obj);
 }
 
+//____________________________________________________________________________
 void    AliConfig::Add (AliDetector * obj)
 {
-               AddSubFolder(gDetectorFolder, (TObject *) obj);
+  AddSubFolder(fDetectorFolder, obj); 
+  AddSubTask(fDetectorTask, obj);
 }
 
-       
-void    AliConfig::Add (const char *list)
-{
-        char *path;
-        
-               const char   *conf_path = gSystem->Getenv ("ALICE_CONFIG_PATH");
-               if  (conf_path) {
-                   path = new char[strlen (conf_path)];
-                   strcpy (path, conf_path);
-               } else {
-                   const char   *alice = gSystem->Getenv ("ALICE_ROOT");
-                   path = new char[strlen (alice) + 32];
-
-                   strcpy (path, ".:");
-                   if (alice) {
-                               strcat (path, alice);
-                   }
-                   strcat (path, "/macros/config");
-               }
-
-               char   *token = strtok (path, ":");
-
-               TList  *dirlist = new TList;
-
-               while (token != NULL)   
-               {
-                   dirlist->Add ((TObject *) token);
-                   token = strtok (NULL, ":");
-               }
-
-               token = strtok ((char *)list, " ");
-
-               while (token != NULL)
-               {
-                   cout << "Configuring " << token << ": ";
-
-                   TObject *obj;
-                   TIter   next (dirlist);
-                   TString found = "\0";
-                   
-                   while ((obj = next ()))
-                   {
-                       TString dir   = (char *) obj;
-                               TString path  = dir + "/" + token;
-                               TString macro = path + ".C";
-                               if (!gSystem->AccessPathName (macro.Data()))    {
-                                  gInterpreter->ExecuteMacro (macro.Data());                              
-                                  found = "(" + macro + ")";
-                                  if (macro.Contains("/")) {
-                                     TString dirname = gSystem->DirName(macro.Data());
-                                 TString macroConfigure = dirname + "/Configure.C";
-                                     if (!gSystem->AccessPathName (macroConfigure.Data()))     {
-                                           gInterpreter->ExecuteMacro (macroConfigure.Data());                             
-                                       found += " => Configured";
-                      }                              
-                                  }
-                                  break;
-                               } else {
-                                  TString macroDefault = path + "/Default.C";
-                                  if (!gSystem->AccessPathName (macroDefault.Data()))  {
-                                    gInterpreter->ExecuteMacro (macroDefault.Data());
-                                    found = "(" + macro + ")";
-                                TString macroConfigure = path + "/Configure.C";
-                                    if (!gSystem->AccessPathName (macroConfigure.Data()))      {
-                                      gInterpreter->ExecuteMacro (macroConfigure.Data());                                  
-                                      found += " => Configured";
-                     }
-                     break;                                
-                                  }
-                       }
-                   }
-                   
-                   if (strlen(found.Data())) {
-                      cout << found << " => OK" << endl;
-                   } else {
-                      cout << " => FAILED." << endl;
-                      exit(1); 
-                   }               
-            
-                   token = strtok (NULL, " ");
-               }
-
-               if (dirlist) delete dirlist;
 
+//____________________________________________________________________________
+void    AliConfig::Add (char *list)
+{
+  char *path;
+  
+  const char   *conf_path = gSystem->Getenv ("ALICE_CONFIG_PATH");
+  if  (conf_path) {
+    path = new char[strlen (conf_path)];
+    strcpy (path, conf_path);
+  } else {
+    const char   *alice = gSystem->Getenv ("ALICE_ROOT");
+    path = new char[strlen (alice) + 32];
+    
+    strcpy (path, ".:");
+    if (alice) {
+      strcat (path, alice);
+    }
+    strcat (path, "/macros/config");
+  }
+  
+  char   *token = strtok (path, ":");
+  
+  TList  *dirlist = new TList;
+  
+  while (token != NULL)        
+    {
+      dirlist->Add (new TObjString(token));
+      token = strtok (NULL, ":");
+    }
+  
+  token = strtok (list, " ");
+  
+  while (token != NULL)
+    {
+      cout << "Configuring " << token << ": ";
+      
+      TObject *obj;
+      TIter   next (dirlist);
+      TString found = "\0";
+      
+      while ((obj = next ()))
+       {
+         TString dir(obj->GetName());
+         TString path  = dir + "/" + token;
+         TString macro = path + ".C";
+         if (!gSystem->AccessPathName (macro.Data()))  {
+           gInterpreter->ExecuteMacro (macro.Data());                             
+           found = "(" + macro + ")";
+           if (macro.Contains("/")) {
+             TString dirname = gSystem->DirName(macro.Data());
+             TString macroConfigure = dirname + "/Configure.C";
+             if (!gSystem->AccessPathName (macroConfigure.Data()))     {
+               gInterpreter->ExecuteMacro (macroConfigure.Data());                                 
+               found += " => Configured";
+             }                       
+           }
+           break;
+         } else {
+           TString macroDefault = path + "/Default.C";
+           if (!gSystem->AccessPathName (macroDefault.Data())) {
+             gInterpreter->ExecuteMacro (macroDefault.Data());
+             found = "(" + macro + ")";
+             TString macroConfigure = path + "/Configure.C";
+             if (!gSystem->AccessPathName (macroConfigure.Data()))     {
+               gInterpreter->ExecuteMacro (macroConfigure.Data());                                 
+               found += " => Configured";
+             }
+             break;                                
+           }
+         }
+       }
+      
+      if (strlen(found.Data())) {
+       cout << found << " => OK" << endl;
+      } else {
+       cout << " => FAILED." << endl;
+       exit(1); 
+      }            
+      
+      token = strtok (NULL, " ");
+    }
+  
+  if (dirlist) delete dirlist;
+  
 }
 
 
index 31e690b..4a17084 100644 (file)
@@ -6,18 +6,22 @@
 /* $Id$ */
 /* 
  * $Log$
+ * Revision 1.2  2001/05/21 17:22:51  buncic
+ * Fixed problem with missing AliConfig while reading galice.root
+ *
  * Revision 1.1  2001/05/16 14:57:22  alibrary
  * New files for folders and Stack
  * 
  */
 
+#include <iostream>
 #include <TFolder.h>
 #include <TList.h>
 #include <TInterpreter.h>
 #include <TROOT.h>
 #include <TSystem.h>
 #include <TDatabasePDG.h>
-
+class TString ; 
 class AliGenerator;
 class AliModule;
 class AliDetector;
@@ -26,32 +30,46 @@ class AliConfig;
 class AliTasks;
 
 class AliConfig : public TNamed {
+  
+public:
+  
+  AliConfig(){ 
+    // ctor: this is a singleton, the ctor should never be called but cint needs it as public
+    cerr << "ERROR: AliConfig is a singleton default ctor not callable" << endl ;
+    abort() ; 
+  } 
+  
+  virtual ~ AliConfig ();
+  
+  void  Add (AliGenerator *generator);
+  void  Add (AliMC *mc);
+  void  Add (TDatabasePDG *pdg);
+  void  Add (AliModule *module);
+  void  Add (AliDetector *detector);
+  
+  void  Add (char *list);
+  
+  static AliConfig* Instance();
+  
+private:
+  AliConfig(const char * name, const char * title );
+  void  AddInFolder (char * dir, TObject *obj);
+  void  AddSubFolder(char * dir[], TObject *obj);
+  void  AddSubTask(char * dir[], TObject *obj);
+ TObject* FindInFolder (char *dir, const char *name);
+  
+  TFolder  *fTopFolder;
+  AliTasks *fTasks;
+  // folders
+  char*  fPDGFolder ; 
+  char*  fGeneratorFolder ; 
+  char*  fMCFolder ; 
+  char*  fModuleFolder ; 
+  char** fDetectorFolder ; 
+  char** fDetectorTask ; 
 
-  public:
-
-    AliConfig(const char *name="gAlice", 
-                 const char *title = "Alice simulation and reconstruction framework");
-    virtual ~ AliConfig ();
-
-    void  Add (AliGenerator *generator);
-    void  Add (AliMC *mc);
-    void  Add (TDatabasePDG *pdg);
-    void  Add (AliModule *module);
-    void  Add (AliDetector *detector);
-   
-    void  Add (const char *list);
-    
-    static AliConfig* Instance();
-
-  private:
-     void  AddInFolder (char *dir, TObject *obj);
-     void  AddSubFolder(char *dir[], TObject *obj);
-     TObject* FindInFolder (char *dir, const char *name);
-
-    TFolder  *fTopFolder;
-    AliTasks *fTasks;
 
-    static AliConfig*  fInstance;
+  static AliConfig*  fInstance;
     
     ClassDef(AliConfig,1) //Configuration class for AliRun
 };                             // end class AliConfig
index c6662f4..0c7adea 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.15  2001/07/27 13:03:13  hristov
+Default Branch split level set to 99
+
 Revision 1.14  2001/05/21 17:22:51  buncic
 Fixed problem with missing AliConfig while reading galice.root
 
@@ -218,18 +221,28 @@ TBranch* AliDetector::MakeBranchInTree(TTree *tree, const char* name, const char
            printf("* MakeBranch * Diverting Branch %s to file %s\n",name,file);
     }
     char *folder = 0;
-        
+    TString folderName(name);  
+    
     if (!strncmp(tree->GetName(),"TreeE",5)) folder = "RunMC/Event/Data";
     if (!strncmp(tree->GetName(),"TreeK",5)) folder = "RunMC/Event/Data";
-    if (!strncmp(tree->GetName(),"TreeH",5)) folder = "RunMC/Event/Data";
-    if (!strncmp(tree->GetName(),"TreeD",5)) folder = "Run/Event/Data";
-    if (!strncmp(tree->GetName(),"TreeS",5)) folder = "Run/Event/Data";
+    if (!strncmp(tree->GetName(),"TreeH",5)) {
+      folder     = "RunMC/Event/Data/Hits";
+      folderName = "Hits" ; 
+    }
+    if (!strncmp(tree->GetName(),"TreeD",5)) {
+      folder     = "Run/Event/Data";
+      folderName = "Digits" ; 
+    }
+    if (!strncmp(tree->GetName(),"TreeS",5)) {
+      folder     = "RunMC/Event/Data/SDigits";
+      folderName = "SDigits" ; 
+    }
     if (!strncmp(tree->GetName(),"TreeR",5)) folder = "Run/Event/RecData";
 
     if (folder) {
       if (GetDebug())
           printf("%15s: Publishing %s to %s\n",ClassName(),name,folder);
-      Publish(folder,address,name);
+      Publish(folder,address, folderName.Data());
     }  
     return branch;
 }
index 06bc170..b283cc6 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.77  2001/09/04 15:09:11  hristov
+fTreeE->Branch replaced temporary by fTreeE->BranchOld to avoid data corruption in case of many events per file
+
 Revision 1.76  2001/08/03 14:38:35  morsch
 Use original method to access TreeH.
 
@@ -689,9 +692,9 @@ void AliRun::FinishRun()
   if (fTreeR) {
     delete fTreeR; fTreeR = 0;
   }
-  if (fTreeE) {
-    delete fTreeE; fTreeE = 0;
-  }
+//   if (fTreeE) {
+//     delete fTreeE; fTreeE = 0;
+//   }
   if (fTreeS) {
     delete fTreeS; fTreeS = 0;
   }
@@ -1733,25 +1736,25 @@ void AliRun::Streamer(TBuffer &R__b)
 {
    // Stream an object of class AliRun.
 
-   if (R__b.IsReading()) {
-      if (!gAlice) gAlice = this;
-
-      AliRun::Class()->ReadBuffer(R__b, this);
-      //
-      gROOT->GetListOfBrowsables()->Add(this,"Run");
-
-      fTreeE = (TTree*)gDirectory->Get("TE");
-      if (fTreeE) {
-         fTreeE->SetBranchAddress("Header", &fHeader);
-      }
-      
-      else    Error("Streamer","cannot find Header Tree\n");
-      fTreeE->GetEntry(0);
-
-      gRandom = fRandom;
-   } else {
-      AliRun::Class()->WriteBuffer(R__b, this);
-   }
+  if (R__b.IsReading()) {
+    if (!gAlice) gAlice = this;
+    
+    AliRun::Class()->ReadBuffer(R__b, this);
+    //
+    gROOT->GetListOfBrowsables()->Add(this,"Run");
+    
+    fTreeE = (TTree*)gDirectory->Get("TE");
+    if (fTreeE) {
+      fTreeE->SetBranchAddress("Header", &fHeader);
+    }
+    
+    else    Error("Streamer","cannot find Header Tree\n");
+    fTreeE->GetEntry(0);
+    
+    gRandom = fRandom;
+  } else {
+    AliRun::Class()->WriteBuffer(R__b, this); 
+ }
 }