void rec() { AliReconstruction reco; reco.SetWriteESDfriend(); reco.SetWriteAlignmentData(); reco.SetDefaultStorage(Form("local://%s/OCDB", gSystem->pwd())); reco.SetSpecificStorage("GRP/GRP/Data", Form("local://%s",gSystem->pwd())); reco.SetRunPlaneEff(kTRUE); //reco.SetRunQA("ALL:ALL") ; reco.SetQARefDefaultStorage("local://$ALICE_ROOT/QAref") ; for (Int_t det = 0 ; det < AliQA::kNDET ; det++) { reco.SetQACycles((AliQAv1::DETECTORINDEX_t)det, 999) ; reco.SetQAWriteExpert((AliQAv1::DETECTORINDEX_t)det) ; } TStopwatch timer; timer.Start(); reco.Run(); timer.Stop(); timer.Print(); }
void rec() { AliReconstruction reco; reco.SetWriteESDfriend(); reco.SetWriteAlignmentData(); // Use the GRP from the backgr reco.SetDefaultStorage("local://$ALICE_ROOT/OCDB"); reco.SetSpecificStorage("GRP/GRP/Data", Form("local://%s/../backgr",gSystem->pwd())); reco.SetRunPlaneEff(kTRUE); TStopwatch timer; timer.Start(); reco.Run(); timer.Stop(); timer.Print(); }
void rec() { if (!strcmp(gSystem->GetBuildArch(),"win32gcc")) { gSystem->Load("libProof"); gSystem->Load("libGui"); gROOT->Macro("loadlibsrec.C"); new AliRun("gAlice","The ALICE Off-line Simulation Framework"); } AliReconstruction reco; reco.SetWriteESDfriend(); reco.SetWriteAlignmentData(); reco.SetDefaultStorage("local://$ALICE_ROOT/OCDB"); reco.SetSpecificStorage("GRP/GRP/Data", Form("local://%s",gSystem->pwd())); reco.SetRunPlaneEff(kTRUE); TStopwatch timer; timer.Start(); reco.Run(); timer.Stop(); timer.Print(); }
// ---------------------------------------------------------------------------- void HLTT0Test(const Char_t *filename, const Char_t *cdbURI, Int_t minEvent=-1, Int_t maxEvent=-1) { printf (" ============================================= \n\n"); printf (" TEST T0 RECONSTRUCTION \n\n"); printf (" ============================================= \n"); if(!gSystem->AccessPathName("galice.root")){ cerr << "AliReconstruction on raw data requires to delete galice.root, "; cerr << "or run at different place." << endl; cerr << "!!! DO NOT DELETE the galice.root of your simulation, "; cerr << "but create a subfolder !!!!" << endl; return; } TGrid::Connect("alien"); if (gSystem->AccessPathName(filename)) { cerr << "can not find file " << filename << endl; return; } // -- connect to the GRID if we use a file or OCDB from the GRID TString struri=cdbURI; TString strfile=filename; if (struri.BeginsWith("raw://") || strfile.Contains("://") && !strfile.Contains("local://")) { TGrid::Connect("alien"); } // -- Set the CDB storage location AliCDBManager * man = AliCDBManager::Instance(); man->SetDefaultStorage(cdbURI); if (struri.BeginsWith("local://")) { // set specific storage for GRP entry // search in the working directory and one level above, the latter // follows the standard simulation setup like e.g. in test/ppbench if (!gSystem->AccessPathName("GRP/GRP/Data")) { man->SetSpecificStorage("GRP/GRP/Data", "local://$PWD"); } else if (!gSystem->AccessPathName("../GRP/GRP/Data")) { man->SetSpecificStorage("GRP/GRP/Data", "local://$PWD/.."); } else { cerr << "can not find a GRP entry, please run the macro in the folder" << endl; cerr << "of a simulated data sample, or specify a GRID OCDB" << endl; HLTT0Test(); return; } } ////////////////////////////////////////////////////////////////////////////////////// // // Reconstruction settings AliReconstruction rec; if (minEvent>=0 || maxEvent>minEvent) { if (minEvent<0) minEvent=0; if (maxEvent<minEvent) maxEvent=minEvent; rec.SetEventRange(minEvent,maxEvent); } rec.SetRunReconstruction("HLT"); rec.SetLoadAlignFromCDB(kFALSE); rec.SetWriteESDfriend(kFALSE); // due to bug ... // StopOnError needs to be disabled rec.SetStopOnError(kFALSE); rec.SetRunVertexFinder(kFALSE); rec.SetInput(filename); // QA options rec.SetRunQA(":") ; //rec.SetQARefDefaultStorage("local://$ALICE_ROOT/QAref") ; ////////////////////////////////////////////////////////////////////////////////////// // // setup the HLT system AliHLTSystem* pHLT=AliHLTPluginBase::GetInstance(); /* // define a data publisher configuration for T0 raw data AliHLTConfiguration publisher("RAW-Publisher", "AliRawReaderPublisher", "", "-equipmentid 3584 " "-datatype 'DDL_RAW ' 'VZRO' " "-dataspec 0x01" ); // define configuration of the T0Reconstruction component AliHLTConfiguration vzeroReco("T0-Reconstruction", "T0Reconstruction", "RAW-Publisher", "" ); // define configuration of the GlobalEsdConverter component AliHLTConfiguration esdConverter("GLOBAL-ESD-Converter", "GlobalEsdConverter", "T0-Reconstruction", "" ); // define configuration for Root file writer of T0 output AliHLTConfiguration rootWriter("RootWriter", "ROOTFileWriter", "T0-Reconstruction GLOBAL-ESD-Converter", "-directory analysis -datafile vzeroRec" ); */ // set option for the HLT module in AliReconstruction // arguments // - ignore-hltout : ignore the HLTOUT payload from the HLT DDLs // - libraries to be used as plugins // - loglevel=0x7c : Important, Info, Warning, Error, Fatal rec.SetOption("HLT", "ignore-hltout " "libAliHLTUtil.so libAliHLTGlobal.so libAliHLTITS.so libAliHLTT0.so " "loglevel=0x7c " "chains=T0-RECO"//"GLOBAL-ESD-Converter,RootWriter" ); rec.SetRunPlaneEff(kFALSE); // switch off cleanESD rec.SetCleanESD(kFALSE); AliLog::Flush(); rec.Run(); }
void rec() { AliReconstruction reco; // // switch off cleanESD, write ESDfriends and Alignment data reco.SetCleanESD(kFALSE); reco.SetWriteESDfriend(); reco.SetWriteAlignmentData(); // // ITS Efficiency and tracking errors reco.SetRunPlaneEff(kTRUE); reco.SetUseTrackingErrorsForAlignment("ITS"); // // Residual OCDB reco.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-15-Release/Residual/"); // // GRP from local OCDB reco.SetSpecificStorage("GRP/GRP/Data", Form("local://%s",gSystem->pwd())); // // Vertex from RAW OCDB reco.SetSpecificStorage("GRP/Calib/MeanVertexTPC","alien://folder=/alice/data/2010/OCDB"); reco.SetSpecificStorage("GRP/Calib/MeanVertex","alien://folder=/alice/data/2010/OCDB"); reco.SetSpecificStorage("GRP/Calib/MeanVertexSPD", "alien://folder=/alice/data/2010/OCDB"); // // EMCAL from RAW OCDB reco.SetSpecificStorage("EMCAL/Calib/Data","alien://Folder=/alice/data/2010/OCDB"); reco.SetSpecificStorage("EMCAL/Calib/Pedestals","alien://Folder=/alice/data/2010/OCDB"); // // PHOS from RAW OCDB reco.SetSpecificStorage("PHOS/Calib/EmcBadChannels","alien://Folder=/alice/data/2010/OCDB"); // // SPD and SDD from RAW OCDB reco.SetSpecificStorage("ITS/Calib/SPDDead","alien://folder=/alice/data/2010/OCDB"); reco.SetSpecificStorage("TRIGGER/SPD/PITConditions","alien://folder=/alice/data/2010/OCDB"); reco.SetSpecificStorage("ITS/Calib/SPDNoise","alien://folder=/alice/data/2010/OCDB"); reco.SetSpecificStorage("ITS/Calib/CalibSDD","alien://Folder=/alice/data/2010/OCDB"); // // TRD from RAW OCDB reco.SetSpecificStorage("TRD/Calib/ChamberStatus","alien://folder=/alice/data/2010/OCDB"); reco.SetSpecificStorage("TRD/Calib/PadStatus","alien://folder=/alice/data/2010/OCDB"); // // TPC from RAW OCDB reco.SetSpecificStorage("TPC/Calib/PadGainFactor","alien://folder=/alice/data/2010/OCDB"); // // V0 from RAW OCDB reco.SetSpecificStorage("VZERO/Trigger/Data","alien://folder=/alice/data/2010/OCDB"); reco.SetSpecificStorage("VZERO/Calib/RecoParam","alien://folder=/alice/data/2010/OCDB"); reco.SetSpecificStorage("VZERO/Calib/Data","alien://folder=/alice/data/2010/OCDB"); reco.SetSpecificStorage("VZERO/Calib/TimeSlewing","alien://folder=/alice/data/2010/OCDB"); reco.SetSpecificStorage("VZERO/Calib/TimeDelays","alien://folder=/alice/data/2010/OCDB"); // // TOF from RAW OCDB reco.SetSpecificStorage("TOF/Calib/Status","alien://folder=/alice/data/2010/OCDB"); // // FMD from RAW OCDB reco.SetSpecificStorage("FMD/Calib/Pedestal", "alien://folder=/alice/data/2010/OCDB"); reco.SetSpecificStorage("FMD/Calib/PulseGain","alien://folder=/alice/data/2010/OCDB"); reco.SetSpecificStorage("FMD/Calib/Dead", "alien://folder=/alice/data/2010/OCDB"); reco.SetSpecificStorage("FMD/Calib/AltroMap","alien://folder=/alice/data/2010/OCDB"); // TStopwatch timer; timer.Start(); reco.Run(); timer.Stop(); timer.Print(); }
/** * @file sampleRawAnalysis.C * @brief Example macro to run the AliHLTSampleRawAnalysisComponent in * AliReconstruction. * * The component subscribes to DDL raw data published by the * AliHLTRawReaderPublisherComponent. The macros requires a raw data file * and a corresponding GRP entry. * * <pre> * Usage: aliroot -b -q -l \ * sampleRawAnalysis.C'("rawfile", "cdb", minEvent, maxEvent)' * * Examples: * sampleRawAnalysis.C'("raw.root", minEvent, MaxEvent)' * sampleRawAnalysis.C'("./", minEvent, MaxEvent)' * sampleRawAnalysis.C'("alien:///alice/data/2010/.../raw/....root")' * * Defaults * cdb="local://$ALICE_ROOT/OCDB" -> take local OCDB from distribution * minEvent=-1 -> no lower event selection * maxEvent=-1 -> no upper event selection * * </pre> * * The input file can be a local raw.root file but also a file from the * GRID. The separate DDL files generated in simulation can be accessed * using AliRawReaderFile by speficying "directory/". * * Since the macro runs AliReconstruction the OCDB needs to be set up, in * particular the GRP entry. If testing with a local OCDB you have to * simulate some events and run the macro in the folder of the simulation. * Also HLT components configure from objects in the OCDB. * * Note: You need a valid GRID token, if you want to access files directly * from the Grid, use 'alien-token-init' of your alien installation. * * @author [email protected] * @ingroup alihlt_tutorial */ void sampleRawAnalysis(const char *filename, const char *cdbURI, int minEvent=-1, int maxEvent=-1) { if(!gSystem->AccessPathName("galice.root")){ cerr << "AliReconstruction on raw data requires to delete galice.root, or run at different place." << endl; cerr << "!!! DO NOT DELETE the galice.root of your simulation, but create a subfolder !!!!" << endl; return; } if (gSystem->AccessPathName(filename)) { cerr << "can not find file " << filename << endl; return; } // connect to the GRID if we use a file or OCDB from the GRID TString struri=cdbURI; TString strfile=filename; if (struri.BeginsWith("raw://") || strfile.Contains("://") && !strfile.Contains("local://")) { TGrid::Connect("alien"); } // Set the CDB storage location AliCDBManager * man = AliCDBManager::Instance(); man->SetDefaultStorage(cdbURI); if (struri.BeginsWith("local://")) { // set specific storage for GRP entry // search in the working directory and one level above, the latter // follows the standard simulation setup like e.g. in test/ppbench if (!gSystem->AccessPathName("GRP/GRP/Data")) { man->SetSpecificStorage("GRP/GRP/Data", "local://$PWD"); } else if (!gSystem->AccessPathName("../GRP/GRP/Data")) { man->SetSpecificStorage("GRP/GRP/Data", "local://$PWD/.."); } else { cerr << "can not find a GRP entry, please run the macro in the folder" << endl; cerr << "of a simulated data sample, or specify a GRID OCDB" << endl; sampleRawAnalysis(); return; } } ////////////////////////////////////////////////////////////////////////////////////// // // Reconstruction settings AliReconstruction rec; if (minEvent>=0 || maxEvent>minEvent) { if (minEvent<0) minEvent=0; if (maxEvent<minEvent) maxEvent=minEvent; rec.SetEventRange(minEvent,maxEvent); } rec.SetRunReconstruction("HLT"); rec.SetLoadAlignFromCDB(kFALSE); rec.SetWriteESDfriend(kFALSE); // due to bug ... // StopOnError needs to be disabled rec.SetStopOnError(kFALSE); rec.SetRunVertexFinder(kFALSE); rec.SetInput(filename); // QA options rec.SetRunQA(":") ; //rec.SetQARefDefaultStorage("local://$ALICE_ROOT/QAref") ; ////////////////////////////////////////////////////////////////////////////////////// // // setup the HLT system AliHLTSystem* pHLT=AliHLTPluginBase::GetInstance(); // define a data publisher configuration // arguments: // 1) id of the configuartion, later used to refer to this configuration // 2) id of the component to run // 3) parents, no parents for publisher components // 4) optional component arguments // publish link #512, the first link (numbered 0) of SSD AliHLTConfiguration publisher("RAW-Publisher", "AliRawReaderPublisher", "", "-minid 512 " "-datatype 'DDL_RAW ' 'ISSD' " "-dataspec 0x01" ); // define configuration of the SampleRawAnalyis component // arguments: // 1) id of the configuartion, later used to refer to this configuration // 2) id of the component to run // 3) parents, here the publisher configuration defined above // 4) optional component arguments AliHLTConfiguration rawanalysis("RAW-Analysis", "SampleRawAnalysis", "RAW-Publisher", "-mandatory1 test " "-verbose" ); // set option for the HLT module in AliReconstruction // arguments // - ignore-hltout : ignore the HLTOUT payload from the HLT DDLs // - libraries to be used as plugins // - loglevel=0x7c : Important, Info, Warning, Error, Fatal // - chains=RAW-Analysis : chains to be run rec.SetOption("HLT", "ignore-hltout " "libAliHLTUtil.so libAliHLTSample.so " "loglevel=0x7c " "chains=RAW-Analysis " ); rec.SetRunPlaneEff(kFALSE); // switch off cleanESD rec.SetCleanESD(kFALSE); AliLog::Flush(); rec.Run(); }