X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=TRD%2FTRDVDRIFTda.cxx;h=18a8db0f9e09587ab85180676b15d7eceb083e38;hb=70186db5c04ab633d4a09a96cdec1ee6a524f551;hp=b121c9f6c989761ebae5a89a5ffc0fab729571d5;hpb=162a3e73367bd8ff7a75b99280f294e684c763e8;p=u%2Fmrichter%2FAliRoot.git diff --git a/TRD/TRDVDRIFTda.cxx b/TRD/TRDVDRIFTda.cxx index b121c9f6c98..18a8db0f9e0 100644 --- a/TRD/TRDVDRIFTda.cxx +++ b/TRD/TRDVDRIFTda.cxx @@ -1,17 +1,19 @@ /* Contact: r.bailhache@gsi.de -Link: http://www-linux.gsi.de/~bailhach/VDRIFT/raw.root.date -Run Type: nothing special in ECS, physics run +Link: +Reference run: 25909 +Run Type: PHYSICS STANDALONE DA Type: MON -Number of events needed: as many as possible -Input Files: no config files, no previous result files, RAW DATA file with all the TRD ([DDL = 1024 to DDL = 1041]) -Output Files: trdCalibrationv.root, trdCalibrationv.root, no persitent file over runs -Trigger types used: PHYSICS +Number of events needed: many +Input Files: TRD raw files +Output Files: trdCalibrationv.root +Trigger types used: PHYSICS_EVENT */ -#define RESULT_FILE "trdCalibrationv.root" +#define RESULT_FILE "trdVdrift.root" +#define FILE_ID "VDRIFT" extern "C" { @@ -30,17 +32,19 @@ extern "C" { #include #include #include -#include #include #include #include +#include "TROOT.h" +#include "TPluginManager.h" // //AliRoot includes // #include "AliRawReader.h" #include "AliRawReaderDate.h" -#include "AliTRDrawStreamTB.h" -#include "AliCDBManager.h" +#include "AliTRDrawStream.h" +#include "AliTRDrawStreamBase.h" + // // TRD calibration algorithm includes @@ -56,6 +60,12 @@ extern "C" { */ int main(int argc, char **argv) { + /* magic line from Rene */ + gROOT->GetPluginManager()->AddHandler("TVirtualStreamerInfo", + "*", + "TStreamerInfo", + "RIO", + "TStreamerInfo()"); int status; if (argc!=2) { @@ -94,9 +104,9 @@ int main(int argc, char **argv) { int nevents_total=0; //Instance of AliCDBManager: needed by AliTRDRawStreamV2 - AliCDBManager *man = AliCDBManager::Instance(); - man->SetDefaultStorage("local://$ALICE_ROOT"); - man->SetRun(0); + //AliCDBManager *man = AliCDBManager::Instance(); + //man->SetDefaultStorage("local://$ALICE_ROOT"); + //man->SetRun(0); //Instance of AliTRDCalibraFillHisto AliTRDCalibraFillHisto *calibra = AliTRDCalibraFillHisto::Instance(); // everythings are okey for vdrift @@ -104,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) */ @@ -141,7 +153,7 @@ int main(int argc, char **argv) { continue; } - if( ((Int_t)nevents_total)%100 == 0 ) printf(" event number %d (physic event number %d) will be processed\n",(Int_t) nevents_total,(Int_t) nevents_physics); + if( ((Int_t)nevents_total)%1000 == 0 ) printf(" event number %d (physic event number %d) will be processed\n",(Int_t) nevents_total,(Int_t) nevents_physics); /* use event - here, just write event id to result file */ @@ -153,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){ @@ -201,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;