]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
const correctness of the interaction map (L.Aphecetche)
authorzconesa <zconesa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 27 Jun 2013 13:10:24 +0000 (13:10 +0000)
committerzconesa <zconesa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 27 Jun 2013 13:10:24 +0000 (13:10 +0000)
STEER/AOD/AliAODHeader.cxx
STEER/AOD/AliAODHeader.h
STEER/ESD/AliESDHeader.cxx
STEER/ESD/AliESDHeader.h

index ef8bbb3242a0f5c5e06be45f3e2b671afcceb056..a87dad69b2b6c9636c418488fb6f19df2ce7033c 100644 (file)
@@ -522,7 +522,7 @@ void AliAODHeader::Print(Option_t* /*option*/) const
 }
 
 //__________________________________________________________________________
-Int_t AliAODHeader::FindIRIntInteractionsBXMap(Int_t difference)
+Int_t AliAODHeader::FindIRIntInteractionsBXMap(Int_t difference) const
 {
   //
   // The mapping is of 181 bits, from -90 to +90
@@ -536,7 +536,7 @@ Int_t AliAODHeader::FindIRIntInteractionsBXMap(Int_t difference)
 }
 
 //__________________________________________________________________________
-Int_t AliAODHeader::GetIRInt2ClosestInteractionMap()
+Int_t AliAODHeader::GetIRInt2ClosestInteractionMap() const
 {
   //
   // Calculation of the closest interaction
@@ -566,7 +566,7 @@ Int_t AliAODHeader::GetIRInt2ClosestInteractionMap()
 }
 
 //__________________________________________________________________________
-Int_t AliAODHeader::GetIRInt1ClosestInteractionMap(Int_t gap)
+Int_t AliAODHeader::GetIRInt1ClosestInteractionMap(Int_t gap) const
 {
   //
   // Calculation of the closest interaction
@@ -598,7 +598,7 @@ Int_t AliAODHeader::GetIRInt1ClosestInteractionMap(Int_t gap)
 }
 
 //__________________________________________________________________________
-Int_t AliAODHeader::GetIRInt2LastInteractionMap()
+Int_t AliAODHeader::GetIRInt2LastInteractionMap() const
 {
   //
   // Calculation of the last interaction
index 90e58e6f47372b76153c1924f8f488cdde7e9f8c..f5f54a7aba7f50add9f0836c4e8769a702475c61 100644 (file)
@@ -192,14 +192,14 @@ class AliAODHeader : public AliVHeader {
   void       SetT0spread(Int_t i, Float_t t) {
     if ((i>=0)&&(i<kT0SpreadSize)) fT0spread[i]=t;}
 
-  Int_t  FindIRIntInteractionsBXMap(Int_t difference);
+  Int_t  FindIRIntInteractionsBXMap(Int_t difference) const;
   void   SetIRInt2InteractionMap(TBits bits) { fIRInt2InteractionsMap = bits; }
   void   SetIRInt1InteractionMap(TBits bits) { fIRInt1InteractionsMap = bits; }
-  TBits  GetIRInt2InteractionMap() { return fIRInt2InteractionsMap; }
-  TBits  GetIRInt1InteractionMap() { return fIRInt1InteractionsMap; }
-  Int_t  GetIRInt2ClosestInteractionMap();
-  Int_t  GetIRInt1ClosestInteractionMap(Int_t gap = 3);
-  Int_t  GetIRInt2LastInteractionMap();
+  TBits  GetIRInt2InteractionMap() const { return fIRInt2InteractionsMap; }
+  TBits  GetIRInt1InteractionMap() const { return fIRInt1InteractionsMap; }
+  Int_t  GetIRInt2ClosestInteractionMap() const;
+  Int_t  GetIRInt1ClosestInteractionMap(Int_t gap = 3) const;
+  Int_t  GetIRInt2LastInteractionMap() const;
   
  private :
   
index 6c7cc37d721b8530b9092860b003580e3c7f10af..9d98ac0dab302cf26e5713602f67011965763015 100644 (file)
@@ -480,7 +480,7 @@ TObjArray AliESDHeader::GetIRArray(Int_t int1, Int_t int2, Float_t deltaTime) co
 }
 
 //__________________________________________________________________________
-void AliESDHeader::SetIRInteractionMap()
+void AliESDHeader::SetIRInteractionMap() const
 {
   //
   // Function to compute the map of interations 
@@ -524,7 +524,7 @@ void AliESDHeader::SetIRInteractionMap()
 }
 
 //__________________________________________________________________________
-Int_t AliESDHeader::FindIRIntInteractionsBXMap(Int_t difference)
+Int_t AliESDHeader::FindIRIntInteractionsBXMap(Int_t difference) const
 {
   //
   // The mapping is of 181 bits, from -90 to +90
@@ -538,7 +538,7 @@ Int_t AliESDHeader::FindIRIntInteractionsBXMap(Int_t difference)
 }
 
 //__________________________________________________________________________
-Int_t AliESDHeader::GetIRInt2ClosestInteractionMap()
+Int_t AliESDHeader::GetIRInt2ClosestInteractionMap() const
 {
   //
   // Calculation of the closest interaction
@@ -570,7 +570,7 @@ Int_t AliESDHeader::GetIRInt2ClosestInteractionMap()
 }
 
 //__________________________________________________________________________
-Int_t AliESDHeader::GetIRInt1ClosestInteractionMap(Int_t gap)
+Int_t AliESDHeader::GetIRInt1ClosestInteractionMap(Int_t gap) const
 {
   //
   // Calculation of the closest interaction
@@ -604,7 +604,7 @@ Int_t AliESDHeader::GetIRInt1ClosestInteractionMap(Int_t gap)
 }
 
 //__________________________________________________________________________
-Int_t  AliESDHeader::GetIRInt2LastInteractionMap()
+Int_t  AliESDHeader::GetIRInt2LastInteractionMap() const
 {
   //
   // Calculation of the last interaction
index 69f6dd7907b420f29243b727a7ad3866f24a2c04..e5e8805bcbda3f1021fde73696d17dc9c7ebf3ed 100644 (file)
@@ -63,13 +63,12 @@ public:
   TString     GetFiredTriggerInputs() const;
   Bool_t      IsTriggerInputFired(const char *name) const;
   const AliTriggerConfiguration*  GetCTPConfig() const { return fCTPConfig;}
-  void   SetIRInteractionMap();
-  Int_t  FindIRIntInteractionsBXMap(Int_t difference);
-  TBits  GetIRInt2InteractionMap() { SetIRInteractionMap(); return fIRInt2InteractionsMap; }
-  TBits  GetIRInt1InteractionMap() { SetIRInteractionMap(); return fIRInt1InteractionsMap; }
-  Int_t  GetIRInt2ClosestInteractionMap();
-  Int_t  GetIRInt1ClosestInteractionMap(Int_t gap = 3);
-  Int_t  GetIRInt2LastInteractionMap();
+  Int_t  FindIRIntInteractionsBXMap(Int_t difference) const;
+  TBits  GetIRInt2InteractionMap() const { SetIRInteractionMap(); return fIRInt2InteractionsMap; }
+  TBits  GetIRInt1InteractionMap() const { SetIRInteractionMap(); return fIRInt1InteractionsMap; }
+  Int_t  GetIRInt2ClosestInteractionMap() const;
+  Int_t  GetIRInt1ClosestInteractionMap(Int_t gap = 3) const;
+  Int_t  GetIRInt2LastInteractionMap() const;
 //**************************************************************************
 
   ULong64_t GetTriggerMask() const {return fTriggerMask;}
@@ -89,6 +88,9 @@ public:
 
   enum {kNTriggerInputs = 60};   //24 L0, 24 L1 and 12 L2 inputs
 
+private:
+  void   SetIRInteractionMap() const;
+
 private:
 
   // Event Identification
@@ -112,8 +114,8 @@ private:
   TObjArray    fTriggerInputsNames;// Array of TNamed of the active trigger inputs (L0,L1 and L2)
   AliTriggerConfiguration*  fCTPConfig; // Trigger configuration for the run
   TObjArray    fIRBufferArray;// Array with interaction records before and after triggered event
-  TBits   fIRInt2InteractionsMap;  // map of the Int2 events (normally 0TVX) near the event, that's Int2Id-EventId within -90 +90 BXs
-  TBits   fIRInt1InteractionsMap;  // map of the Int1 events (normally V0A&V0C) near the event, that's Int1Id-EventId within -90 +90 BXs
+  mutable TBits   fIRInt2InteractionsMap;  // map of the Int2 events (normally 0TVX) near the event, that's Int2Id-EventId within -90 +90 BXs
+  mutable TBits   fIRInt1InteractionsMap;  // map of the Int1 events (normally V0A&V0C) near the event, that's Int1Id-EventId within -90 +90 BXs
 
 
   ClassDef(AliESDHeader,11)