2 //Class (base) responsible for management of data:
3 // - opening and closing proper files
4 // - posting data to folders
5 // - writing data from folders to proper files
7 //Author: Alice Offline Group http://alisoft.cern.ch
8 //Responsible: Piotr.Skowronski@cern.ch
10 #include "AliLoader.h"
20 #include "AliConfig.h"
21 #include "AliDetector.h"
22 #include "AliDigitizer.h"
25 #include "AliRunLoader.h"
27 const TString AliLoader::fgkDefaultHitsContainerName("TreeH");
28 const TString AliLoader::fgkDefaultDigitsContainerName = "TreeD";
29 const TString AliLoader::fgkDefaultSDigitsContainerName = "TreeS";
30 const TString AliLoader::fgkDefaultRecPointsContainerName = "TreeR";
31 const TString AliLoader::fgkDefaultTracksContainerName = "TreeT";
32 const TString AliLoader::fgkDefaultRecParticlesContainerName = "TreeP";
33 const TString AliLoader::fgkLoaderBaseName("Loader");
36 //___________________________________________________________________
37 /////////////////////////////////////////////////////////////////////
41 // Base class for Loaders. //
42 // Loader provides base I/O fascilities for "standard" data. //
43 // Each detector has a laoder data member //
44 // loader is accessible via folder structure as well //
46 /////////////////////////////////////////////////////////////////////
48 /*****************************************************************************/
50 AliLoader::AliLoader():
55 fDetectorDataFolder(0x0),
63 /******************************************************************/
65 AliLoader::AliLoader(const Char_t* detname,const Char_t* eventfoldername):
66 fDataLoaders(new TObjArray(kNDataTypes)),
70 fDetectorDataFolder(0x0),
76 AliDebug(1, Form("detname = %s eventfoldername = %s",detname,eventfoldername));
78 //try to find folder eventfoldername in top alice folder
79 //safe because GetTopFolder will abort in case of failure
81 fDetectorName = detname;
82 fName = fDetectorName+"Loader";
85 TObject* fobj = GetTopFolder()->FindObject(eventfoldername);
86 fEventFolder = (fobj)?dynamic_cast<TFolder*>(fobj):0x0;//in case FindObject returns NULL dynamic cast cause seg. fault
87 SetEventFolder(fEventFolder);
90 /*****************************************************************************/
92 AliLoader::AliLoader(const Char_t * detname,TFolder* eventfolder):
93 fDataLoaders(new TObjArray(kNDataTypes)),
94 fDetectorName(detname),
97 fDetectorDataFolder(0x0),
103 fDetectorName = detname;
104 fName = fDetectorName+"Loader";
106 SetEventFolder(eventfolder);
107 //fileoption's don't need to initialized because default TString ctor does it correctly
109 /*****************************************************************************/
110 AliLoader::AliLoader(const AliLoader& source) :
112 fDataLoaders(source.fDataLoaders),
113 fDetectorName(source.fDetectorName),
114 fEventFolder(source.fEventFolder),
115 fDataFolder(source.fDataFolder),
116 fDetectorDataFolder(source.fDetectorDataFolder),
117 fModuleFolder(source.fModuleFolder),
118 fTasksFolder(source.fTasksFolder),
119 fQAFolder(source.fQAFolder)
121 // dummy copy constructor
122 if(&source==this)return;
124 AliFatal("Copy constructor not implemented. Aborting");
128 /*****************************************************************************/
129 AliLoader& AliLoader::operator=(const AliLoader& source) {
130 // dummy assignment operator
131 if(&source==this) return *this;
133 AliFatal("Assignment operator not implemented. Aborting");
137 /*****************************************************************************/
138 AliLoader::~AliLoader()
141 if (fDataLoaders) fDataLoaders->SetOwner();
144 /*****************************************************************************/
146 void AliLoader::InitDefaults()
150 dl = new AliDataLoader(fDetectorName + ".Hits.root",fgkDefaultHitsContainerName, "Hits" );
151 fDataLoaders->AddAt(dl,kHits);
154 // S U M M A B L E D I G I T S
155 dl = new AliDataLoader(fDetectorName + ".SDigits.root",fgkDefaultSDigitsContainerName, "Summable Digits");
156 AliTaskLoader* tl = new AliTaskLoader(fDetectorName + AliConfig::Instance()->GetSDigitizerTaskName(),
157 dl,AliRunLoader::GetRunSDigitizer(),kTRUE);
158 dl->SetBaseTaskLoader(tl);
159 fDataLoaders->AddAt(dl,kSDigits);
162 dl = new AliDataLoader(fDetectorName + ".Digits.root",fgkDefaultDigitsContainerName, "Digits");
163 tl = new AliTaskLoader(fDetectorName + AliConfig::Instance()->GetDigitizerTaskName(),
164 dl,AliRunLoader::GetRunDigitizer(),kTRUE);
165 dl->SetBaseTaskLoader(tl);
166 fDataLoaders->AddAt(dl,kDigits);
168 // R E C O N S T R U C T E D P O I N T S aka C L U S T E R S
169 dl = new AliDataLoader(fDetectorName + ".RecPoints.root",fgkDefaultRecPointsContainerName, "Reconstructed Points");
170 tl = new AliTaskLoader(fDetectorName + AliConfig::Instance()->GetReconstructionerTaskName(),
171 dl,AliRunLoader::GetRunReconstructioner(),kTRUE);
172 dl->SetBaseTaskLoader(tl);
173 fDataLoaders->AddAt(dl,kRecPoints);
176 dl = new AliDataLoader(fDetectorName + ".Tracks.root",fgkDefaultTracksContainerName, "Tracks");
177 tl = new AliTaskLoader(fDetectorName + AliConfig::Instance()->GetTrackerTaskName(),
178 dl,AliRunLoader::GetRunTracker(),kTRUE);
179 dl->SetBaseTaskLoader(tl);
180 fDataLoaders->AddAt(dl,kTracks);
182 // R E C O N S T R U C T E D P O I N T S aka C L U S T E R S
183 dl = new AliDataLoader(fDetectorName + ".RecParticles.root",fgkDefaultRecParticlesContainerName, "Reconstructed Particles");
184 tl = new AliTaskLoader(fDetectorName + AliConfig::Instance()->GetPIDTaskName(),
185 dl,AliRunLoader::GetRunPIDTask(),kTRUE);
186 dl->SetBaseTaskLoader(tl);
187 fDataLoaders->AddAt(dl,kRecParticles);
190 /*****************************************************************************/
192 AliDataLoader* AliLoader::GetDataLoader(const char* name)
194 //returns Data Loader with specified name
195 return dynamic_cast<AliDataLoader*>(fDataLoaders->FindObject(name));
197 /*****************************************************************************/
198 void AliLoader::AddDataLoader(AliDataLoader* dl)
201 // Adds a data loader
205 AliError("Pointer is NULL");
208 if (fDataLoaders->FindObject(dl->GetName()))
210 AliError("Such a loader exists");
213 fDataLoaders->AddLast(dl);
214 dl->SetEventFolder(fEventFolder);
215 dl->SetFolder(GetDetectorDataFolder()); //Must exists - ensure register is called before
217 /*****************************************************************************/
219 Int_t AliLoader::SetEvent()
221 //basically the same that GetEvent but do not post data to folders
222 TIter next(fDataLoaders);
224 while ((dl = (AliDataLoader*)next()))
230 /******************************************************************/
232 void AliLoader::UnloadAll()
234 //calls UnloadAll for all base laoders
236 TIter next(fDataLoaders);
238 while ((dl = (AliDataLoader*)next()))
243 /******************************************************************/
245 Int_t AliLoader::GetEvent()
247 //changes to proper root directory and tries to load data from files to folders
248 // event number is defined in RunLoader
251 // 0 - in case of no error
252 // 1 - event not found
256 TIter next(fDataLoaders);
258 while ((dl = (AliDataLoader*)next()))
260 retval = dl->GetEvent();
263 AliError(Form("Error occured while GetEvent for %s",dl->GetName()));
271 /******************************************************************/
273 TFolder* AliLoader::GetTopFolder()
275 //returns TOP aliroot folder, just a simple interface to AliConfig (gives shorter notation)
276 return AliConfig::Instance()->GetTopFolder();
279 /******************************************************************/
281 TFolder* AliLoader::GetEventFolder()
283 //get EVENT folder (data that are changing from event to event, even in single run)
286 /******************************************************************/
287 TFolder* AliLoader::GetDataFolder()
289 //returns the folder speciofic to given detector e.g. /Folders/Event/Data/
292 fDataFolder = dynamic_cast<TFolder*>(GetEventFolder()->FindObject(AliConfig::Instance()->GetDataFolderName()));
296 AliFatal("Can not find AliRoot data folder. Aborting");
303 /*****************************************************************************/
305 TFolder* AliLoader::GetTasksFolder()
307 //Returns pointer to Folder with Alice Tasks
310 fTasksFolder = dynamic_cast<TFolder*>(GetTopFolder()->FindObject(AliConfig::GetTasksFolderName()));
314 AliFatal("Can not find tasks folder. Aborting");
321 /*****************************************************************************/
323 TFolder* AliLoader::GetModulesFolder()
325 //returns pointer to the folder containing modules
328 fModuleFolder = dynamic_cast<TFolder*>(GetEventFolder()->FindObjectAny(AliConfig::GetModulesFolderName()));
332 AliFatal("Can not find modules folder. Aborting");
336 return fModuleFolder;
339 /*****************************************************************************/
341 TFolder* AliLoader::GetQAFolder()
343 //returns folder with Quality assurance
344 if (fQAFolder == 0x0)
346 TObject *obj = GetEventFolder()->FindObjectAny(AliConfig::Instance()->GetQAFolderName());
347 fQAFolder = (obj)?dynamic_cast<TFolder*>(obj):0x0;
349 if (fQAFolder == 0x0)
351 AliFatal("Can not find Quality Assurance folder. Aborting");
358 /*****************************************************************************/
359 TTask* AliLoader::SDigitizer() const
361 //returns SDigitizer task for this detector
362 return GetSDigitsDataLoader()->GetBaseTaskLoader()->Task();
365 /*****************************************************************************/
367 AliDigitizer* AliLoader::Digitizer() const
369 //returns Digitizer task for this detector
370 return dynamic_cast<AliDigitizer*>(GetDigitsDataLoader()->GetBaseTaskLoader()->Task());
372 /*****************************************************************************/
374 TTask* AliLoader::Reconstructioner() const
376 //returns Recontructioner (Cluster Finder, Cluster Maker,
377 //or whatever you want to call it) task for this detector
378 return GetRecPointsDataLoader()->GetBaseTaskLoader()->Task();
380 /*****************************************************************************/
382 TTask* AliLoader::Tracker() const
385 return dynamic_cast<TTask*>(GetTracksDataLoader()->GetBaseTaskLoader()->Task());
388 /*****************************************************************************/
389 TTask* AliLoader::PIDTask() const
392 return dynamic_cast<TTask*>(GetRecParticlesDataLoader()->GetBaseTaskLoader()->Task());
395 /*****************************************************************************/
397 TTask* AliLoader::QAtask(const char* name) const
399 // Returns pointer to the quality assurance task
400 TTask* qat = AliRunLoader::GetRunQATask();
403 AliError(Form("Can not get RunQATask. (Name:%s)",GetName()));
407 TString dqatname(fDetectorName + AliConfig::Instance()->GetQATaskName());
408 TTask* dqat = dynamic_cast<TTask*>(qat->GetListOfTasks()->FindObject(dqatname));
412 AliError(Form("Can not find QATask in RunQATask for %s",GetDetectorName().Data()));
416 if (strlen(name) == 0) return dqat;
418 TList* list = dqat->GetListOfTasks();
422 while((task = static_cast<TTask *>(it.Next()) ))
424 TString taskname(task->GetName()) ;
425 if(taskname.BeginsWith(name))
428 AliError(Form("Can not find sub-task with name starting with %s in task %s",name,dqat->GetName()));
431 /*****************************************************************************/
433 TDirectory* AliLoader::ChangeDir(TFile* file, Int_t eventno)
435 //changes the root directory in "file" to "dirname" which corresponds to event 'eventno'
436 //in case of success returns the pointer to directory
441 AliErrorClass("File is null");
444 if (file->IsOpen() == kFALSE)
446 AliErrorClass("File is not opened");
450 TString dirname("Event");
452 AliDebugClass(1, Form("Changing Dir to %s in file %s.",dirname.Data(),file->GetName()));
456 TDirectory* dir = dynamic_cast<TDirectory*>(file->Get(dirname));
460 AliDebugClass(1, Form("Can not find directory %s in file %s, creating...",
461 dirname.Data(),file->GetName()));
463 if (file->IsWritable() == kFALSE)
465 AliErrorClass(Form("Can not create directory. File %s in not writable.",
470 TDirectory* newdir = file->mkdir(dirname);
473 AliErrorClass(Form("Failed to create new directory in file %s.",
477 result = file->cd(dirname);
478 if (result == kFALSE)
485 file->cd();//make a file active
486 file->cd(dirname);//cd event dir
491 /*****************************************************************************/
493 TString AliLoader::GetUnixDir() const
495 //This Method will manage jumping through unix directories in case of
496 //run with more events per run than defined in gAlice
502 /*****************************************************************************/
503 /************************************************************/
505 void AliLoader::MakeTree(Option_t *option)
507 //Makes a tree depending on option
510 // S: - Summable Digits
511 // R: - Reconstructed Points (clusters)
512 // T: - Tracks (tracklets)
514 const char *oH = strstr(option,"H");
515 const char *oD = strstr(option,"D");
516 const char *oS = strstr(option,"S");
517 const char *oR = strstr(option,"R");
518 const char *oT = strstr(option,"T");
519 const char *oP = strstr(option,"P");
521 if (oH) MakeHitsContainer();
522 if (oD) MakeDigitsContainer();
523 if (oS) MakeSDigitsContainer();
524 if (oR) MakeRecPointsContainer();
525 if (oT) MakeTracksContainer();
526 if (oP) MakeRecParticlesContainer();
529 /*****************************************************************************/
530 Int_t AliLoader::WriteHits(Option_t* opt) const
533 AliDataLoader* dl = GetHitsDataLoader();
534 Int_t ret = dl->WriteData(opt);
537 /*****************************************************************************/
539 Int_t AliLoader::WriteSDigits(Option_t* opt) const
541 // Writes summable digits
542 AliDataLoader* dl = GetSDigitsDataLoader();
543 Int_t ret = dl->WriteData(opt);
547 /*****************************************************************************/
549 Int_t AliLoader::PostSDigitizer(TTask* sdzer) const
552 return GetSDigitsDataLoader()->GetBaseTaskLoader()->Post(sdzer);
554 /*****************************************************************************/
556 Int_t AliLoader::PostDigitizer(AliDigitizer* task) const
559 return GetDigitsDataLoader()->GetBaseTaskLoader()->Post(task);
561 /*****************************************************************************/
563 Int_t AliLoader::PostReconstructioner(TTask* task) const
565 // Posts Reconstructioner
566 return GetRecPointsDataLoader()->GetBaseTaskLoader()->Post(task);
568 /*****************************************************************************/
570 Int_t AliLoader::PostTracker(TTask* task) const
573 return GetTracksDataLoader()->GetBaseTaskLoader()->Post(task);
575 /*****************************************************************************/
577 Int_t AliLoader::PostPIDTask(TTask* task) const
579 // Posts particle identification task
580 return GetRecParticlesDataLoader()->GetBaseTaskLoader()->Post(task);
582 /*****************************************************************************/
584 TObject** AliLoader::GetDetectorDataRef(TObject *obj)
586 // Returns pointer to an entry in the list of folders pointing to "obj"
591 return GetDetectorDataFolder()->GetListOfFolders()->GetObjectRef(obj) ;
593 /*****************************************************************************/
595 TObject** AliLoader::SDigitizerRef()
597 // Returns pointer to a Runloader's task-list entry pointing to SDigitizer
598 TTask* rsd = AliRunLoader::GetRunSDigitizer();
603 return rsd->GetListOfTasks()->GetObjectRef(SDigitizer());
605 /*****************************************************************************/
607 TObject** AliLoader::DigitizerRef()
609 // Returns pointer to a Runloader's task-list entry pointing to Digitizer
610 TTask* rd = AliRunLoader::GetRunDigitizer();
615 return rd->GetListOfTasks()->GetObjectRef(Digitizer()) ;
617 /*****************************************************************************/
619 TObject** AliLoader::ReconstructionerRef()
621 // Returns pointer to a Runloader's task-list entry pointing to Reconstructioner
622 TTask* rrec = AliRunLoader::GetRunReconstructioner();
627 return rrec->GetListOfTasks()->GetObjectRef(Reconstructioner());
629 /*****************************************************************************/
631 TObject** AliLoader::TrackerRef()
633 // Returns pointer to a Runloader's task-list entry pointing to Tracker
634 TTask* rrec = AliRunLoader::GetRunTracker();
639 return rrec->GetListOfTasks()->GetObjectRef(Tracker());
641 /*****************************************************************************/
643 TObject** AliLoader::PIDTaskRef()
645 // Returns pointer to a Runloader's task-list entry pointing to PIDTask
646 TTask* rrec = AliRunLoader::GetRunPIDTask();
651 return rrec->GetListOfTasks()->GetObjectRef(PIDTask());
654 /*****************************************************************************/
655 void AliLoader::CleanFolders()
657 //Cleans all posted objects == removes from folders and deletes them
658 TIter next(fDataLoaders);
660 while ((dl = (AliDataLoader*)next()))
662 AliDebug(1, Form("name = %s cleaning",dl->GetName()));
666 /*****************************************************************************/
668 /*****************************************************************************/
670 void AliLoader::CleanSDigitizer()
672 //removes and deletes detector task from Run Task
673 if ( GetSDigitsDataLoader()->GetBaseTaskLoader() == 0x0 )
675 AliWarning("Task Loader for SDigits does not exist");
678 GetSDigitsDataLoader()->GetBaseTaskLoader()->Clean();
680 /*****************************************************************************/
682 void AliLoader::CleanDigitizer()
684 //removes and deletes detector task from Run Task
685 if ( GetDigitsDataLoader()->GetBaseTaskLoader() == 0x0 )
687 AliWarning("Task Loader for Digits does not exist");
690 GetDigitsDataLoader()->GetBaseTaskLoader()->Clean();
692 /*****************************************************************************/
694 void AliLoader::CleanReconstructioner()
696 //removes and deletes detector Reconstructioner from Run Reconstructioner
697 if ( GetRecPointsDataLoader()->GetBaseTaskLoader() == 0x0 )
699 AliWarning("Task Loader for SDigits does not exist");
702 GetRecPointsDataLoader()->GetBaseTaskLoader()->Clean();
704 /*****************************************************************************/
706 void AliLoader::CleanTracker()
708 //removes and deletes detector task from Run Task
709 if ( GetTracksDataLoader()->GetBaseTaskLoader() == 0x0 )
711 AliWarning("Task Loader for Tracks does not exist");
714 GetTracksDataLoader()->GetBaseTaskLoader()->Clean();
716 /*****************************************************************************/
718 void AliLoader::CleanPIDTask()
720 //removes and deletes detector Reconstructioner from Run Reconstructioner
722 if ( GetRecParticlesDataLoader()->GetBaseTaskLoader() == 0x0 )
724 AliWarning("Task Loader for Reconstructed Particles does not exist");
727 GetRecParticlesDataLoader()->GetBaseTaskLoader()->Clean();
729 /*****************************************************************************/
731 Int_t AliLoader::ReloadAll()
733 // Calling Reload function for all the data loaders
734 TIter next(fDataLoaders);
737 while((dl = (AliDataLoader*)next()))
739 Int_t err = dl->Reload();
742 AliError(Form("Reload returned error for %s",dl->GetName()));
748 /*****************************************************************************/
750 void AliLoader::CloseFiles()
752 //close files for data loaders
753 TIter next(fDataLoaders);
755 while((dl = (AliDataLoader*)next()))
760 /*****************************************************************************/
762 Int_t AliLoader::SetEventFolder(TFolder* eventfolder)
764 //sets the event folder
765 if (eventfolder == 0x0)
767 AliError("Stupid joke. Argument is NULL");
771 fEventFolder = eventfolder;
772 TIter next(fDataLoaders);
775 while((dl = (AliDataLoader*)next()))
777 dl->SetEventFolder(fEventFolder);
778 dl->SetFolder(GetDetectorDataFolder()); //Must exists - ensure register is called before
782 }//sets the event folder
783 /*****************************************************************************/
785 Int_t AliLoader::Register(TFolder* eventFolder)
787 //triggers creation of subfolders for a given detector
788 //this method is called when session is read from disk
790 //warning: AliDetector in constructor (not default) calls
791 //creation of folder structure as well (some detectors needs folders
792 //alrady in constructors)
794 AliDebug(1, Form("Name is %s.",GetName()));
795 if (eventFolder == 0x0)
797 AliError("Event folder is not set.");
800 Int_t retval = AliConfig::Instance()->AddDetector(eventFolder,fDetectorName,fDetectorName);
803 AliError(Form("Can not create tasks and/or folders for %s. Event folder name is %s",
804 fDetectorName.Data(),eventFolder->GetName()));
807 SetEventFolder(eventFolder);
810 /*****************************************************************************/
811 AliRunLoader* AliLoader::GetRunLoader()
813 //gets the run-loader from event folder
814 AliRunLoader* rg = 0x0;
815 TObject * obj = GetEventFolder()->FindObject(AliRunLoader::GetRunLoaderName());
816 if (obj) rg = dynamic_cast<AliRunLoader*>(obj);
819 /*****************************************************************************/
820 Bool_t AliLoader::TestFileOption(Option_t* opt)
822 //tests the TFile::Option
823 //if file is truncated at opening moment ("recreate", "new" or "create") returns kFALSE;
824 //else kTRUE (means opened with "read" or "update" mode)
826 if (option.CompareTo("recreate",TString::kIgnoreCase) == 0) return kFALSE;
827 if (option.CompareTo("new",TString::kIgnoreCase) == 0) return kFALSE;
828 if (option.CompareTo("create",TString::kIgnoreCase) == 0) return kFALSE;
831 /*****************************************************************************/
832 void AliLoader::SetDirName(TString& dirname)
834 //adds "dirname" to each file. Dirname should end with "#","/", or ":"
835 TIter next(fDataLoaders);
837 while((dl = (AliDataLoader*)next()))
839 dl->SetDirName(dirname);
843 /*****************************************************************************/
845 void AliLoader::SetDigitsFileNameSuffix(const TString& suffix) const
847 //adds the suffix before ".root",
848 //e.g. TPC.Digits.root -> TPC.DigitsMerged.root
849 //made on Jiri Chudoba demand
850 GetDigitsDataLoader()->SetFileNameSuffix(suffix);
852 /*****************************************************************************/
854 void AliLoader::SetCompressionLevel(Int_t cl)
856 //sets comression level for data defined by di
857 TIter next(fDataLoaders);
859 while((dl = (AliDataLoader*)next()))
861 dl->SetCompressionLevel(cl);
864 /*****************************************************************************/
866 void AliLoader::Clean()
868 //Cleans all data loaders
869 TIter next(fDataLoaders);
871 while((dl = (AliDataLoader*)next()))
876 /*****************************************************************************/
878 void AliLoader::Clean(const TString& name)
880 // Removes object with "name" from the detector's data folder
881 // and from the memory
882 TObject* obj = GetDetectorDataFolder()->FindObject(name);
885 AliDebug(1, Form("name=%s, cleaning %s.",GetName(),name.Data()));
886 GetDetectorDataFolder()->Remove(obj);
891 /*****************************************************************************/
893 Bool_t AliLoader::IsOptionWritable(const TString& opt)
895 // Returns "true" if the option means also "writable"
896 if (opt.CompareTo("recreate",TString::kIgnoreCase)) return kTRUE;
897 if (opt.CompareTo("new",TString::kIgnoreCase)) return kTRUE;
898 if (opt.CompareTo("create",TString::kIgnoreCase)) return kTRUE;
899 if (opt.CompareTo("update",TString::kIgnoreCase)) return kTRUE;
903 /*****************************************************************************/
905 void AliLoader::SetDebug(Int_t deb)
908 AliLog::SetClassDebugLevel("AliRunLoader", deb);
909 AliLog::SetClassDebugLevel("AliLoader", deb);
910 AliLog::SetClassDebugLevel("AliDataLoader", deb);
911 AliLog::SetClassDebugLevel("AliBaseLoader", deb);
912 AliLog::SetClassDebugLevel("AliObjectLoader", deb);
913 AliLog::SetClassDebugLevel("AliTreeLoader", deb);
914 AliLog::SetClassDebugLevel("AliTaskLoader", deb);
915 AliLog::SetClassDebugLevel("AliConfig", deb);
917 /*****************************************************************************/
919 void AliLoader::SetTAddrInDet()
921 //calls SetTreeAddress for corresponding detector
922 AliRunLoader* rl = GetRunLoader();
923 if (rl == 0x0) return;
924 AliRun* ar = rl->GetAliRun();
925 if (ar == 0x0) return;
926 AliDetector* det = ar->GetDetector(fDetectorName);
927 if (det == 0x0) return;
928 det->SetTreeAddress();
930 /*****************************************************************************/
932 void AliLoader::Synchronize()
934 //synchrinizes all writtable files
935 TIter next(fDataLoaders);
937 while ((dl = (AliDataLoader*)next()))
943 /*****************************************************************************/
944 /*****************************************************************************/
945 /*****************************************************************************/