]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/EveBase/AliEveEventManager.cxx
Make use of new method AliRawReader::GetNumberOfEvents() - goinf to the last event...
[u/mrichter/AliRoot.git] / EVE / EveBase / AliEveEventManager.cxx
1 // $Id$
2 // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3
4 /**************************************************************************
5  * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
6  * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
7  * full copyright notice.                                                 *
8  **************************************************************************/
9
10 #include "AliEveEventManager.h"
11 #include <TEveManager.h>
12
13 #include <AliRunLoader.h>
14 #include <AliRun.h>
15 #include <AliESDEvent.h>
16 #include <AliESDfriend.h>
17 #include <AliDAQ.h>
18 #include <AliRawEventHeaderBase.h>
19 #include <AliRawReaderRoot.h>
20 #include <AliRawReaderFile.h>
21 #include <AliRawReaderDate.h>
22 #include <AliMagFMaps.h>
23 #include <AliCDBManager.h>
24 #include <AliHeader.h>
25 #include <AliGeomManager.h>
26
27 #include <TFile.h>
28 #include <TTree.h>
29 #include <TGeoManager.h>
30 #include <TSystem.h>
31
32 //==============================================================================
33 //==============================================================================
34 // AliEveEventManager
35 //==============================================================================
36
37 //______________________________________________________________________________
38 //
39 // Provide interface for loading and navigating standard AliRoot data
40 // (AliRunLoader) and ESDs.
41 //
42 // Missing support for raw-data. For now this is handled individually
43 // by each sub-detector.
44 //
45 // Also provides interface to magnetic-field and geometry. Mostly
46 // intended as wrappers over standard AliRoot functionality for
47 // convenient use from visualizateion macros.
48
49 ClassImp(AliEveEventManager)
50
51 AliEveEventManager* gAliEveEvent = 0;
52
53 Bool_t AliEveEventManager::fgAssertRunLoader = kFALSE;
54 Bool_t AliEveEventManager::fgAssertESD       = kFALSE;
55 Bool_t AliEveEventManager::fgAssertRaw       = kFALSE;
56
57 TString  AliEveEventManager::fgESDFileName("AliESDs.root");
58 TString  AliEveEventManager::fgRawFileName("raw.root");
59 TString  AliEveEventManager::fgCdbUri("local://$ALICE_ROOT");
60
61 AliMagF* AliEveEventManager::fgMagField = 0;
62
63
64 AliEveEventManager::AliEveEventManager() :
65   TEveEventManager(),
66
67   fPath      ( ), fEventId (-1),
68   fRunLoader (0),
69   fESDFile   (0), fESDTree (0), fESD (0),
70   fESDfriend (0), fESDfriendExists(kFALSE),
71   fRawReader (0),
72   fAutoLoad(kFALSE),
73   fAutoLoadTime(5.),
74   fAutoLoadTimer(0),
75   fIsOnline(kFALSE)
76 {
77   // Default constructor.
78 }
79
80 AliEveEventManager::AliEveEventManager(TString path, Int_t ev) :
81   TEveEventManager("AliEVE AliEveEventManager"),
82
83   fPath   (path), fEventId(-1),
84   fRunLoader (0),
85   fESDFile   (0), fESDTree (0), fESD (0),
86   fESDfriend (0), fESDfriendExists(kFALSE),
87   fRawReader (0),
88   fAutoLoad(kFALSE),
89   fAutoLoadTime(5.),
90   fAutoLoadTimer(0),
91   fIsOnline(kFALSE)
92 {
93   // Constructor with event-directory URL and event-id.
94
95   Open();
96   if (ev >= 0) GotoEvent(ev);
97 }
98
99 AliEveEventManager::~AliEveEventManager()
100 {
101   // Destructor.
102
103   if (fAutoLoadTimer) delete fAutoLoadTimer;
104   // Somewhat unclear what to do here.
105   // In principle should close all data sources and deregister from
106   // TEveManager.
107 }
108
109 /******************************************************************************/
110
111 void AliEveEventManager::SetESDFileName(const Text_t* esd)
112 {
113   // Set file-name for opening ESD, default "AliESDs.root".
114
115   if (esd) fgESDFileName = esd;
116 }
117
118 void AliEveEventManager::SetRawFileName(const Text_t* raw)
119 {
120   // Set file-name for opening of raw-data, default "raw.root"
121   if (raw) fgRawFileName = raw;
122 }
123
124 void AliEveEventManager::SetCdbUri(const Text_t* cdb)
125 {
126   // Set path to CDB, default "local://$ALICE_ROOT".
127
128   if (cdb) fgCdbUri = cdb;
129 }
130
131 void AliEveEventManager::SetAssertElements(Bool_t assertRunloader,
132                                            Bool_t assertEsd,
133                                            Bool_t assertRaw)
134 {
135   // Set global flags that detrmine which parts of the event-data must
136   // be present when the event is opened.
137
138   fgAssertRunLoader = assertRunloader;
139   fgAssertESD = assertEsd;
140   fgAssertRaw = assertRaw;
141 }
142
143 /******************************************************************************/
144
145 void AliEveEventManager::Open()
146 {
147   // Open event-data from URL specified in fPath.
148   // Attempts to create AliRunLoader() and to open ESD with ESDfriends.
149   // Warning is reported if run-loader or ESD is not found.
150   // Global data-members fgAssertRunLoader and fgAssertESD can be set
151   // to throw exceptions instead.
152
153   static const TEveException kEH("AliEveEventManager::Open ");
154
155   gSystem->ExpandPathName(fPath);
156   // The following magick is required for ESDriends to be loaded properly
157   // from non-current directory.
158   if (fPath.IsNull() || fPath == ".")
159   {
160     fPath = gSystem->WorkingDirectory();
161   }
162   else if ( ! fPath.BeginsWith("file:/"))
163   {
164     TUrl    url(fPath, kTRUE);
165     TString protocol(url.GetProtocol());
166     if (protocol == "file" && fPath[0] != '/')
167       fPath = Form("%s/%s", gSystem->WorkingDirectory(), fPath.Data());
168   }
169
170   Int_t runNo = -1;
171
172   // Open ESD and ESDfriends
173
174   TString esdPath(Form("%s/%s", fPath.Data(), fgESDFileName.Data()));
175   if ((fESDFile = TFile::Open(esdPath)))
176   {
177     fESD = new AliESDEvent();
178     fESDTree = (TTree*) fESDFile->Get("esdTree");
179     if (fESDTree != 0)
180     {
181       fESD->ReadFromTree(fESDTree);
182       fESDTree->GetEntry(0);
183       if (runNo < 0)
184         runNo = fESD->GetESDRun()->GetRunNumber();
185
186       // Check if ESDfriends exists and attach the branch
187       TString p(Form("%s/AliESDfriends.root", fPath.Data()));
188       if (gSystem->AccessPathName(p, kReadPermission) == kFALSE)
189       {
190         fESDfriendExists = kTRUE;
191         fESDTree->SetBranchStatus ("ESDfriend*", 1);
192         fESDTree->SetBranchAddress("ESDfriend.", &fESDfriend);
193       }
194     }
195     else // esdtree == 0
196     {
197       delete fESDFile; fESDFile = 0;
198       Warning(kEH, "failed getting the esdTree.");
199     }
200   }
201   else // esd not readable
202   {
203     Warning(kEH, "can not read ESD file '%s'.", esdPath.Data());
204   }
205   if (fESDTree == 0)
206   {
207     if (fgAssertESD)
208     {
209       throw (kEH + "ESD not initialized. Its precence was requested.");
210     } else {
211       Warning(kEH, "ESD not initialized.");
212     }
213   }
214
215   // Open RunLoader from galice.root
216
217   TString gaPath(Form("%s/galice.root", fPath.Data()));
218   // If i use open directly, we get fatal.
219   // Is AccessPathName check ok for xrootd / alien? Yes, not for http.
220   if (gSystem->AccessPathName(gaPath, kReadPermission) == kFALSE)
221   {
222     fRunLoader = AliRunLoader::Open(gaPath);
223     if (fRunLoader)
224     {
225       TString alicePath = fPath + "/";
226       fRunLoader->SetDirName(alicePath);
227
228       if (fRunLoader->LoadgAlice() != 0)
229         Warning(kEH, "failed loading gAlice via run-loader.");
230
231       if (fRunLoader->LoadHeader() == 0)
232       {
233         if (runNo < 0)
234           runNo = fRunLoader->GetHeader()->GetRun();
235       }
236       else
237       {
238         Warning(kEH, "failed loading run-loader's header.");
239         delete fRunLoader;
240         fRunLoader = 0;
241       }
242     }
243     else // run-loader open failed
244     {
245       Warning(kEH, "failed opening ALICE run-loader from '%s'.", gaPath.Data());
246     }
247   }
248   else // galice not readable
249   {
250     Warning(kEH, "can not read '%s'.", gaPath.Data());
251   }
252   if (fRunLoader == 0)
253   {
254     if (fgAssertRunLoader)
255       throw (kEH + "Bootstraping of run-loader failed. Its precence was requested.");
256     else
257       Warning(kEH, "Bootstraping of run-loader failed.");
258   }
259
260   // Open raw-data file
261
262   TString rawPath(Form("%s/%s", fPath.Data(), fgRawFileName.Data()));
263   // If i use open directly, raw-reader reports an error but i have      
264   // no way to detect it.        
265   // Is this (AccessPathName check) ok for xrootd / alien? Yes, not for http.    
266   if (gSystem->AccessPathName(rawPath, kReadPermission) == kFALSE)       
267   {
268     fRawReader = AliRawReader::Create(rawPath);
269   }
270   else
271   {
272     fRawReader = AliRawReader::Create(fgRawFileName);
273   }
274   if (fRawReader == 0)
275   {
276     if (fgAssertRaw)
277     {
278       throw (kEH + "raw-data not initialized. Its precence was requested.");
279     } else {
280       Warning(kEH, "raw-data not initialized.");
281     }
282   }
283
284   if (runNo < 0)
285   {
286     if (fRawReader)
287     {
288       fRawReader->NextEvent();
289       runNo = fRawReader->GetRunNumber();
290       Info(kEH, "Determining run-no from raw ... run=%d.", runNo);
291       fRawReader->RewindEvents();
292     } else {
293       throw (kEH + "unknown run number.");
294     }
295   }
296
297   {
298     AliCDBManager* cdb = AliCDBManager::Instance();
299     cdb->SetDefaultStorage(fgCdbUri);
300     if (cdb->IsDefaultStorageSet() == kFALSE)
301       throw (kEH + "CDB initialization failed.");
302     cdb->SetRun(runNo);
303   }
304
305   SetName(Form("Event %d", fEventId));
306   SetTitle(fPath);
307 }
308
309 void AliEveEventManager::SetEvent(AliRunLoader *runLoader, AliRawReader *rawReader, AliESDEvent *esd)
310 {
311   // Set an event from an external source
312   // The method is used in the online visualisation
313   fRunLoader = runLoader;
314   fRawReader = rawReader;
315   fESD = esd;
316   fIsOnline = kTRUE;
317   SetTitle("Online event in memory");
318   SetName("Online Event");
319
320   ElementChanged();
321   AfterNewEventLoaded();
322 }
323
324 Int_t AliEveEventManager::GetMaxEventId(Bool_t /*refreshESD*/) const
325 {
326   // Returns maximum available event id.
327   // If raw-data is the only data-source this can not be known
328   // and 10,000,000 is returned.
329   // If neither data-source is initialised an exception is thrown.
330   // If refresh_esd is true and ESD is the primary event-data source
331   // its header is re-read from disk.
332
333   static const TEveException kEH("AliEveEventManager::GetMaxEventId ");
334
335   if (fESDTree)
336   {
337     // Refresh crashes with root-5.21.1-alice.
338     // Fixed by Philippe 5.8.2008 r25053, can be reactivated
339     // when we move to a newer root.
340     // if (refreshESD)
341     //   fESDTree->Refresh();
342     return fESDTree->GetEntries() - 1;
343   }
344   else if (fRunLoader)
345   {
346     return fRunLoader->GetNumberOfEvents() - 1;
347   }
348   else if (fRawReader)
349   {
350     Int_t n = fRawReader->GetNumberOfEvents() - 1;
351     return n > -1 ? n : 10000000;
352   }
353   else
354   {
355     throw (kEH + "neither RunLoader, ESD nor Raw loaded.");
356   }
357 }
358
359 void AliEveEventManager::GotoEvent(Int_t event)
360 {
361   // Load data for specified event.
362   // If event is out of range an exception is thrown and old state
363   // is preserved.
364   // After successful loading of event, the virtual function
365   // AfterNewEventLoaded() is called. This executes commands that
366   // were registered via TEveEventManager::AddNewEventCommand().
367   //
368   // If event is negative, it is subtracted from the number of
369   // available events, thus passing -1 will load the last event.
370   // This is not supported when raw-data is the only data-source
371   // as the number of events is not known.
372
373   static const TEveException kEH("AliEveEventManager::GotoEvent ");
374
375   Int_t maxEvent = 0;
376   if (fESDTree)
377   {
378     // Refresh crashes with root-5.21.1-alice.
379     // Fixed by Philippe 5.8.2008 r25053, can be reactivated
380     // when we move to a newer root.
381     // fESDTree->Refresh();
382     maxEvent = fESDTree->GetEntries() - 1;
383     if (event < 0)
384       event = fESDTree->GetEntries() + event;
385   }
386   else if (fRunLoader)
387   {
388     maxEvent = fRunLoader->GetNumberOfEvents() - 1;
389     if (event < 0)
390       event = fRunLoader->GetNumberOfEvents() + event;
391   }
392   else if (fRawReader)
393   {
394     maxEvent = fRawReader->GetNumberOfEvents() - 1;
395     if (maxEvent < 0)
396     {
397       maxEvent = 10000000;
398       if (event < 0) {
399         Error(kEH, "current raw-data source does not support direct event access.");
400         return;
401       }
402       Info(kEH, "number of events unknown for current raw-data source, setting max-event id to 10M.");
403     }
404     else
405     {
406       if (event < 0)
407         event = fRawReader->GetNumberOfEvents() + event;
408     }
409   }
410   else
411   {
412     throw (kEH + "neither RunLoader, ESD nor Raw loaded.");
413   }
414   if (event < 0 || event > maxEvent)
415   {
416     throw (kEH + Form("event %d not present, available range [%d, %d].",
417                       event, 0, maxEvent));
418   }
419
420   TEveManager::TRedrawDisabler rd(gEve);
421   gEve->Redraw3D(kFALSE, kTRUE); // Enforce drop of all logicals.
422
423   // !!! MT this is somewhat brutal; at least optionally, one could be
424   // a bit gentler, checking for objs owning their external refs and having
425   // additinal parents.
426   DestroyElements();
427
428   if (fESDTree) {
429     if (fESDTree->GetEntry(event) <= 0)
430       throw (kEH + "failed getting required event from ESD.");
431
432     if (fESDfriendExists)
433       fESD->SetESDfriend(fESDfriend);
434   }
435
436   if (fRunLoader) {
437     if (fRunLoader->GetEvent(event) != 0)
438       throw (kEH + "failed getting required event.");
439   }
440
441   if (fRawReader)
442   {
443     // AliRawReader::GotoEvent(Int_t) works for AliRawReaderRoot/Chain.
444     if (fRawReader->GotoEvent(event) == kFALSE)
445     {
446       // Use fallback method - iteration with NextEvent().
447       Int_t rawEv = fEventId;
448       if (event < rawEv)
449       {
450         fRawReader->RewindEvents();
451         rawEv = -1;
452       }
453
454       while (rawEv < event)
455       {
456         if ( ! fRawReader->NextEvent())
457         {
458           fRawReader->RewindEvents();
459           fEventId = -1;
460           throw (kEH + Form("Error going to next raw-event from event %d.", rawEv));
461         }
462         ++rawEv;
463       }
464       Warning(kEH, "Loaded raw-event %d with fallback method.\n", rawEv);
465     }
466   }
467
468   fEventId = event;
469   SetName(Form("Event %d", fEventId));
470   ElementChanged();
471
472   AfterNewEventLoaded();
473   NewEventLoaded();
474 }
475
476 void AliEveEventManager::NextEvent()
477 {
478   // Loads next event
479   // either in automatic (online) or
480   // manual mode
481   
482   if (fIsOnline)
483   {
484     if (fAutoLoadTimer) fAutoLoadTimer->Stop();
485
486     DestroyElements();
487
488     gSystem->ExitLoop();
489   }
490   else
491   {
492     if (fEventId < GetMaxEventId(kTRUE))
493       GotoEvent(fEventId + 1);
494     else
495       GotoEvent(0);
496     StartStopAutoLoadTimer();
497   }
498 }
499
500 void AliEveEventManager::PrevEvent()
501 {
502   // Loads previous event
503   // only in case of manual mode
504   if (!fIsOnline) {
505     GotoEvent(fEventId - 1);
506     StartStopAutoLoadTimer();
507   }
508 }
509
510 void AliEveEventManager::Close()
511 {
512   // Close the event data-files and delete ESD, ESDfriend, run-loader
513   // and raw-reader.
514
515   if (fESDTree) {
516     delete fESD;       fESD       = 0;
517     delete fESDfriend; fESDfriend = 0;
518
519     delete fESDTree;   fESDTree = 0;
520     delete fESDFile;   fESDFile = 0;
521   }
522
523   if (fRunLoader) {
524     delete fRunLoader; fRunLoader = 0;
525   }
526
527   if (fRawReader) {
528     delete fRawReader; fRawReader = 0;
529   }
530 }
531
532
533 /******************************************************************************/
534 // Static convenience functions, mainly used from macros.
535 /******************************************************************************/
536
537 AliRunLoader* AliEveEventManager::AssertRunLoader()
538 {
539   // Make sure AliRunLoader is initialized and return it.
540   // Throws exception in case run-loader is not available.
541   // Static utility for macros.
542
543   static const TEveException kEH("AliEveEventManager::AssertRunLoader ");
544
545   if (gAliEveEvent == 0)
546     throw (kEH + "ALICE event not ready.");
547   if (gAliEveEvent->fRunLoader == 0)
548     throw (kEH + "AliRunLoader not initialised.");
549   return gAliEveEvent->fRunLoader;
550 }
551
552 AliESDEvent* AliEveEventManager::AssertESD()
553 {
554   // Make sure AliESDEvent is initialized and return it.
555   // Throws exception in case ESD is not available.
556   // Static utility for macros.
557
558   static const TEveException kEH("AliEveEventManager::AssertESD ");
559
560   if (gAliEveEvent == 0)
561     throw (kEH + "ALICE event not ready.");
562   if (gAliEveEvent->fESD == 0)
563     throw (kEH + "AliESD not initialised.");
564   return gAliEveEvent->fESD;
565 }
566
567 AliESDfriend* AliEveEventManager::AssertESDfriend()
568 {
569   // Make sure AliESDfriend is initialized and return it.
570   // Throws exception in case ESDfriend-loader is not available.
571   // Static utility for macros.
572
573   static const TEveException kEH("AliEveEventManager::AssertESDfriend ");
574
575   if (gAliEveEvent == 0)
576     throw (kEH + "ALICE event not ready.");
577   if (gAliEveEvent->fESDfriend == 0)
578     throw (kEH + "AliESDfriend not initialised.");
579   return gAliEveEvent->fESDfriend;
580 }
581
582 AliRawReader* AliEveEventManager::AssertRawReader()
583 {
584   // Make sure raw-reader is initialized and return it.
585
586   static const TEveException kEH("AliEveEventManager::AssertRawReader ");
587
588   if (gAliEveEvent == 0)
589     throw (kEH + "ALICE event not ready.");
590   if (gAliEveEvent->fRawReader == 0)
591     throw (kEH + "RawReader not ready.");
592
593   return gAliEveEvent->fRawReader;
594 }
595
596 AliMagF* AliEveEventManager::AssertMagField()
597 {
598   // Make sure AliMagF is initialized and return it.
599   // Throws exception in case magnetic field is not available.
600   // Static utility for macros.
601
602   if (fgMagField == 0)
603   {
604     if (gAliEveEvent && gAliEveEvent->fRunLoader && gAliEveEvent->fRunLoader->GetAliRun())
605       fgMagField = gAliEveEvent->fRunLoader->GetAliRun()->Field();
606     else
607       fgMagField = new AliMagFMaps("Maps","Maps", 1, 1., 10., AliMagFMaps::k5kG);
608   }
609   return fgMagField;
610 }
611
612 TGeoManager* AliEveEventManager::AssertGeometry()
613 {
614   // Make sure AliGeomManager is initialized and returns the
615   // corresponding TGeoManger.
616   // gGeoManager is set to the return value.
617   // Throws exception if geometry can not be loaded or if it is not
618   // available and the TGeoManager is locked.
619   // Static utility for macros.
620
621   static const TEveException kEH("AliEveEventManager::AssertGeometry ");
622
623   if (AliGeomManager::GetGeometry() == 0)
624   {
625     if (TGeoManager::IsLocked())
626       throw (kEH + "geometry is not loaded but TGeoManager is locked.");
627
628     gGeoManager = 0;
629     AliGeomManager::LoadGeometry();
630     if ( ! AliGeomManager::GetGeometry())
631     {
632       throw (kEH + "can not load geometry.");
633     }
634     if ( ! AliGeomManager::ApplyAlignObjsFromCDB("ITS TPC TRD TOF PHOS HMPID EMCAL MUON FMD ZDC PMD T0 VZERO ACORDE"))
635     {
636       ::Warning(kEH, "mismatch of alignable volumes. Proceeding.");
637       // throw (kEH + "could not apply align objs.");
638     }
639     AliGeomManager::GetGeometry()->DefaultColors();
640   }
641
642   gGeoManager = AliGeomManager::GetGeometry();
643   return gGeoManager;
644 }
645
646 void AliEveEventManager::SetAutoLoad(Bool_t autoLoad)
647 {
648   // Set the automatic event loading mode
649   fAutoLoad = autoLoad;
650   StartStopAutoLoadTimer();
651 }
652
653 void AliEveEventManager::SetAutoLoadTime(Double_t time)
654 {
655   // Set the auto-load time in seconds
656   fAutoLoadTime = time;
657   StartStopAutoLoadTimer();
658 }
659
660 void AliEveEventManager::StartStopAutoLoadTimer()
661 {
662   // Create if needed and start
663   // the automatic event loading timer
664   if (fAutoLoad)
665   {
666     if (!fAutoLoadTimer)
667     {
668       fAutoLoadTimer = new TTimer;
669       fAutoLoadTimer->Connect("Timeout()","AliEveEventManager",this,"NextEvent()");
670     }
671     fAutoLoadTimer->Start((Long_t)fAutoLoadTime*1000,kTRUE);
672   }
673   else
674   {
675     if (fAutoLoadTimer) fAutoLoadTimer->Stop();
676   }
677 }
678
679 void AliEveEventManager::NewEventLoaded()
680 {
681   // Emit NewEventLoaded signal.
682
683   Emit("NewEventLoaded()");
684 }
685
686 const char* AliEveEventManager::GetEventInfo() const
687 {
688   // Dumps the event-header contents
689
690   static TString eventInfo;
691
692   if (!fRawReader) {
693     eventInfo.Form("No raw-data event info is available!\n");
694   }
695   else {
696     const UInt_t* attr = fRawReader->GetAttributes();
697     eventInfo.Form("Raw-data event info:\nRun#: %d\nEvent type: %d (%s)\nPeriod: %x\nOrbit: %x   BC: %x\nTrigger: %llx\nDetectors: %x (%s)\nAttributes:%x-%x-%x\nTimestamp: %x\n",
698                    fRawReader->GetRunNumber(),fRawReader->GetType(),AliRawEventHeaderBase::GetTypeName(fRawReader->GetType()),
699                    fRawReader->GetPeriod(),fRawReader->GetOrbitID(),fRawReader->GetBCID(),
700                    fRawReader->GetClassMask(),
701                    *fRawReader->GetDetectorPattern(),AliDAQ::ListOfTriggeredDetectors(*fRawReader->GetDetectorPattern()),
702                    attr[0],attr[1],attr[2],
703                    fRawReader->GetTimestamp());
704   }
705   if (!fESD) {
706     eventInfo.Append(Form("\nNo ESD event info is available!\n"));
707   }
708   else {
709     TString acttrclasses = fESD->GetESDRun()->GetActiveTriggerClasses();
710     TString firedtrclasses = fESD->GetFiredTriggerClasses();
711     eventInfo.Append(Form("\nESD event info:\nRun#: %d\nActive trigger classes: %s\nEvent type: %d (%s)\nPeriod: %x\nOrbit: %x   BC: %x\nTrigger: %llx (%s)\nEvent# in file:%d\nTimestamp: %x\n",
712                           fESD->GetRunNumber(),
713                           acttrclasses.Data(),
714                           fESD->GetEventType(),AliRawEventHeaderBase::GetTypeName(fESD->GetEventType()),
715                           fESD->GetPeriodNumber(),fESD->GetOrbitNumber(),fESD->GetBunchCrossNumber(),
716                           fESD->GetTriggerMask(),firedtrclasses.Data(),
717                           fESD->GetEventNumberInFile(),
718                           fESD->GetTimeStamp()));
719   }
720
721   return eventInfo.Data();
722 }
723