]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
replacing GetEntries() by GetEntriesFast() to get correct size of TObjArrays
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 2 Nov 2009 23:40:08 +0000 (23:40 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 2 Nov 2009 23:40:08 +0000 (23:40 +0000)
HLT/BASE/AliHLTCTPData.cxx
HLT/BASE/AliHLTComponent.cxx
HLT/BASE/AliHLTSystem.cxx
HLT/BASE/util/AliHLTFileWriter.cxx

index 9e0f2a4c3346d478a6ad4196c3e2ac34b902b851..c930a2a3b9959464fda7126c15c7cfc089d28221 100644 (file)
@@ -173,11 +173,11 @@ int AliHLTCTPData::InitCTPTriggerClasses(const char* ctpString)
   TObjArray* classEntries=string.Tokenize(",");
   if (classEntries) {
     enum {kBit=0, kName, kDetectors};
-    for (int i=0; i<classEntries->GetEntries(); i++) {
+    for (int i=0; i<classEntries->GetEntriesFast(); i++) {
       TString entry=((TObjString*)classEntries->At(i))->GetString();
       TObjArray* entryParams=entry.Tokenize(":");
       if (entryParams) {
-       if (entryParams->GetEntries()==3 &&
+       if (entryParams->GetEntriesFast()==3 &&
            (((TObjString*)entryParams->At(kBit))->GetString()).IsDigit()) {
          int index=(((TObjString*)entryParams->At(kBit))->GetString()).Atoi();
          if (index<gkNCTPTriggerClasses) {
@@ -311,7 +311,7 @@ void AliHLTCTPData::Increment(const char* classIds)
   TString string=classIds;
   TObjArray* classEntries=string.Tokenize(",");
   if (classEntries) {
-    for (int i=0; i<classEntries->GetEntries(); i++) {
+    for (int i=0; i<classEntries->GetEntriesFast(); i++) {
       int index=Index(((TObjString*)classEntries->At(i))->GetString().Data());
       if (index>=0 && index<fCounters.GetSize()) fCounters[index]++;
     }
index 8f65c0ae3ab4f003a14c3e03d5fab9ab232ee558..a5155f8fe6a2bceb587eb32fc59f8af99ed2a7e2 100644 (file)
@@ -375,7 +375,7 @@ int AliHLTComponent::SetComponentDescription(const char* desc)
   TString descriptor=desc;
   TObjArray* pTokens=descriptor.Tokenize(" ");
   if (pTokens) {
-    for (int i=0; i<pTokens->GetEntries() && iResult>=0; i++) {
+    for (int i=0; i<pTokens->GetEntriesFast() && iResult>=0; i++) {
       TString argument=((TObjString*)pTokens->At(i++))->GetString();
       if (!argument || argument.IsNull()) continue;
 
@@ -2088,7 +2088,7 @@ int AliHLTComponent::SetStopwatches(TObjArray* pStopwatches)
   if (pStopwatches==NULL) return -EINVAL;
 
   int iResult=0;
-  for (int i=0 ; i<(int)kSWTypeCount && pStopwatches->GetEntries(); i++)
+  for (int i=0 ; i<(int)kSWTypeCount && pStopwatches->GetEntriesFast(); i++)
     SetStopwatch(pStopwatches->At(i), (AliHLTStopwatchType)i);
   return iResult;
 }
@@ -2330,20 +2330,20 @@ int AliHLTComponent::ExtractComponentTableEntry(const AliHLTUInt8_t* pBuffer, Al
   TObjArray* pTokens=descriptor.Tokenize("{");
   if (pTokens) {
     int n=0;
-    if (pTokens->GetEntries()>n) {
+    if (pTokens->GetEntriesFast()>n) {
       retChainId=((TObjString*)pTokens->At(n++))->GetString();
     }
-    if (pTokens->GetEntries()>n) {
+    if (pTokens->GetEntriesFast()>n) {
       compId=((TObjString*)pTokens->At(n++))->GetString();
     }
     delete pTokens;
   }
   if (!compId.IsNull() && (pTokens=compId.Tokenize(":"))!=NULL) {
     int n=0;
-    if (pTokens->GetEntries()>n) {
+    if (pTokens->GetEntriesFast()>n) {
       compId=((TObjString*)pTokens->At(n++))->GetString();
     }
-    if (pTokens->GetEntries()>n) {
+    if (pTokens->GetEntriesFast()>n) {
       compArgs=((TObjString*)pTokens->At(n++))->GetString();
     }
     delete pTokens;
@@ -2393,12 +2393,12 @@ int AliHLTComponent::ScanECSParam(const char* ecsParam)
   TString string=ecsParam;
   TObjArray* parameter=string.Tokenize(";");
   if (parameter) {
-    for (int i=0; i<parameter->GetEntries(); i++) {
+    for (int i=0; i<parameter->GetEntriesFast(); i++) {
       TString entry=((TObjString*)parameter->At(i))->GetString();
       HLTDebug("scanning ECS entry: %s", entry.Data());
       TObjArray* entryParams=entry.Tokenize("=");
       if (entryParams) {
-       if (entryParams->GetEntries()>1) {
+       if (entryParams->GetEntriesFast()>1) {
          if ((((TObjString*)entryParams->At(0))->GetString()).CompareTo("CTP_TRIGGER_CLASS")==0) {
            int result=InitCTPTriggerClasses((((TObjString*)entryParams->At(1))->GetString()).Data());
            if (iResult>=0 && result<0) iResult=result;
index 9e995d9db602a5d673dc82e8314794ac1865ce1b..116032fad18f809eb3922b0b64b4dc5b3621a9dd 100644 (file)
@@ -1086,7 +1086,7 @@ int AliHLTSystem::LoadComponentLibraries(const char* libraries)
       TString libs(libraries);
       TObjArray* pTokens=libs.Tokenize(" ");
       if (pTokens) {
-       int iEntries=pTokens->GetEntries();
+       int iEntries=pTokens->GetEntriesFast();
        for (int i=0; i<iEntries && iResult>=0; i++) {
          iResult=fpComponentHandler->LoadLibrary((((TObjString*)pTokens->At(i))->GetString()).Data());
        }
@@ -1158,7 +1158,7 @@ int AliHLTSystem::ScanOptions(const char* options)
     TString alloptions(options);
     TObjArray* pTokens=alloptions.Tokenize(" ");
     if (pTokens) {
-      int iEntries=pTokens->GetEntries();
+      int iEntries=pTokens->GetEntriesFast();
       for (int i=0; i<iEntries; i++) {
        TString token=(((TObjString*)pTokens->At(i))->GetString());
        if (token.Contains("loglevel=")) {
@@ -1370,7 +1370,7 @@ int AliHLTSystem::BuildTaskListsFromReconstructionChains(AliRawReader* rawReader
   // build task list for chains
   TObjArray* pTokens=chains.Tokenize(" ");
   if (pTokens) {
-    int iEntries=pTokens->GetEntries();
+    int iEntries=pTokens->GetEntriesFast();
     for (int i=0; i<iEntries && iResult>=0; i++) {
       const char* pCID=((TObjString*)pTokens->At(i))->GetString().Data();
       AliHLTConfiguration* pConf=fpConfigurationHandler->FindConfiguration(pCID);
@@ -1449,7 +1449,7 @@ int AliHLTSystem::AddHLTOUTTask(const char* hltoutchains)
   TString chains=hltoutchains;
   TObjArray* pTokens=chains.Tokenize(" ");
   if (pTokens) {
-    int iEntries=pTokens->GetEntries();
+    int iEntries=pTokens->GetEntriesFast();
     for (int i=0; i<iEntries && iResult>=0; i++) {
       const char* token=((TObjString*)pTokens->At(i))->GetString().Data();
       AliHLTConfiguration* pConf=fpConfigurationHandler->FindConfiguration(token);
index 2686b5a8852ebf0b1d8c3fa3926e9bb3ba1a750a..c377625396dcce8ae03ec7d1da2bfc6292dc45f3 100644 (file)
@@ -128,7 +128,7 @@ int AliHLTFileWriter::DoInit( int argc, const char** argv )
       fBaseName=argv[i];
       TObjArray* pTokens=fBaseName.Tokenize(".");
       if (pTokens) {
-       int iEntries=pTokens->GetEntries();
+       int iEntries=pTokens->GetEntriesFast();
        if (iEntries>1) {
          int n=0;
          fBaseName=((TObjString*)pTokens->At(n++))->GetString();