fDataOffset(0),
fBlocks()
{
-// Writer implementation of the HOMER interface.
-// The HLT Monitoring Environment including ROOT is
-// a native interface to ship out data from the HLT chain.
-// See pdf document shiped with the package
-// for class documentation and tutorial.
+ // Writer implementation of the HOMER interface.
+ // The HLT Monitoring Environment including ROOT is
+ // a native interface to ship out data from the HLT chain.
+ // See pdf document shiped with the package
+ // for class documentation and tutorial.
Clear();
}
AliHLTHOMERWriter::~AliHLTHOMERWriter()
{
-// see header file for class documentation
+ // see header file for class documentation
}
void AliHLTHOMERWriter::Clear()
{
-// see header file for class documentation
+ // see header file for class documentation
fDataOffset = 0;
fBlocks.clear();
}
void AliHLTHOMERWriter::AddBlock( const void* descriptor, const void* data )
{
-// see header file for class documentation
+ // see header file for class documentation
TBlockData bd;
memcpy( bd.fDescriptor, descriptor, HOMERBlockDescriptor::GetHOMERBlockDescriptorSize() );
bd.fData = data;
homer_uint32 AliHLTHOMERWriter::GetTotalMemorySize( bool includeData )
{
-// see header file for class documentation
+ // see header file for class documentation
if ( includeData )
return fDataOffset + HOMERBlockDescriptor::GetHOMERBlockDescriptorSize()*(fBlocks.size()+1);
else
void AliHLTHOMERWriter::Copy( void* destination, homer_uint64 eventType, homer_uint64 eventNr, homer_uint64 statusFlags, homer_uint64 nodeID, bool includeData )
{
-// see header file for class documentation
+ // see header file for class documentation
HOMERBlockDescriptor homerBlock;
homer_uint8* bd = reinterpret_cast<homer_uint8*>( destination );
struct timeval now;
homer_uint8 AliHLTHOMERWriter::DetermineUInt64Alignment()
{
-// see header file for class documentation
+ // see header file for class documentation
HOMERWriterAlignment64TestStructure test;
if ( (unsigned long)(&test.f64Test64) != ((unsigned long)(&test.f64Fill))+sizeof(test.f64Fill) )
{
}
if ( (unsigned long)(&test.f64Test32) != ((unsigned long)(&test.f32Fill))+sizeof(test.f32Fill) )
{
- // The 64 bit element does not immedately follow the 32 bit element,
+ // The 64 bit element does not immediately follow the 32 bit element,
// therefore the alignment has to be greater than 4.
return (homer_uint8)8;
}
if ( (unsigned long)(&test.f64Test16) != ((unsigned long)(&test.f16Fill))+sizeof(test.f16Fill) )
{
- // The 64 bit element does not immedately follow the 16 bit element,
+ // The 64 bit element does not immediately follow the 16 bit element,
// therefore the alignment has to be greater than 2.
return (homer_uint8)4;
}
if ( (unsigned long)(&test.f64Test8) != ((unsigned long)(&test.f8Fill))+sizeof(test.f8Fill) )
{
- // The 64 bit element does not immedately follow the 8 bit element,
+ // The 64 bit element does not immediately follow the 8 bit element,
// therefore the alignment has to be greater than 1.
return (homer_uint8)2;
}
homer_uint8 AliHLTHOMERWriter::DetermineUInt32Alignment()
{
-// see header file for class documentation
+ // see header file for class documentation
HOMERWriterAlignment32TestStructure test;
if ( (unsigned long)(&test.f32Test64) != ((unsigned long)(&test.f64Fill))+sizeof(test.f64Fill) )
{
}
if ( (unsigned long)(&test.f32Test32) != ((unsigned long)(&test.f32Fill))+sizeof(test.f32Fill) )
{
- // The 32 bit element does not immedately follow the 32 bit element,
+ // The 32 bit element does not immediately follow the 32 bit element,
// therefore the alignment has to be greater than 4.
return (homer_uint8)8;
}
if ( (unsigned long)(&test.f32Test16) != ((unsigned long)(&test.f16Fill))+sizeof(test.f16Fill) )
{
- // The 32 bit element does not immedately follow the 16 bit element,
+ // The 32 bit element does not immediately follow the 16 bit element,
// therefore the alignment has to be greater than 2.
return (homer_uint8)4;
}
if ( (unsigned long)(&test.f32Test8) != ((unsigned long)(&test.f8Fill))+sizeof(test.f8Fill) )
{
- // The 32 bit element does not immedately follow the 8 bit element,
+ // The 32 bit element does not immediately follow the 8 bit element,
// therefore the alignment has to be greater than 1.
return (homer_uint8)2;
}
homer_uint8 AliHLTHOMERWriter::DetermineUInt16Alignment()
{
-// see header file for class documentation
+ // see header file for class documentation
HOMERWriterAlignment16TestStructure test;
if ( (unsigned long)(&test.f16Test64) != ((unsigned long)(&test.f64Fill))+sizeof(test.f64Fill) )
{
}
if ( (unsigned long)(&test.f16Test32) != ((unsigned long)(&test.f32Fill))+sizeof(test.f32Fill) )
{
- // The 16 bit element does not immedately follow the 32 bit element,
+ // The 16 bit element does not immediately follow the 32 bit element,
// therefore the alignment has to be greater than 4.
return (homer_uint8)8;
}
if ( (unsigned long)(&test.f16Test16) != ((unsigned long)(&test.f16Fill))+sizeof(test.f16Fill) )
{
- // The 16 bit element does not immedately follow the 16 bit element,
+ // The 16 bit element does not immediately follow the 16 bit element,
// therefore the alignment has to be greater than 2.
return (homer_uint8)4;
}
if ( (unsigned long)(&test.f16Test8) != ((unsigned long)(&test.f8Fill))+sizeof(test.f8Fill) )
{
- // The 16 bit element does not immedately follow the 8 bit element,
+ // The 16 bit element does not immediately follow the 8 bit element,
// therefore the alignment has to be greater than 1.
return (homer_uint8)2;
}
homer_uint8 AliHLTHOMERWriter::DetermineUInt8Alignment()
{
-// see header file for class documentation
+ // see header file for class documentation
HOMERWriterAlignment8TestStructure test;
if ( (unsigned long)(&test.f8Test64) != ((unsigned long)(&test.f64Fill))+sizeof(test.f64Fill) )
{
}
if ( (unsigned long)(&test.f8Test32) != ((unsigned long)(&test.f32Fill))+sizeof(test.f32Fill) )
{
- // The 8 bit element does not immedately follow the 32 bit element,
+ // The 8 bit element does not immediately follow the 32 bit element,
// therefore the alignment has to be greater than 4.
return (homer_uint8)8;
}
if ( (unsigned long)(&test.f8Test16) != ((unsigned long)(&test.f16Fill))+sizeof(test.f16Fill) )
{
- // The 8 bit element does not immedately follow the 16 bit element,
+ // The 8 bit element does not immediately follow the 16 bit element,
// therefore the alignment has to be greater than 2.
return (homer_uint8)4;
}
if ( (unsigned long)(&test.f8Test8) != ((unsigned long)(&test.f8Fill))+sizeof(test.f8Fill) )
{
- // The 8 bit element does not immedately follow the 8 bit element,
+ // The 8 bit element does not immediately follow the 8 bit element,
// therefore the alignment has to be greater than 1.
return (homer_uint8)2;
}
homer_uint8 AliHLTHOMERWriter::DetermineDoubleAlignment()
{
-// see header file for class documentation
+ // see header file for class documentation
HOMERWriterAlignmentDoubleTestStructure test;
if ( (unsigned long)(&test.fDoubleTest64) != ((unsigned long)(&test.f64Fill))+sizeof(test.f64Fill) )
{
}
if ( (unsigned long)(&test.fDoubleTest32) != ((unsigned long)(&test.f32Fill))+sizeof(test.f32Fill) )
{
- // The double element does not immedately follow the 32 bit element,
+ // The double element does not immediately follow the 32 bit element,
// therefore the alignment has to be greater than 4.
return (homer_uint8)8;
}
if ( (unsigned long)(&test.fDoubleTest16) != ((unsigned long)(&test.f16Fill))+sizeof(test.f16Fill) )
{
- // The double element does not immedately follow the 16 bit element,
+ // The double element does not immediately follow the 16 bit element,
// therefore the alignment has to be greater than 2.
return (homer_uint8)4;
}
if ( (unsigned long)(&test.fDoubleTest8) != ((unsigned long)(&test.f8Fill))+sizeof(test.f8Fill) )
{
- // The double element does not immedately follow the 8 bit element,
+ // The double element does not immediately follow the 8 bit element,
// therefore the alignment has to be greater than 1.
return (homer_uint8)2;
}
homer_uint8 AliHLTHOMERWriter::DetermineFloatAlignment()
{
-// see header file for class documentation
+ // see header file for class documentation
HOMERWriterAlignmentFloatTestStructure test;
if ( (unsigned long)(&test.fFloatTest64) != ((unsigned long)(&test.f64Fill))+sizeof(test.f64Fill) )
{
}
if ( (unsigned long)(&test.fFloatTest32) != ((unsigned long)(&test.f32Fill))+sizeof(test.f32Fill) )
{
- // The float element does not immedately follow the 32 bit element,
+ // The float element does not immediately follow the 32 bit element,
// therefore the alignment has to be greater than 4.
return (homer_uint8)8;
}
if ( (unsigned long)(&test.fFloatTest16) != ((unsigned long)(&test.f16Fill))+sizeof(test.f16Fill) )
{
- // The float element does not immedately follow the 16 bit element,
+ // The float element does not immediately follow the 16 bit element,
// therefore the alignment has to be greater than 2.
return (homer_uint8)4;
}
if ( (unsigned long)(&test.fFloatTest8) != ((unsigned long)(&test.f8Fill))+sizeof(test.f8Fill) )
{
- // The float element does not immedately follow the 8 bit element,
+ // The float element does not immediately follow the 8 bit element,
// therefore the alignment has to be greater than 1.
return (homer_uint8)2;
}
AliHLTHOMERWriter* AliHLTHOMERWriterCreate()
{
-// see header file for function documentation
- return new AliHLTHOMERWriter();
+ // see header file for function documentation
+ return new AliHLTHOMERWriter();
}
void AliHLTHOMERWriterDelete(AliHLTHOMERWriter* pInstance)
{
-// see header file for function documentation
- if (pInstance) delete pInstance;
+ // see header file for function documentation
+ if (pInstance) delete pInstance;
}