X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=STEER%2FCreateXML.C;h=e351bee1d795c8a962e627d284b9afb60fb5a85f;hb=8abeb05b3580306617359a3f7b2219783fb2a632;hp=2d8f151967771617ef461c0d84ad841f84750c3a;hpb=17d9550fe00dbe11152f5830cb7af1453819f186;p=u%2Fmrichter%2FAliRoot.git diff --git a/STEER/CreateXML.C b/STEER/CreateXML.C index 2d8f1519677..e351bee1d79 100644 --- a/STEER/CreateXML.C +++ b/STEER/CreateXML.C @@ -13,47 +13,71 @@ // In all cases you create the xml file by using the CreateXMLCollection // of the AliTagAnalysisClass. The first argument of this method is the // name of the output xml collection which is stored locally. +// +// coll_in: xml collection of tag files +// or path to the tag files +// +// coll_out: name of the output xml collection //_________________________________________________________________________ -Bool_t CreateXML() { +Bool_t CreateXML(char * coll_in="pp.xml", char * coll_out="global2") +{ TStopwatch timer; timer.Start(); - //needed in the case of the string statements - gSystem->Load("libTreePlayer"); + + gSystem->Load("libTreePlayer"); //needed in the case of the string statements + gSystem->Load("libANALYSIS"); //needed by libANALYSISalice + gSystem->Load("libANALYSISalice"); //needed AliTagAnalysis // Create A tag analysis object and impose some selection criteria AliTagAnalysis *TagAna = new AliTagAnalysis(); //Case where the tag files are stored locally - //TagAna->ChainLocalTags("."); + //TagAna->ChainLocalTags(coll_in); //Case where the tag files are stored in the file catalog - //pp.xml is the xml collection of tag files that was produced - //by querying the file catalog. - TGrid::Connect("alien://pcapiserv01.cern.ch:10000","pchrist"); + //coll_in (pp.xml) is the xml collection of tag files that was produced + //by querying the file catalog: + // find -x pp /alice/sim/PDC_08/LHC08r/270001/* *tag.root > pp.xml + + TGrid::Connect("alien://pcapiserv01.cern.ch:10000","elopez"); //TGrid::Connect("alien://"); - TAlienCollection* coll = TAlienCollection::Open("pp.xml"); - TGridResult* TagResult = coll->GetGridResult(""); + TAlienCollection* coll = TAlienCollection::Open(coll_in); + TGridResult* TagResult = coll->GetGridResult("",0,0); + cout << endl << "Chain Grid Tags..." << endl; TagAna->ChainGridTags(TagResult); //__________________________// //Usage of string statements// //__________________________// - /*const char* fRunCuts = "fAliceRunId == 340"; - const char* fEventCuts = "(fEventTag.fTopPtMin >= 1.0)&&(fEventTag.fNumberOfTracks >= 11)&&(fEventTag.fNumberOfTracks <= 12)"; - TagAna->CreateXMLCollection("global",fRunCuts,fEventCuts);*/ +/* + const char* runTagCuts = "fAliceRunId==270001"; + const char* lhcTagCuts = "fLHCTag.fLHCState==LHC08r"; + const char* detTagCuts = "fDetectorTag.fTPC==1"; + const char* evTagCuts = "(fEventTag.fTopPtMin >= 1.0)&&(fEventTag.fNumberOfTracks >= 11)&&(fEventTag.fNumberOfTracks <= 12)"; +*/ //________________________________________________// //Usage of AliRunTagCuts & AliEventTagCuts classes// //________________________________________________// // create a RunTagCut object - AliRunTagCuts *RunCuts = new AliRunTagCuts(); - RunCuts->SetRunId(340); + AliRunTagCuts *runTagCuts = new AliRunTagCuts(); + // runTagCuts->SetRunId(270001); + + // create an LHCTagCuts object + AliLHCTagCuts *lhcTagCuts = new AliLHCTagCuts(); + + // create an DetectorTagCuts object + AliDetectorTagCuts *detTagCuts = new AliDetectorTagCuts(); + // create an EventTagCut object - AliEventTagCuts *EvCuts = new AliEventTagCuts(); - EvCuts->SetMultiplicityRange(11,12); - EvCuts->SetTopPtMin(1.0); - TagAna->CreateXMLCollection("global2",RunCuts,EvCuts); + AliEventTagCuts *evTagCuts = new AliEventTagCuts(); + //evTagCuts->SetMultiplicityRange(11,12); + //evTagCuts->SetTopPtMin(1.0); + + // Query the Tags and create the xml collection + cout << endl << "Create XML Collection..." << endl; + TagAna->CreateXMLCollection(coll_out, runTagCuts, lhcTagCuts, detTagCuts, evTagCuts); timer.Stop(); timer.Print();