1 void UpdateWithRCT(const char *inrun, const char *inrct)
3 TFile *inrunfile = new TFile(inrun);
4 TTree *runtree = (TTree *) inrunfile->Get("T");
5 AliRunTag *runt = new AliRunTag();
6 runtree->SetBranchAddress("AliTAG", &runt);
8 TFile *inrctfile = new TFile(inrct);
9 TTree *rcttree = (TTree *) inrctfile->Get("T");
10 AliRunTag *rctt = new AliRunTag();
11 rcttree->SetBranchAddress("AliTAG", &rctt);
15 cout << "Looking for RCT match for run " << runt->GetRunId() << endl;
17 for (int iter=0; iter<rcttree->GetEntries(); iter++) {
18 rcttree->GetEntry(iter);
19 if (rctt->GetRunId() == runt->GetRunId()) {
20 cout << "Found match in RCT for run " << rctt->GetRunId() << endl;
21 cout << "Updating " << endl;
23 runt->UpdateFromRunTable(rctt);
28 TFile* ftag = TFile::Open("Updated.root", "recreate");
30 TTree * ttag = new TTree("T","A Tree with event tags");
31 TBranch * btag = ttag->Branch("AliTAG", &runt);
34 btag->SetCompressionLevel(9);