]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - FMD/AliFMDDigitizer.cxx
Added tpcrefit requirement for QA task, cut configuration for ESD Filter
[u/mrichter/AliRoot.git] / FMD / AliFMDDigitizer.cxx
index c17a265073221a93ba75a8e3f49887dbe8a28a26..69d42dc9a18978ad82c43fc1a38e688574b0ccf9 100644 (file)
@@ -1,24 +1,27 @@
-/**************************************************************************
- * Copyright(c) 2004, 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$ */
-/** @file    AliFMDDigitizer.cxx
-    @author  Christian Holm Christensen <cholm@nbi.dk>
-    @date    Mon Mar 27 12:38:26 2006
-    @brief   FMD Digitizers implementation
-    @ingroup FMD_sim
-*/
+//************************************************************************
+// Copyright(c) 2004, 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$ */
+/**
+ * @file    AliFMDDigitizer.cxx
+ * 
+ * @author  Christian Holm Christensen <cholm@nbi.dk>
+ * @date    Mon Mar 27 12:38:26 2006
+ * @brief   FMD Digitizers implementation
+ *
+ * @ingroup FMD_sim
+ */
 //////////////////////////////////////////////////////////////////////////////
 //
 //  This class contains the procedures simulation ADC  signal for the
 #include "AliFMDSDigit.h"      // ALIFMDDIGIT_H
 #include "AliFMDDigit.h"       // ALIFMDDIGIT_H
 #include "AliFMDParameters.h"   // ALIFMDPARAMETERS_H
-#include <AliRunDigitizer.h>   // ALIRUNDIGITIZER_H
+#include <AliDigitizationInput.h>      // ALIRUNDIGITIZER_H
 #include <AliRun.h>            // ALIRUN_H
 #include <AliLoader.h>         // ALILOADER_H
 #include <AliRunLoader.h>      // ALIRUNLOADER_H
@@ -223,7 +226,9 @@ ClassImp(AliFMDDigitizer)
 Bool_t
 AliFMDDigitizer::Init()
 {
+  // 
   // Initialisation
+  // 
   if (!AliFMDBaseDigitizer::Init()) return kFALSE;
   
 #if 0
@@ -251,10 +256,18 @@ AliFMDDigitizer::Init()
 
 //____________________________________________________________________
 void
-AliFMDDigitizer::Exec(Option_t*)
+AliFMDDigitizer::Digitize(Option_t*)
 {
-  if (!fManager) { 
-    AliError("No digitisation manager defined");
+  // 
+  // Execute this digitizer.  
+  // This member function will be called once per event by the passed
+  // AliDigitizationInput* digInput object. 
+  // 
+  // Parameters:
+  //    options Not used 
+  //
+  if (!fDigInput) { 
+    AliError("No digitisation input defined");
     return;
   }
 
@@ -263,7 +276,7 @@ AliFMDDigitizer::Exec(Option_t*)
 
   AliRunLoader* runLoader = 0;
   if (!gAlice) { 
-    TString folderName(fManager->GetInputFolderName(0));
+    TString folderName(fDigInput->GetInputFolderName(0));
     runLoader = AliRunLoader::GetRunLoader(folderName.Data());
     if (!runLoader) { 
       AliError(Form("Failed at getting run loader from %s",
@@ -287,16 +300,16 @@ AliFMDDigitizer::Exec(Option_t*)
 
 
   // Loop over input files
-  Int_t nFiles= fManager->GetNinputs();
+  Int_t nFiles= fDigInput->GetNinputs();
   AliFMDDebug(1, (" Digitizing event number %d, got %d inputs",
-                 fManager->GetOutputEventNr(), nFiles));
+                 fDigInput->GetOutputEventNr(), nFiles));
   for (Int_t inputFile = 0; inputFile < nFiles; inputFile++) {
     AliFMDDebug(5, ("Now reading input # %d", inputFile));
     // Get the current loader 
     AliRunLoader* currentLoader = 
-      AliRunLoader::GetRunLoader(fManager->GetInputFolderName(inputFile));
+      AliRunLoader::GetRunLoader(fDigInput->GetInputFolderName(inputFile));
     if (!currentLoader) { 
-      Error("Exec", Form("no run loader for input file # %d", inputFile));
+      Error("Exec", "no run loader for input file # %d", inputFile);
       continue;
     }
 
@@ -311,7 +324,7 @@ AliFMDDigitizer::Exec(Option_t*)
     // Get the tree of summable digits
     TTree* sdigitsTree = inFMD->TreeS();
     if (!sdigitsTree)  {
-      AliError("No sdigit tree from manager");
+      AliError("No sdigit tree from input");
       continue;
     }
     if (AliLog::GetDebugLevel("FMD","") >= 10) {
@@ -346,7 +359,7 @@ AliFMDDigitizer::Exec(Option_t*)
     inFMD->UnloadSDigits();
   }  
 
-  TString       outFolder(fManager->GetOutputFolderName());
+  TString       outFolder(fDigInput->GetOutputFolderName());
   AliRunLoader* out    = AliRunLoader::GetRunLoader(outFolder.Data());
   AliLoader*    outFMD = out->GetLoader("FMDLoader");
   if (!outFMD) { 
@@ -376,8 +389,12 @@ AliFMDDigitizer::Exec(Option_t*)
 void
 AliFMDDigitizer::SumContributions(TBranch* sdigitsBranch) 
 {
-  // Sum energy deposited contributions from each sdigits in a cache
-  // (fEdep).  
+  // 
+  // Sum contributions from SDigits 
+  // 
+  // Parameters:
+  //    sdigitsBranch Branch of SDigit data 
+  //
   AliFMDDebug(3, ("Runnin our version of SumContributions"));
 
   // Get a list of hits from the FMD manager 
@@ -424,7 +441,7 @@ AliFMDDigitizer::SumContributions(TBranch* sdigitsBranch)
 
 
   AliFMDDebug(3, ("Size of cache: %d bytes, read %d bytes", 
-                  sizeof(fEdep), read));
+                 int(sizeof(fEdep)), read));
 }
 
 //____________________________________________________________________