}
}
+AliRecoParam::AliRecoParam(const AliRecoParam& par) :
+ TObject(),
+ fEventSpecie(par.fEventSpecie)
+{
+ // copy constructor
+ for(Int_t iDet = 0; iDet < kNDetectors; iDet++) {
+ if (par.fDetRecoParams[iDet])
+ fDetRecoParams[iDet] = (TObjArray*)(par.fDetRecoParams[iDet]->Clone());
+ else
+ fDetRecoParams[iDet] = NULL;
+ }
+ for(Int_t iSpecie = 0; iSpecie < kNSpecies; iSpecie++) {
+ for(Int_t iDet = 0; iDet < kNDetectors; iDet++) {
+ fDetRecoParamsIndex[iSpecie][iDet] = par.fDetRecoParamsIndex[iSpecie][iDet];
+ }
+ }
+}
+
+//_____________________________________________________________________________
+AliRecoParam& AliRecoParam::operator = (const AliRecoParam& par)
+{
+ // assignment operator
+
+ if(&par == this) return *this;
+
+ this->~AliRecoParam();
+ new(this) AliRecoParam(par);
+ return *this;
+}
+
AliRecoParam::~AliRecoParam(){
// Destructor
// ...
//
for(Int_t iDet = 0; iDet < kNDetectors; iDet++) {
if (fDetRecoParams[iDet]){
- printf("AliDetectorRecoParam objects for detector %d\n",iDet);
+ printf("AliDetectorRecoParam objects for detector %d:\n",iDet);
Int_t nparam = fDetRecoParams[iDet]->GetEntriesFast();
for (Int_t iparam=0; iparam<nparam; iparam++){
AliDetectorRecoParam * param = (AliDetectorRecoParam *)fDetRecoParams[iDet]->At(iparam);
{
// Return AliDetectorRecoParam object for a given detector
// according to the event specie provided as an argument
+ if ( iDet >= kNDetectors) return NULL;
if (!fDetRecoParams[iDet]) return NULL;
if (fDetRecoParams[iDet]->GetEntries() == 0) return NULL;
AliDetectorRecoParam *par = (AliDetectorRecoParam*)parArray->At(i);
if (!par) continue;
if (par->IsDefault()) defaultFound = kTRUE;
- }
+
+ Int_t specie = par->GetEventSpecie();
+ for(Int_t iBit = 0; iBit < kNSpecies; iBit++) {
+ if (specie & (1 << iBit)) {
+ fDetRecoParamsIndex[iBit][iDet] = i;
+ }
+ }
+ }
fDetRecoParams[iDet] = parArray;