]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/sim/AliHLTOUTComponent.cxx
Adding definitions for the fields of the lookup tables used in the dHLT analysis...
[u/mrichter/AliRoot.git] / HLT / sim / AliHLTOUTComponent.cxx
index 45b73e192c9ca072c994159e3971fba7795572d1..dabafe584726bdff53bf5190835395fc4a138a72 100644 (file)
@@ -52,8 +52,6 @@ AliHLTOUTComponent::AliHLTOUTComponent()
   fWriters(),
   fNofDDLs(10),
   fIdFirstDDL(7680), // 0x1e<<8
-  fWriteDigits(kTRUE),
-  fWriteRaw(kTRUE),
   fBuffer(),
   fpLibManager(NULL)
 {
@@ -73,6 +71,8 @@ AliHLTOUTComponent::AliHLTOUTComponent()
   */
 }
 
+int AliHLTOUTComponent::fgOptions=kWriteRawFiles|kWriteDigits;
+
 AliHLTOUTComponent::~AliHLTOUTComponent()
 {
   // see header file for class documentation
@@ -180,7 +180,7 @@ int AliHLTOUTComponent::DumpEvent( const AliHLTComponentEventData& evtData,
 {
   // see header file for class documentation
   int iResult=0;
-  HLTInfo("write %d output blocks", evtData.fBlockCnt);
+  HLTInfo("write %d output block(s)", evtData.fBlockCnt);
   if (iResult>=0) {
     homer_uint64 homerHeader[kCount_64b_Words];
     HOMERBlockDescriptor homerDescriptor(homerHeader);
@@ -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::Swap(id));
-      homerDescriptor.SetSubType1(AliHLTOUT::Swap(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);
@@ -241,8 +241,8 @@ int AliHLTOUTComponent::FillESD(int eventNo, AliRunLoader* runLoader, AliESDEven
     int bufferSize=0;
     
     if ((bufferSize=FillOutputBuffer(eventNo, fWriters[*ddlno], pBuffer))>0) {
-      if (fWriteDigits) WriteDigits(eventNo, runLoader, *ddlno, pBuffer, bufferSize);
-      if (fWriteRaw) WriteRawFile(eventNo, runLoader, *ddlno, pBuffer, bufferSize);
+      if (fgOptions&kWriteDigits) WriteDigits(eventNo, runLoader, *ddlno, pBuffer, bufferSize);
+      if (fgOptions&kWriteRawFiles) WriteRawFile(eventNo, runLoader, *ddlno, pBuffer, bufferSize);
     }
     fWriters[*ddlno]->Clear();
     ddlno++;
@@ -368,3 +368,15 @@ int AliHLTOUTComponent::WriteRawFile(int eventNo, AliRunLoader* /*runLoader*/, i
   }
   return iResult;
 }
+
+void AliHLTOUTComponent::SetGlobalOption(unsigned int options)
+{
+  // see header file for class documentation
+  fgOptions|=options;
+}
+
+void AliHLTOUTComponent::ClearGlobalOption(unsigned int options)
+{
+  // see header file for class documentation
+  fgOptions&=~options;
+}