#include "AliHLTHOMERSourceDesc.h"
#include "AliHLTHOMERBlockDesc.h"
// -- -- -- -- -- -- --
-#include "AliLog.h"
ClassImp(AliHLTHOMERManager)
/*
if ( fProxyHandler ) {
iResult = fProxyHandler->Initialize();
if (iResult)
- AliError(Form("Initialize of ProxyHandler failed."));
+ HLTError(Form("Initialize of ProxyHandler failed."));
}
else {
iResult = -1;
- AliError(Form("Creating of ProxyHandler failed."));
+ HLTError(Form("Creating of ProxyHandler failed."));
}
return iResult;
iResult = fProxyHandler->FillSourceList( fSourceList );
if ( iResult < 0 ) {
- AliWarning(Form("There have been errors, while creating the sources list."));
+ HLTWarning(Form("There have been errors, while creating the sources list."));
}
else if ( iResult > 0 ) {
- AliWarning(Form("No active services found."));
+ HLTWarning(Form("No active services found."));
}
else {
- AliInfo(Form("New sources list created."));
+ HLTInfo(Form("New sources list created."));
// -- New SourceList has been created
// --> All Sources are new --> State has changed
// -- Check if already connected and state has not changed
if ( fStateHasChanged == kFALSE && IsConnected() ) {
- AliInfo(Form("No need for reconnection."));
+ HLTInfo(Form("No need for reconnection."));
return iResult;
}
CreateReadoutList( sourceHostnames, sourcePorts, sourceCount, detector );
if ( sourceCount == 0 ) {
- AliError(Form("No sources selected, aborting."));
+ HLTError(Form("No sources selected, aborting."));
return -1;
}
if ( !fReader && fLibManager )
fReader = fLibManager->OpenReader( sourceCount, sourceHostnames, sourcePorts );
else {
- AliError(Form("No LibManager present."));
+ HLTError(Form("No LibManager present."));
return -2;
}
UInt_t ndx = fReader->GetErrorConnectionNdx();
if ( ndx < sourceCount ) {
- AliError(Form("Error establishing connection to TCP source %s:%hu: %s (%d)",
+ HLTError(Form("Error establishing connection to TCP source %s:%hu: %s (%d)",
sourceHostnames[ndx], sourcePorts[ndx], strerror(iResult), iResult));
}
else {
- AliError(Form("Error establishing connection to unknown source with index %d: %s (%d)",
+ HLTError(Form("Error establishing connection to unknown source with index %d: %s (%d)",
ndx, strerror(iResult), iResult));
}
// -- Connection ok - set reader
fConnected = kTRUE;
- AliInfo(Form("Connection established."));
+ HLTInfo(Form("Connection established."));
}
delete[] sourceHostnames;
fStateHasChanged = kTRUE;
fConnected = kFALSE;
- AliInfo(Form("Connection closed."));
+ HLTInfo(Form("Connection closed."));
return;
}
iResult = ConnectHOMER(detector);
if ( iResult ) {
- AliError(Form("Error reconnecting."));
+ HLTError(Form("Error reconnecting."));
}
return iResult;
Int_t iRetryCount = 0;
if ( !fReader || ! IsConnected() ) {
- AliWarning(Form( "Not connected yet." ));
+ HLTWarning(Form( "Not connected yet." ));
return -1;
}
iResult = fReader->ReadNextEvent( 40000000 /*timeout in us*/);
if ( iResult == 111 || iResult == 32 || iResult == 6 ) {
- AliError(Form("No Connection to source %d: %s (%d)",
+ HLTError(Form("No Connection to source %d: %s (%d)",
fReader->GetErrorConnectionNdx(), strerror(iResult), iResult));
return -iResult;
}
else if ( iResult == 110 ) {
- AliError(Form("Timout occured, reading event from source %d: %s (%d)",
+ HLTError(Form("Timout occured, reading event from source %d: %s (%d)",
fReader->GetErrorConnectionNdx(), strerror(iResult), iResult));
return -iResult;
}
++iRetryCount;
if ( iRetryCount >= 20 ) {
- AliError(Form("Retry Failed: Error reading event from source %d: %s (%d)",
+ HLTError(Form("Retry Failed: Error reading event from source %d: %s (%d)",
fReader->GetErrorConnectionNdx(), strerror(iResult), iResult));
return -iResult;
}
else {
- AliError(Form("Retry: Error reading event from source %d: %s (%d)",
+ HLTError(Form("Retry: Error reading event from source %d: %s (%d)",
fReader->GetErrorConnectionNdx(), strerror(iResult), iResult));
continue;
}
}
else if ( iResult ) {
- AliError(Form("General Error reading event from source %d: %s (%d)",
+ HLTError(Form("General Error reading event from source %d: %s (%d)",
fReader->GetErrorConnectionNdx(), strerror(iResult), iResult));
fConnected = kFALSE;
return -iResult;
fEventID = static_cast<ULong64_t>(fReader->GetEventID());
fCurrentBlk = 0;
- AliInfo(Form("Event 0x%016LX (%Lu) with %lu blocks", fEventID, fEventID, fNBlks));
+ HLTInfo(Form("Event 0x%016LX (%Lu) with %lu blocks", fEventID, fEventID, fNBlks));
#if EVE_DEBUG
// Loop for Debug only
void *tmp21 = tmp2;
ULong_t* tmp22 = static_cast<ULong_t*>(tmp21);
*tmp22 = fReader->GetBlockDataOrigin(ii);
- AliInfo(Form( "Block %lu length: %lu - type: %s - origin: %s - spec 0x%08X",
+ HLTInfo(Form( "Block %lu length: %lu - type: %s - origin: %s - spec 0x%08X",
ii, fReader->GetBlockDataLength(ii), tmp1, tmp2, fReader->GetBlockDataSpec(ii) ));
} // end for ( ULong_t ii = 0; ii < fNBlks; ii++ ) {
#endif
// -- Create BlockList
if ( fNBlks > 0 ) {
- AliInfo(Form("Create Block List"));
+ HLTInfo(Form("Create Block List"));
CreateBlockList();
}
else {
- AliWarning(Form("Event 0x%016LX (%Lu) with %lu blocks", fEventID, fEventID, fNBlks));
+ HLTWarning(Form("Event 0x%016LX (%Lu) with %lu blocks", fEventID, fEventID, fNBlks));
}
return iResult;
// Get pointer to current block in current event
if ( !fReader || !IsConnected() ) {
- AliError(Form("Not connected yet."));
+ HLTError(Form("Not connected yet."));
return NULL;
}
if ( ndx < static_cast<Int_t>(fNBlks) )
// see header file for class documentation
if ( !fReader || !IsConnected() ) {
- AliError(Form("Not connected yet."));
+ HLTError(Form("Not connected yet."));
return 0;
}
// -- Check for Connection
if ( !fReader || ! IsConnected() ) {
- AliError(Form("Not connected yet."));
+ HLTError(Form("Not connected yet."));
return origin;
}
// -- Check block index
if ( ndx >= static_cast<Int_t>(fNBlks) ) {
- AliError(Form("Block index %d out of range.", ndx ));
+ HLTError(Form("Block index %d out of range.", ndx ));
return origin;
}
// -- Check for Connection
if ( !fReader || ! IsConnected() ) {
- AliError(Form("Not connected yet."));
+ HLTError(Form("Not connected yet."));
return type;
}
// -- Check block index
if ( ndx >= static_cast<Int_t>(fNBlks) ) {
- AliError(Form("Block index %d out of range.", ndx ));
+ HLTError(Form("Block index %d out of range.", ndx ));
return type;
}
// -- Check for Connection
if ( !fReader || ! IsConnected() ) {
- AliError(Form("Not connected yet."));
+ HLTError(Form("Not connected yet."));
return 0;
}
// -- Check block index
if ( ndx >= static_cast<Int_t>(fNBlks) ) {
- AliError(Form("Block index %d out of range.", ndx ));
+ HLTError(Form("Block index %d out of range.", ndx ));
return 0;
}
if ( ! source->IsSelected() )
continue;
else
- AliError(Form("IS SELECTED"));
+ HLTError(Form("IS SELECTED"));
// -- Check if detector matches
if ( source->GetSourceName().CompareTo( block->GetBlockName() ) )
#if EVE_DEBUG
if ( requested ) {
- AliInfo(Form("Block requested : %s", block->GetBlockName().Data()));
+ HLTInfo(Form("Block requested : %s", block->GetBlockName().Data()));
}
else {
- AliInfo(Form("Block NOT requested : %s", block->GetBlockName().Data()));
+ HLTInfo(Form("Block NOT requested : %s", block->GetBlockName().Data()));
}
#endif
// -- -- -- -- -- -- --
#include "AliHLTHOMERProxyHandler.h"
// -- -- -- -- -- -- --
-#include "AliLog.h"
ClassImp(AliHLTHOMERProxyHandler)
iResult = ProcessXmlRpcResponse();
if (iResult < 0) {
- AliError(Form("Filling SourceList failed."));
+ HLTError(Form("Filling SourceList failed."));
}
return iResult;
TSocket *socket = new TSocket(fgkHOMERProxyNode[fRealm], proxyPort);
if ( ! socket->IsValid() ) {
- AliWarning(Form("Failed to create socket to %s:%d,",fgkHOMERProxyNode[fRealm], proxyPort));
- AliWarning(Form("trying %s:%d now.", fgkHOMERProxyNode[fRealm+kHOMERRealmsMax],proxyPort));
+ HLTWarning(Form("Failed to create socket to %s:%d,",fgkHOMERProxyNode[fRealm], proxyPort));
+ HLTWarning(Form("trying %s:%d now.", fgkHOMERProxyNode[fRealm+kHOMERRealmsMax],proxyPort));
socket = new TSocket(fgkHOMERProxyNode[fRealm+kHOMERRealmsMax], proxyPort);
if ( ! socket->IsValid() ) {
- AliError(Form("Failed to create socket to %s:%d and %s:%d.",
+ HLTError(Form("Failed to create socket to %s:%d and %s:%d.",
fgkHOMERProxyNode[fRealm], proxyPort,
fgkHOMERProxyNode[fRealm+kHOMERRealmsMax],proxyPort));
iResult = socket->SendRaw( reqMsg, strlen(reqMsg) );
if ( iResult < 1 ||
iResult != static_cast<Int_t>(strlen(reqMsg))) {
- AliError(Form("Error sending! -- send length %d -- msg length %d.", iResult, static_cast<Int_t>(strlen(reqMsg)) ));
+ HLTError(Form("Error sending! -- send length %d -- msg length %d.", iResult, static_cast<Int_t>(strlen(reqMsg)) ));
socket->Close();
return iResult;
}
iResult = socket->RecvRaw(&buffer[bufferLength], 1);
if ( iResult < 0) {
- AliError(Form("Error reading form socket."));
+ HLTError(Form("Error reading form socket."));
socket->Close();
return iResult;
}
TDOMParser xmlParser;
xmlParser.SetValidate(kFALSE);
- AliInfo(Form("XMLResponse: %s",fXmlRpcResponse.Data()));
+ HLTInfo(Form("XMLResponse: %s",fXmlRpcResponse.Data()));
iResult = xmlParser.ParseBuffer(fXmlRpcResponse.Data(), fXmlRpcResponse.Length());
if ( iResult < 0 ) {
- AliError(Form("Parsing buffer with error: %s",
+ HLTError(Form("Parsing buffer with error: %s",
xmlParser.GetParseCodeMessage(xmlParser.GetParseCode()) ));
GetChildren()->GetChildren()->GetChildren()->GetChildren();
if ( strcmp( node->GetNodeName(), "string" ) ) {
- AliError(Form("No node 'string' in XmlRpcResponse."));
+ HLTError(Form("No node 'string' in XmlRpcResponse."));
return -1;
}
// -- Get Content
TString xmlContent(node->GetText() );
- AliInfo(Form("XMLContent: %s",xmlContent.Data()));
+ HLTInfo(Form("XMLContent: %s",xmlContent.Data()));
iResult = xmlParser.ParseBuffer(xmlContent.Data(), xmlContent.Length());
if ( iResult < 0 ) {
- AliError(Form("Parsing buffer with error: %s",
+ HLTError(Form("Parsing buffer with error: %s",
xmlParser.GetParseCodeMessage(xmlParser.GetParseCode()) ));
return iResult;
if ( !xmlParser.GetXMLDocument()->GetRootNode()->HasChildren() ) {
- AliWarning(Form("No Services active."));
+ HLTWarning(Form("No Services active."));
return 1;
}
// -- Add service to list
iResult = AddService( serviceNode->GetChildren() );
if ( iResult > 0 ) {
- AliWarning(Form("Incomplete Service not added."));
+ HLTWarning(Form("Incomplete Service not added."));
iResult = 0;
}
} while ( ( serviceNode = prevServiceNode->GetNextNode() ) && !iResult );
Int_t iResult = 0;
- AliInfo(Form(">> New service"));
+ HLTInfo(Form(">> New service"));
// -- Loop over all service properties and
// read them from the service tag
if ( ! strcmp(innerNode->GetNodeName(), "text" ) )
continue;
- AliInfo(Form(" %s ++ %s", innerNode->GetNodeName(), innerNode->GetText() ));
+ HLTInfo(Form(" %s ++ %s", innerNode->GetNodeName(), innerNode->GetText() ));
// -- hostname
if ( ! strcmp( innerNode->GetNodeName(), "address") )
if ( portS.IsDigit() )
port = portS.Atoi();
else {
- AliError(Form("Port %s is not a digit.", portS.Data()));
+ HLTError(Form("Port %s is not a digit.", portS.Data()));
iResult = -1;
}
}
// -- Check for completeness of the source properties
if ( hostname.IsNull() || !port || dataOrigin.IsNull() ||
dataType.IsNull() || dataSpecification.IsNull() ) {
- AliWarning(Form("Service provides not all values:\n\thostname\t\t %s\n\tport\t\t\t %d\n\tdataorigin\t\t %s\n\tdatatype\t\t %s\n\tdataspecification\t %s",
+ HLTWarning(Form("Service provides not all values:\n\thostname\t\t %s\n\tport\t\t\t %d\n\tdataorigin\t\t %s\n\tdatatype\t\t %s\n\tdataspecification\t %s",
hostname.Data(), port, dataOrigin.Data(), dataType.Data(), dataSpecification.Data()));
return 1;
fSourceList->Add( source );
- AliInfo(Form( "New Source added : %s", source->GetSourceName().Data()));
+ HLTInfo(Form( "New Source added : %s", source->GetSourceName().Data()));
return iResult;
}