From 462112b232a6c7f945fca9fb7a607880aecf4b0a Mon Sep 17 00:00:00 2001 From: cvetan Date: Thu, 13 Mar 2008 08:54:03 +0000 Subject: [PATCH] Fix from v4-11-Release: 1. Possibility to run over a local raw-data chunk (just provide the thrird argument and the first two are ignored). 2. Remove local ITS CDB entries, xrootd now is working and there is no need in this patch. 3. Add a TRD option to select the correct raw-stream class --- test/cosmic/rec.C | 78 +++++++++++++++++++++++++++-------------------- 1 file changed, 45 insertions(+), 33 deletions(-) diff --git a/test/cosmic/rec.C b/test/cosmic/rec.C index d426b872d85..af1d2bc1289 100644 --- a/test/cosmic/rec.C +++ b/test/cosmic/rec.C @@ -2,44 +2,53 @@ void rec(Int_t runNumber = 0, const char* year = "08", const char *localFileName { // Offline shifter reconstruction macro - cout << "Going to run the reconstruction for run: " << runNumber << endl; + TString filename; - // connect to the grid - TGrid * grid = 0x0 ; - grid = TGrid::Connect("alien://") ; + if (!localFileName) { + + cout << "Going to run the reconstruction for run: " << runNumber << endl; + + // connect to the grid + TGrid * grid = 0x0 ; + grid = TGrid::Connect("alien://") ; - // make the file name pattern year and run number - TString pattern; - pattern.Form("%9d",runNumber); - pattern.ReplaceAll(" ", "0") ; - pattern.Prepend(year); - pattern.Append("*0.root"); + // make the file name pattern year and run number + TString pattern; + pattern.Form("%9d",runNumber); + pattern.ReplaceAll(" ", "0") ; + pattern.Prepend(year); + pattern.Append("*0.root"); - // find the files associated to this run - // get the list of files from AliEn directly - TString baseDir; - baseDir.Form("/alice/data/20%s/",year); + // find the files associated to this run + // get the list of files from AliEn directly + TString baseDir; + baseDir.Form("/alice/data/20%s/",year); - cout << "Looking for raw-data files with pattern " << pattern << " in folder " << baseDir << endl; + cout << "Looking for raw-data files with pattern " << pattern << " in folder " << baseDir << endl; - TGridResult *result = grid->Query(baseDir, pattern); + TGridResult *result = grid->Query(baseDir, pattern); - TList *fileList = result->GetFileInfoList(); + TList *fileList = result->GetFileInfoList(); - cout << fileList->GetEntries() << " raw-data files found" << endl; - if ( fileList->GetEntries() == 0) { - cout << "Exiting..." << endl; - return; - } + cout << fileList->GetEntries() << " raw-data files found" << endl; + if ( fileList->GetEntries() == 0) { + cout << "Exiting..." << endl; + return; + } - // Take the first (or last?) file... - TFileInfo *fi = (TFileInfo *)fileList->At(0); - // TFileInfo *fi = (TFileInfo *)fileList->At(fileList->GetEntries()-1); + // Take the first (or last?) file... + TFileInfo *fi = (TFileInfo *)fileList->At(0); + // TFileInfo *fi = (TFileInfo *)fileList->At(fileList->GetEntries()-1); - cout << "Getting the file:" << fi->GetCurrentUrl()->GetUrl() << endl; - fi->Dump(); + cout << "Getting the file:" << fi->GetCurrentUrl()->GetUrl() << endl; + fi->Dump(); - TString filename(fi->GetCurrentUrl()->GetUrl()); + filename = fi->GetCurrentUrl()->GetUrl(); + } + else { + // In case of local raw-data file... + filename = localFileName; + } AliLog::Flush(); @@ -54,12 +63,12 @@ void rec(Int_t runNumber = 0, const char* year = "08", const char *localFileName // man->SetDefaultStorage("local://LocalCDB"); man->SetDefaultStorage("alien://folder=/alice/data/2008/LHC08a/OCDB/"); - // Files that we can not read from alien... - man->SetSpecificStorage("ITS/Calib/MapsAnodeSDD","local://$ALICE_ROOT"); - man->SetSpecificStorage("ITS/Calib/MapsTimeSDD","local://$ALICE_ROOT"); - man->SetSpecificStorage("TPC/Calib/ExB","local://$ALICE_ROOT"); + // Files that we can not read from alien...solved + // man->SetSpecificStorage("ITS/Calib/MapsAnodeSDD","local://$ALICE_ROOT"); + // man->SetSpecificStorage("ITS/Calib/MapsTimeSDD","local://$ALICE_ROOT"); + // man->SetSpecificStorage("TPC/Calib/ExB","local://$ALICE_ROOT"); - // Objects not found if using LHC07w database + // Objects not found if using LHC07w database...solved // man->SetSpecificStorage("ITS/Calib/MapsAnodeSDD","local:///afs/cern.ch/user/c/cheshkov/public/OCDB"); // man->SetSpecificStorage("GRP/GRP/Data","local://$ALICE_ROOT"); // man->SetSpecificStorage("ITS/Calib/DDLMapSDD","local://$ALICE_ROOT"); @@ -88,6 +97,9 @@ void rec(Int_t runNumber = 0, const char* year = "08", const char *localFileName AliTPCReconstructor::SetRecoParam(tpcRecoParam); AliTPCReconstructor::SetStreamLevel(1); + // TRD setting + AliTRDrawStreamBase::SetRawStreamVersion("TB"); + // PHOS settings AliPHOSRecoParam* recEmc = new AliPHOSRecoParamEmc(); recEmc->SetSubtractPedestals(kTRUE); -- 2.43.5