2 // Author: Artur Szostak
3 // email: artur@alice.phy.uct.ac.za
8 #include "AliRunLoader.h"
11 #include "AliMUONDataInterface.h"
12 #include "AliMUONLocalTrigger.h"
13 #include "AliMUONHit.h"
14 #include "AliMUONDigit.h"
15 #include "AliMUONRawCluster.h"
23 ClassImp(AliMUONDataInterface)
26 AliMUONDataInterface::AliMUONDataInterface()
27 : TObject(), fData(NULL, "MUON", "MUON")
29 // Set all internal pointers to NULL and indices to -1.
34 AliMUONDataInterface::AliMUONDataInterface(const AliMUONDataInterface& rhs)
37 // Protected copy constructor
39 AliFatal("Not implemented.");
42 AliMUONDataInterface::~AliMUONDataInterface()
44 // Delete the runloader if we created it.
45 // If the runloader is not to be deleted then call Reset just before
46 // the destructor is called.
48 if (fRunloader != NULL && fCreatedRunLoader)
53 AliMUONDataInterface::operator=(const AliMUONDataInterface& rhs)
55 // Protected assignement operator
57 if (this == &rhs) return *this;
59 AliFatal("Not implemented.");
65 void AliMUONDataInterface::Reset()
67 // Sets all internal pointers to NULL and indices to -1.
68 // Note: No resources are released!
69 // Specificaly AliRunLoader is not deleted.
71 fCreatedRunLoader = kFALSE;
78 fHitAddressSet = kFALSE;
79 fSDigitAddressSet = kFALSE;
80 fDigitAddressSet = kFALSE;
81 fClusterAddressSet = kFALSE;
82 fTriggerAddressSet = kFALSE;
86 Bool_t AliMUONDataInterface::UseCurrentRunLoader()
88 // Tries to fetch the current runloader with AliRunLoader::GetRunLoader. If nothing is
89 // currently loaded then kFALSE is returned and AliMUONDataInterface is reset.
92 fRunloader = AliRunLoader::GetRunLoader();
93 if (fRunloader == NULL) return kFALSE;
94 // Fetch the current file name, folder name and event number.
95 fFilename = fRunloader->GetFileName();
96 fFoldername = fRunloader->GetEventFolder()->GetName();
97 fEventnumber = fRunloader->GetEventNumber();
99 if ( ! FetchMuonLoader(fFilename.Data(), fFoldername.Data()) )
109 Bool_t AliMUONDataInterface::FetchMuonLoader(TString filename, TString foldername)
111 fMuonloader = fRunloader->GetLoader("MUONLoader");
112 if (fMuonloader == NULL)
114 AliError(Form("Could not find the MUON loader in file: %s and folder: %s",
115 (const char*)filename, (const char*)foldername));
119 // Need to connect the muon loader to the AliMUONData object,
120 // else class to fData will return NULL.
121 fData.SetLoader(fMuonloader);
126 Bool_t AliMUONDataInterface::LoadLoaders(TString filename, TString foldername)
128 // Load the run and muon loaders from the specified file and folder.
129 // kTRUE is returned on success and kFALSE on failure.
131 fRunloader = AliRunLoader::Open(filename, foldername, "READ");
132 if (fRunloader == NULL)
134 AliError(Form("Could not find or load the run loader for the file: %s and folder: %s",
135 (const char*)filename, (const char*)foldername));
138 fCreatedRunLoader = kTRUE;
139 if ( ! FetchMuonLoader(filename, foldername) )
145 fFilename = filename;
146 fFoldername = foldername;
147 fEventnumber = -1; // Reset the event number to force the event to be loaded.
152 Bool_t AliMUONDataInterface::FetchLoaders(TString filename, TString foldername)
154 // Fetch the run loader and muon loader objects from memory if they already exist,
155 // or from memory if they do not.
156 // If the currently loaded run loader (if any) is not refering to the file and folder
157 // we are interested in then it is deleted and reopened with the required file and
160 if (fRunloader == NULL)
162 fRunloader = AliRunLoader::GetRunLoader();
163 if (fRunloader == NULL)
164 return LoadLoaders(filename, foldername);
167 if (fMuonloader == NULL)
169 if ( ! FetchMuonLoader(filename, foldername) )
177 // Fetch the current file and folder names.
178 fFilename = fRunloader->GetFileName();
179 fFoldername = fRunloader->GetEventFolder()->GetName();
182 // If filename or foldername are not the same as the ones currently selected then
184 if ( filename.CompareTo(fFilename) != 0 || foldername.CompareTo(fFoldername) != 0 )
187 return LoadLoaders(filename, foldername);
193 Bool_t AliMUONDataInterface::FetchEvent(Int_t event)
195 // Fetch the specified event from the runloader and reset all the track, cathode
196 // and address flags to force them to be reloaded.
197 // If a negative event number is specified then the current runloader event
200 if (fEventnumber < 0)
202 fEventnumber = fRunloader->GetEventNumber();
206 fHitAddressSet = kFALSE;
207 fSDigitAddressSet = kFALSE;
208 fDigitAddressSet = kFALSE;
209 fClusterAddressSet = kFALSE;
210 fTriggerAddressSet = kFALSE;
212 if ( event != fEventnumber )
214 if ( fRunloader->GetEvent(event) < 0 ) return kFALSE;
215 fEventnumber = event;
219 fHitAddressSet = kFALSE;
220 fSDigitAddressSet = kFALSE;
221 fDigitAddressSet = kFALSE;
222 fClusterAddressSet = kFALSE;
223 fTriggerAddressSet = kFALSE;
229 Bool_t AliMUONDataInterface::FetchTreeK()
231 // Fetch the Kine tree from the current run loader.
233 if (fRunloader->TreeK() == NULL)
235 fRunloader->LoadKinematics("READ");
236 if (fRunloader->TreeK() == NULL)
238 AliError("Could not load TreeK.");
246 Bool_t AliMUONDataInterface::FetchTreeH()
248 // Fetch the Hits tree from the current muon loader.
249 // Set all the required addresses etc...
251 if (fMuonloader->TreeH() == NULL)
253 fMuonloader->LoadHits("READ");
254 if (fMuonloader->TreeH() == NULL)
256 AliError("Could not load TreeH.");
259 fData.SetTreeAddress("H");
260 fHitAddressSet = kTRUE;
262 else if ( ! fHitAddressSet )
264 fData.SetTreeAddress("H");
265 fHitAddressSet = kTRUE;
271 Bool_t AliMUONDataInterface::FetchTreeS()
273 // Fetch the S-Digits tree from the current muon loader.
274 // Set all the required addresses etc...
276 if (fMuonloader->TreeS() == NULL)
278 fMuonloader->LoadSDigits("READ");
279 if (fMuonloader->TreeS() == NULL)
281 AliError("Could not load TreeS.");
284 fData.SetTreeAddress("S");
285 fSDigitAddressSet = kTRUE;
287 else if ( ! fSDigitAddressSet )
289 fData.SetTreeAddress("S");
290 fSDigitAddressSet = kTRUE;
296 Bool_t AliMUONDataInterface::FetchTreeD()
298 // Fetch the digits tree from the current muon loader.
299 // Set all the required addresses etc...
301 if (fMuonloader->TreeD() == NULL)
303 fMuonloader->LoadDigits("READ");
304 if (fMuonloader->TreeD() == NULL)
306 AliError("Could not load TreeD.");
309 fData.SetTreeAddress("D");
310 fDigitAddressSet = kTRUE;
312 else if ( ! fDigitAddressSet )
314 fData.SetTreeAddress("D");
315 fDigitAddressSet = kTRUE;
321 Bool_t AliMUONDataInterface::FetchTreeR()
323 // Fetch the reconstructed objects tree from the current muon loader.
324 // Note: The addresses must still be set.
326 if (fMuonloader->TreeR() == NULL)
328 fMuonloader->LoadRecPoints("READ");
329 if (fMuonloader->TreeR() == NULL)
331 AliError("Could not load TreeR.");
335 // Need to reset these flags so that the cluster and trigger address
336 // gets reset after this method.
337 fClusterAddressSet = kFALSE;
338 fTriggerAddressSet = kFALSE;
344 Int_t AliMUONDataInterface::NumberOfEvents(TString filename, TString foldername)
346 // Returns the number of events in the specified file/folder, and -1 on error.
348 if ( ! FetchLoaders(filename, foldername) ) return -1;
349 return fRunloader->GetNumberOfEvents();
353 Int_t AliMUONDataInterface::NumberOfParticles(TString filename, TString foldername, Int_t event)
355 // Returns the number of events in the specified file/folder, and -1 on error.
357 if ( ! FetchLoaders(filename, foldername) ) return -1;
358 if ( ! FetchEvent(event) ) return -1;
359 if ( ! FetchTreeK() ) return -1;
360 return (Int_t) fRunloader->TreeK()->GetEntriesFast();
364 TParticle* AliMUONDataInterface::Particle(
365 TString filename, TString foldername, Int_t event, Int_t particle
368 // Returns the specified particle in the given file, folder and event.
369 // NULL is returned on error.
371 if ( ! FetchLoaders(filename, foldername) ) return NULL;
372 if ( ! FetchEvent(event) ) return NULL;
373 if ( ! FetchTreeK() ) return NULL;
375 TTree* treeK = fRunloader->TreeK();
377 treeK->GetBranch("Particles")->SetAddress(&p);
378 treeK->GetEvent(particle);
383 Int_t AliMUONDataInterface::NumberOfTracks(TString filename, TString foldername, Int_t event)
385 // Returns the number of tracks in the specified file/folder and event.
386 // -1 is returned on error.
388 if ( ! FetchLoaders(filename, foldername) ) return -1;
389 if ( ! FetchEvent(event) ) return -1;
390 if ( ! FetchTreeH() ) return -1;
391 return fData.GetNtracks();
395 Int_t AliMUONDataInterface::NumberOfHits(
396 TString filename, TString foldername, Int_t event, Int_t track
399 // Returns the number of hits in the specified file/folder, event and track.
400 // -1 is returned on error.
402 if ( ! FetchLoaders(filename, foldername) ) return -1;
403 if ( ! FetchEvent(event) ) return -1;
404 if ( ! FetchTreeH() ) return -1;
406 if (fTrack < 0 || fTrack != track)
409 fData.GetTrack(track);
412 return fData.Hits()->GetEntriesFast();
416 AliMUONHit* AliMUONDataInterface::Hit(
417 TString filename, TString foldername, Int_t event,
418 Int_t track, Int_t hit
421 // Returns the specified hit in the given file, folder, event and track.
422 // NULL is returned on error.
424 if ( ! FetchLoaders(filename, foldername) ) return NULL;
425 if ( ! FetchEvent(event) ) return NULL;
426 if ( ! FetchTreeH() ) return NULL;
428 if (fTrack < 0 || fTrack != track)
431 fData.GetTrack(track);
434 return static_cast<AliMUONHit*>( fData.Hits()->At(hit) );
438 Int_t AliMUONDataInterface::NumberOfSDigits(
439 TString filename, TString foldername, Int_t event,
440 Int_t chamber, Int_t cathode
443 // Returns the number of s-digits in the given file, folder, event,
444 // chamber and cathode. -1 is returned on error.
446 Assert( 0 <= chamber && chamber <= 13 );
447 Assert( 0 <= cathode && cathode <= 1 );
449 if ( ! FetchLoaders(filename, foldername) ) return -1;
450 if ( ! FetchEvent(event) ) return -1;
451 if ( ! FetchTreeS() ) return -1;
453 if ( fSCathode != cathode )
455 fData.ResetSDigits();
459 return fData.SDigits(chamber)->GetEntriesFast();
463 AliMUONDigit* AliMUONDataInterface::SDigit(
464 TString filename, TString foldername, Int_t event,
465 Int_t chamber, Int_t cathode, Int_t sdigit
468 // Returns the specified s-digit in the given file, folder, event,
469 // chamber and cathode. NULL is returned on error.
471 Assert( 0 <= chamber && chamber <= 13 );
472 Assert( 0 <= cathode && cathode <= 1 );
474 if ( ! FetchLoaders(filename, foldername) ) return NULL;
475 if ( ! FetchEvent(event) ) return NULL;
476 if ( ! FetchTreeS() ) return NULL;
478 if ( fSCathode != cathode )
480 fData.ResetSDigits();
484 return static_cast<AliMUONDigit*>( fData.SDigits(chamber)->At(sdigit) );
488 Int_t AliMUONDataInterface::NumberOfDigits(
489 TString filename, TString foldername, Int_t event,
490 Int_t chamber, Int_t cathode
493 // Returns the number of digits in the given file, folder, event,
494 // chamber and cathode. -1 is returned on error.
495 Assert( 0 <= chamber && chamber <= 13 );
496 Assert( 0 <= cathode && cathode <= 1 );
498 if ( ! FetchLoaders(filename, foldername) ) return -1;
499 if ( ! FetchEvent(event) ) return -1;
500 if ( ! FetchTreeD() ) return -1;
502 if ( fCathode != cathode )
508 return fData.Digits(chamber)->GetEntriesFast();
512 AliMUONDigit* AliMUONDataInterface::Digit(
513 TString filename, TString foldername, Int_t event,
514 Int_t chamber, Int_t cathode, Int_t digit
517 // Returns the specified digit in the given file, folder, event,
518 // chamber and cathode. NULL is returned on error.
520 Assert( 0 <= chamber && chamber <= 13 );
521 Assert( 0 <= cathode && cathode <= 1 );
523 if ( ! FetchLoaders(filename, foldername) ) return NULL;
524 if ( ! FetchEvent(event) ) return NULL;
525 if ( ! FetchTreeD() ) return NULL;
527 if ( fCathode != cathode )
533 return static_cast<AliMUONDigit*>( fData.Digits(chamber)->At(digit) );
537 Int_t AliMUONDataInterface::NumberOfRawClusters(
538 TString filename, TString foldername, Int_t event, Int_t chamber
541 // Returns the number of raw clusters in the specified file, folder, event and chamber.
542 // -1 is returned or error.
544 Assert( 0 <= chamber && chamber <= 13 );
545 if ( ! FetchLoaders(filename, foldername) ) return -1;
546 if ( ! FetchEvent(event) ) return -1;
547 if ( ! FetchTreeR() ) return -1;
548 if ( ! fClusterAddressSet )
550 // If the raw cluster address in TreeR is not set yet then set it now.
551 fData.SetTreeAddress("RC");
552 fData.ResetRawClusters();
553 fData.GetRawClusters();
554 fClusterAddressSet = kTRUE;
556 return fData.RawClusters(chamber)->GetEntriesFast();
560 AliMUONRawCluster* AliMUONDataInterface::RawCluster(
561 TString filename, TString foldername, Int_t event,
562 Int_t chamber, Int_t cluster
565 // Fetch the specified raw cluster from the given file, folder, event and chamber number.
566 // NULL is returned on error.
568 Assert( 0 <= chamber && chamber <= 13 );
569 if ( ! FetchLoaders(filename, foldername) ) return NULL;
570 if ( ! FetchEvent(event) ) return NULL;
571 if ( ! FetchTreeR() ) return NULL;
572 if ( ! fClusterAddressSet )
574 // If the raw cluster address in TreeR is not set yet then set it now.
575 fData.SetTreeAddress("RC");
576 fData.ResetRawClusters();
577 fData.GetRawClusters();
578 fClusterAddressSet = kTRUE;
580 return static_cast<AliMUONRawCluster*>( fData.RawClusters(chamber)->At(cluster) );
584 Int_t AliMUONDataInterface::NumberOfLocalTriggers(TString filename, TString foldername, Int_t event)
586 // Return the number of local trigger objects in the specified file, folder and
587 // event number. -1 is returned on error.
589 if ( ! FetchLoaders(filename, foldername) ) return -1;
590 if ( ! FetchEvent(event) ) return -1;
591 if ( ! FetchTreeD() ) return -1;
592 if ( ! fTriggerAddressSet )
594 // If the local trigger address in TreeR is not set yet then set it now.
595 fData.SetTreeAddress("GLT");
596 fData.ResetTrigger();
598 fTriggerAddressSet = kTRUE;
600 return fData.LocalTrigger()->GetEntriesFast();
604 AliMUONLocalTrigger* AliMUONDataInterface::LocalTrigger(
605 TString filename, TString foldername, Int_t event, Int_t trigger
608 // Fetch the specified local trigger object from the given file, folder and event number.
609 // NULL is returned on error.
611 if ( ! FetchLoaders(filename, foldername) ) return NULL;
612 if ( ! FetchEvent(event) ) return NULL;
613 if ( ! FetchTreeD() ) return NULL;
614 if ( ! fTriggerAddressSet )
616 // If the local trigger address in TreeR is not set yet then set it now.
617 fData.SetTreeAddress("GLT");
618 fData.ResetTrigger();
620 fTriggerAddressSet = kTRUE;
622 return static_cast<AliMUONLocalTrigger*>( fData.LocalTrigger()->At(trigger) );
626 Bool_t AliMUONDataInterface::SetFile(TString filename, TString foldername)
628 // Set the current file and folder from which to fetch data.
629 // kTRUE is returned if the run and muon loaders were found, else kFALSE.
631 return FetchLoaders(filename, foldername);
635 Bool_t AliMUONDataInterface::GetEvent(Int_t event)
637 // Select the current event from which to fetch data.
638 // kTRUE is returned if the event was found, else kFALSE is returned.
640 if (fRunloader == NULL)
642 AliError("File not set.");
646 return FetchEvent(event);
650 Int_t AliMUONDataInterface::NumberOfEvents()
652 // Get the number of events in the currently selected file.
653 // -1 is returned on error.
655 if (fRunloader == NULL)
657 AliError("File not set.");
660 return fRunloader->GetNumberOfEvents();
664 Int_t AliMUONDataInterface::NumberOfParticles()
666 // Get the number of particles in the current event.
667 // -1 is returned on error.
669 if (fRunloader == NULL)
671 AliError("File not set.");
674 if ( ! FetchTreeK() ) return -1;
675 return (Int_t) fRunloader->TreeK()->GetEntriesFast();
679 TParticle* AliMUONDataInterface::Particle(Int_t particle)
681 // Fetch the specified particle from the current event.
682 // NULL is returned on error.
684 if (fRunloader == NULL)
686 AliError("File not set.");
689 if (fEventnumber < 0)
691 AliError("Event not chosen.");
694 if ( ! FetchTreeK() ) return NULL;
695 TTree* treeK = fRunloader->TreeK();
697 treeK->GetBranch("Particles")->SetAddress(&p);
698 treeK->GetEvent(particle);
703 Int_t AliMUONDataInterface::NumberOfTracks()
705 // Get the number of tracks in the current event.
706 // -1 is returned on error.
708 if (fRunloader == NULL)
710 AliError("File not set.");
713 if (fEventnumber < 0)
715 AliError( "Event not chosen.");
718 if ( ! FetchTreeH() ) return -1;
719 return fData.GetNtracks();
723 Int_t AliMUONDataInterface::NumberOfHits(Int_t track)
725 // Get the number of hits for the given track in the current event.
726 // -1 is returned on error.
728 if (fRunloader == NULL)
730 AliError("File not set.");
733 if (fEventnumber < 0)
735 AliError("Event not chosen.");
738 if ( ! FetchTreeH() ) return -1;
739 if (fTrack < 0 || fTrack != track)
742 fData.GetTrack(track);
745 return fData.Hits()->GetEntriesFast();
749 AliMUONHit* AliMUONDataInterface::Hit(Int_t track, Int_t hit)
751 // Fetch the specified hit from the current event.
752 // NULL is returned on error.
754 if (fRunloader == NULL)
756 AliError("File not set.");
759 if (fEventnumber < 0)
761 AliError("Event not chosen.");
764 if ( ! FetchTreeH() ) return NULL;
765 if (fTrack < 0 || fTrack != track)
768 fData.GetTrack(track);
771 return static_cast<AliMUONHit*>( fData.Hits()->At(hit) );
775 Int_t AliMUONDataInterface::NumberOfSDigits(Int_t chamber, Int_t cathode)
777 // Get the number of s-digits on the chamber, cathode in the current event.
778 // -1 is returned on error.
780 Assert( 0 <= chamber && chamber <= 13 );
781 Assert( 0 <= cathode && cathode <= 1 );
783 if (fRunloader == NULL)
785 AliError("File not set.");
788 if (fEventnumber < 0)
790 AliError("Event not chosen.");
794 if ( ! FetchTreeS() ) return -1;
795 if ( fSCathode != cathode )
797 fData.ResetSDigits();
801 return fData.SDigits(chamber)->GetEntriesFast();
805 AliMUONDigit* AliMUONDataInterface::SDigit(Int_t chamber, Int_t cathode, Int_t sdigit)
807 // Fetch the specified s-digits on the chamber, cathode from the current event.
808 // NULL is returned on error.
810 Assert( 0 <= chamber && chamber <= 13 );
811 Assert( 0 <= cathode && cathode <= 1 );
813 if (fRunloader == NULL)
815 AliError("File not set.");
818 if (fEventnumber < 0)
820 AliError("Event not chosen.");
824 if ( ! FetchTreeS() ) return NULL;
825 if ( fSCathode != cathode )
827 fData.ResetSDigits();
831 return static_cast<AliMUONDigit*>( fData.SDigits(chamber)->At(sdigit) );
835 Int_t AliMUONDataInterface::NumberOfDigits(Int_t chamber, Int_t cathode)
837 // Get the number of digits on the chamber, cathode in the current event.
838 // -1 is returned on error.
840 Assert( 0 <= chamber && chamber <= 13 );
841 Assert( 0 <= cathode && cathode <= 1 );
843 if (fRunloader == NULL)
845 AliError("File not set.");
848 if (fEventnumber < 0)
850 AliError("Event not chosen.");
854 if ( ! FetchTreeD() ) return -1;
855 if ( fCathode != cathode )
861 return fData.Digits(chamber)->GetEntriesFast();
865 AliMUONDigit* AliMUONDataInterface::Digit(Int_t chamber, Int_t cathode, Int_t digit)
867 // Fetch the specified digits on the chamber, cathode from the current event.
868 // NULL is returned on error.
870 Assert( 0 <= chamber && chamber <= 13 );
871 Assert( 0 <= cathode && cathode <= 1 );
873 if (fRunloader == NULL)
875 AliError("File not set.");
878 if (fEventnumber < 0)
880 AliError("Event not chosen.");
884 if ( ! FetchTreeD() ) return NULL;
885 if ( fCathode != cathode )
891 return static_cast<AliMUONDigit*>( fData.Digits(chamber)->At(digit) );
895 Int_t AliMUONDataInterface::NumberOfRawClusters(Int_t chamber)
897 // Get the number of raw clusters on the given chamber in the current event.
898 // -1 is returned on error.
900 Assert( 0 <= chamber && chamber <= 13 );
902 if (fRunloader == NULL)
904 AliError("File not set.");
907 if (fEventnumber < 0)
909 AliError("Event not chosen.");
913 if ( ! FetchTreeR() ) return -1;
914 if ( ! fClusterAddressSet )
916 fData.SetTreeAddress("RC");
917 fData.ResetRawClusters();
918 fData.GetRawClusters();
919 fClusterAddressSet = kTRUE;
921 return fData.RawClusters(chamber)->GetEntriesFast();
925 AliMUONRawCluster* AliMUONDataInterface::RawCluster(Int_t chamber, Int_t cluster)
927 // Fetch the specified raw cluster on the given chamber from the current event.
928 // NULL is returned on error.
930 Assert( 0 <= chamber && chamber <= 13 );
932 if (fRunloader == NULL)
934 AliError("File not set.");
937 if (fEventnumber < 0)
939 AliError("Event not chosen.");
943 if ( ! FetchTreeR() ) return NULL;
944 if ( ! fClusterAddressSet )
946 fData.SetTreeAddress("RC");
947 fData.ResetRawClusters();
948 fData.GetRawClusters();
949 fClusterAddressSet = kTRUE;
951 return static_cast<AliMUONRawCluster*>( fData.RawClusters(chamber)->At(cluster) );
955 Int_t AliMUONDataInterface::NumberOfLocalTriggers()
957 // Get the number of local trigger objects in the current event.
958 // -1 is returned on error.
960 if (fRunloader == NULL)
962 AliError("File not set.");
965 if (fEventnumber < 0)
967 AliError("Event not chosen.");
971 if ( ! FetchTreeD() ) return -1;
972 if ( ! fTriggerAddressSet )
974 fData.SetTreeAddress("GLT");
975 fData.ResetTrigger();
977 fTriggerAddressSet = kTRUE;
979 return fData.LocalTrigger()->GetEntriesFast();
983 AliMUONLocalTrigger* AliMUONDataInterface::LocalTrigger(Int_t trigger)
985 // Fetch the specified local trigger object from the current event.
986 // NULL is returned on error.
988 if (fRunloader == NULL)
990 AliError("File not set.");
993 if (fEventnumber < 0)
995 AliError( "Event not chosen.");
999 if ( ! FetchTreeD() ) return NULL;
1000 if ( ! fTriggerAddressSet )
1002 fData.SetTreeAddress("GLT");
1003 fData.ResetTrigger();
1004 fData.GetTriggerD();
1005 fTriggerAddressSet = kTRUE;
1007 return static_cast<AliMUONLocalTrigger*>( fData.LocalTrigger()->At(trigger) );