- emcal_data->SetESD(esd);
- // RunLoader information
-// emcal_data->LoadHits(ht); // Does not work with my aliroot version ?
-// emcal_data->LoadDigits(dt);
-// emcal_data->LoadRecPoints(rt);
-
- // To be uncommented if use of emcalLoader
- rl->GetEvent(evtNum);
- emcal_data->LoadHitsFromEMCALLoader(emcl);
-// emcal_data->LoadDigitsFromEMCALLoader(emcl);
-// emcal_data->LoadRecPointsFromEMCALLoader(emcl);
-
- // To be uncommented to read esds
- emcal_data->LoadDigitsFromESD();
- emcal_data->LoadRecPointsFromESD();
+ if(iESD) emcal_data->SetESD(esd);
+
+ // Get information from RunLoader
+ if(iLoader)
+ {
+ if(iHits) emcal_data->LoadHits(ht); // Does not work with my aliroot version
+ if(iDigits) emcal_data->LoadDigits(dt);
+ if(iClusters) emcal_data->LoadRecPoints(rt);
+
+ rl->GetEvent(evtNum);
+
+ if(iHits) emcal_data->LoadHitsFromEMCALLoader(emcl);
+ if(iDigits) emcal_data->LoadDigitsFromEMCALLoader(emcl);
+ if(iClusters) emcal_data->LoadRecPointsFromEMCALLoader(emcl);
+ }
+
+ // Get information from ESDs
+ if(iESD)
+ {
+ rl->GetEvent(evtNum);
+ if(iDigits) emcal_data->LoadDigitsFromESD();
+ if(iClusters) emcal_data->LoadRecPointsFromESD();
+ }