]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
code defects fix
authorkowal2 <kowal2@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 21 Feb 2011 18:14:51 +0000 (18:14 +0000)
committerkowal2 <kowal2@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 21 Feb 2011 18:14:51 +0000 (18:14 +0000)
TPC/AliTPC.cxx
TPC/AliTPCDigitizer.cxx

index ad8b17ad471ec56525caafba85a55f7faa4e481a..0e5452d46ad8494ff5629511f43d2e3b325371f1 100644 (file)
@@ -774,14 +774,16 @@ void    AliTPC::SetActiveSectors(Int_t flag)
     return;
   }
   for (Int_t i=0;i<fTPCParam->GetNSector();i++) fActiveSectors[i]=kFALSE;
-  TBranch * branch=0;
+  //TBranch * branch=0;
   if (fLoader->TreeH() == 0x0)
    {
      AliFatal("Can not find TreeH in folder");
      return;
    }
-  if (fHitType>1) branch = fLoader->TreeH()->GetBranch("TPC2");
-  else branch = fLoader->TreeH()->GetBranch("TPC");
+  //if (fHitType>1) branch = fLoader->TreeH()->GetBranch("TPC2");
+  if (fHitType>1) fLoader->TreeH()->GetBranch("TPC2");
+  //else branch = fLoader->TreeH()->GetBranch("TPC");
+  else fLoader->TreeH()->GetBranch("TPC");
   Stat_t ntracks = fLoader->TreeH()->GetEntries();
   // loop over all hits
   AliDebug(1,Form("Got %d tracks", (Int_t) ntracks));
@@ -1209,9 +1211,9 @@ void AliTPC::SetDefaults(){
   //
   AliRunLoader* rl = (AliRunLoader*)fLoader->GetEventFolder()->FindObject(AliRunLoader::GetRunLoaderName());
   rl->CdGAFile();
-  AliTPCParamSR *param=(AliTPCParamSR*)gDirectory->Get("75x40_100x60");
-
-  param = (AliTPCParamSR*)AliTPCcalibDB::Instance()->GetParameters();
+  //AliTPCParamSR *param=(AliTPCParamSR*)gDirectory->Get("75x40_100x60");
+  gDirectory->Get("75x40_100x60");
+  AliTPCParamSR *param = (AliTPCParamSR*)AliTPCcalibDB::Instance()->GetParameters();
   if(!param){
     AliFatal("No TPC parameters found");
   }
index aa3b1d8a5023038d39b28bdc6e14b268cd83a878..2ff41a12abc97e7fdfa2d89b7522670b8eaeeeaf 100644 (file)
@@ -391,8 +391,8 @@ void AliTPCDigitizer::ExecSave(Option_t* option)
   ogime = orl->GetLoader("TPCLoader");
   
   rl = AliRunLoader::GetRunLoader(fManager->GetInputFolderName(0));
-  gime = rl->GetLoader("TPCLoader");
-  
+  //gime = rl->GetLoader("TPCLoader");
+  rl->GetLoader("TPCLoader");
   rl->LoadgAlice();
   AliRun* alirun = rl->GetAliRun();
   
@@ -402,6 +402,9 @@ void AliTPCDigitizer::ExecSave(Option_t* option)
   printf("noise %f \n",  param->GetNoise()*param->GetNoiseNormFac());
   //
   Int_t nInputs = fManager->GetNinputs();
+  // stupid protection...
+  if (nInputs <= 0) return;
+  //
   Int_t * masks = new Int_t[nInputs];
   for (Int_t i=0; i<nInputs;i++)
     masks[i]= fManager->GetMask(i);