+
+//______________________________________________________________________________
+Bool_t AliRawDB::WriteGuidFile(TString &guidFileFolder)
+{
+ // Write the guid file
+ // in the specified folder or
+ // in the folder where the raw data
+ // file is.
+
+ TString guidFileName;
+ if (!guidFileFolder.IsNull()) {
+ guidFileName = guidFileFolder;
+
+ TString pathStr = fRawDB->GetName();
+ TObjArray *pathArr = pathStr.Tokenize('/');
+ guidFileName.Append("/");
+ guidFileName.Append(((TObjString *)pathArr->Last())->String());
+ pathArr->Delete();
+ delete pathArr;
+ }
+ else
+ guidFileName = fRawDB->GetName();
+
+ guidFileName += ".guid";
+
+ ofstream fguid(guidFileName.Data());
+ if (!fguid.is_open()) {
+ Error("WriteGuidFile", "failure to open guid file %s", guidFileName.Data());
+ return kFALSE;
+ }
+ TString guid = fRawDB->GetUUID().AsString();
+ fguid << "guid: \t" << guid.Data();
+ fguid.close();
+
+ return kTRUE;
+}
+
+
+//______________________________________________________________________________
+void AliRawDB::Reset()
+{
+ // Clear the raw-data arrays
+ // Should be done before processing the raw-data event
+
+ for (Int_t iDet = 0; iDet < (AliDAQ::kNDetectors + 1); iDet++)
+ for (Int_t iBranch = 0; iBranch < fgkDetBranches[iDet]; iBranch++)
+ fDetRawData[iDet][iBranch]->ClearData();
+}
+
+//______________________________________________________________________________
+AliRawDataArrayV2 *AliRawDB::GetRawDataArray(UInt_t eqSize, UInt_t eqId) const
+{
+ // Return the corresponding raw-datra array (branch)
+ // depending on the equipment ID
+
+ Int_t iDet = AliDAQ::kNDetectors;
+ Int_t iBranch = 0; // can we split somehow the unrecognized data??? For the moment - no
+ if(eqSize) {
+ Int_t ddlIndex = -1;
+ iDet = AliDAQ::DetectorIDFromDdlID(eqId,ddlIndex);
+ if (iDet < 0 || iDet >= AliDAQ::kNDetectors)
+ iDet = AliDAQ::kNDetectors;
+ else
+ iBranch = (ddlIndex * fgkDetBranches[iDet])/AliDAQ::NumberOfDdls(iDet);
+ }
+
+ return fDetRawData[iDet][iBranch];
+}
+