flatESD compare component
authorsgweber <steffen.georg.weber@cern.ch>
Mon, 22 Sep 2014 10:56:55 +0000 (12:56 +0200)
committersgweber <steffen.georg.weber@cern.ch>
Thu, 25 Sep 2014 14:01:25 +0000 (16:01 +0200)
HLT/CMakelibAliHLTGlobal.pkg
HLT/global/AliFlatESDTrack.cxx
HLT/global/AliHLTGlobalAgent.cxx
HLT/global/AliHLTGlobalEsdToFlatConverterComponent.cxx

index c481b66..2145875 100644 (file)
@@ -28,6 +28,7 @@
 #--------------------------------------------------------------------------------#
 
 set ( CLASS_HDRS
+    AliHLTGlobalCompareFlatComponent.h
     AliHLTGlobalFlatEsdTestComponent.h
     AliHLTGlobalFlatEsdConverterComponent.h
     AliHLTGlobalEsdToFlatConverterComponent.h
index bd75389..34a9935 100644 (file)
@@ -108,7 +108,7 @@ Int_t AliFlatESDTrack::FillExternalTrackParam(const AliExternalTrackParam* param
 
   if (!param) return -1;
 
-  Printf("  DEBUG: CONTENT %d >> %p + 0x%07llx = %p", flag, fContent, fContentSize, fContent + fContentSize);
+  //Printf("  DEBUG: CONTENT %d >> %p + 0x%07llx = %p", flag, fContent, fContentSize, fContent + fContentSize);
 
   AliFlatExternalTrackParam * current = reinterpret_cast<AliFlatExternalTrackParam*> (fContent + fContentSize);
   current->SetExternalTrackParam( param );    
index 1982a4d..4dc1b9b 100644 (file)
@@ -31,6 +31,7 @@
 
 // header files of library components
 #include "AliHLTGlobalTrackMergerComponent.h"
+#include "AliHLTGlobalCompareFlatComponent.h"
 #include "AliHLTGlobalEsdToFlatConverterComponent.h"
 #include "AliHLTGlobalFlatEsdConverterComponent.h"
 #include "AliHLTGlobalEsdConverterComponent.h"
@@ -80,6 +81,7 @@ int AliHLTGlobalAgent::RegisterComponents(AliHLTComponentHandler* pHandler) cons
   assert(pHandler);
   if (!pHandler) return -EINVAL;
   pHandler->AddComponent(new AliHLTGlobalEsdToFlatConverterComponent);
+  pHandler->AddComponent(new AliHLTGlobalCompareFlatComponent);
   pHandler->AddComponent(new AliHLTGlobalFlatEsdTestComponent);
   pHandler->AddComponent(new AliHLTGlobalTrackMergerComponent);
   pHandler->AddComponent(new AliHLTGlobalFlatEsdConverterComponent);
@@ -171,6 +173,7 @@ int AliHLTGlobalAgent::CreateConfigurations(AliHLTConfigurationHandler* pHandler
   pHandler->CreateConfiguration("GLOBAL-esd-converter", "GlobalEsdConverter", esdInputs.Data(), "");
   pHandler->CreateConfiguration("GLOBAL-flat-esd-test", "GlobalFlatEsdTest", "GLOBAL-esd-converter GLOBAL-flat-esd-converter", "");
   pHandler->CreateConfiguration("esd-to-flat-conversion", "GlobalEsdToFlatConverter", "GLOBAL-esd-converter", "");
+  pHandler->CreateConfiguration("compare-flat", "GlobalCompareFlat", "GLOBAL-flat-esd-converter esd-to-flat-conversion", "");
 
   ///////////////////////////////////////////////////////////////////////////////////////////////////
   //
index f37a79d..2af15b1 100644 (file)
@@ -98,8 +98,8 @@ AliHLTComponentDataType AliHLTGlobalEsdToFlatConverterComponent::GetOutputDataTy
 // #################################################################################
 void AliHLTGlobalEsdToFlatConverterComponent::GetOutputDataSize( ULong_t& constBase, Double_t& inputMultiplier ) {
   // see header file for class documentation
-  constBase = 100000;
-  inputMultiplier = 1.0;
+  constBase = 100;
+  inputMultiplier = 10.0;
 }
 
 
@@ -196,8 +196,8 @@ Int_t AliHLTGlobalEsdToFlatConverterComponent::DoDeinit() {
 Int_t AliHLTGlobalEsdToFlatConverterComponent::DoEvent(const AliHLTComponentEventData& /*evtData*/,
                                                    const AliHLTComponentBlockData* /*blocks*/, 
                                                    AliHLTComponentTriggerData& /*trigData*/,
-                                                   AliHLTUInt8_t* /*outputPtr*/, 
-                                                   AliHLTUInt32_t& /*size*/,
+                                                   AliHLTUInt8_t* outputPtr, 
+                                                   AliHLTUInt32_t& size,
                                                    AliHLTComponentBlockDataList& outputBlocks) {
   // see header file for class documentation
 
@@ -209,30 +209,6 @@ Int_t AliHLTGlobalEsdToFlatConverterComponent::DoEvent(const AliHLTComponentEven
     return 0;
   
    AliESDEvent *esd;
-
-#if 0
-  AliESDEvent *pEsd;
-  const TTree *tree;
-       
-       
-  for ( const TObject *iter = GetFirstInputObject(kAliHLTDataTypeESDTree | kAliHLTDataOriginOut); iter != NULL; iter = GetNextInputObject() ) {
-    cout<<"Found ESD tree in esd test component !!!"<<endl;
-               
-    tree = dynamic_cast<const TTree*>(iter);
-               if(tree)
-                       pEsd->ReadFromTree( const_cast< TTree*>(tree) );
-    if( pEsd ){
-      cout<<"N ESD tracks: "<<pEsd->GetNumberOfTracks()<<endl;
-                       iResult=1;
-    } else {
-      cout<<"ESD pointer is NULL "<<endl;
-    }
-               
-               
-               
-  }
-       
-#endif
        
        
   for ( const TObject *iter = GetFirstInputObject(kAliHLTDataTypeESDObject | kAliHLTDataOriginOut); iter != NULL; iter = GetNextInputObject() ) {
@@ -258,23 +234,15 @@ Int_t AliHLTGlobalEsdToFlatConverterComponent::DoEvent(const AliHLTComponentEven
     }
   }
   
-       /*
+       
        
    if (iResult>=0) {            
  
-                
-  Bool_t useESDFriends = 0;
  AliFlatESDEvent *flatEsd ;
-  Byte_t *mem = new Byte_t[AliFlatESDEvent::EstimateSize(const_cast<AliESDEvent*>(esd), useESDFriends)];
 
-    flatEsd = reinterpret_cast<AliFlatESDEvent*>(mem);
+    flatEsd = reinterpret_cast<AliFlatESDEvent*>(outputPtr);
     new (flatEsd) AliFlatESDEvent;
-//  flatEsd->Fill(esd,useESDFriends);  
-                
-                
-                
-                
-                
+  flatEsd->SetFromESD(AliFlatESDEvent::EstimateSize(esd),esd, kTRUE); 
                 
     AliHLTComponentBlockData outBlock;
     FillBlockData( outBlock );
@@ -284,10 +252,10 @@ Int_t AliHLTGlobalEsdToFlatConverterComponent::DoEvent(const AliHLTComponentEven
     outBlock.fSpecification = AliHLTTPCDefinitions::EncodeDataSpecification( 0, 35, 0, 5 );
 
     outputBlocks.push_back( outBlock );
-      
+
     size += outBlock.fSize;
   }
- */