fListSrcElement(),
fArguments(""),
fArgc(-1),
- fArgv(NULL)
+ fArgv(NULL),
+ fBufferSize(-1)
{
// see header file for class documentation
// or
fListSrcElement=fListSources.begin();
}
-AliHLTConfiguration::AliHLTConfiguration(const char* id, const char* component, const char* sources, const char* arguments)
+AliHLTConfiguration::AliHLTConfiguration(const char* id, const char* component, const char* sources,
+ const char* arguments, const char* bufsize)
:
fID(id),
fComponent(component),
fListSrcElement(),
fArguments(arguments),
fArgc(-1),
- fArgv(NULL)
+ fArgv(NULL),
+ fBufferSize(-1)
{
// see header file for function documentation
+ if (bufsize) fBufferSize=ConvertSizeString(bufsize);
fListSrcElement=fListSources.begin();
if (id && component) {
if (fgConfigurationHandler) {
fListSrcElement(),
fArguments(src.fArguments),
fArgc(-1),
- fArgv(NULL)
+ fArgv(NULL),
+ fBufferSize(src.fBufferSize)
{
// see header file for function documentation
fListSrcElement=fListSources.begin();
fArguments=src.fArguments;
fArgc=-1;
fArgv=NULL;
+ fBufferSize=src.fBufferSize;
return *this;
}
return iResult;
}
-int AliHLTConfiguration::InterpreteString(const char* arg, vector<char*>& argList)
+int AliHLTConfiguration::InterpreteString(const char* arg, vector<char*>& argList) const
{
// see header file for function documentation
int iResult=0;
return iResult;
}
+int AliHLTConfiguration::ConvertSizeString(const char* strSize) const
+{
+ // see header file for function documentation
+ int size=0;
+ if (!strSize) return -1;
+
+ char* endptr=NULL;
+ size=strtol(strSize, &endptr, 10);
+ if (size>=0) {
+ if (endptr) {
+ if (endptr==strSize) {
+ HLTWarning("ignoring unrecognized buffer size '%s'", strSize);
+ size=-1;
+ } else if (*endptr==0) {
+ // no unit specifier
+ } else if (*endptr=='k') {
+ size*=1014;
+ } else if (*endptr=='M') {
+ size*=1024*1024;
+ } else {
+ HLTWarning("ignoring buffer size of unknown unit '%c'", endptr[0]);
+ }
+ } else {
+ HLTWarning("ignoring negative buffer size specifier '%s'", strSize);
+ size=-1;
+ }
+ }
+ return size;
+}
+
int AliHLTConfiguration::FollowDependency(const char* id, TList* pTgtList)
{
// see header file for function documentation