Number of events needed: 100
Input Files: TRD raw files
Output Files: trdCalibration.root
-Trigger types used:
+Trigger types used: PHYSICS_EVENT
*/
//
#include "AliRawReader.h"
#include "AliRawReaderDate.h"
-#include "AliTRDrawStreamTB.h"
+#include "AliTRDrawStream.h"
#include "AliTRDrawStreamBase.h"
#include "AliCDBManager.h"
//
/* init some counters */
- int nevents_total=0;
+ int neventstotal=0;
int nevents =0;
//Instance of AliCDBManager: needed by AliTRDRawStream
//AliCDBManager *man = AliCDBManager::Instance();
- //man->SetDefaultStorage("local://$ALICE_ROOT");
+ //man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
//man->SetRun(0);
// AliTRDCalibPadStatus object
AliTRDCalibPadStatus calipad = AliTRDCalibPadStatus();
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::DisableSkipData();
+ AliTRDrawStream::SetNoErrorWarning();
+ //AliTRDrawStream::SetSubtractBaseline(0);
+ //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;
/* read the file until EOF */
for(;;) {
struct eventHeaderStruct *event;
+ eventTypeType eventT;
/* get next event */
status=monitorGetEventDynamic((void **)&event);
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++;
}
- nevents_total++;
+ neventstotal++;
/* free resources */
free(event);
/* report progress */
- printf("%d events processed and %d used\n",nevents_total,nevents);
+ printf("%d events processed and %d used\n",neventstotal,nevents);
/* write file in any case to see what happens in case of problems*/
TFile *fileTRD = new TFile(RESULT_FILE,"recreate");
return status;
}
+