]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
choose better name for recently added Swap functions -> ByteSwap
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 12 Mar 2008 20:11:13 +0000 (20:11 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 12 Mar 2008 20:11:13 +0000 (20:11 +0000)
HLT/BASE/AliHLTOUT.cxx
HLT/BASE/AliHLTOUT.h
HLT/BASE/AliHLTOUTHomerBuffer.cxx
HLT/rec/AliHLTOUTRawReader.cxx
HLT/sim/AliHLTOUTComponent.cxx

index e063ffffd1e0ddccfbf0e6ffbfb7ee9135959b95..3cca730425595d81d566208b601492be64ea8e8a 100644 (file)
@@ -402,7 +402,7 @@ bool AliHLTOUT::AliHLTOUTHandlerListEntry::HasIndex(AliHLTUInt32_t index)
 
 const AliHLTOUT::AliHLTOUTHandlerListEntry AliHLTOUT::AliHLTOUTHandlerListEntry::fgkVoidHandlerListEntry;
 
-AliHLTUInt64_t AliHLTOUT::Swap64(AliHLTUInt64_t src)
+AliHLTUInt64_t AliHLTOUT::ByteSwap64(AliHLTUInt64_t src)
 {
   // see header file for class documentation
   return ((src & 0xFFULL) << 56) | 
@@ -415,7 +415,7 @@ AliHLTUInt64_t AliHLTOUT::Swap64(AliHLTUInt64_t src)
     ((src & 0xFF00000000000000ULL) >> 56);
 }
 
-AliHLTUInt32_t AliHLTOUT::Swap32(AliHLTUInt32_t src)
+AliHLTUInt32_t AliHLTOUT::ByteSwap32(AliHLTUInt32_t src)
 {
   // see header file for class documentation
   return ((src & 0xFFULL) << 24) | 
index af5ad6a0042f3e236d076116d33ba8a510d58caf..23bc252bffdb6c3e3307593f2721f7d068462f79 100644 (file)
@@ -229,12 +229,12 @@ class AliHLTOUT : public AliHLTLogging {
   /**
    * Helper function to byte swap a 64 bit value.
    */
-  static AliHLTUInt64_t Swap64(AliHLTUInt64_t src);
+  static AliHLTUInt64_t ByteSwap64(AliHLTUInt64_t src);
 
   /**
    * Helper function to byte swap a 32 bit value.
    */
-  static AliHLTUInt32_t Swap32(AliHLTUInt32_t src);
+  static AliHLTUInt32_t ByteSwap32(AliHLTUInt32_t src);
 
  protected:
   /**
index dc44e26c202fd1f4237891615654bf180e768c48..8bc6b0a23d768cc9010e5856bcb76f462bda969e 100644 (file)
@@ -142,7 +142,7 @@ int AliHLTOUTHomerBuffer::ScanReader(AliHLTMonitoringReader* pReader, AliHLTUInt
       homer_uint32 origin=pReader->GetBlockDataOrigin( i );
       homer_uint32 spec=pReader->GetBlockDataSpec( i );
       AliHLTComponentDataType dt;
-      AliHLTComponent::SetDataType(dt, Swap64(id), Swap32(origin));
+      AliHLTComponent::SetDataType(dt, ByteSwap64(id), ByteSwap32(origin));
       AliHLTOUTBlockDescriptor desc(dt, spec, offset|i);
       HLTDebug("adding block %d: %s %#x", i, AliHLTComponent::DataType2Text(dt).c_str(), spec);
       iResult=AddBlockDescriptor(desc);
index 1dafa76432fc9c3c19c2b0a45e244145f2042119..89821bff485a7918a539518beebe31d6e2cd2dac 100644 (file)
@@ -186,7 +186,7 @@ AliHLTHOMERReader* AliHLTOUTRawReader::OpenReader(UChar_t* pSrc, unsigned int si
   // check for the HOME descriptor type id
   AliHLTUInt64_t* pHomerDesc=reinterpret_cast<AliHLTUInt64_t*>(pSrc+offset);
   if (*(pHomerDesc+kID_64b_Offset) != HOMER_BLOCK_DESCRIPTOR_TYPEID && 
-      Swap64(*(pHomerDesc+kID_64b_Offset)) != HOMER_BLOCK_DESCRIPTOR_TYPEID) {
+      ByteSwap64(*(pHomerDesc+kID_64b_Offset)) != HOMER_BLOCK_DESCRIPTOR_TYPEID) {
     HLTWarning("format error: can not find HOMER block descriptor typid, skipping this data block");
     return NULL;
   }
index 8f504283f771bc4604964e736d18feda2e5a24ac..6c39a30504949a66294c280ac849d4d84a747691 100644 (file)
@@ -196,8 +196,8 @@ int AliHLTOUTComponent::DumpEvent( const AliHLTComponentEventData& evtData,
       homer_uint64 origin=0;
       memcpy(&id, blocks[n].fDataType.fID, sizeof(homer_uint64));
       memcpy(((AliHLTUInt8_t*)&origin)+sizeof(homer_uint32), blocks[n].fDataType.fOrigin, sizeof(homer_uint32));
-      homerDescriptor.SetType(AliHLTOUT::Swap64(id));
-      homerDescriptor.SetSubType1(AliHLTOUT::Swap32(origin));
+      homerDescriptor.SetType(AliHLTOUT::ByteSwap64(id));
+      homerDescriptor.SetSubType1(AliHLTOUT::ByteSwap32(origin));
       homerDescriptor.SetSubType2(blocks[n].fSpecification);
       homerDescriptor.SetBlockSize(blocks[n].fSize);
       int writerNo=ShuffleWriters(fWriters, blocks[n].fSize);