]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/EMCAL/AliHLTEMCALClusterizerComponent.cxx
Refactoring: rempved the usage of AliHLTEMCALConstant
[u/mrichter/AliRoot.git] / HLT / EMCAL / AliHLTEMCALClusterizerComponent.cxx
1 // $Id$
2
3 /**************************************************************************
4  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  *                                                                        *
6  * Authors: Oystein Djuvsland <oysteind@ift.uib.no>                       *
7  *                                                                        *
8  * Permission to use, copy, modify and distribute this software and its   *
9  * `documentation strictly for non-commercial purposes is hereby granted   *
10  * without fee, provided that the above copyright notice appears in all   *
11  * copies and that both the copyright notice and this permission notice   *
12  * appear in the supporting documentation. The authors make no claims     *
13  * about the suitability of this software for any purpose. It is          *
14  * provided "as is" without express or implied warranty.                  *
15  **************************************************************************/
16
17 #include <iostream>
18
19 #include "AliHLTEMCALClusterizerComponent.h"
20 #include "AliHLTCaloRecPointDataStruct.h"
21 #include "AliHLTCaloRecPointHeaderStruct.h"
22 #include "AliHLTEMCALGeometry.h"
23 #include "AliHLTEMCALRecoParamHandler.h"
24 #include "AliHLTCaloClusterAnalyser.h"
25
26
27
28
29 /** @file   AliHLTEMCALClusterizerComponent.cxx
30     @author Oystein Djuvsland
31     @date   
32     @brief  A clusterizer component for EMCAL HLT
33 */
34
35 // see header file for class documentation
36 // or
37 // refer to README to build package
38 // or
39 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
40
41 #include "AliHLTCaloDefinitions.h"
42 #include "AliHLTEMCALDefinitions.h"
43
44
45 AliHLTEMCALClusterizerComponent gAliHLTEMCALClusterizerComponent;
46
47 AliHLTEMCALClusterizerComponent::AliHLTEMCALClusterizerComponent(): 
48   AliHLTCaloClusterizerComponent("EMCAL")
49 {
50   //See headerfile for documentation
51
52   fDataOrigin = const_cast<char*>(kAliHLTDataOriginEMCAL);
53
54   //AliHLTEMCALGeometry *geom = new AliHLTEMCALGeometry;
55   
56   
57 }
58
59 AliHLTEMCALClusterizerComponent::~AliHLTEMCALClusterizerComponent()
60 {
61   //See headerfile for documentation
62 }
63
64 void
65 AliHLTEMCALClusterizerComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
66 {
67   //See headerfile for documentation
68   list.clear();
69   //list.push_back(AliHLTCaloDefinitions::fgkDigitDataType|kAliHLTDataOriginEMCAL);
70   list.push_back(AliHLTEMCALDefinitions::fgkDigitDataType);
71 }
72
73 AliHLTComponentDataType
74 AliHLTEMCALClusterizerComponent::GetOutputDataType()
75 {
76   //See headerfile for documentation
77   return kAliHLTDataTypeCaloCluster|kAliHLTDataOriginEMCAL;
78 }
79
80 void
81 AliHLTEMCALClusterizerComponent::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier )
82
83 {
84   //See headerfile for documentation
85   constBase = sizeof(AliHLTCaloRecPointHeaderStruct) + sizeof(AliHLTCaloRecPointDataStruct) + (sizeof(AliHLTCaloDigitDataStruct) << 7); //Reasonable estimate... ;
86   inputMultiplier = 2.0;
87 }
88
89
90 const Char_t*
91 AliHLTEMCALClusterizerComponent::GetComponentID()
92 {
93   //See headerfile for documentation
94   return "EmcalClusterizer";
95 }
96
97 AliHLTComponent*
98 AliHLTEMCALClusterizerComponent::Spawn()
99 {
100   //See headerfile for documentation
101
102   return new AliHLTEMCALClusterizerComponent();
103 }
104 int AliHLTEMCALClusterizerComponent::DoInit(int argc, const char** argv)
105 {
106     fRecoParamsPtr = new AliHLTEMCALRecoParamHandler();
107
108     return AliHLTCaloClusterizerComponent::DoInit(argc, argv);
109 }
110
111 int AliHLTEMCALClusterizerComponent::DoDeinit()
112 {
113    if(fRecoParamsPtr)
114    {
115       delete fRecoParamsPtr;
116       fRecoParamsPtr = 0;
117    }
118     return AliHLTCaloClusterizerComponent::DoDeinit();
119 }
120
121
122 int AliHLTEMCALClusterizerComponent::InitialiseGeometry()
123 {
124         fAnalyserPtr->SetGeometry(new AliHLTEMCALGeometry());
125
126         return 0;
127 }