make GetSubevent() const.
authorrdm <rdm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 26 Sep 2003 10:46:12 +0000 (10:46 +0000)
committerrdm <rdm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 26 Sep 2003 10:46:12 +0000 (10:46 +0000)
RAW/AliRawEvent.cxx
RAW/AliRawEvent.h

index 441f08bf3129279da9700a4f7449fe1501402562..f36d416f2e73c9a7ebe54c0ed7981dfbb447da3d 100644 (file)
@@ -176,7 +176,7 @@ void AliRawEquipmentHeader::Swap()
    // Swap equipment header data. There is no way to see if the data
    // has already been swapped. This method is only called when the
    // header is read from the DATE event builder (GDC).
-                                                                                
+
    fSize                 = net2host(fSize);
    fEquipmentType        = net2host(fEquipmentType);
    fEquipmentID          = net2host(fEquipmentID);
@@ -247,9 +247,14 @@ AliRawEvent *AliRawEvent::NextSubEvent()
 }
 
 //______________________________________________________________________________
-AliRawEvent *AliRawEvent::GetSubEvent(Int_t index)
+AliRawEvent *AliRawEvent::GetSubEvent(Int_t index) const
 {
-  return (AliRawEvent *)fSubEvents->At(index);
+   // Get specified sub event. Returns 0 if sub event does not exist.
+
+   if (!fSubEvents)
+      return 0;
+
+   return (AliRawEvent *) fSubEvents->At(index);
 }
 
 //______________________________________________________________________________
@@ -1251,7 +1256,7 @@ Int_t AliMDC::Run()
 #ifdef USE_EB
          ebdata = (char *)ebvec[nsub].iov_base;
 #endif
+
          ALIDEBUG(1)
             Info("Run", "reading LDC %d", nsub);
 
index db1a30745d02da34b1fccc3ca95d3cd2eea93800..5f4f8988826d858c86121f135399781a877a1c35 100644 (file)
@@ -191,7 +191,7 @@ public:
    AliRawData            *GetRawData();
    Int_t                  GetNSubEvents() const { return fNSubEvents; }
    AliRawEvent           *NextSubEvent();
-   AliRawEvent           *GetSubEvent(Int_t index);
+   AliRawEvent           *GetSubEvent(Int_t index) const;
    void                   Reset();
 
    ClassDef(AliRawEvent,1)  // ALICE raw event object