本文整理汇总了C++中AliReconstruction::SetEventRange方法的典型用法代码示例。如果您正苦于以下问题:C++ AliReconstruction::SetEventRange方法的具体用法?C++ AliReconstruction::SetEventRange怎么用?C++ AliReconstruction::SetEventRange使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AliReconstruction
的用法示例。
在下文中一共展示了AliReconstruction::SetEventRange方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: HLTT0Test
// ----------------------------------------------------------------------------
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",
""
//.........这里部分代码省略.........
示例2: trackhisto
//.........这里部分代码省略.........
for(int part=iMinPart; part<=iMaxPart; part++){
TString arg, publisher, cf;
// raw data publisher components
int ddlno=768;
if (part>1) ddlno+=72+4*slice+(part-2);
else ddlno+=2*slice+part;
arg.Form("-minid %d -datatype 'DDL_RAW ' 'TPC ' -dataspec 0x%02x%02x%02x%02x -verbose", ddlno, slice, slice, part, part);
publisher.Form("DP_%02d_%d", slice, part);
AliHLTConfiguration pubconf(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data());
// cluster finder components
cf.Form("CF_%02d_%d", slice, part);
AliHLTConfiguration cfconf(cf.Data(), "TPCClusterFinder32Bit", publisher.Data(), "");
if (trackerInput.Length()>0) trackerInput+=" ";
trackerInput+=cf;
}
TString tracker, converted_tracklet;
// tracker components
tracker.Form("TR_%02d", slice);
converted_tracklet.Form("CONVTR_%02d", slice);
AliHLTConfiguration trackerconf(tracker.Data(), "TPCCATracker", trackerInput.Data(), "");
AliHLTConfiguration convertedconf(converted_tracklet.Data(), "TPCCATrackerOutputConverter", tracker.Data(), "");
if (tracklets.Length()>0) tracklets+=" ";
tracklets+=converted_tracklet;
}
TString histoInput;
if(bTracklets==kTRUE){
if(histoInput.Length()>0)
histoInput+=" ";
histoInput+=tracklets;
AliHLTConfiguration tracklethiconf("tracklethi", "TPCTrackHisto", histoInput.Data(), "");
AliHLTConfiguration trackletrwfconf("trackletrfw", "ROOTFileWriter", "tracklethi", "-datafile TrackletHisto -concatenate-events -overwrite");
}
else {
if(histoInput.Length()>0)
histoInput+=" ";
histoInput+="TPC-clusters";
histoInput+=" ";
histoInput+="TPC-globalmerger";
AliHLTConfiguration trhiconf("trhi", "TPCTrackHisto", histoInput.Data(), "");
AliHLTConfiguration rwfconf("rfw", "ROOTFileWriter", "trhi", "-datafile TrackHisto -concatenate-events -overwrite");
}
AliReconstruction rec;
rec.SetRunQA(":");
rec.SetInput(filename);
// 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");
}
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/..");
}
}
if(minEvent>=0 || maxEvent>minEvent){
if(minEvent<0) minEvent=0;
if(maxEvent<minEvent) maxEvent=minEvent;
rec.SetEventRange(minEvent,maxEvent);
}
rec.SetRunVertexFinder(kFALSE);
rec.SetRunReconstruction("HLT");
if(bTracklets==kTRUE){
rec.SetOption("HLT", "loglevel=0x7c chains=trackletrfw");
}
else {
rec.SetOption("HLT", "loglevel=0x7c chains=rfw");
}
rec.Run();
}
示例3: recCPass0
//.........这里部分代码省略.........
//
// Load some system libs for Grid and monitoring
// Set the CDB storage location
AliCDBManager * man = AliCDBManager::Instance();
man->SetDefaultStorage(ocdb);
// Reconstruction settings
AliReconstruction rec;
//
// do we extract the TPC recpoints in advance
Int_t preclustTPC = TString(gSystem->Getenv("preclusterizeTPC")).Atoi();
Bool_t noTPCLocalRec = preclustTPC==1;
if (noTPCLocalRec) printf("preclustTPC = %d: TPC local reconstruction assumed to be already done\n", preclustTPC);
else printf("preclustTPC = %d: TPC local reconstruction assumed to NOT be already done\n", preclustTPC);
//
if (gSystem->Getenv("disableOuter")!=NULL){
TString disOuter = gSystem->Getenv("disableOuter");
TString disOuterLoc = disOuter;
if (noTPCLocalRec) {
disOuterLoc.ReplaceAll("TPC","");
disOuterLoc.ReplaceAll("HLT","");
}
rec.SetRunReconstruction(disOuter.Data());
rec.SetRunLocalReconstruction(disOuterLoc.Data());
}
else if (noTPCLocalRec) {
rec.SetRunReconstruction("ALL -HLT");
rec.SetRunLocalReconstruction("ALL -TPC -HLT");
}
else {
rec.SetRunLocalReconstruction("ALL");
}
// Upload CDB entries from the snapshot (local root file) if snapshot exist
if (gSystem->AccessPathName("OCDB.root", kFileExists)==0) {
rec.SetDefaultStorage("local://");
rec.SetCDBSnapshotMode("OCDB.root");
}
else {
// setup ocdb by custom (if any) or default settings
if (gSystem->AccessPathName("localOCDBaccessConfig.C", kFileExists)==0) {
gROOT->LoadMacro("localOCDBaccessConfig.C");
localOCDBaccessConfig();
}else { // default settings
AliCDBManager* man = AliCDBManager::Instance();
man->SetRaw(kTRUE);
}
TString cdbMode = gSystem->Getenv("OCDB_SNAPSHOT_CREATE");
if (cdbMode == "kTRUE") {
gROOT->LoadMacro("$ALIDPG_ROOT/MC/CreateSnapshot.C");
CreateSnapshot("OCDB.root",filename);
return;
}
}
// All friends
rec.SetFractionFriends(2.0);
// AliReconstruction settings - hardwired MB trigger for calibration
TString newfilename = filename;
newfilename += options;
rec.SetInput(newfilename.Data());
// Set protection against too many events in a chunk (should not happen)
if (nevents>0) rec.SetEventRange(0,nevents);
// Remove recpoints after each event
TString delRecPoints="TPC TRD ITS";
if (noTPCLocalRec) delRecPoints.ReplaceAll("TPC","");
rec.SetDeleteRecPoints(delRecPoints.Data());
//
// Switch off the V0 finder - saves time!
// rec.SetRunMultFinder(kFALSE);
rec.SetRunV0Finder(kFALSE);
//
// QA options - all QA is off
//
rec.SetRunQA(":");
rec.SetRunGlobalQA(kFALSE);
// AliReconstruction settings
rec.SetWriteESDfriend(kTRUE);
rec.SetWriteAlignmentData();
rec.SetUseTrackingErrorsForAlignment("ITS");
rec.SetCleanESD(kFALSE);
// ITS options (see ALIROOT-7179)
float itsErrY2[6]={0., 0., 0.1*0.1, 0.1*.1, 0.,0.};
TVectorF *vecITSErrY2 = new TVectorF(6, itsErrY2);
AliITSReconstructor::SetExtraErrorY2(vecITSErrY2);
//Ignore SetStopOnError
rec.SetStopOnError(kFALSE);
AliLog::Flush();
rec.Run();
}
示例4: sampleRawAnalysis
/**
* @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);
//.........这里部分代码省略.........
示例5: main_recCPass1_OuterDet
void main_recCPass1_OuterDet(const char *filename="raw.root",Int_t nevents=-1, const char *ocdb="raw://", Bool_t useFullITS=kFALSE)
{
// Load some system libs for Grid and monitoring
// Set the CDB storage location
AliCDBManager * man = AliCDBManager::Instance();
man->SetDefaultStorage(ocdb);
// Reconstruction settings
AliReconstruction rec;
// Upload CDB entries from the snapshot (local root file) if snapshot exist
if (gSystem->AccessPathName("OCDB.root", kFileExists)==0) {
man->SetDefaultStorage("local://");
man->SetRaw(kFALSE);
man->SetSnapshotMode("OCDB.root");
}
if (gSystem->AccessPathName("localOCDBaccessConfig.C", kFileExists)==0) {
gInterpreter->ProcessLine("localOCDBaccessConfig();");
}
if(!useFullITS){
// only SPD-trackletting will be done
printf("Special ITS configuration: only SPD-trackletting will be done\n");
rec.SetRecoParam("ITS",GetSpecialITSRecoParam());
}
// All friends
rec.SetFractionFriends(1.0);
// AliReconstruction settings - hardwired MB trigger for calibration
TString newfilename = filename;
newfilename += "?Trigger=kCalibOuter";
rec.SetInput(newfilename.Data());
// Set protection against too many events in a chunk (should not happen)
if (nevents>0) rec.SetEventRange(0,nevents);
// Remove recpoints after each event
rec.SetDeleteRecPoints("ITS MUON EMCAL PHOS VZERO T0");
// Switch off the V0 finder - saves time!
rec.SetRunV0Finder(kFALSE);
//
// QA options - all QA is off
//
rec.SetRunQA(":");
rec.SetRunGlobalQA(kFALSE);
// AliReconstruction settings
rec.SetWriteESDfriend(kFALSE);
if(!useFullITS) rec.SetWriteAlignmentData(kFALSE);
else rec.SetWriteAlignmentData();
rec.SetUseTrackingErrorsForAlignment("ITS");
rec.SetRunReconstruction("ITS MUON EMCAL PHOS VZERO T0");
rec.SetFillESD("ITS MUON EMCAL PHOS VZERO T0");
rec.SetCleanESD(kFALSE);
// Specific reco params for ZDC (why isn't this automatic?)
// rec.SetRecoParam("ZDC",AliZDCRecoParamPbPb::GetHighFluxParam(2760));
//Ignore SetStopOnError
rec.SetStopOnError(kFALSE);
AliLog::Flush();
rec.Run();
}