]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/BASE/AliHLTOfflineInterface.cxx
Removing the lib files
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTOfflineInterface.cxx
index da07963d855eba77289a8b2cfe5fdb8ed90cbb42..218985e2db70ecf418084e6906d443504f6893f5 100644 (file)
@@ -1,26 +1,26 @@
 // $Id$
 
-/**************************************************************************
- * This file is property of and copyright by the ALICE HLT Project        * 
- * ALICE Experiment at CERN, All rights reserved.                         *
- *                                                                        *
- * Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no>        *
- *                  for The ALICE HLT Project.                            *
- *                                                                        *
- * 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.                  *
- **************************************************************************/
-
-/** @file   AliHLTOfflineInterface.cxx
-    @author Matthias Richter
-    @date   
-    @brief  the HLT interface to AliRoot
-*/
+//**************************************************************************
+//* This file is property of and copyright by the                          * 
+//* ALICE Experiment at CERN, All rights reserved.                         *
+//*                                                                        *
+//* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no>        *
+//*                  for The ALICE HLT Project.                            *
+//*                                                                        *
+//* 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.                  *
+//**************************************************************************/
+
+/// @file   AliHLTOfflineInterface.cxx
+/// @author Matthias Richter
+/// @date   
+/// @brief  the HLT interface to AliRoot
+///
 
 #include "AliHLTOfflineInterface.h"
 #include "AliHLTLogging.h"
@@ -32,18 +32,22 @@ AliHLTOfflineInterface::AliHLTOfflineInterface()
   :
   fpRunLoader(NULL),
   fpRawReader(NULL),
-  fpESD(NULL)
+  fpESD(NULL),
+  fpNext(NULL)
 {
-  // see header file for class documentation
-  // or
-  // refer to README to build package
-  // or
-  // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
-}
-
-AliHLTOfflineInterface* AliHLTOfflineInterface::fAnchor=NULL;
-AliHLTOfflineInterface* AliHLTOfflineInterface::fCurrent=NULL;
-int AliHLTOfflineInterface::fCount=0;
+  // The class implements the basic interface to the AliRoot objects during
+  // reconstructions.
+  // It serves as a base class for offline source and sink interface components
+  // and provides access methods for the AliRunLoader, AliRawReader and AliESDEvent
+  // objects. The AliRunLoader and the AliRawReader are fixed during one run,
+  // while the AliESDEvent object will be changed from event to event.<br>
+  // \em Note: The digits and clusters trees are not available through this
+  // interface class as they are completetly detector (AliLoader) dependend.
+}
+
+AliHLTOfflineInterface* AliHLTOfflineInterface::fgAnchor=NULL;
+AliHLTOfflineInterface* AliHLTOfflineInterface::fgCurrent=NULL;
+int AliHLTOfflineInterface::fgCount=0;
 AliRunLoader* AliHLTOfflineInterface::fgpRunLoader=NULL;
 AliRawReader* AliHLTOfflineInterface::fgpRawReader=NULL;
 
@@ -51,56 +55,45 @@ AliHLTOfflineInterface::AliHLTOfflineInterface(AliRunLoader* pRunLoader, AliRawR
   :
   fpRunLoader(pRunLoader),
   fpRawReader(pRawReader),
-  fpESD(NULL)
+  fpESD(NULL),
+  fpNext(NULL)
 {
-}
-
-AliHLTOfflineInterface::AliHLTOfflineInterface(const AliHLTOfflineInterface&)
-  :
-  TObject(),
-  fpRunLoader(NULL),
-  fpRawReader(NULL),
-  fpESD(NULL)
-{
-  // see header file for class documentation
-  //HLTFatal("copy constructor untested");
-}
-
-AliHLTOfflineInterface& AliHLTOfflineInterface::operator=(const AliHLTOfflineInterface&)
-{ 
-  // see header file for class documentation
-  //HLTFatal("assignment operator untested");
-  return *this;
+  // constructor
 }
 
 AliHLTOfflineInterface::~AliHLTOfflineInterface()
 {
+  // destructor
 }
 
 AliRunLoader* AliHLTOfflineInterface::GetRunLoader() const
 {
+  // set RawReader pointer
   return fpRunLoader!=NULL?fpRunLoader:fgpRunLoader;
 }
 
 AliRawReader* AliHLTOfflineInterface::GetRawReader() const
 {
+  // get RawReader pointer
   return fpRawReader!=NULL?fpRawReader:fgpRawReader;
 }
 
-int AliHLTOfflineInterface::SetESD(Int_t eventNo, AliESDEvent* pESD)
+int AliHLTOfflineInterface::SetESD(Int_t /*eventNo*/, AliESDEvent* pESD)
 {
+  // set ESD pointer
   fpESD=pESD;
   return 0;
 }
 
 AliESDEvent* AliHLTOfflineInterface::GetESD() const
 {
+  // get ESD pointer
   return fpESD;
 }
 
 int AliHLTOfflineInterface::SetParams(AliRunLoader* runLoader, AliRawReader* rawReader)
 {
-  // see header file for class documentation
+  // set parameters of the interface
   int iResult=0;
   if (fpRunLoader!=NULL && fpRunLoader!=runLoader) {
     //HLTWarning("overriding previous instance of Run Loader %p with %p", fpRunLoader, runLoader);
@@ -125,13 +118,13 @@ int AliHLTOfflineInterface::Reset()
 
 int AliHLTOfflineInterface::SetParamsToComponents(AliRunLoader* runLoader, AliRawReader* rawReader)
 {
-  // see header file for class documentation
+  // pass parameters to registered components
   AliHLTLogging log;
   int iResult=0;
   int count=0;
   fgpRunLoader=runLoader;
   fgpRawReader=rawReader;
-  AliHLTOfflineInterface* pCurrent=fAnchor;
+  AliHLTOfflineInterface* pCurrent=fgAnchor;
   while (pCurrent!=NULL) {
     int iLocal=0;
     if (pCurrent) iLocal=pCurrent->SetParams(runLoader, rawReader);
@@ -152,9 +145,9 @@ int AliHLTOfflineInterface::SetParamsToComponents(AliRunLoader* runLoader, AliRa
 
 int AliHLTOfflineInterface::ResetComponents()
 {
-  // see header file for class documentation
+  // loop over registered components and call Reset
   int iResult=0;
-  AliHLTOfflineInterface* pCurrent=fAnchor;
+  AliHLTOfflineInterface* pCurrent=fgAnchor;
   while (pCurrent!=NULL) {
     int iLocal=0;
     if (pCurrent) iLocal=pCurrent->Reset();
@@ -168,15 +161,15 @@ int AliHLTOfflineInterface::ResetComponents()
 
 int AliHLTOfflineInterface::FillComponentESDs(int eventNo, AliRunLoader* runLoader, AliESDEvent* esd)
 {
-  // see header file for class documentation
+  // loop ove registered components and call FillESD function
   int iResult=0;
-  AliHLTOfflineInterface* pCurrent=fAnchor;
+  AliHLTOfflineInterface* pCurrent=fgAnchor;
   while (pCurrent!=NULL) {
     int iLocal=0;
     if (pCurrent) {
       pCurrent->SetESD(eventNo, esd);
       if (pCurrent->GetRunLoader()!=runLoader) {
-       //HLTWarning("runLoader missmatch: component %p was reconstructed with runLoader %p, but got %p now", pCurrent, pCurrent->GetRunLoader(), runLoader);
+       //HLTWarning("runLoader mismatch: component %p was reconstructed with runLoader %p, but got %p now", pCurrent, pCurrent->GetRunLoader(), runLoader);
       }
       iLocal=pCurrent->FillESD(eventNo, runLoader, esd);
     }
@@ -190,36 +183,36 @@ int AliHLTOfflineInterface::FillComponentESDs(int eventNo, AliRunLoader* runLoad
 
 int AliHLTOfflineInterface::Register(AliHLTOfflineInterface* me)
 {
-  // see header file for function documentation
+  // register a component in the list of offline interface components
   int iResult=0;
-  if (fAnchor==NULL) {
-    fAnchor=me;
+  if (fgAnchor==NULL) {
+    fgAnchor=me;
   } else {
-    me->fpNext=fAnchor;
-    fAnchor=me;
+    me->fpNext=fgAnchor;
+    fgAnchor=me;
   }
-  fCount++;
+  fgCount++;
   return iResult;
 }
 
 int AliHLTOfflineInterface::Unregister(AliHLTOfflineInterface* me)
 {
-  // see header file for function documentation
+  // remove a component from the list
   int iResult=0;
-  fCurrent=NULL;
+  fgCurrent=NULL;
   AliHLTOfflineInterface* prev=NULL;
-  AliHLTOfflineInterface* handler=fAnchor;
+  AliHLTOfflineInterface* handler=fgAnchor;
   while (handler!=NULL && handler!=me) {
     prev=handler;
     handler=handler->fpNext;
   }
   if (handler) {
     if (prev==NULL) {
-      fAnchor=handler->fpNext;
+      fgAnchor=handler->fpNext;
     } else {
       prev->fpNext=handler->fpNext;
     }
-    fCount--;
+    fgCount--;
   }
   return iResult;
 }