]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/ThermalFits/TestReadTable.C
First version of a class to process particle yields file
[u/mrichter/AliRoot.git] / PWGLF / ThermalFits / TestReadTable.C
1 void TestReadTable() {
2
3   gROOT->LoadMacro("AliParticleYield.cxx+");
4   TClonesArray * arr = AliParticleYield::ReadFromASCIIFile("./PbPb_2760.txt");
5   std::cout << "------------------------------ All Part ------------------------------" << std::endl;
6   arr->Print();
7
8   // Get it as tree
9   TTree * tree = AliParticleYield::ReadFromASCIIFileAsTree("./PbPb_2760.txt");
10
11   // examples on how to extract sub arrays;
12   delete arr;
13   arr =AliParticleYield::GetEntriesMatchingSelection(tree, "fCentr == \"V0M0010\" && fStatus == 0");
14   std::cout << "------------------------------ CENTR = 0-10%, Status = 0 ------------------------------" << std::endl;
15   arr->Print();
16   delete arr;
17   arr =AliParticleYield::GetEntriesMatchingSelection(tree, "fCentr == \"V0M0020\" && !IsTypeRatio()");
18   std::cout << "------------------------------ CENTR = 0-20%, no ratios ------------------------------" << std::endl;
19   arr->Print();
20
21
22                                                     
23
24   AliParticleYield::SaveAsASCIIFile(arr,"pippo.txt");
25
26 }