]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Hack to get it running with current setup
authorjthaeder <jthaeder@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 5 Dec 2009 20:41:24 +0000 (20:41 +0000)
committerjthaeder <jthaeder@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 5 Dec 2009 20:41:24 +0000 (20:41 +0000)
HLT/BASE/AliHLTHOMERManager.cxx
HLT/exa/HOMERManager.C

index cf6c30360e0c6f8c3c6604c3c3016ba9284d3530..3377bb641a5f64e9420258ab5cfb4ddb85cb74e4 100644 (file)
@@ -234,6 +234,10 @@ Int_t AliHLTHOMERManager::ConnectHOMER( TString detector ){
 
   Int_t iResult = 0;
 
+  // HAck Jochen
+  //----
+  detector="ALL";
+
   // -- Check if LibManager is present
   if ( ! fLibManager ) {
     HLTError(Form("No LibManager present."));
@@ -525,8 +529,9 @@ void AliHLTHOMERManager::CreateReadoutList( const char** sourceHostnames, UShort
     // -- If detector NO detector name given
     if ( ! detector.CompareTo("ALL") ) {
       // -- Continue if source is not selected
-      if ( ! source->IsSelected() )
-       continue;
+      // HACK Jochen
+      //if ( ! source->IsSelected() )
+      //       continue;
     }
     // -- DetectorName given
     else {
index 0932e81a091bac9d93c8c6f42c1e1a8eeb8dc245..b5730a474705188c15b576e3cfcc7c8b7f2b9135 100644 (file)
@@ -26,8 +26,9 @@
  * @ingroup alihlt_homer
  */
 
-Int_t HOMERManager() {
 
+Int_t HOMERManager() {
+  
   Int_t iResult = 0;
 
   // -- Create new hM object
@@ -45,39 +46,76 @@ Int_t HOMERManager() {
 
   printf( "== CONNECT HOMER ==\n" );
   
-  // Empty argument should connect to all
-  //iResult = hM->ConnectHOMER();
-    iResult = hM->ConnectHOMER("HLT");
+  iResult = hM->ConnectHOMER(); 
   if (iResult) return iResult;
   
   printf( "== NEXT EVENT ==\n" );
   
   iResult = hM->NextEvent();
   if (iResult) return iResult;
-
+  
   printf( "== LOOP OVER BLOCKS ==\n" );
 
-  TObject * object =  NULL;  
+  if ( hM->GetBlockList() == NULL )
+    return -1;
+
+  if ( hM->GetBlockList()->IsEmpty() )
+    return -2;
 
   TIter next(hM->GetBlockList());
   AliHLTHOMERBlockDesc* block = NULL;
 
+  AliESDEvent* esd = NULL;
+  
   while ((block = (AliHLTHOMERBlockDesc*)next())) {
    
-    printf ( "Detector : %s\n" ,block->GetDetector().Data() );
-    printf ( "Datatype : %s\n" ,block->GetDataType().Data() );
+    //printf ( "Detector : %s\n" ,block->GetDetector().Data() );
+    //printf ( "Datatype : %s\n" ,block->GetDataType().Data() );
     
-    if ( block->IsTObject() ) {
-      object = block->GetTObject();
-      
-        printf("ClassName %s\n", block->GetClassName().Data() );
+    if ( block->IsTObject() ) { 
+      TObject*     object = block->GetTObject();
+      // printf("ClassName %s\n", block->GetClassName().Data() );
     }
-  }
 
+    // ++ HLT BLOCK
+    // +++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    if ( ! block->GetDetector().CompareTo("HLT") ) {
+
+      // -- ESDTREE
+      if ( ! block->GetDataType().CompareTo("ALIESDV0") ) {
+       esd = static_cast<AliESDEvent*> ( block->GetTObject() );
+       esd->GetStdContent();
+       
+       printf( "Number of ESD Tracks : %d \n", esd->GetNumberOfTracks());
+      } //if ( ! block->GetDataType().CompareTo("ALIESDV0") ) {
+    } // if ( ! block->GetDetector().CompareTo("HLT") ) {
+
+    else if ( ! block->GetDetector().CompareTo("TPC") ) {
+      // -- Process TPC Clusters
+      if ( ! block->GetDataType().CompareTo("CLUSTERS") ) {
+
+       Int_t   slice = block->GetSubDetector();
+       Int_t   patch = block->GetSubSubDetector();
+       //      Float_t phi   = ( slice + 0.5 ) * TMath::Pi() / 9.0;  
+       //      Float_t cos   = TMath::Cos( phi );
+       //      Float_t sin   = TMath::Sin( phi );
+
+       Int_t ddl = slice*6 + patch;
+
+       // cout << slice << " -- " << patch << " -- " << ddl << endl;
+       
+       //      AliHLTTPCClusterData *cd = reinterpret_cast<AliHLTTPCClusterData*> (block->GetData());
+       //      UChar_t *data            = reinterpret_cast<UChar_t*> (cd->fSpacePoints);
+
+      } // if ( ! block->GetDataType().CompareTo("CLUSTERS") ) {
+    } //     else if ( ! block->GetDetector().CompareTo("TPC") ) {
+    
+  } // while ((block = (AliHLTHOMERBlockDesc*)next())) {
+  
   // -- Destroy hM object
   if (hM)
     delete hM;
   hM = NULL;
-
-  return iResult;;
+  
+  return iResult;
 }