Introduction of the online monitoring code into the alimdc package. Fixed some memory...
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 6 Oct 2004 08:51:20 +0000 (08:51 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 6 Oct 2004 08:51:20 +0000 (08:51 +0000)
23 files changed:
HLT/hough/AliL3Hough.cxx
HLT/hough/AliL3Hough.h
HLT/hough/AliL3HoughMaxFinder.cxx
HLT/hough/AliL3HoughTransformerRow.cxx
HLT/misc/AliL3DDLDataFileHandler.cxx
HLT/misc/AliL3DDLDataFileHandler.h
HLT/src/AliL3MemHandler.h
MONITOR/binmonitorCheck.pkg
RAW/AliMDC.cxx
RAW/AliMDC.h
RAW/AliRawCastorDB.cxx
RAW/AliRawCastorDB.h
RAW/AliRawDB.cxx
RAW/AliRawDB.h
RAW/AliRawNullDB.cxx
RAW/AliRawNullDB.h
RAW/AliRawRFIODB.cxx
RAW/AliRawRFIODB.h
RAW/AliRawRootdDB.cxx
RAW/AliRawRootdDB.h
RAW/Make-macros
RAW/Makefile
RAW/libRAW.pkg

index 659c2de..83c1394 100644 (file)
@@ -91,6 +91,7 @@ AliL3Hough::AliL3Hough()
   fPeakRatio   = 0.5;
   fInputFile   = 0;
   fInputPtr    = 0;
+  fRawEvent    = 0;
   
   SetTransformerParams();
   SetThreshold();
@@ -199,6 +200,17 @@ void AliL3Hough::CleanUp()
   //cout << "Cleaned class mem " << endl;
 }
 
+void AliL3Hough::Init(Int_t netasegments,Int_t tv,AliRawEvent *rawevent,Float_t zvertex)
+{
+  //Normal constructor
+  fNEtaSegments  = netasegments;
+  fVersion       = tv;
+  fRawEvent      = rawevent;
+  fZVertex       = zvertex;
+
+  Init();
+}
+
 void AliL3Hough::Init(Char_t *path,Bool_t binary,Int_t netasegments,Bool_t bit8,Int_t tv,Char_t *infile,Char_t *ptr,Float_t zvertex)
 {
   //Normal init of the AliL3Hough
@@ -282,35 +294,42 @@ void AliL3Hough::Init(Bool_t doit, Bool_t addhists)
       else
 #ifdef use_aliroot
        {
-         if(!fInputFile) {
-           if(!fInputPtr) {
-             /* In case of reading digits file */
-             fMemHandler[i] = new AliL3FileHandler(kTRUE); //use static index
-             if(!fBinary) {
+         if(!fRawEvent) {
+           if(!fInputFile) {
+             if(!fInputPtr) {
+               /* In case of reading digits file */
+               fMemHandler[i] = new AliL3FileHandler(kTRUE); //use static index
+               if(!fBinary) {
 #if use_newio
-               if(!fRunLoader) {
+                 if(!fRunLoader) {
 #endif
-                 Char_t filename[1024];
-                 sprintf(filename,"%s/digitfile.root",fPath);
-                 fMemHandler[i]->SetAliInput(filename);
+                   Char_t filename[1024];
+                   sprintf(filename,"%s/digitfile.root",fPath);
+                   fMemHandler[i]->SetAliInput(filename);
 #if use_newio
-               }
-               else {
-                 fMemHandler[i]->SetAliInput(fRunLoader);
-               }
+                 }
+                 else {
+                   fMemHandler[i]->SetAliInput(fRunLoader);
+                 }
 #endif
+               }
+             }
+             else {
+               /* In case of reading from DATE */
+               fMemHandler[i] = new AliL3DDLDataFileHandler();
+               fMemHandler[i]->SetReaderInput(fInputPtr,-1);
              }
            }
            else {
-             /* In case of reading from DATE */
+             /* In case of reading rawdata from ROOT file */
              fMemHandler[i] = new AliL3DDLDataFileHandler();
-             fMemHandler[i]->SetReaderInput(fInputPtr,-1);
+             fMemHandler[i]->SetReaderInput(fInputFile);
            }
          }
          else {
-           /* In case of reading rawdata from ROOT file */
+           /* In case of reading rawdata using AliRawEvent */
            fMemHandler[i] = new AliL3DDLDataFileHandler();
-           fMemHandler[i]->SetReaderInput(fInputFile);
+           fMemHandler[i]->SetReaderInput(fRawEvent);
          }
        }
 #else
@@ -1211,6 +1230,41 @@ void AliL3Hough::WriteTracks(Int_t slice,Char_t *path)
     }
 }
 
+#ifdef use_aliroot
+Int_t AliL3Hough::FillESD(AliESD *esd)
+{
+  if(!fGlobalTracks) return 0;
+  Int_t nglobaltracks = 0;
+  for(Int_t i=0; i<fGlobalTracks->GetNTracks(); i++)
+    {
+      AliL3HoughTrack *tpt = (AliL3HoughTrack *)fGlobalTracks->GetCheckedTrack(i);
+      if(!tpt) continue; 
+      
+      AliESDHLTtrack *esdtrack = new AliESDHLTtrack(); 
+
+      esdtrack->SetRowRange(tpt->GetFirstRow(),tpt->GetLastRow());
+      esdtrack->SetNHits(tpt->GetNHits());
+      esdtrack->SetFirstPoint(tpt->GetFirstPointX(),tpt->GetFirstPointY(),tpt->GetFirstPointZ());
+      esdtrack->SetLastPoint(tpt->GetLastPointX(),tpt->GetLastPointY(),tpt->GetLastPointZ());
+      esdtrack->SetPt(tpt->GetPt());
+      esdtrack->SetPsi(tpt->GetPsi());
+      esdtrack->SetTgl(tpt->GetTgl());
+      esdtrack->SetCharge(tpt->GetCharge());
+      esdtrack->SetMCid(tpt->GetMCid());
+      esdtrack->SetWeight(tpt->GetWeight());
+      esdtrack->SetSector(tpt->GetSector());
+      esdtrack->SetBinXY(tpt->GetBinX(),tpt->GetBinY(),tpt->GetSizeX(),tpt->GetSizeY());
+      esdtrack->SetPID(tpt->GetPID());
+      esdtrack->ComesFromMainVertex(tpt->ComesFromMainVertex());
+
+      esd->AddHLTHoughTrack(esdtrack);
+      nglobaltracks++;
+      delete esdtrack;
+    }
+  return nglobaltracks;
+}
+#endif
+
 void AliL3Hough::WriteDigits(Char_t *outfile)
 {
   //Write the current data to a new rootfile.
index 35d7c06..adc077a 100644 (file)
@@ -18,9 +18,13 @@ class AliL3HoughGlobalMerger;
 class AliL3Benchmark;
 
 #include "TThread.h"
-//class TThread;
 #ifdef use_newio
 #include <AliRunLoader.h>
+#include <../RAW/AliRawEvent.h>
+#endif
+#ifdef use_aliroot
+#include <AliESD.h>
+#include <AliESDHLTtrack.h>
 #endif
 
 class AliL3Hough {
@@ -34,6 +38,7 @@ class AliL3Hough {
   void SetRunLoader(AliRunLoader *runloader) {fRunLoader = runloader;}
 #endif
 
+  void Init(Int_t netasegments,Int_t tv,AliRawEvent *rawevent,Float_t zvertex=0.0);
   void Init(Char_t *path,Bool_t binary,Int_t netasegments=100,Bool_t bit8=kFALSE,Int_t tv=0,Char_t *infile=0,Char_t *ptr=0,Float_t zvertex=0.0);
   void Init(Bool_t doit=kFALSE, Bool_t addhists=kFALSE);
 
@@ -55,6 +60,9 @@ class AliL3Hough {
   void EvaluatePatch(Int_t i,Int_t roadwidth,Int_t nrowstomiss);
   void WriteTracks(Int_t slice,Char_t *path="./");
   void WriteTracks(Char_t *path);
+#ifdef use_aliroot
+  Int_t FillESD(AliESD *esd);
+#endif
   void WriteDigits(Char_t *outfile="output_digits.root");
   void InitEvaluate();
   void DoBench(Char_t *filename);
@@ -96,6 +104,7 @@ class AliL3Hough {
  private:
   Char_t *fInputFile;//!
   Char_t *fInputPtr;//!
+  AliRawEvent *fRawEvent;//!
   Char_t fPath[1024]; // Path to the files
   Bool_t fBinary; // Is input binary
   Bool_t fAddHistograms; // Add all patch histograms at the end or not
index 56277f4..1338840 100644 (file)
@@ -1006,7 +1006,7 @@ void AliL3HoughMaxFinder::FindAdaptedRowPeaks(Int_t kappawindow,Int_t xsize,Int_
   fN2PeaksPrevEtaSlice = fNPeaks;
 
   for(Int_t i=0; i<hist->GetNbinsY(); i++)
-    delete localmaxima[i];
+    delete [] localmaxima[i];
 
   delete [] localmaxima;
   delete [] nmaxs;
index b43f3cd..7773d99 100644 (file)
@@ -484,7 +484,7 @@ void AliL3HoughTransformerRow::CreateHistograms(Int_t nxbin,Float_t xmin,Float_t
              //              cout<<" fTrackNRows "<<(Int_t)fInitialGapCount[xbin + ybin*nxbins]<<" "<<xbin<<" "<<ybin<<" "<<(Int_t)fTrackNRows[xbin + ybin*nxbins]<<" "<<(Int_t)fTrackFirstRow[xbin + ybin*nxbins]<<" "<<(Int_t)fTrackLastRow[xbin + ybin*nxbins]<<" "<<endl;
            }
        }
-      delete tracklength;
+      delete [] tracklength;
     }
 
   if(!fStartPadParams)
index f6b2fcb..80a383e 100644 (file)
@@ -56,13 +56,26 @@ void AliL3DDLDataFileHandler::FreeAll()
 {
   // frees all heap memory
   if(fReader) delete fReader;
-  if(fTPCStream) delete fTPCStream;
   fReader = 0;
+  if(fTPCStream) delete fTPCStream;
   fTPCStream = 0;
 }
 
 
 #ifdef use_newio
+Bool_t AliL3DDLDataFileHandler::SetReaderInput(AliRawEvent *rawevent)
+{
+  // sets the input of the reader
+  fEvent=-1;
+  fFilename="";
+  if(fReader) delete fReader;
+  fReader=new AliRawReaderRoot(rawevent);
+  if(fTPCStream) delete fTPCStream;
+  fTPCStream=new AliTPCRawStream(fReader);
+
+  return kTRUE;
+}
+
 Bool_t AliL3DDLDataFileHandler::SetReaderInput(Char_t *name,Int_t event)
 {
   // sets the input of the reader
index 843c241..a043443 100644 (file)
@@ -4,6 +4,7 @@
 #define ALIL3DDLDATAFILEHANDLER_H
 
 #ifdef use_newio
+#include "../RAW/AliRawEvent.h"
 #include "../RAW/AliRawReader.h"
 #include "../RAW/AliTPCRawStream.h"
 #include <TString.h>
@@ -21,6 +22,7 @@ class AliL3DDLDataFileHandler:public AliL3MemHandler{
    virtual ~AliL3DDLDataFileHandler();
 
 #ifdef use_newio
+   Bool_t SetReaderInput(AliRawEvent *rawevent);
    Bool_t SetReaderInput(Char_t *name,Int_t event=0);
    Bool_t IsDigit(Int_t i=0) const;
    AliL3DigitRowData *AliAltroDigits2Memory(UInt_t & nrow,Int_t event=0,Bool_t /*eventmerge*/=kFALSE){return DDLData2Memory(nrow,event);};
index de2cfbd..325fedb 100644 (file)
@@ -25,6 +25,7 @@ class AliL3RandomDigitData;
 
 #ifdef use_newio
 class AliRunLoader;
+class AliRawEvent;
 #endif
 class AliTPCRawStream;
 
@@ -155,6 +156,7 @@ class AliL3MemHandler {
 
   //AliL3DDLDataFileHandler
 #ifdef use_newio
+  virtual Bool_t SetReaderInput(AliRawEvent */*rawevent*/){fDummy=0; return 0;}
   virtual Bool_t SetReaderInput(Char_t */*name*/,Int_t /*event*/=0){fDummy=0; return 0;}
 #else
   virtual Bool_t SetReaderInput(Char_t */*name*/,Bool_t /*add*/=kTRUE){fDummy=0; return 0;}
index 570cf2e..f40b345 100644 (file)
@@ -16,7 +16,7 @@ EINCLUDE+=TPC CONTAINERS ITS RAW HLT/src HLT/hough HLT/comp
 ifdef DATE_ROOT
 
 ELIBSDIR:=${DATE_MONITOR_DIR}/${DATE_SYS}
-ELIBS:= STEER RAW monitor shift pythia6 pdf microcern
+ELIBS:= STEER CONTAINERS RAW monitor shift pythia6 pdf microcern TPCbase TPCsim TPCrec AliL3Src AliL3Comp AliL3Misc AliL3Hough
 EINCLUDE+= ${DATE_COMMON_DEFS} ${DATE_MONITOR_DIR}
 
 else
index fd5add6..27093cf 100644 (file)
 #include "libDateEb.h"
 #endif
 
+#ifdef USE_HLT
+#include <AliL3StandardIncludes.h>
+#include "AliL3Logging.h"
+#include <AliL3Transform.h>
+#include "AliRawReaderRoot.h"
+#include <AliL3Hough.h>
+#include <AliESD.h>
+#endif
+
 #include "AliRawEvent.h"
 #include "AliRawEventHeader.h"
 #include "AliRawEquipment.h"
@@ -228,19 +237,36 @@ Int_t AliMDC::Run()
 
    // Event object used to store event data.
    AliRawEvent *event = new AliRawEvent;
+#ifdef USE_HLT
+   //Init HLT
+   AliL3Log::fgLevel=AliL3Log::kError;
+   ALIDEBUG(1)
+     AliL3Log::fgLevel=AliL3Log::kWarning;
+   ALIDEBUG(2)
+     AliL3Log::fgLevel=AliL3Log::kWarning;
+   ALIDEBUG(3)
+     AliL3Log::fgLevel=AliL3Log::kNone;
+
+   if (!AliL3Transform::Init("./", kFALSE)) {
+     Error("Run","HLT initialization failed!");
+     return 1;
+   }
+
+   AliESD *esd = new AliESD;
+#endif
 
    // Create new raw DB.
    AliRawDB *rawdb;
    if (fWriteMode == kRFIO)
-      rawdb = new AliRawRFIODB(event, fMaxFileSize, fCompress);
+      rawdb = new AliRawRFIODB(event, esd, fMaxFileSize, fCompress);
    else if (fWriteMode == kROOTD)
-      rawdb = new AliRawRootdDB(event, fMaxFileSize, fCompress);
+      rawdb = new AliRawRootdDB(event, esd, fMaxFileSize, fCompress);
    else if (fWriteMode == kCASTOR)
-      rawdb = new AliRawCastorDB(event, fMaxFileSize, fCompress);
+      rawdb = new AliRawCastorDB(event, esd, fMaxFileSize, fCompress);
    else if (fWriteMode == kDEVNULL)
-      rawdb = new AliRawNullDB(event, fMaxFileSize, fCompress);
+      rawdb = new AliRawNullDB(event, esd, fMaxFileSize, fCompress);
    else
-      rawdb = new AliRawDB(event, fMaxFileSize, fCompress);
+      rawdb = new AliRawDB(event, esd, fMaxFileSize, fCompress);
 
    if (rawdb->IsZombie()) return 1;
    printf("Filling raw DB %s\n", rawdb->GetDBName());
@@ -310,9 +336,8 @@ Int_t AliMDC::Run()
 
       // Check if event has any hard track flagged
       Bool_t callFilter = kFALSE;
-      // This needs to be re-engineered for the next ADC...
-      //if (fUseFilter && TEST_USER_ATTRIBUTE(header.GetTypeAttribute(), 0))
-      //   callFilter = kTRUE;
+      if (fUseFilter)
+       callFilter = kTRUE;
 
       // Check event type and skip "Start of Run", "End of Run",
       // "Start of Run Files" and "End of Run Files"
@@ -432,8 +457,10 @@ Int_t AliMDC::Run()
 
                // Read equipment raw data
                AliRawData &subRaw = *equipment.GetRawData();
-              Int_t eqSize = equipmentHeader.GetEquipmentSize() -
-                              equipHeaderSize;
+              // To be checked !
+              //              Int_t eqSize = equipmentHeader.GetEquipmentSize() -
+              //                              equipHeaderSize;
+              Int_t eqSize = equipmentHeader.GetEquipmentSize();
                if ((status = ReadRawData(subRaw, eqSize, ebdata)) != eqSize) {
                   if (status == 0) {
                      Error("Run", "unexpected EOF reading sub-event raw data");
@@ -444,16 +471,6 @@ Int_t AliMDC::Run()
                toRead  -= eqSize;
                rawSize -= eqSize;
 
-               if (callFilter) {
-#ifdef ALI_DATE
-                  if (TEST_USER_ATTRIBUTE(subHeader.GetTypeAttribute(), 0))
-                     Filter(subRaw);
-                  else {
-                     // set size of all sectors without hard track flag to 0
-                     subRaw.SetSize(0);
-                  }
-#endif
-               }
            }
 
          } else {  // Read only raw data but no equipment header
@@ -468,21 +485,24 @@ Int_t AliMDC::Run()
             }
             toRead  -= rawSize;
 
-            if (callFilter) {
-#ifdef ALI_DATE
-               if (TEST_USER_ATTRIBUTE(subHeader.GetTypeAttribute(), 0))
-                  Filter(subRaw);
-               else {
-                  // set size of all sectors without hard track flag to 0
-                  subRaw.SetSize(0);
-               }
-#endif
-            }
         }
 
          nsub++;
       }
 
+      //HLT
+      if (callFilter) {
+#ifdef ALI_DATE
+       if(header.GetType() == AliRawEventHeader::kPhysicsEvent ||
+          header.GetType() == AliRawEventHeader::kCalibrationEvent)
+         Filter(
+#ifdef USE_HLT
+                event,esd
+#endif
+                );
+#endif
+      }
+
       // Set stat info for first event of this file
       if (rawdb->GetEvents() == 0)
          stats->SetFirstId(header.GetRunNumber(), header.GetEventInRun());
@@ -542,7 +562,11 @@ Int_t AliMDC::Run()
       // Make top event object ready for next event data
       //printf("Event %d has %d sub-events\n", fNumEvents, event->GetNSubEvents());
       event->Reset();
-
+#ifdef USE_HLT
+      // Clean up HLT ESD for the next event
+      // Probably we could add esd->Reset() method to AliESD?
+      esd->Reset();
+#endif
 #ifdef USE_EB
       if (!ebReleaseEvent(ebvec)) {
          Error("Run", "problem releasing event (%s)", ebGetLastError());
@@ -740,22 +764,92 @@ Int_t AliMDC::DumpEvent(Int_t toRead)
 }
 
 //______________________________________________________________________________
-Int_t AliMDC::Filter(AliRawData &raw)
+Int_t AliMDC::Filter(
+#ifdef USE_HLT
+                    AliRawEvent *event,AliESD *esd
+#endif
+                    )
 {
-   // Call 3rd level filter for this raw data segment.
+  // Call 3rd level filter for this raw data event.
 
 #ifdef USE_HLT
 
-   // Add HLT code here
+  // Run the HLT code
+  {
+    TStopwatch timer;
+    timer.Start();
+
+    AliL3Hough *hough1 = new AliL3Hough();
+    
+    hough1->SetThreshold(4);
+    hough1->SetTransformerParams(76,140,0.4,-1);
+    hough1->SetPeakThreshold(70,-1);
+    // Attention Z of the vertex to be taken from the event head!
+    // So far for debug purposes it is fixed by hand...
+    hough1->Init(100,4,event,3.82147);
+    hough1->SetAddHistograms();
+
+    AliL3Hough *hough2 = new AliL3Hough();
+
+    hough2->SetThreshold(4);
+    hough2->SetTransformerParams(76,140,0.4,-1);
+    hough2->SetPeakThreshold(70,-1);
+    hough2->Init(100,4,event,3.82147);
+    hough2->SetAddHistograms();
+
+    Int_t nglobaltracks = 0;
+    /* In case we run HLT code in 2 threads */
+    hough1->StartProcessInThread(0,17);
+    hough2->StartProcessInThread(18,35);
+
+    if(hough1->WaitForThreadFinish())
+      ::Fatal("AliL3Hough::WaitForThreadFinish"," Can not join the required thread! ");
+    if(hough2->WaitForThreadFinish())
+      ::Fatal("AliL3Hough::WaitForThreadFinish"," Can not join the required thread! ");
+
+    /* In case we run HLT code in the main thread
+    for(Int_t slice=0; slice<=17; slice++)
+      {
+       hough1->ReadData(slice,0);
+       hough1->Transform();
+       hough1->AddAllHistogramsRows();
+       hough1->FindTrackCandidatesRow();
+       hough1->AddTracks();
+      }
+    for(Int_t slice=18; slice<=35; slice++)
+      {
+       hough2->ReadData(slice,0);
+       hough2->Transform();
+       hough2->AddAllHistogramsRows();
+       hough2->FindTrackCandidatesRow();
+       hough2->AddTracks();
+      }
+    */
+
+    nglobaltracks += hough1->FillESD(esd);
+    nglobaltracks += hough2->FillESD(esd);
+
+    /* In case we want to debug the ESD
+    gSystem->MakeDirectory("hough1");
+    hough1->WriteTracks("./hough1");
+    gSystem->MakeDirectory("hough2");
+    hough2->WriteTracks("./hough2");
+    */
+
+    delete hough1;
+    delete hough2;
+
+    printf("Filter called for event %d\n", fNumEvents);
+    printf("Filter has found %d TPC tracks in %f seconds\n", nglobaltracks,timer.RealTime());
+  }
 
 #else
 
-   raw.GetSize();
-   printf("Filter called for event %d\n", fNumEvents);
+  printf("Filter called for event %d\n", fNumEvents);
 
 #endif
 
-   return 0;
+  return 0;
 }
 
 //______________________________________________________________________________
index 7ffdafd..2b86730 100644 (file)
 #endif
 
 // Forward class declarations
+class AliRawEvent;
 class AliRawEventHeader;
 class AliRawEquipmentHeader;
 class AliRawData;
-
+#ifdef USE_HLT
+class AliESD;
+#endif
 
 class AliMDC : public TObject {
 
@@ -113,7 +116,11 @@ private:
                                  Bool_t isSwapped, void *eb = 0);
    Int_t     ReadRawData(AliRawData &raw, Int_t size, void *eb = 0);
    Int_t     DumpEvent(Int_t toRead);
-   Int_t     Filter(AliRawData &raw);
+   Int_t     Filter(
+#ifdef USE_HLT
+                   AliRawEvent *event,AliESD *esd
+#endif
+                   );
 
    ClassDef(AliMDC,0)  // MDC processor
 };
index fbe559a..68715e1 100644 (file)
@@ -34,8 +34,16 @@ ClassImp(AliRawCastorDB)
 
 
 //______________________________________________________________________________
-AliRawCastorDB::AliRawCastorDB(AliRawEvent *event, Double_t maxsize, Int_t compress)
-   : AliRawDB(event, maxsize, compress, kFALSE)
+AliRawCastorDB::AliRawCastorDB(AliRawEvent *event,
+#ifdef USE_HLT
+                              AliESD *esd,
+#endif
+                              Double_t maxsize, Int_t compress)
+   : AliRawDB(event,
+#ifdef USE_HLT
+             esd,
+#endif
+             maxsize, compress, kFALSE)
 {
    // Create a new raw DB that will be accessed via CASTOR and rootd.
 
index 2151f8a..8e53e8f 100644 (file)
 class AliRawCastorDB : public AliRawDB {
 
 public:
-   AliRawCastorDB(AliRawEvent *event, Double_t maxsize, Int_t compress);
+   AliRawCastorDB(AliRawEvent *event,
+#ifdef USE_HLT
+                 AliESD *esd,
+#endif
+                 Double_t maxsize, Int_t compress);
    ~AliRawCastorDB() { Close(); }
 
    const char *GetOpenOption() const { return "-RECREATE"; }
index 508cd71..49ff7a9 100644 (file)
 #include "AliRawEventHeader.h"
 #include "AliMDC.h"
 
+#ifdef USE_HLT
+#include "AliESD.h"
+#endif
+
 #include "AliRawDB.h"
 
 
@@ -41,12 +45,17 @@ ClassImp(AliRawDB)
 
 
 //______________________________________________________________________________
-AliRawDB::AliRawDB(AliRawEvent *event, Double_t maxsize, Int_t compress,
+AliRawDB::AliRawDB(AliRawEvent *event,
+#ifdef USE_HLT
+                  AliESD *esd, 
+#endif
+                  Double_t maxsize, Int_t compress,
                    Bool_t create)
 {
    // Create a new raw DB containing at most maxsize bytes.
 
    fEvent    = event;
+   fESD      = esd;
    fMaxSize  = maxsize;
    fCompress = compress;
 
@@ -228,6 +237,16 @@ void AliRawDB::MakeTree()
    //Int_t split   = 1;
    Int_t split   = 0;
    fTree->Branch("rawevent", "AliRawEvent", &fEvent, bufsize, split);
+
+#ifdef USE_HLT
+   // Create tree which will contain the HLT ESD information
+
+   fESDTree = new TTree("esdTree", Form("ALICE MDC%d HLT ESD tree", AliMDC::kMDC));
+   fESDTree->SetAutoSave(2000000000);  // autosave when 2 Gbyte written
+   split   = 99;
+   fESDTree->Branch("ESD", "AliESD", &fESD, bufsize, split);
+#endif
+
 }
 
 //______________________________________________________________________________
@@ -241,6 +260,7 @@ void AliRawDB::Close()
 
    // Write the tree.
    fTree->Write();
+   fESDTree->Write();
 
    // Close DB, this also deletes the fTree
    fRawDB->Close();
index f233b2e..e8c7283 100644 (file)
 class AliRawEvent;
 class TFile;
 
+#ifdef USE_HLT
+class AliESD;
+#endif
 
 class AliRawDB : public TObject {
 
 public:
-   AliRawDB(AliRawEvent *event, Double_t maxsize, Int_t compress,
+   AliRawDB(AliRawEvent *event,
+#ifdef USE_HLT
+           AliESD *esd,
+#endif
+           Double_t maxsize, Int_t compress,
             Bool_t create = kTRUE);
    virtual ~AliRawDB() { Close(); }
 
@@ -41,7 +48,7 @@ public:
    virtual Int_t       GetNetopt() const { return 0; }
    virtual Bool_t      Create();
    virtual void        Close();
-   void                Fill() { fTree->Fill(); }
+   void                Fill() { fTree->Fill(); fESDTree->Fill(); }
    Bool_t              FileFull() { return (fRawDB->GetBytesWritten() > fMaxSize) ?
                                     kTRUE : kFALSE; }
 
@@ -59,6 +66,10 @@ protected:
    TFile         *fRawDB;         // DB to store raw data
    TTree         *fTree;          // tree used to store raw data
    AliRawEvent   *fEvent;         // AliRawEvent via which data is stored
+#ifdef USE_HLT
+   TTree         *fESDTree;       // tree for storing HLT ESD information
+   AliESD        *fESD;           // pointer to HLT ESD object
+#endif
    Int_t          fCompress;      // compression mode (1 default)
    Double_t       fMaxSize;       // maximum size in bytes of the raw DB
 
index c1b0d9b..25c65ef 100644 (file)
@@ -29,8 +29,16 @@ ClassImp(AliRawNullDB)
 
 
 //______________________________________________________________________________
-AliRawNullDB::AliRawNullDB(AliRawEvent *event, Double_t maxsize, Int_t compress)
-   : AliRawDB(event, maxsize, compress, kFALSE)
+AliRawNullDB::AliRawNullDB(AliRawEvent *event,
+#ifdef USE_HLT
+                          AliESD *esd,
+#endif
+                          Double_t maxsize, Int_t compress)
+   : AliRawDB(event,
+#ifdef USE_HLT
+             esd,
+#endif
+             maxsize, compress, kFALSE)
 {
    // Create a new raw DB that will wrtie to /dev/null.
 
index 49461e1..83d4fcb 100644 (file)
 class AliRawNullDB : public AliRawDB {
 
 public:
-   AliRawNullDB(AliRawEvent *event, Double_t maxsize, Int_t compress);
+   AliRawNullDB(AliRawEvent *event,
+#ifdef USE_HLT
+               AliESD *esd,
+#endif
+               Double_t maxsize, Int_t compress);
    ~AliRawNullDB() { Close(); }
 
    void Close();
index 0936f9d..a6b15b0 100644 (file)
@@ -34,8 +34,16 @@ ClassImp(AliRawRFIODB)
 
 
 //______________________________________________________________________________
-AliRawRFIODB::AliRawRFIODB(AliRawEvent *event, Double_t maxsize, Int_t compress)
-   : AliRawDB(event, maxsize, compress, kFALSE)
+AliRawRFIODB::AliRawRFIODB(AliRawEvent *event,
+#ifdef USE_HLT
+                          AliESD *esd,
+#endif
+                          Double_t maxsize, Int_t compress)
+   : AliRawDB(event,
+#ifdef USE_HLT
+             esd,
+#endif
+             maxsize, compress, kFALSE)
 {
    // Create a new raw DB that will be accessed via RFIO.
 
index f85af66..1f6ca3f 100644 (file)
 class AliRawRFIODB : public AliRawDB {
 
 public:
-   AliRawRFIODB(AliRawEvent *event, Double_t maxsize, Int_t compress);
+   AliRawRFIODB(AliRawEvent *event,
+#ifdef USE_HLT
+               AliESD *esd,
+#endif
+               Double_t maxsize, Int_t compress);
    ~AliRawRFIODB() { Close(); }
 
    void Close();
index 7062e28..58af4b9 100644 (file)
@@ -33,8 +33,16 @@ ClassImp(AliRawRootdDB)
 
 
 //______________________________________________________________________________
-AliRawRootdDB::AliRawRootdDB(AliRawEvent *event, Double_t maxsize, Int_t compress)
-   : AliRawDB(event, maxsize, compress, kFALSE)
+AliRawRootdDB::AliRawRootdDB(AliRawEvent *event,
+#ifdef USE_HLT
+                            AliESD *esd,
+#endif
+                            Double_t maxsize, Int_t compress)
+   : AliRawDB(event,
+#ifdef USE_HLT
+             esd,
+#endif
+             maxsize, compress, kFALSE)
 {
    // Create a new raw DB that will be accessed via rootd daemon.
 
index ea8499e..67dea97 100644 (file)
 class AliRawRootdDB : public AliRawDB {
 
 public:
-   AliRawRootdDB(AliRawEvent *event, Double_t maxsize, Int_t compress);
+   AliRawRootdDB(AliRawEvent *event,
+#ifdef USE_HLT
+                AliESD *esd,
+#endif
+                Double_t maxsize, Int_t compress);
    ~AliRawRootdDB() { Close(); }
 
    void Close();
index 9d43db8..826453e 100644 (file)
@@ -59,7 +59,7 @@ $(ALIMDC):      $(MAINO) $(DICT) $(OBJS)
 
 $(DICT):        $(HDRS)
                @echo "Generating dictionary ..."
-               rootcint -f $(DICT) -c $(ROOTH) $(HDRS)
+               rootcint -f $(DICT) -c $(CXXFLAGS) $(ROOTH) $(HDRS)
 
 $(DICTO):       $(DICT)
                $(CXX) $(NOOPT) $(CXXFLAGS) -c $(DICT)
index 60fe3bd..788889e 100644 (file)
@@ -48,14 +48,15 @@ LIBS     += -L$(EBDIR)/Linux -L$(BMDIR)/Linux -L$(DBMDIR)/Linux \
 endif
 
 ifneq ($(findstring hlt,$(MAKECMDGOALS)),)
-CXXFLAGS += -DUSE_HLT -I$(ALITPC)
-LIBS     += -L$(ALITPC) -lSTEER -lTPC
+include ../HLT/hlt.conf
+CXXFLAGS += -DUSE_HLT ${HLTDEFS} -I${ALICE_ROOT}/include -I../HLT/src -I../HLT/hough -I../HLT/comp
+LIBS     += -lEG -lVMC -lGeom -lThread -L../lib/tgt_linuxDEBUG -lSTEER -lRAW -lTPCbase -lTPCsim -lTPCrec -lCONTAINERS -lAliL3Src -lAliL3Misc -lAliL3Hough -lAliL3Comp
 endif
 
 ##### DATE #####
 
 ifdef DATE_ROOT
-DATEFLAGS = -DALI_DATE -D${DATE_SYS} -DDATE_SYS=${DATE_SYS} -Dlong32=${DATE_LONG32} -Dlong64=${DATE_LONG64} -DdatePointer=${DATE_POINTER} -I${DATE_COMMON_DEFS}
+DATEFLAGS = -DALI_DATE -D${DATE_SYS} -DDATE_SYS=${DATE_SYS} -Dlong32=${DATE_LONG32} -Dlong64='${DATE_LONG64}' -DdatePointer=${DATE_POINTER} -I${DATE_COMMON_DEFS}
 CXXFLAGS += $(DATEFLAGS)
 endif
 
@@ -66,4 +67,4 @@ include Make-macros
 
 ##### DEPENDENCIES #####
 
-include Make-depend
+#include Make-depend
index 01436d4..3a51ed9 100644 (file)
@@ -1,3 +1,10 @@
+include HLT/hlt.conf
+
+EDEFINE      := ${HLTDEFS}
+PACKCXXFLAGS := ${HLTCXXFLAGS}
+PACKCFLAGS   := ${HLTCLFAGS}
+PACKDCXXFLAGS:= ${HLTDCXXFLAGS}
+
 SRCS:=  AliRawEventHeader.cxx AliRawEquipmentHeader.cxx \
        AliRawData.cxx AliRawEquipment.cxx AliRawEvent.cxx \
        AliStats.cxx AliRawDB.cxx \
@@ -17,7 +24,9 @@ HDRS:= $(SRCS:.cxx=.h)
 
 EHDRS:=$(ROOTSYS)/include/TH1F.h
 
-EDEFINE:= -DUSE_RDM
+EINCLUDE:=HLT/src HLT/hough HLT/comp
+
+EDEFINE+= -DUSE_RDM -DUSE_HLT
 
 DHDR:= RAWLinkDef.h