// ctor
InitParameters() ;
+ fDefaultInit = kTRUE ;
}
fSplitFile= 0 ;
InitParameters() ;
Init() ;
+ fDefaultInit = kFALSE ;
}
AliEMCALDigitizer::~AliEMCALDigitizer()
{
// dtor
- // gime=0 if Digitizer created by default ctor (to get just the parameters)
-
- AliEMCALGetter * gime = AliEMCALGetter::GetInstance() ;
-
- if (gime) {
+ // fDefaultInit = kTRUE if Digitizer created by default ctor (to get just the parameters)
+
+ if (!fDefaultInit) {
+ AliEMCALGetter * gime = AliEMCALGetter::GetInstance() ;
+
// remove the task from the folder list
gime->RemoveTask("S",GetName()) ;
gime->RemoveTask("D",GetName()) ;
private:
+ Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized)
+ // !!! the following is not necessary, it is in the folder !!!!!!!
AliEMCALSDigitizer * fSDigitizer ; // ! SDigitizer to extract some sdigitizing parameters
Int_t fNinputs ; // Number of input files
Bool_t fInitialized ; //
{
TTask * sd = dynamic_cast<TTask*>(fTasksFolder->FindObject("Digitizer")) ;
if ( !sd ) {
- cerr << "ERROR: AliEMCALGetter::Post DerRef -> Task //" << fTasksFolder << "/Digitizer not found!" << endl;
+ cerr << "ERROR: AliEMCALGetter::Post DerRef -> Task //" << fTasksFolder->GetName() << "/Digitizer not found!" << endl;
abort();
}
TTask * emcal = dynamic_cast<TTask*>(sd->GetListOfTasks()->FindObject("EMCAL")) ;
if ( !emcal ) {
- cerr <<"ERROR: AliEMCALGetter::Post DerRef -> //" << fTasksFolder << "/Digitizer/EMCAL" << endl;
+ cerr <<"ERROR: AliEMCALGetter::Post DerRef -> //" << fTasksFolder->GetName() << "/Digitizer/EMCAL" << endl;
abort();
}
TTask * tasks = dynamic_cast<TTask*>(fTasksFolder->FindObject("Reconstructioner")) ;
if ( !tasks ) {
- cerr << "ERROR: AliEMCALGetter::Post RerRef -> Task //" << fTasksFolder << "/Reconstructioner not found!" << endl;
+ cerr << "ERROR: AliEMCALGetter::Post RerRef -> Task //" << fTasksFolder->GetName() << "/Reconstructioner not found!" << endl;
abort() ;
}
TTask * emcal = dynamic_cast<TTask*>(tasks->GetListOfTasks()->FindObject("EMCAL")) ;
if ( !emcal ) {
- cerr <<"WARNING: AliEMCALGetter::Post RerRef -> //" << fTasksFolder << "/Reconstructioner/EMCAL" << endl;
+ cerr <<"WARNING: AliEMCALGetter::Post RerRef -> //" << fTasksFolder->GetName() << "/Reconstructioner/EMCAL" << endl;
abort() ;
}
TTask * tasks = dynamic_cast<TTask*>(fTasksFolder->FindObject("Reconstructioner")) ;
if ( !tasks ) {
- cerr << "ERROR: AliEMCALGetter::Post Rer -> Task//" << fTasksFolder << "/Reconstructioner not found!" << endl;
+ cerr << "ERROR: AliEMCALGetter::Post Rer -> Task//" << fTasksFolder->GetName() << "/Reconstructioner not found!" << endl;
return kFALSE ;
}
if ( !emcal ) {
if (fDebug) {
cout <<"WARNING: AliEMCALGetter::Post Rer -> //" << fTasksFolder << "/Reconstructioner/EMCAL not found!" << endl;
- cout <<"INFO: AliEMCALGetter::Post Rer -> Adding //" << fTasksFolder << "/Reconstructioner/EMCAL" << endl;
+ cout <<"INFO: AliEMCALGetter::Post Rer -> Adding //" << fTasksFolder->GetName() << "/Reconstructioner/EMCAL" << endl;
}
emcal = new TTask("EMCAL", "") ;
tasks->Add(emcal) ;
TTask * tasks = dynamic_cast<TTask*>(fTasksFolder->FindObject("Reconstructioner")) ;
if ( !tasks ) {
- cerr << "ERROR: AliEMCALGetter::TSLakerRef TerRef -> Task //" << fTasksFolder << "/Reconstructioner not found!" << endl;
+ cerr << "ERROR: AliEMCALGetter::TSLakerRef TerRef -> Task //" << fTasksFolder->GetName() << "/Reconstructioner not found!" << endl;
abort() ;
}
TTask * emcal = dynamic_cast<TTask*>(tasks->GetListOfTasks()->FindObject("EMCAL")) ;
if ( !emcal ) {
- cerr <<"WARNING: AliEMCALGetter::TSMakerRef TerRef -> //" << fTasksFolder << "/Reconstructioner/EMCAL not found!" << endl;
+ cerr <<"WARNING: AliEMCALGetter::TSMakerRef TerRef -> //" << fTasksFolder->GetName() << "/Reconstructioner/EMCAL not found!" << endl;
abort() ;
}
TTask * tasks = dynamic_cast<TTask*>(fTasksFolder->FindObject("Reconstructioner")) ;
if ( !tasks ) {
- cerr << "ERROR: AliEMCALGetter::Post Per -> Task //" << fTasksFolder << "/Reconstructioner not found!" << endl;
+ cerr << "ERROR: AliEMCALGetter::Post Per -> Task //" << fTasksFolder->GetName() << "/Reconstructioner not found!" << endl;
return kFALSE ;
}
TTask * emcal = dynamic_cast<TTask*>(tasks->GetListOfTasks()->FindObject("EMCAL")) ;
if ( !emcal ) {
if (fDebug) {
- cout <<"WARNING: AliEMCALGetter::Post Per -> //" << fTasksFolder << "/Reconstructioner/EMCAL not found!" << endl;
- cout <<"INFO: AliEMCALGetter::Post Per -> Adding //" << fTasksFolder << "/Reconstructioner/EMCAL" << endl;
+ cout <<"WARNING: AliEMCALGetter::Post Per -> //" << fTasksFolder->GetName() << "/Reconstructioner/EMCAL not found!" << endl;
+ cout <<"INFO: AliEMCALGetter::Post Per -> Adding //" << fTasksFolder->GetName() << "/Reconstructioner/EMCAL" << endl;
}
emcal = new TTask("EMCAL", "") ;
tasks->Add(emcal) ;
TTask * tasks = dynamic_cast<TTask*>(fTasksFolder->FindObject("Reconstructioner")) ;
if ( !tasks ) {
- cerr << "ERROR: AliEMCALGetter::Post Per -> Task //" << fTasksFolder << "/Reconstructioner not found!" << endl;
+ cerr << "ERROR: AliEMCALGetter::Post Per -> Task //" << fTasksFolder->GetName() << "/Reconstructioner not found!" << endl;
return kFALSE ;
}
TTask * emcal = dynamic_cast<TTask*>(tasks->GetListOfTasks()->FindObject("EMCAL")) ;
if ( !emcal ) {
if (fDebug) {
- cout <<"WARNING: AliEMCALGetter::Post Per -> //" << fTasksFolder << "/Reconstructioner/EMCAL not found!" << endl;
- cout <<"INFO: AliEMCALGetter::Post Per -> Adding //" << fTasksFolder << "/Reconstructioner/EMCAL" << endl;
+ cout <<"WARNING: AliEMCALGetter::Post Per -> //" << fTasksFolder->GetName() << "/Reconstructioner/EMCAL not found!" << endl;
+ cout <<"INFO: AliEMCALGetter::Post Per -> Adding //" << fTasksFolder->GetName() << "/Reconstructioner/EMCAL" << endl;
}
emcal = new TTask("EMCAL", "") ;
tasks->Add(emcal) ;
TTask * tasks = dynamic_cast<TTask*>(fTasksFolder->FindObject("Reconstructioner")) ;
if ( !tasks ) {
- cerr << "ERROR: AliEMCALGetter::PIDRef PerRef -> Task //" << fTasksFolder << "/Reconstructioner not found!" << endl;
+ cerr << "ERROR: AliEMCALGetter::PIDRef PerRef -> Task //" << fTasksFolder->GetName() << "/Reconstructioner not found!" << endl;
abort() ;
}
TTask * emcal = dynamic_cast<TTask*>(tasks->GetListOfTasks()->FindObject("EMCAL")) ;
if ( !emcal ) {
- cerr <<"WARNING: AliEMCALGetter::PIDRef PerRef -> //" << fTasksFolder << "/ReconstructionerEMCAL not found!" << endl;
+ cerr <<"WARNING: AliEMCALGetter::PIDRef PerRef -> //" << fTasksFolder->GetName() << "/ReconstructionerEMCAL not found!" << endl;
abort() ;
}
if(!Digitizer(fDigitsTitle))
PostDigitizer(fDigitsTitle) ;
- //!!!!!!!!!!!!!!!!!!!!!!!!!! Weird problem, the following line causes a seg fault
- // digitizerbranch->SetAddress(DigitizerRef(fDigitsTitle)) ;
- // digitizerbranch->GetEntry(0) ;
+ digitizerbranch->SetAddress(DigitizerRef(fDigitsTitle)) ;
+ digitizerbranch->GetEntry(0) ;
}
if(!Clusterizer(fRecPointsTitle) )
PostClusterizer(fRecPointsTitle) ;
- //!!!!!!!!!!!!!!!!!!!!!!!!!! Weird problem, the following line causes a seg fault
- //clusterizerbranch->SetAddress(ClusterizerRef(fRecPointsTitle)) ;
- //clusterizerbranch->GetEntry(0) ;
+
+ clusterizerbranch->SetAddress(ClusterizerRef(fRecPointsTitle)) ;
+ clusterizerbranch->GetEntry(0) ;
//------------------- TrackSegments ---------------------
// // Read and Post the TrackSegment Maker
// if(!TrackSegmentMaker(fTrackSegmentsTitle))
// PostTrackSegmentMaker(fTrackSegmentsTitle) ;
- //!!!!!!!!!!!!!!!!!!!!!!!!!! Weird problem, the following line causes a seg fault
-// //tsmakerbranch->SetAddress(TSMakerRef(fTrackSegmentsTitle)) ;
-// //tsmakerbranch->GetEntry(0) ;
+// tsmakerbranch->SetAddress(TSMakerRef(fTrackSegmentsTitle)) ;
+// tsmakerbranch->GetEntry(0) ;
// //------------ RecParticles ----------------------------
// // Read and Post the PID
// if(!PID(fRecParticlesTitle))
// PostPID(fRecParticlesTitle) ;
- //!!!!!!!!!!!!!!!!!!!!!!!!!! Weird problem, the following line causes a seg fault
-// //pidbranch->SetAddress(PIDRef(fRecParticlesTitle)) ;
-// //pidbranch->GetEntry(0) ;
+// pidbranch->SetAddress(PIDRef(fRecParticlesTitle)) ;
+// pidbranch->GetEntry(0) ;
}
if(!SDigitizer(sdname) )
PostSDigitizer(fSDigitsTitle,folder->GetName()) ;
- //!!!!!!!!!!!!!!!!!!!!!!!!!! Weird problem, the following line causes a seg fault
- // sdigitizerBranch->SetAddress(SDigitizerRef(sdname)) ;
- // sdigitizerBranch->GetEntry(0) ;
+ sdigitizerBranch->SetAddress(SDigitizerRef(sdname)) ;
+ sdigitizerBranch->GetEntry(0) ;
}
{
// ctor
InitParameters() ;
+ fDefaultInit = kTRUE ;
}
//____________________________________________________________________________
// ctor
InitParameters() ;
Init();
+ fDefaultInit = kFALSE ;
}
//____________________________________________________________________________
AliEMCALSDigitizer::~AliEMCALSDigitizer()
{
// dtor
- // gime=0 if Digitizer created by default ctor (to get just the parameters)
-
- AliEMCALGetter * gime = AliEMCALGetter::GetInstance() ;
-
- if (gime) {
+ // fDefaultInit = kTRUE if SDigitizer created by default ctor (to get just the parameters)
+
+ if (!fDefaultInit) {
+ AliEMCALGetter * gime = AliEMCALGetter::GetInstance() ;
+
// remove the task from the folder list
gime->RemoveTask("S",GetName()) ;
// should be calculated independently for each layer as :
// LightYield*LightCollectionEfficiency*LightAttenuation*APDPhotoElectronEfficiency*APDGain
+ Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized)
Int_t fNevents ; // Number of events to digitize
Float_t fTowerPrimThreshold ; // To store primary in Tower if Elos > threshold
Float_t fPreShowerPrimThreshold ; // To store primary if Pre Shower Elos > threshold
// default ctor (to be used mainly by Streamer)
InitParameters() ;
+ fDefaultInit = kTRUE ;
}
//____________________________________________________________________________
else
fFrom = from ;
Init() ;
+ fDefaultInit = kFALSE ;
}
AliPHOSClusterizerv1::~AliPHOSClusterizerv1()
{
// dtor
- // gime=0 if Clusterizer created by default ctor (to get just the parameters)
+ // fDefaultInit = kTRUE if Clusterizer created by default ctor (to get just the parameters)
- AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ;
-
- if (gime) {
- // remove the task from the folder list
+ if (!fDefaultInit) {
+ AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ;
+
+ // remove the task from the folder list
gime->RemoveTask("C",GetName()) ;
// remove the data from the folder list
private:
+ Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized)
TString fFrom ; // name of Digits
TString fHeaderFileName ; // name of the file which contains gAlice, Tree headers etc.
TString fDigitsBranchTitle ; // name of the file, where digits branch is stored
// ctor
InitParameters() ;
+ fDefaultInit = kTRUE ;
}
//____________________________________________________________________________
fSplitFile= 0 ;
InitParameters() ;
Init() ;
+ fDefaultInit = kFALSE ;
}
SetTitle("aliroot") ;
SetName("Default") ;
InitParameters() ;
-
+ fDefaultInit = kTRUE ;
}
//____________________________________________________________________________
AliPHOSDigitizer::~AliPHOSDigitizer()
{
// dtor
- // gime=0 if Digitizer created by default ctor (to get just the parameters)
+ // fDefaultInit = kTRUE if Digitizer created by default ctor (to get just the parameters)
- AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ;
-
- if (gime) {
+ if (!fDefaultInit) {
+ AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ;
+
// remove the task from the folder list
gime->RemoveTask("S",GetName()) ;
gime->RemoveTask("D",GetName()) ;
digits->Expand(nCPV) ;
// get first the sdigitizer from the tasks list (must have same name as the digitizer)
- const AliPHOSSDigitizer * sDigitizer = new AliPHOSSDigitizer() ; //gime->SDigitizer(GetName());
+ const AliPHOSSDigitizer * sDigitizer = gime->SDigitizer(GetName());
if ( !sDigitizer) {
cerr << "ERROR: AliPHOSDigitizer::Digitize -> SDigitizer with name " << GetName() << " not found " << endl ;
abort() ;
cout << "------------------- "<< GetName() << " -------------" << endl ;
cout << "Digitizing sDigits from file(s): " <<endl ;
- TCollection * folderslist = ((TFolder*)gROOT->FindObjectAny("Folders/RunMC/Event/Data/PHOS/SDigits"))->GetListOfFolders() ;
+ TCollection * folderslist = ((TFolder*)gROOT->FindObjectAny("Folders/RunMC/Event/Data/SDigits/PHOS"))->GetListOfFolders() ;
TIter next(folderslist) ;
TFolder * folder = 0 ;
private:
+ Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized)
Int_t fEmcCrystals ; // Number of EMC crystalls in the given geometry
Float_t fPinNoise ; // Electronics noise in EMC
TFolder * primariesFolder = dynamic_cast<TFolder*>(fPrimariesFolder->FindObject("Primaries")) ;
if ( !primariesFolder ) {
if (fDebug) {
- cout << "WARNING: AliPHOSGetter::Post Primaries -> Folder //" << fPrimariesFolder << "/Primaries/ not found!" << endl;
- cout << "INFO: AliPHOSGetter::Post Primaries -> Adding Folder //" << fPrimariesFolder << "/Primaries/" << endl;
+ cout << "WARNING: AliPHOSGetter::Post Primaries -> Folder //" << fPrimariesFolder->GetName() << "/Primaries/ not found!" << endl;
+ cout << "INFO: AliPHOSGetter::Post Primaries -> Adding Folder //" << fPrimariesFolder->GetName() << "/Primaries/" << endl;
}
primariesFolder = fPrimariesFolder->AddFolder("Primaries", "Primaries particles from TreeK") ;
}
TTask * task = dynamic_cast<TTask*>(phos->GetListOfTasks()->FindObject(name)) ;
- cout << "AliPHOSGetter::DigitizerRef " << task->GetName() << endl ;
- cout << "AliPHOSGetter::DigitizerRef " << phos->GetName() << endl ;
- cout << "AliPHOSGetter::DigitizerRef " << task->GetListOfTasks() << endl ;
- cout << "AliPHOSGetter::DigitizerRef " << task->GetListOfTasks()->GetObjectRef(task) << endl ;
-
-
return phos->GetListOfTasks()->GetObjectRef(task) ;
}
if ( !phosFolder ) {
if (fDebug) {
- cout << "WARNING: AliPHOSGetter::Post TS -> Folder //" << fRecoFolder << "/PHOS/ not found!" << endl;
+ cout << "WARNING: AliPHOSGetter::Post TS -> Folder //" << fRecoFolder->GetName() << "/PHOS/ not found!" << endl;
cout << "INFO: AliPHOSGetter::Post TS -> Adding Folder //" << fRecoFolder->GetName() << "/PHOS" << endl;
}
phosFolder = fRecoFolder->AddFolder("PHOS", "Reconstructed data from PHOS") ;
TFolder * phosTSFolder = dynamic_cast<TFolder*>(phosFolder->FindObject("TrackSegments")) ;
if ( !phosTSFolder ) {
if (fDebug) {
- cout << "WARNING: AliPHOSGetter::Post TS -> Folder//" << fRecoFolder->GetName() << "/PHOS/TrackSegments/ not found!" << endl;
+ cout << "WARNING: AliPHOSGetter::Post TS -> Folder //" << fRecoFolder->GetName() << "/PHOS/TrackSegments/ not found!" << endl;
cout << "INFO: AliPHOSGetter::Post TS -> Adding Folder //" << fRecoFolder->GetName() << "/PHOS/TrackSegments/" << endl;
}
phosTSFolder = phosFolder->AddFolder("TrackSegments", "TrackSegments from PHOS") ;
TTask * tasks = dynamic_cast<TTask*>(fTasksFolder->FindObject("Reconstructioner")) ;
if ( !tasks ) {
- cerr << "ERROR: AliPHOSGetter::Post Ter -> Task //" << fTasksFolder << "/Reconstructioner not found!" << endl;
+ cerr << "ERROR: AliPHOSGetter::Post Ter -> Task //" << fTasksFolder->GetName() << "/Reconstructioner not found!" << endl;
return kFALSE ;
}
TTask * phos = dynamic_cast<TTask*>(tasks->GetListOfTasks()->FindObject("PHOS")) ;
if ( !phos ) {
if (fDebug) {
- cout <<"WARNING: AliPHOSGetter::Post Rer -> //" << fTasksFolder << "/Reconstructioner/PHOS not found!" << endl;
- cout <<"INFO: AliPHOSGetter::Post Rer -> Adding //" << fTasksFolder << "/Reconstructioner/PHOS" << endl;
+ cout <<"WARNING: AliPHOSGetter::Post Ter -> //" << fTasksFolder->GetName() << "/Reconstructioner/PHOS not found!" << endl;
+ cout <<"INFO: AliPHOSGetter::Post Ter -> Adding //" << fTasksFolder->GetName() << "/Reconstructioner/PHOS" << endl;
}
phos = new TTask("PHOS", "") ;
tasks->Add(phos) ;
TList * l = phos->GetListOfTasks() ;
TIter it(l) ;
TString tsn(name);
+ tsn+=":tsm" ;
TTask * task ;
while((task = static_cast<TTask *>(it.Next()) )){
TString taskname(task->GetName()) ;
TTask * tasks = dynamic_cast<TTask*>(fTasksFolder->FindObject("Reconstructioner")) ;
if ( !tasks ) {
- cerr << "ERROR: AliPHOSGetter::TSMakerRef -> Task //" << fTasksFolder << "/Reconstructioner not found!" << endl;
+ cerr << "ERROR: AliPHOSGetter::TSMakerRef -> Task //" << fTasksFolder->GetName() << "/Reconstructioner not found!" << endl;
abort() ;
}
TTask * phos = dynamic_cast<TTask*>(tasks->GetListOfTasks()->FindObject("PHOS")) ;
if ( !phos ) {
- cerr <<"WARNING: AliPHOSGetter::TSMakerRef -> //" << fTasksFolder << "/Reconstructioner/PHOS not found!" << endl;
+ cerr <<"WARNING: AliPHOSGetter::TSMakerRef -> //" << fTasksFolder->GetName() << "/Reconstructioner/PHOS not found!" << endl;
abort() ;
}
if(tsm)
return l->GetObjectRef(tsm) ;
else {
- cerr << "ERROR: AliPHOSGetter::TSMakerRef -> Task //" << fTasksFolder << "/Reconstructioner/TrackSegmentMarker name not found!" << endl;
- abort() ;
+ cerr << "ERROR: AliPHOSGetter::TSMakerRef -> Task //" << fTasksFolder->GetName() << "/Reconstructioner/PHOS/TrackSegmentMarker/" << name << " not found!" << endl;
+ //abort() ;
}
}
TTask * tasks = dynamic_cast<TTask*>(fTasksFolder->FindObject("Reconstructioner")) ;
if ( !tasks ) {
- cerr << "ERROR: AliPHOSGetter::Post Per -> Task //" << fTasksFolder << "/Reconstructioner not found!" << endl;
+ cerr << "ERROR: AliPHOSGetter::Post Per -> Task //" << fTasksFolder->GetName() << "/Reconstructioner not found!" << endl;
return kFALSE ;
}
TTask * phos = dynamic_cast<TTask*>(tasks->GetListOfTasks()->FindObject("PHOS")) ;
if ( !phos ) {
if (fDebug) {
- cout <<"WARNING: AliPHOSGetter::Post Per -> //" << fTasksFolder << "/Reconstructioner/PHOS not found!" << endl;
- cout <<"INFO: AliPHOSGetter::Post Per -> Adding //" << fTasksFolder << "/Reconstructioner/PHOS" << endl;
+ cout <<"WARNING: AliPHOSGetter::Post Per -> //" << fTasksFolder->GetName() << "/Reconstructioner/PHOS not found!" << endl;
+ cout <<"INFO: AliPHOSGetter::Post Per -> Adding //" << fTasksFolder->GetName() << "/Reconstructioner/PHOS" << endl;
}
phos = new TTask("PHOS", "") ;
tasks->Add(phos) ;
TList * l = phos->GetListOfTasks() ;
TIter it(l) ;
TString pidname(name) ;
+ pidname+=":pid" ;
TTask * task ;
while((task = static_cast<TTask *>(it.Next()) )){
TString taskname(task->GetName()) ;
TTask * tasks = dynamic_cast<TTask*>(fTasksFolder->FindObject("Reconstructioner")) ;
if ( !tasks ) {
- cerr << "ERROR: AliPHOSGetter::PIDRef -> Task //" << fTasksFolder << "/Reconstructioner not found!" << endl;
+ cerr << "ERROR: AliPHOSGetter::PIDRef -> Task //" << fTasksFolder->GetName() << "/Reconstructioner not found!" << endl;
abort() ;
}
TTask * phos = dynamic_cast<TTask*>(tasks->GetListOfTasks()->FindObject("PHOS")) ;
if ( !phos ) {
- cerr << "ERROR: AliPHOSGetter::PIDRef -> //" << fTasksFolder << "/Reconstructioner/PHOS not found!" << endl;
+ cerr << "ERROR: AliPHOSGetter::PIDRef -> //" << fTasksFolder->GetName() << "/Reconstructioner/PHOS not found!" << endl;
abort() ;
}
if(pid)
return l->GetObjectRef(pid) ;
else {
- cerr << "ERROR: AliPHOSGetter::PIDRef -> Task //" << fTasksFolder << "/Reconstructioner/PID name not found!" << endl;
- abort() ;
+ cerr << "ERROR: AliPHOSGetter::PIDRef -> Task //" << fTasksFolder->GetName() << "/Reconstructioner/PHOS/PID/" << name << " not found!" << endl;
+ //abort() ;
}
}
// read the Digitizer
if(!Digitizer(fDigitsTitle))
PostDigitizer(fDigitsTitle) ;
- //!!!!!!!!!!!!!!!!!!!!!!!!!! Weird problem, the following line causes a seg fault
- // digitizerbranch->SetAddress(DigitizerRef(fDigitsTitle)) ;
- // digitizerbranch->GetEntry(0) ;
+ digitizerbranch->SetAddress(DigitizerRef(fDigitsTitle)) ;
+ digitizerbranch->GetEntry(0) ;
return 0 ;
}
} else {
if(!EmcRecPoints(fRecPointsTitle) )
PostRecPoints(fRecPointsTitle) ;
+
emcbranch->SetAddress(EmcRecPointsRef(fRecPointsTitle)) ;
emcbranch->GetEntry(0) ;
cpvbranch->SetAddress(CpvRecPointsRef(fRecPointsTitle)) ;
cpvbranch->GetEntry(0) ;
- if(!Clusterizer(fRecPointsTitle) )
+ if(!Clusterizer(fRecPointsTitle) )
PostClusterizer(fRecPointsTitle) ;
- //!!!!!!!!!!!!!!!!!!!!!!!!!! Weird problem, the following line causes a seg fault
- //clusterizerbranch->SetAddress(ClusterizerRef(fRecPointsTitle)) ;
- //clusterizerbranch->GetEntry(0) ;
+
+ clusterizerbranch->SetAddress(ClusterizerRef(fRecPointsTitle)) ;
+ clusterizerbranch->GetEntry(0) ;
}
//------------------- TrackSegments ---------------------
// Read and Post the TrackSegment Maker
if(!TrackSegmentMaker(fTrackSegmentsTitle))
PostTrackSegmentMaker(fTrackSegmentsTitle) ;
- //!!!!!!!!!!!!!!!!!!!!!!!!!! Weird problem, the following line causes a seg fault
- //tsmakerbranch->SetAddress(TSMakerRef(fTrackSegmentsTitle)) ;
- //tsmakerbranch->GetEntry(0) ;
+ tsmakerbranch->SetAddress(TSMakerRef(fTrackSegmentsTitle)) ;
+ tsmakerbranch->GetEntry(0) ;
}
// Read and Post the PID
if(!PID(fRecParticlesTitle))
PostPID(fRecParticlesTitle) ;
- //!!!!!!!!!!!!!!!!!!!!!!!!!! Weird problem, the following line causes a seg fault
- //pidbranch->SetAddress(PIDRef(fRecParticlesTitle)) ;
- //pidbranch->GetEntry(0) ;
+ pidbranch->SetAddress(PIDRef(fRecParticlesTitle)) ;
+ pidbranch->GetEntry(0) ;
}
return 0 ;
}
sdname+=folder->GetName() ;
if(!SDigitizer(sdname) )
PostSDigitizer(fSDigitsTitle,folder->GetName()) ;
- //!!!!!!!!!!!!!!!!!!!!!!!!!! Weird problem, the following line causes a seg fault
- // sdigitizerBranch->SetAddress(SDigitizerRef(sdname)) ;
- // sdigitizerBranch->GetEntry(0) ;
+ sdigitizerBranch->SetAddress(SDigitizerRef(sdname)) ;
+ sdigitizerBranch->GetEntry(0) ;
}
- // After SDigits have been read from all files, return to the first one
-
+// After SDigits have been read from all files, return to the first one
+
next.Reset();
folder = static_cast<TFolder*>(next());
if(folder){
if(!SDigitizer(sdigitsBranch->GetTitle()) )
PostSDigitizer(sdigitsBranch->GetTitle(),filename) ;
- //!!!!!!!!!!!!!!!!!!!!!!!!!! Weird problem, the following line causes a seg fault
- // sdigitizerBranch->SetAddress(SDigitizerRef(sdname)) ;
- // sdigitizerBranch->GetEntry(0) ;
+ sdigitizerBranch->SetAddress(SDigitizerRef(sdname)) ;
+ sdigitizerBranch->GetEntry(0) ;
}
} else if (what.CompareTo("Clusterizer") == 0){
if ( name.IsNull() )
name = fRecPointsTitle ;
- name.Append(":clusterizer") ;
+ name.Append(":clu") ;
}
else if (what.CompareTo("TrackSegmentMaker") == 0){
if ( name.IsNull() )
name = fTrackSegmentsTitle ;
- name.Append(":tracksegmentmaker") ;
+ name.Append(":tsm") ;
}
else if (what.CompareTo("PID") == 0){
if ( name.IsNull() )
}
if(fDebug)
- cout << "WARNING: AliPHOSGetter::ReturnT -> Task " << search << "/" << name << " not found!" << endl ;
+ cout << "WARNING: AliPHOSGetter::ReturnT -> Task " << search << "/PHOS" << name << " not found!" << endl ;
return 0 ;
}
// default ctor
InitParameters() ;
+ fDefaultInit = kTRUE ;
+
}
//____________________________________________________________________________
fFrom = from ;
Init() ;
+ fDefaultInit = kFALSE ;
}
AliPHOSPIDv1::~AliPHOSPIDv1()
{
// dtor
- // gime=0 if PID created by default ctor (to get just the parameters)
-
+ // fDefaultInit = kTRUE if PID created by default ctor (to get just the parameters)
delete [] fX ; // Principal input
delete [] fP ; // Principal components
delete fParameters100 ; // Matrix of Parameters
- AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ;
-
- if(gime){
- // remove the task from the folder list
- gime->RemoveTask("P",GetName()) ;
- TString name(GetName()) ;
- name.ReplaceAll("pid", "clu") ;
- gime->RemoveTask("C",name) ;
-
- // remove the data from the folder list
- name = GetName() ;
- name.Remove(name.Index(":")) ;
- gime->RemoveObjects("RE", name) ; // EMCARecPoints
- gime->RemoveObjects("RC", name) ; // CPVRecPoints
- gime->RemoveObjects("T", name) ; // TrackSegments
- gime->RemoveObjects("P", name) ; // RecParticles
-
- // Delete gAlice
- gime->CloseFile() ;
- fSplitFile = 0 ;
+ if (!fDefaultInit) {
+ AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ;
+ // remove the task from the folder list
+ gime->RemoveTask("P",GetName()) ;
+ TString name(GetName()) ;
+ name.ReplaceAll("pid", "clu") ;
+ gime->RemoveTask("C",name) ;
+
+ // remove the data from the folder list
+ name = GetName() ;
+ name.Remove(name.Index(":")) ;
+ gime->RemoveObjects("RE", name) ; // EMCARecPoints
+ gime->RemoveObjects("RC", name) ; // CPVRecPoints
+ gime->RemoveObjects("T", name) ; // TrackSegments
+ gime->RemoveObjects("P", name) ; // RecParticles
+
+ // Delete gAlice
+ gime->CloseFile() ;
+
+ fSplitFile = 0 ;
}
}
// "MEDIUM EFFICIENCY" "LOW EFFICIENCY" and 3 more options changing
// EFFICIENCY by PURITY)
-
+
Int_t eff_pur = GetEffPurOption(Eff_Pur);
GetAnalysisParameters(Cluster_En) ;
if((fClusterrcpv!= -1)&&(eff_pur != -1))
private:
+ Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized)
TString fFileName5 ; // File that contains the Principal file for analysis from 0.5 to 5 GeV
TString fFileName100 ; // File that contains the Principal file for analysis from 0.5 to 100 GeV
TString fFileNamePar5 ; // File that contains the parameters for analysis from 0.5 to 5 GeV
//____________________________________________________________________________
AliPHOSSDigitizer::AliPHOSSDigitizer():TTask("","") {
// ctor
- InitParameters() ;
+ InitParameters() ;
+ fDefaultInit = kTRUE ;
}
//____________________________________________________________________________
// ctor
InitParameters() ;
Init();
+ fDefaultInit = kFALSE ;
}
//____________________________________________________________________________
AliPHOSSDigitizer::~AliPHOSSDigitizer()
{
// dtor
- // gime=0 if Digitizer created by default ctor (to get just the parameters)
+ // fDefaultInit = kTRUE if SDigitizer created by default ctor (to get just the parameters)
- AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ;
- if (gime) {
+ if (!fDefaultInit) {
+ AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ;
+
// remove the task from the folder list
gime->RemoveTask("S",GetName()) ;
Float_t fA ; // Pedestal parameter
Float_t fB ; // Slope Digitizition parameters
+ Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized)
Float_t fPrimThreshold ; // To store primari if Elos > threshold
Int_t fSDigitsInRun ; //! Total number of sdigits in one run
TFile * fSplitFile ; //! file in which SDigits will eventually be stored
fFrom = "" ;
fTrackSegmentsInRun = 0 ;
+
+ fDefaultInit = kTRUE ;
}
//____________________________________________________________________________
else
fFrom = from ;
Init() ;
-
+
+ fDefaultInit = kFALSE ;
+
}
//____________________________________________________________________________
AliPHOSTrackSegmentMakerv1::~AliPHOSTrackSegmentMakerv1()
{
// dtor
- // gime=0 if TrackSegmentMaker created by default ctor (to get just the parameters)
-
- delete fLinkUpArray ;
+ // fDefaultInit = kTRUE if TrackSegmentMaker created by default ctor (to get just the parameters)
- AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ;
-
- if (gime) {
+ if (!fDefaultInit) {
+ delete fLinkUpArray ;
+
+ AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ;
+
// remove the task from the folder list
gime->RemoveTask("T",GetName()) ;
TString name(GetName()) ;
private:
+ Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized)
TString fFrom ; // name of Recpoints
TString fHeaderFileName ; // name of the file which contains gAlice, Tree headers etc.
TString fRecPointsBranchTitle ; // name of the file, where RecPoints branchs are stored