1 Bool_t CheckAOD(const char* aodFileName = "AliAOD.Muons.root")
4 //AliCDBManager *cdb = AliCDBManager::Instance();
5 //cdb->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
8 TFile* aodFile = TFile::Open(aodFileName);
9 if (!aodFile || !aodFile->IsOpen()) {
10 Error("CheckAOD", "opening AOD file %s failed", aodFileName);
13 AliAODEvent *aod = new AliAODEvent();
14 TTree* tree = (TTree*) aodFile->Get("aodTree");
16 Error("CheckAOD", "no AOD tree found");
19 aod->ReadFromTree(tree);
22 for (Int_t iEvent = 0; iEvent < tree->GetEntries(); iEvent++) {
25 if (tree->GetEvent(iEvent) <= 0) {
26 Error("CheckAOD", "no AOD object found for event %d", iEvent);
37 Info("CheckAOD", "check of AOD was successfull");