]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - FMD/AliFMD.cxx
fix problem with streaming - Jiri
[u/mrichter/AliRoot.git] / FMD / AliFMD.cxx
index 437fcf52bf24b6b8a4db29d74e25e8ef57cbb96f..cd22e9b03a5e9a02f26be237a9778fb843913aae 100644 (file)
@@ -94,7 +94,7 @@
 #include <TVirtualMC.h>                // ROOT_TVirtualMC
 #include <cmath>                // __CMATH__
 
-#include <AliRunDigitizer.h>   // ALIRUNDIGITIZER_H
+#include <AliDigitizationInput.h>      // ALIRUNDIGITIZER_H
 #include <AliLoader.h>         // ALILOADER_H
 #include <AliRun.h>            // ALIRUN_H
 #include <AliMC.h>             // ALIMC_H
@@ -145,7 +145,7 @@ AliFMD::AliFMD()
   fHits        = 0;
   fDigits      = 0;
   fIshunt      = 0;
-  fBad         = new TClonesArray("AliFMDHit");
+  // fBad         = new TClonesArray("AliFMDHit");
 }
 
 //____________________________________________________________________
@@ -162,15 +162,15 @@ AliFMD::AliFMD(const char *name, const char *title)
   // Standard constructor for Forward Multiplicity Detector
   //
   AliFMDDebug(10, ("\tStandard CTOR"));
-  fBad         = new TClonesArray("AliFMDHit");
+  // fBad         = new TClonesArray("AliFMDHit");
   
   // Initialise Hit array
-  HitsArray();
-  gAlice->GetMCApp()->AddHitList(fHits);
+  // HitsArray();
+  // gAlice->GetMCApp()->AddHitList(fHits);
 
   // (S)Digits for the detectors disk
-  DigitsArray();
-  SDigitsArray();
+  // DigitsArray();
+  // SDigitsArray();
   
   // CHC: What is this?
   fIshunt = 0;
@@ -736,7 +736,9 @@ AliFMD::AddHitByFields(Int_t    track,
 
   AliMC *mcApplication = (AliMC*)gAlice->GetMCApp();
   
-  AliTrackReference* trackRef = AddTrackReference(mcApplication->GetCurrentTrackNumber(), AliTrackReference::kFMD); 
+  AliTrackReference* trackRef = 
+    AddTrackReference(mcApplication->GetCurrentTrackNumber(), 
+                     AliTrackReference::kFMD); 
   UInt_t stripId = AliFMDStripIndex::Pack(detector,ring,sector,strip);
   trackRef->SetUserId(stripId);
   
@@ -898,6 +900,8 @@ AliFMD::HitsArray()
   if (!fHits) { 
     fHits = new TClonesArray("AliFMDHit", 1000);
     fNhits = 0;
+    if (gAlice && gAlice->GetMCApp() && gAlice->GetMCApp()->GetHitLists()) 
+      gAlice->GetMCApp()->AddHitList(fHits);
   }
   return fHits;
 }
@@ -939,7 +943,7 @@ AliFMD::Hits2Digits()
   // 
   AliFMDHitDigitizer digitizer(this, AliFMDHitDigitizer::kDigits);
   digitizer.Init();
-  digitizer.Exec("");
+  digitizer.Digitize("");
 }
 
 //____________________________________________________________________
@@ -951,13 +955,13 @@ AliFMD::Hits2SDigits()
   // 
   AliFMDHitDigitizer digitizer(this, AliFMDHitDigitizer::kSDigits);
   digitizer.Init();
-  digitizer.Exec("");
+  digitizer.Digitize("");
 }
 
   
 //____________________________________________________________________
 AliDigitizer* 
-AliFMD::CreateDigitizer(AliRunDigitizer* manager) const
+AliFMD::CreateDigitizer(AliDigitizationInput* digInput) const
 {
   // Create a digitizer object 
   
@@ -965,14 +969,14 @@ AliFMD::CreateDigitizer(AliRunDigitizer* manager) const
   AliFMDBaseDigitizer* digitizer = 0;
   
 #ifdef USE_SSDIGITIZER
-  digitizer = new AliFMDSSDigitizer(manager);
+  digitizer = new AliFMDSSDigitizer(digInput);
 #else 
   /* This is what we actually do, and will work */
 #if 0
   AliInfo("SDigit->Digit conversion not really supported, "
          "doing Hit->Digit conversion instead");
 #endif
-  digitizer = new AliFMDDigitizer(manager);
+  digitizer = new AliFMDDigitizer(digInput);
 #endif
   return digitizer;
 }
@@ -1020,9 +1024,10 @@ AliFMD::Raw2SDigits(AliRawReader* reader)
   // Bool_t ret = fmdReader.ReadAdcs(sdigits, kTRUE, kTRUE);
   // sdigits->ls();
   UShort_t ns = sdigits->GetEntriesFast();
-  for (UShort_t i = 0; i < ns; i++) 
-    sdigits->At(i)->Print("pl");
-  
+  if (AliLog::GetDebugLevel("FMD", 0) > 5) {
+    for (UShort_t i = 0; i < ns; i++) 
+      sdigits->At(i)->Print("pl");
+  } 
   AliFMDDebug(1, ("Got a total of %d SDigits", ns));
 
   fLoader->TreeS()->Fill();