/************************************************************************** * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * * * Author: The ALICE Off-line Project. * * Contributors are mentioned in the code where appropriate. * * * * Permission to use, copy, modify and distribute this software and its * * documentation strictly for non-commercial purposes is hereby granted * * without fee, provided that the above copyright notice appears in all * * copies and that both the copyright notice and this permission notice * * appear in the supporting documentation. The authors make no claims * * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ /* $Id: $ */ //__________________________________________ // Class that uses info from the AliJetCorrelSelector object to set up the // two-particle correlations to be run in one instance of the analysis module. //-- Author: Paul Constantin #include "AliJetCorrelMaker.h" using namespace std; ClassImp(AliJetCorrelMaker) AliJetCorrelMaker::AliJetCorrelMaker() : fNumCorrel(0), fNumTrigg(0), fNumAssoc(0), fCorrelType(NULL), fCorrelStr(NULL), fTriggType(NULL), fAssocType(NULL), fIdxTrigg(NULL), fIdxAssoc(NULL){ // (default) constructor } AliJetCorrelMaker::~AliJetCorrelMaker(){ // destructor fNumCorrel = 0; fNumTrigg = 0; fNumAssoc = 0; if(fCorrelType) delete [] fCorrelType; if(fCorrelStr) delete [] fCorrelStr; if(fTriggType) delete [] fTriggType; if(fAssocType) delete [] fAssocType; if(fIdxTrigg) delete [] fIdxTrigg; if(fIdxAssoc) delete [] fIdxAssoc; } Bool_t AliJetCorrelMaker::Init(UInt_t s, UInt_t * const v){ // Main method. Returns false on initialisation error fNumCorrel = s; fCorrelType = new UInt_t[fNumCorrel]; fCorrelStr = new TString[fNumCorrel]; fTriggType = new PartType_t[fNumCorrel]; fAssocType = new PartType_t[fNumCorrel]; for(UInt_t k=0; kfNumCorrel || fNumAssoc>fNumCorrel) return kFALSE; for(UInt_t k=0; k=fNumTrigg) return kFALSE; if(fIdxAssoc[k]>=fNumAssoc) return kFALSE; } return kTRUE; } TString AliJetCorrelMaker::Descriptor(UInt_t k) const { if(k>=fNumCorrel) {std::cerr<<"AliJetCorrelMaker::Descriptor overflow!"<=fNumCorrel) {std::cerr<<"AliJetCorrelMaker::IdxTrigg overflow!"<=fNumCorrel) {std::cerr<<"AliJetCorrelMaker::IdxAssoc overflow!"<=fNumCorrel) {std::cerr<<"AliJetCorrelMaker::TriggType overflow!"<=fNumCorrel) {std::cerr<<"AliJetCorrelMaker::AssocType overflow!"<