// 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.so");
+
+ 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.fMaxPt >= 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->SetMaxPt(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();