if (fAnalysis->GetDebugLevel() > 1) {
cout << "->AliAnalysisSelector::Process()" << endl;
}
- Int_t nobjCount = TProcessID::GetObjectCount();
+ static Bool_t init=kTRUE;
+ static Int_t nobjCount = 0;
+ if(init) {
+ nobjCount = TProcessID::GetObjectCount();
+ init=kFALSE;
+ }
+ TProcessID::SetObjectCount(nobjCount);
Int_t returnCode = fAnalysis->GetEntry(entry);
if (returnCode <= 0) {
cout << "Error retrieving event:" << entry << " Skipping ..." << endl;
fAnalysis->ExecAnalysis();
if (returnCode<100000000) fAnalysis->CountEvent(1,1,0,0);
}
- TProcessID::SetObjectCount(nobjCount);
if (fAnalysis->GetDebugLevel() > 1) {
cout << "<-AliAnalysisSelector::Process()" << endl;
}
AliAODEvent::~AliAODEvent()
{
// destructor
- if(fAODObjects&&!fConnected)
- {
- delete fAODObjects;
- fAODObjects = 0;
- }
-
+ if(!fConnected) delete fAODObjects;
delete fAODFolder;
- fAODFolder = 0;
}
//______________________________________________________________________________
TList* connectedList = (TList*) (tree->GetUserInfo()->FindObject("AODObjectsConnectedToTree"));
if (connectedList && (strcmp(opt, "reconnect"))) {
// If connected use the connected list of objects
- fAODObjects->Delete();
+ delete fAODObjects;
fAODObjects = connectedList;
GetStdContent();
fConnected = kTRUE;
// create a new TList from the UserInfo TList...
// copy constructor does not work...
- fAODObjects = (TList*)(aodEvent->GetList()->Clone());
+ // fAODObjects = (TList*)(aodEvent->GetList()->Clone());
+ fAODObjects = (TList*)aodEvent->GetList();
fAODObjects->SetOwner(kTRUE);
if(fAODObjects->GetEntries()<kAODListN)
{
printf("No UserInfo on tree \n");
} else {
- TList* objL = (TList*)(aodEvent->GetList()->Clone());
+ // TList* objL = (TList*)(aodEvent->GetList()->Clone());
+ TList* objL = (TList*)aodEvent->GetList();
printf("Get list of object from tree %d !!\n", objL->GetEntries());
TIter nextobject(objL);
TObject* obj = 0;