]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/TRDVDRIFTda.cxx
Fixed usage of esdVtx for v0s
[u/mrichter/AliRoot.git] / TRD / TRDVDRIFTda.cxx
index b55fc3eb6978cfd593a09c81acb2b13fe4e14e4c..18a8db0f9e09587ab85180676b15d7eceb083e38 100644 (file)
@@ -12,7 +12,8 @@ Trigger types used: PHYSICS_EVENT
 
 */
 
-#define RESULT_FILE "trdCalibrationv.root"
+#define RESULT_FILE  "trdVdrift.root"
+#define FILE_ID "VDRIFT"
 
 
 extern "C" {
@@ -41,7 +42,8 @@ extern "C" {
 //
 #include "AliRawReader.h"
 #include "AliRawReaderDate.h"
-#include "AliTRDrawStreamTB.h"
+#include "AliTRDrawStream.h"
+#include "AliTRDrawStreamBase.h"
 
 
 //
@@ -112,15 +114,17 @@ int main(int argc, char **argv) {
   Int_t  nbvdrift    = 0;     // number of events with entries for vdrift
 
    // setting
-  // AliTRDrawStreamTB::SetNoDebug();
-  AliTRDrawStreamTB::SetNoErrorWarning();
-  AliTRDrawStreamTB::SetForceCleanDataOnly();
-  AliTRDrawStreamTB::AllowCorruptedData();
-  //AliTRDrawStreamTB::SetSkipCDH();
-  //AliTRDrawStreamTB::SetExtraWordsFix();
-  //AliTRDrawStreamTB::EnableDebugStream();
-  //AliTRDrawStreamTB::SetDumpHead(320);
-  //AliTRDrawStreamTB::SetDumpHead(80);
+  // AliTRDrawStream::SetNoDebug();
+  AliTRDrawStream::SetNoErrorWarning();
+  //AliTRDrawStream::SetForceCleanDataOnly();
+  AliTRDrawStream::AllowCorruptedData();
+  AliTRDrawStream::DisableStackNumberChecker();
+  AliTRDrawStream::DisableStackLinkNumberChecker();
+  //AliTRDrawStream::SetSkipCDH();
+  //AliTRDrawStream::SetExtraWordsFix();
+  //AliTRDrawStream::EnableDebugStream();
+  //AliTRDrawStream::SetDumpHead(320);
+  //AliTRDrawStream::SetDumpHead(80);
 
   
   /* main loop (infinite) */
@@ -161,14 +165,15 @@ int main(int argc, char **argv) {
     if ((eventT==PHYSICS_EVENT) && (passvdrift)) {
       //if (eventT==PHYSICS_EVENT) {
       AliRawReader *rawReader = new AliRawReaderDate((void*)event);
-      AliTRDrawStreamTB *trdRawStream = new AliTRDrawStreamTB((AliRawReader *) rawReader);
-      Int_t result = calibra->ProcessEventDAQ(trdRawStream,(Bool_t)nevents_physics);
+      rawReader->Select("TRD");
+      AliTRDrawStream *trdRawStream = new AliTRDrawStream((AliRawReader *) rawReader);
+      Int_t result = calibra->ProcessEventDAQ((AliTRDrawStreamBase *) trdRawStream,(Bool_t)nbvdrift);
       if(!result) passvdrift = kFALSE;
       else nbvdrift += (Int_t) result/2;
              
-      
       delete trdRawStream;
       delete rawReader;
+    
     } 
    
     if(eventT==PHYSICS_EVENT){
@@ -209,7 +214,7 @@ int main(int argc, char **argv) {
   fileTRD->Close();
   status=0;
   // Export the file in any case to see if problems
-  if(daqDA_FES_storeFile(RESULT_FILE,RESULT_FILE)) status = -2;
+  if(daqDA_FES_storeFile(RESULT_FILE,FILE_ID)) status = -2;
   
   delete fileTRD;