running local for SP and LYZEP and new histograms for QC
[u/mrichter/AliRoot.git] / TRD / TRDPEDESTALda.cxx
index 30aab9a..b1ac64e 100644 (file)
@@ -8,7 +8,7 @@ DA Type: LDC
 Number of events needed: 100
 Input Files: TRD raw files
 Output Files: trdCalibration.root
-Trigger types used:
+Trigger types used: PHYSICS_EVENT
 
 */
 
@@ -36,7 +36,7 @@ extern "C" {
 //
 #include "AliRawReader.h"
 #include "AliRawReaderDate.h"
-#include "AliTRDrawStreamTB.h"
+#include "AliTRDrawStream.h"
 #include "AliTRDrawStreamBase.h"
 #include "AliCDBManager.h"
 //
@@ -93,17 +93,17 @@ int main(int argc, char **argv) {
   Bool_t passpadstatus = kTRUE;
 
   // setting
-  // AliTRDrawStreamTB::SetNoDebug();
-  AliTRDrawStreamTB::SetNoErrorWarning();
-  //AliTRDrawStreamTB::SetForceCleanDataOnly();
-  AliTRDrawStreamTB::AllowCorruptedData();
-  AliTRDrawStreamTB::DisableStackNumberChecker();
-  AliTRDrawStreamTB::DisableStackLinkNumberChecker();
-  //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);
 
   /* read the data files */
   int n;
@@ -120,6 +120,7 @@ int main(int argc, char **argv) {
     /* read the file  until EOF */
     for(;;) {
       struct eventHeaderStruct *event;
+      eventTypeType eventT;
       
       /* get next event */
       status=monitorGetEventDynamic((void **)&event);
@@ -137,11 +138,14 @@ int main(int argc, char **argv) {
         break;
       }
 
-      if(passpadstatus){
+      /* use event - here, just write event id to result file */
+      eventT=event->eventType;
+
+      if((eventT==PHYSICS_EVENT) && (passpadstatus)){
 
        AliRawReader *rawReader = new AliRawReaderDate((void*)event);
        rawReader->Select("TRD");
-       AliTRDrawStreamTB *trdRawStream = new AliTRDrawStreamTB((AliRawReader *)rawReader);
+       AliTRDrawStream *trdRawStream = new AliTRDrawStream((AliRawReader *)rawReader);
        Int_t result = calipad.ProcessEvent((AliTRDrawStreamBase *)trdRawStream,0);
        // 0 error, 1 no input, 2 output
        if(result == 2) nevents++;