1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 ///////////////////////////////////////////////////////////////////////////////
20 /// This is the base class for reading raw data.
22 /// The derived classes, which operate on concrete raw data formats,
24 /// - ReadHeader to read the next (data/equipment) header
25 /// - ReadNextData to read the next raw data block (=1 DDL)
26 /// - ReadNext to read a given number of bytes
27 /// - several getters like GetType
29 /// Sequential access to the raw data is provided by the methods
30 /// ReadHeader, ReadNextData, ReadNextInt, ReadNextShort, ReadNextChar
32 /// If only data from a specific detector (and a given range of DDL numbers)
33 /// should be read, this can be achieved by the Select method.
34 /// Several getters provide information about the current event and the
35 /// current type of raw data.
37 ///////////////////////////////////////////////////////////////////////////////
40 #include <TPluginManager.h>
42 #include <TInterpreter.h>
45 #include <THashList.h>
47 #include <Riostream.h>
48 #include "AliRawReader.h"
49 #include "AliRawReaderFile.h"
50 #include "AliRawReaderDate.h"
51 #include "AliRawReaderRoot.h"
52 #include "AliRawReaderChain.h"
57 ClassImp(AliRawReader)
60 AliRawReader::AliRawReader() :
61 fEquipmentIdsIn(NULL),
62 fEquipmentIdsOut(NULL),
63 fRequireHeader(kTRUE),
67 fSelectEquipmentType(-1),
68 fSelectMinEquipmentId(-1),
69 fSelectMaxEquipmentId(-1),
72 fSelectTriggerMask(0),
76 fErrorLogs("AliRawDataErrorLog",100),
78 fHeaderSwappedV3(NULL),
80 fIsTriggerClassLoaded(kFALSE)
82 // default constructor: initialize data members
83 // Allocate the swapped header in case of Mac
85 fHeaderSwapped=new AliRawDataHeader();
86 fHeaderSwappedV3=new AliRawDataHeaderV3();
90 Bool_t AliRawReader::LoadEquipmentIdsMap(const char *fileName)
92 // Open the mapping file
93 // and load the mapping data
94 ifstream input(fileName);
95 if (input.is_open()) {
96 Warning("AliRawReader","Equipment ID mapping file is found !");
97 const Int_t kMaxDDL = 256;
98 fEquipmentIdsIn = new TArrayI(kMaxDDL);
99 fEquipmentIdsOut = new TArrayI(kMaxDDL);
100 Int_t equipIn, equipOut;
102 while (input >> equipIn >> equipOut) {
103 if (nIds >= kMaxDDL) {
104 Error("AliRawReader","Too many equipment Id mappings found ! Truncating the list !");
107 fEquipmentIdsIn->AddAt(equipIn,nIds);
108 fEquipmentIdsOut->AddAt(equipOut,nIds);
111 fEquipmentIdsIn->Set(nIds);
112 fEquipmentIdsOut->Set(nIds);
117 Error("AliRawReader","equipment id map file is not found ! Skipping the mapping !");
122 AliRawReader::AliRawReader(const AliRawReader& rawReader) :
124 fEquipmentIdsIn(rawReader.fEquipmentIdsIn),
125 fEquipmentIdsOut(rawReader.fEquipmentIdsOut),
126 fRequireHeader(rawReader.fRequireHeader),
127 fHeader(rawReader.fHeader),
128 fHeaderV3(rawReader.fHeaderV3),
129 fCount(rawReader.fCount),
130 fSelectEquipmentType(rawReader.fSelectEquipmentType),
131 fSelectMinEquipmentId(rawReader.fSelectMinEquipmentId),
132 fSelectMaxEquipmentId(rawReader.fSelectMaxEquipmentId),
133 fSkipInvalid(rawReader.fSkipInvalid),
134 fSelectEventType(rawReader.fSelectEventType),
135 fSelectTriggerMask(rawReader.fSelectTriggerMask),
136 fSelectTriggerExpr(rawReader.fSelectTriggerExpr),
139 fErrorLogs("AliRawDataErrorLog",100),
140 fHeaderSwapped(NULL),
141 fHeaderSwappedV3(NULL),
142 fIsValid(rawReader.fIsValid),
143 fIsTriggerClassLoaded(rawReader.fIsTriggerClassLoaded)
146 // Allocate the swapped header in case of Mac
148 fHeaderSwapped=new AliRawDataHeader(*rawReader.fHeaderSwapped);
149 fHeaderSwappedV3=new AliRawDataHeader(*rawReader.fHeaderSwappedV3);
153 AliRawReader& AliRawReader::operator = (const AliRawReader& rawReader)
155 // assignment operator
156 if(&rawReader == this) return *this;
157 fEquipmentIdsIn = rawReader.fEquipmentIdsIn;
158 fEquipmentIdsOut = rawReader.fEquipmentIdsOut;
160 fHeader = rawReader.fHeader;
161 fHeaderV3 = rawReader.fHeaderV3;
162 fCount = rawReader.fCount;
164 fSelectEquipmentType = rawReader.fSelectEquipmentType;
165 fSelectMinEquipmentId = rawReader.fSelectMinEquipmentId;
166 fSelectMaxEquipmentId = rawReader.fSelectMaxEquipmentId;
167 fSkipInvalid = rawReader.fSkipInvalid;
168 fSelectEventType = rawReader.fSelectEventType;
169 fSelectTriggerMask = rawReader.fSelectTriggerMask;
170 fSelectTriggerExpr = rawReader.fSelectTriggerExpr;
172 fErrorCode = rawReader.fErrorCode;
174 fEventNumber = rawReader.fEventNumber;
175 fErrorLogs = *((TClonesArray*)rawReader.fErrorLogs.Clone());
177 fIsValid = rawReader.fIsValid;
178 fIsTriggerClassLoaded = rawReader.fIsTriggerClassLoaded;
183 AliRawReader::~AliRawReader()
186 // delete the mapping arrays if
188 if (fEquipmentIdsIn) delete fEquipmentIdsIn;
189 if (fEquipmentIdsOut) delete fEquipmentIdsOut;
191 if (fHeaderSwapped) delete fHeaderSwapped;
192 if (fHeaderSwappedV3) delete fHeaderSwappedV3;
195 AliRawReader* AliRawReader::Create(const char *uri)
197 // RawReader's factory
198 // It instantiate corresponding raw-reader implementation class object
199 // depending on the URI provided
200 // Normal URIs point to files, while the URI starting with
201 // 'mem://:' or 'mem://<filename>' will create
202 // AliRawReaderDateOnline object which is supposed to be used
203 // in the online reconstruction
205 TString strURI = uri;
207 if (strURI.IsNull()) {
208 AliWarningClass("No raw-reader created");
212 TObjArray *fields = strURI.Tokenize("?");
213 TString &fileURI = ((TObjString*)fields->At(0))->String();
215 AliRawReader *rawReader = NULL;
216 if (fileURI.BeginsWith("mem://") || fileURI.BeginsWith("^")) {
217 if (fileURI.BeginsWith("mem://")) fileURI.ReplaceAll("mem://","");
218 AliInfoClass(Form("Creating raw-reader in order to read events in shared memory (option=%s)",fileURI.Data()));
220 TPluginManager* pluginManager = gROOT->GetPluginManager();
221 TString rawReaderName = "AliRawReaderDateOnline";
222 TPluginHandler* pluginHandler = pluginManager->FindHandler("AliRawReader", "online");
223 // if not, add a plugin for it
224 if (!pluginHandler) {
225 pluginManager->AddHandler("AliRawReader", "online",
226 "AliRawReaderDateOnline", "RAWDatarecOnline", "AliRawReaderDateOnline(const char*)");
227 pluginHandler = pluginManager->FindHandler("AliRawReader", "online");
229 if (pluginHandler && (pluginHandler->LoadPlugin() == 0)) {
230 rawReader = (AliRawReader*)pluginHandler->ExecPlugin(1,fileURI.Data());
237 else if (fileURI.BeginsWith("amore://")) {
238 // A special raw-data URL used in case
239 // the raw-data reading is steered from
240 // ouside, i.e. from AMORE
241 fileURI.ReplaceAll("amore://","");
242 AliInfoClass("Creating raw-reader in order to read events sent by AMORE");
243 rawReader = new AliRawReaderDate((void *)NULL);
245 else if (fileURI.BeginsWith("collection://")) {
246 fileURI.ReplaceAll("collection://","");
247 AliInfoClass(Form("Creating raw-reader in order to read raw-data files collection defined in %s",fileURI.Data()));
248 rawReader = new AliRawReaderChain(fileURI);
250 else if (fileURI.BeginsWith("raw://run")) {
251 fileURI.ReplaceAll("raw://run","");
252 if (fileURI.IsDigit()) {
253 rawReader = new AliRawReaderChain(fileURI.Atoi());
256 AliErrorClass(Form("Invalid syntax: %s",fileURI.Data()));
262 AliInfoClass(Form("Creating raw-reader in order to read raw-data file: %s",fileURI.Data()));
263 TString filename(gSystem->ExpandPathName(fileURI.Data()));
264 if (filename.EndsWith("/")) {
265 rawReader = new AliRawReaderFile(filename);
266 } else if (filename.EndsWith(".root")) {
267 rawReader = new AliRawReaderRoot(filename);
269 rawReader = new AliRawReaderDate(filename);
273 if (!rawReader->IsRawReaderValid()) {
274 AliErrorClass(Form("Raw-reader is invalid - check the input URI (%s)",fileURI.Data()));
280 // Now apply event selection criteria (if specified)
281 if (fields->GetEntries() > 1) {
282 Int_t eventType = -1;
283 ULong64_t triggerMask = 0;
285 for(Int_t i = 1; i < fields->GetEntries(); i++) {
286 if (!fields->At(i)) continue;
287 TString &option = ((TObjString*)fields->At(i))->String();
288 if (option.BeginsWith("EventType=",TString::kIgnoreCase)) {
289 option.ReplaceAll("EventType=","");
290 eventType = option.Atoi();
293 if (option.BeginsWith("Trigger=",TString::kIgnoreCase)) {
294 option.ReplaceAll("Trigger=","");
295 if (option.IsDigit()) {
296 triggerMask = option.Atoll();
299 triggerExpr = option.Data();
303 AliWarningClass(Form("Ignoring invalid event selection option: %s",option.Data()));
305 AliInfoClass(Form("Event selection criteria specified: eventype=%d trigger mask=%llx trigger expression=%s",
306 eventType,triggerMask,triggerExpr.Data()));
307 rawReader->SelectEvents(eventType,triggerMask,triggerExpr.Data());
315 Int_t AliRawReader::GetMappedEquipmentId() const
317 if (!fEquipmentIdsIn || !fEquipmentIdsOut) {
318 Error("AliRawReader","equipment Ids mapping is not initialized !");
319 return GetEquipmentId();
321 Int_t equipmentId = GetEquipmentId();
322 for(Int_t iId = 0; iId < fEquipmentIdsIn->GetSize(); iId++) {
323 if (equipmentId == fEquipmentIdsIn->At(iId)) {
324 equipmentId = fEquipmentIdsOut->At(iId);
331 Int_t AliRawReader::GetDetectorID() const
333 // Get the detector ID
334 // The list of detector IDs
335 // can be found in AliDAQ.h
337 if (fEquipmentIdsIn && fEquipmentIdsIn)
338 equipmentId = GetMappedEquipmentId();
340 equipmentId = GetEquipmentId();
342 if (equipmentId >= 0) {
344 return AliDAQ::DetectorIDFromDdlID(equipmentId,ddlIndex);
350 Int_t AliRawReader::GetDDLID() const
352 // Get the DDL ID (within one sub-detector)
353 // The list of detector IDs
354 // can be found in AliDAQ.h
356 if (fEquipmentIdsIn && fEquipmentIdsIn)
357 equipmentId = GetMappedEquipmentId();
359 equipmentId = GetEquipmentId();
361 if (equipmentId >= 0) {
363 AliDAQ::DetectorIDFromDdlID(equipmentId,ddlIndex);
370 void AliRawReader::Select(const char *detectorName, Int_t minDDLID, Int_t maxDDLID)
372 // read only data of the detector with the given name and in the given
373 // range of DDLs (minDDLID <= DDLID <= maxDDLID).
374 // no selection is applied if a value < 0 is used.
375 Int_t detectorID = AliDAQ::DetectorID(detectorName);
377 Select(detectorID,minDDLID,maxDDLID);
380 void AliRawReader::Select(Int_t detectorID, Int_t minDDLID, Int_t maxDDLID)
382 // read only data of the detector with the given ID and in the given
383 // range of DDLs (minDDLID <= DDLID <= maxDDLID).
384 // no selection is applied if a value < 0 is used.
386 fSelectEquipmentType = -1;
389 fSelectMinEquipmentId = AliDAQ::DdlIDOffset(detectorID);
391 fSelectMinEquipmentId = AliDAQ::DdlID(detectorID,minDDLID);
394 fSelectMaxEquipmentId = AliDAQ::DdlID(detectorID,AliDAQ::NumberOfDdls(detectorID)-1);
396 fSelectMaxEquipmentId = AliDAQ::DdlID(detectorID,maxDDLID);
399 void AliRawReader::SelectEquipment(Int_t equipmentType,
400 Int_t minEquipmentId, Int_t maxEquipmentId)
402 // read only data of the equipment with the given type and in the given
403 // range of IDs (minEquipmentId <= EquipmentId <= maxEquipmentId).
404 // no selection is applied if a value < 0 is used.
406 fSelectEquipmentType = equipmentType;
407 fSelectMinEquipmentId = minEquipmentId;
408 fSelectMaxEquipmentId = maxEquipmentId;
411 void AliRawReader::SelectEvents(Int_t type, ULong64_t triggerMask,
412 const char *triggerExpr)
414 // read only events with the given type and optionally
416 // no selection is applied if value = 0 is used.
417 // Trigger selection can be done via string (triggerExpr)
418 // which defines the trigger logic to be used. It works only
419 // after LoadTriggerClass() method is called for all involved
422 fSelectEventType = type;
423 fSelectTriggerMask = triggerMask;
424 if (triggerExpr) fSelectTriggerExpr = triggerExpr;
427 void AliRawReader::LoadTriggerClass(const char* name, Int_t index)
429 // Loads the list of trigger classes defined.
430 // Used in conjunction with IsEventSelected in the
431 // case when the trigger selection is given by
432 // fSelectedTriggerExpr
434 if (fSelectTriggerExpr.IsNull()) return;
436 fIsTriggerClassLoaded = kTRUE;
439 fSelectTriggerExpr.ReplaceAll(name,Form("[%d]",index));
441 fSelectTriggerExpr.ReplaceAll(name,"0");
444 void AliRawReader::LoadTriggerAlias(const THashList *lst)
446 // Loads the list of trigger aliases defined.
447 // Replaces the alias by the OR of the triggers included in it.
448 // The subsiquent call to LoadTriggerClass is needed
449 // to obtain the final expression in
450 // fSelectedTriggerExpr
452 if (fSelectTriggerExpr.IsNull()) return;
454 // Make a THashList alias -> trigger classes
456 THashList alias2trig;
462 while((nmd = dynamic_cast<TNamed*>(iter.Next()))){
464 TString aliasList(nmd->GetTitle());
465 TObjArray* arrAliases = aliasList.Tokenize(',');
466 Int_t nAliases = arrAliases->GetEntries();
468 // Loop on aliases for the current trigger
469 for(Int_t i=0; i<nAliases; i++){
471 TObjString *alias = (TObjString*) arrAliases->At(i);
473 // Find the current alias in the hash list. If it is not there, add TNamed entry
474 TNamed * inlist = (TNamed*)alias2trig.FindObject((alias->GetString()).Data());
476 inlist = new TNamed((alias->GetString()).Data(),nmd->GetName());
477 alias2trig.Add(inlist);
480 TString tt(inlist->GetTitle());
482 tt += nmd->GetName();
483 inlist->SetTitle(tt.Data());
489 alias2trig.Sort(kSortDescending);
491 // Replace all the aliases by the OR of triggers
492 TIter iter1(&alias2trig);
493 while((nmd = dynamic_cast<TNamed*>(iter1.Next()))){
494 fSelectTriggerExpr.ReplaceAll(nmd->GetName(),nmd->GetTitle());
498 Bool_t AliRawReader::IsSelected() const
500 // apply the selection (if any)
502 if (fSkipInvalid && !IsValid()) return kFALSE;
504 if (fSelectEquipmentType >= 0)
505 if (GetEquipmentType() != fSelectEquipmentType) return kFALSE;
508 if (fEquipmentIdsIn && fEquipmentIdsIn)
509 equipmentId = GetMappedEquipmentId();
511 equipmentId = GetEquipmentId();
513 if ((fSelectMinEquipmentId >= 0) &&
514 (equipmentId < fSelectMinEquipmentId))
516 if ((fSelectMaxEquipmentId >= 0) &&
517 (equipmentId > fSelectMaxEquipmentId))
523 Bool_t AliRawReader::IsEventSelected() const
525 // apply the event selection (if any)
527 // First check the event type
528 if (fSelectEventType >= 0) {
529 if (GetType() != (UInt_t) fSelectEventType) return kFALSE;
532 // Then check the trigger pattern and compared it
533 // to the required trigger mask
534 if (fSelectTriggerMask != 0) {
535 if ((GetClassMask() & fSelectTriggerMask) != fSelectTriggerMask) return kFALSE;
538 if ( fIsTriggerClassLoaded && !fSelectTriggerExpr.IsNull()) {
539 TString expr(fSelectTriggerExpr);
540 ULong64_t mask = GetClassMask();
541 for(Int_t itrigger = 0; itrigger < 50; itrigger++) {
542 if (mask & ((ULong64_t)1 << itrigger)) {
543 expr.ReplaceAll(Form("[%d]",itrigger),"1");
546 expr.ReplaceAll(Form("[%d]",itrigger),"0");
549 // Possibility to introduce downscaling
550 TPRegexp("(%\\s*\\d+)").Substitute(expr,Form("&& !(%d$1)",GetEventIndex()),"g");
552 Bool_t result = gROOT->ProcessLineFast(expr.Data(),&error);
553 if ( error == TInterpreter::kNoError)
562 UInt_t AliRawReader::SwapWord(UInt_t x) const
564 // Swap the endianess of the integer value 'x'
566 return (((x & 0x000000ffU) << 24) | ((x & 0x0000ff00U) << 8) |
567 ((x & 0x00ff0000U) >> 8) | ((x & 0xff000000U) >> 24));
570 UShort_t AliRawReader::SwapShort(UShort_t x) const
572 // Swap the endianess of the short value 'x'
574 return (((x & 0x00ffU) << 8) | ((x & 0xff00U) >> 8)) ;
577 Bool_t AliRawReader::ReadNextInt(UInt_t& data)
579 // reads the next 4 bytes at the current position
580 // returns kFALSE if the data could not be read
582 while (fCount == 0) {
583 if (!ReadHeader()) return kFALSE;
585 if (fCount < (Int_t) sizeof(data)) {
587 "too few data left (%d bytes) to read an UInt_t!", fCount);
590 if (!ReadNext((UChar_t*) &data, sizeof(data))) {
591 Error("ReadNextInt", "could not read data!");
600 Bool_t AliRawReader::ReadNextShort(UShort_t& data)
602 // reads the next 2 bytes at the current position
603 // returns kFALSE if the data could not be read
605 while (fCount == 0) {
606 if (!ReadHeader()) return kFALSE;
608 if (fCount < (Int_t) sizeof(data)) {
609 Error("ReadNextShort",
610 "too few data left (%d bytes) to read an UShort_t!", fCount);
613 if (!ReadNext((UChar_t*) &data, sizeof(data))) {
614 Error("ReadNextShort", "could not read data!");
618 data=SwapShort(data);
623 Bool_t AliRawReader::ReadNextChar(UChar_t& data)
625 // reads the next 1 byte at the current stream position
626 // returns kFALSE if the data could not be read
628 while (fCount == 0) {
629 if (!ReadHeader()) return kFALSE;
631 if (!ReadNext((UChar_t*) &data, sizeof(data))) {
632 Error("ReadNextChar", "could not read data!");
638 Bool_t AliRawReader::GotoEvent(Int_t event)
640 // Random access to certain
641 // event index. Could be very slow
642 // for some non-root raw-readers.
643 // So it should be reimplemented there.
644 if (event < fEventNumber) RewindEvents();
646 while (fEventNumber < event) {
647 if (!NextEvent()) return kFALSE;
653 Int_t AliRawReader::CheckData() const
655 // check the consistency of the data
656 // derived classes should overwrite the default method which returns 0 (no err)
662 void AliRawReader::DumpData(Int_t limit)
664 // print the raw data
665 // if limit is not negative, only the first and last "limit" lines of raw data
670 Error("DumpData", "no header");
674 " type = %d run = %d ", GetType(), GetRunNumber());
676 printf("event = %8.8x %8.8x\n", GetEventId()[1], GetEventId()[0]);
678 printf("event = -------- --------\n");
680 if (GetTriggerPattern()) {
681 printf(" trigger = %8.8x %8.8x ",
682 GetTriggerPattern()[1], GetTriggerPattern()[0]);
684 printf(" trigger = -------- -------- ");
686 if (GetDetectorPattern()) {
687 printf("detector = %8.8x\n", GetDetectorPattern()[0]);
689 printf("detector = --------\n");
691 if (GetAttributes()) {
692 printf(" attributes = %8.8x %8.8x %8.8x ",
693 GetAttributes()[2], GetAttributes()[1], GetAttributes()[0]);
695 printf(" attributes = -------- -------- -------- ");
697 printf("GDC = %d\n", GetGDCId());
701 printf("-------------------------------------------------------------------------------\n");
702 printf("LDC = %d\n", GetLDCId());
704 printf("equipment:\n"
705 " size = %d type = %d id = %d\n",
706 GetEquipmentSize(), GetEquipmentType(), GetEquipmentId());
707 if (GetEquipmentAttributes()) {
708 printf(" attributes = %8.8x %8.8x %8.8x ", GetEquipmentAttributes()[2],
709 GetEquipmentAttributes()[1], GetEquipmentAttributes()[0]);
711 printf(" attributes = -------- -------- -------- ");
713 printf("element size = %d\n", GetEquipmentElementSize());
715 printf("data header:\n"
716 " size = %d version = %d valid = %d compression = %d\n",
717 GetDataSize(), GetVersion(), IsValid(), IsCompressed());
720 if (limit == 0) continue;
722 Int_t size = GetDataSize();
724 for (Int_t i = 0; i < 70; i++) line[i] = ' ';
730 for (Int_t n = 0; n < size; n++) {
731 if (!ReadNextChar(byte)) {
732 Error("DumpData", "couldn't read byte number %d\n", n);
736 printf("%8.8x %s\n", n-pos, line);
737 for (Int_t i = 0; i < 70; i++) line[i] = ' ';
740 if ((limit > 0) && (n/max == limit)) {
741 Int_t nContinue = ((size-1)/max+1-limit) * max;
743 printf(" [skipping %d bytes]\n", nContinue-n);
749 Int_t offset = pos/4;
750 if ((byte > 0x20) && (byte < 0x7f)) {
751 line[pos+offset] = byte;
753 line[pos+offset] = '.';
756 snprintf(hex, 3, "%2.2x", byte);
757 line[max+max/4+3+2*pos+offset] = hex[0];
758 line[max+max/4+4+2*pos+offset] = hex[1];
762 if (pos > 0) printf("%8.8x %s\n", size-pos, line);
765 } while (ReadHeader());
768 void AliRawReader::AddErrorLog(AliRawDataErrorLog::ERawDataErrorLevel level,
772 // Add a raw data error message to the list
773 // of raw-data decoding errors
774 if (fEventNumber < 0) {
777 Int_t ddlId = GetEquipmentId();
779 AliError("No ddl raw data have been read so far! Impossible to add a raw data error log!");
783 Int_t prevEventNumber = -1;
784 Int_t prevDdlId = -1;
785 Int_t prevErrorCode = -1;
786 AliRawDataErrorLog *prevLog = (AliRawDataErrorLog *)fErrorLogs.Last();
788 prevEventNumber = prevLog->GetEventNumber();
789 prevDdlId = prevLog->GetDdlID();
790 prevErrorCode = prevLog->GetErrorCode();
793 if ((prevEventNumber != fEventNumber) ||
794 (prevDdlId != ddlId) ||
795 (prevErrorCode != code)) {
796 new (fErrorLogs[fErrorLogs.GetEntriesFast()])
797 AliRawDataErrorLog(fEventNumber,
804 if (prevLog) prevLog->AddCount();
808 Bool_t AliRawReader::GotoEventWithID(Int_t event,
813 // Go to certain event number by
814 // checking the event ID.
815 // Useful in case event-selection
816 // is applied and the 'event' is
818 if (!GotoEvent(event)) return kFALSE;
820 while (GetBCID() != period ||
821 GetOrbitID() != orbitID ||
822 GetPeriod() != bcID) {
823 if (!NextEvent()) return kFALSE;