]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - FMD/AliFMDMultAlgorithm.cxx
Using the recommended way of forward declarations for TVector and TMatrix (see v5...
[u/mrichter/AliRoot.git] / FMD / AliFMDMultAlgorithm.cxx
index 7c8c77871d50a6fef7781d8a693f85cab0aa040f..7c367cff042c4959ddd28e52566b8b57bc36f1ae 100644 (file)
 // Derived classes will implement various ways of reconstructing the
 // charge particle multiplicity in the FMD.  
 // 
+//      +---------------------+       +---------------------+
+//      | AliFMDReconstructor |<>-----| AliFMDMultAlgorithm |
+//      +---------------------+       +---------------------+
+//                                               ^
+//                                               |
+//                                   +-----------+---------+
+//                                   |                     |
+//                         +-------------------+   +------------------+
+//                         | AliFMDMultPoisson |   | AliFMDMultNaiive |
+//                         +-------------------+   +------------------+
+//
+// AliFMDReconstructor acts as a manager class.  It contains a list of
+// AliFMDMultAlgorithm objects.  The call graph looks something like 
+//
+//
+//       +----------------------+            +----------------------+
+//       | :AliFMDReconstructor |            | :AliFMDMultAlgorithm |
+//       +----------------------+            +----------------------+
+//                  |                                  |
+//    Reconstruct  +-+                                 |
+//    ------------>| |                         PreRun +-+
+//                 | |------------------------------->| |   
+//                 | |                                +-+
+//                 | |-----+ (for each event)          |
+//                 | |     | *ProcessEvent             |
+//                 |+-+    |                           |
+//                 || |<---+                 PreEvent +-+
+//                 || |------------------------------>| |      
+//                 || |                               +-+
+//                 || |-----+                          |
+//                 || |     | ProcessDigits            |
+//                 ||+-+    |                          |
+//                 ||| |<---+                          |
+//                 ||| |         *ProcessDigit(digit) +-+
+//                 ||| |----------------------------->| |
+//                 ||| |                              +-+
+//                 ||+-+                               |
+//                 || |                     PostEvent +-+
+//                 || |------------------------------>| |
+//                 || |                               +-+
+//                 |+-+                                |
+//                 | |                        PostRun +-+
+//                 | |------------------------------->| |
+//                 | |                                +-+
+//                 +-+                                 |
+//                  |                                  |
+//
+//
 #include "AliFMDMultAlgorithm.h"       // ALIFMDMULTALGORITHM_H
 #include "AliFMDDigit.h"               // ALIFMDDIGIT_H
 #include <TClonesArray.h>               // ROOT_TClonesArray
 
 //____________________________________________________________________
-ClassImp(AliFMDMultAlgorithm);
+ClassImp(AliFMDMultAlgorithm)
+#if 0
+  ; // This is here to keep Emacs for indenting the next line
+#endif
 
 //____________________________________________________________________
 AliFMDMultAlgorithm::AliFMDMultAlgorithm(const char* name, const char* title)
@@ -35,12 +86,18 @@ AliFMDMultAlgorithm::AliFMDMultAlgorithm(const char* name, const char* title)
     fTreeR(0), 
     fMult(0), 
     fFMD(0)
-{}
+{
+  // Default CTOR
+}
 
 //____________________________________________________________________
 AliFMDMultAlgorithm::~AliFMDMultAlgorithm()
 {
-  if (fMult) delete fMult;
+  // DTOR
+  if (fMult) {
+    fMult->Delete();
+    delete fMult;
+  }
 }
 
 
@@ -48,6 +105,7 @@ AliFMDMultAlgorithm::~AliFMDMultAlgorithm()
 void
 AliFMDMultAlgorithm::PreEvent(TTree* treeR, Float_t /* ipZ */) 
 {
+  // Executed before each event.
   if (fMult) fMult->Clear();
   fNMult = 0;
   fTreeR = treeR;