]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/EMCAL/AliHLTEMCALClusterizerComponent.cxx
Optimisation
[u/mrichter/AliRoot.git] / HLT / EMCAL / AliHLTEMCALClusterizerComponent.cxx
CommitLineData
f7e647fe 1// $Id$
2
4a8f32a0 3/**************************************************************************
f7e647fe 4 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4a8f32a0 5 * *
f7e647fe 6 * Authors: Oystein Djuvsland <oysteind@ift.uib.no> *
4a8f32a0 7 * *
8 * Permission to use, copy, modify and distribute this software and its *
7b3a0a0e 9 * `documentation strictly for non-commercial purposes is hereby granted *
4a8f32a0 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
f7e647fe 17#include <iostream>
4a8f32a0 18
19#include "AliHLTEMCALClusterizerComponent.h"
f7e647fe 20#include "AliHLTCaloRecPointDataStruct.h"
21#include "AliHLTCaloRecPointHeaderStruct.h"
22#include "AliHLTEMCALGeometry.h"
427c373f 23#include "AliHLTEMCALRecoParamHandler.h"
f7e647fe 24#include "AliHLTCaloClusterAnalyser.h"
4a8f32a0 25
a558187d 26
4a8f32a0 27
4a8f32a0 28
f7e647fe 29/** @file AliHLTEMCALClusterizerComponent.cxx
30 @author Oystein Djuvsland
31 @date
32 @brief A clusterizer component for EMCAL HLT
33*/
4a8f32a0 34
f7e647fe 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
4a8f32a0 40
f7e647fe 41#include "AliHLTCaloDefinitions.h"
bb29f0e9 42#include "AliHLTEMCALDefinitions.h"
4e33deaf 43#include "AliHLTCaloClusterizer.h"
bb29f0e9 44
4a8f32a0 45
f7e647fe 46AliHLTEMCALClusterizerComponent gAliHLTEMCALClusterizerComponent;
4a8f32a0 47
f7e647fe 48AliHLTEMCALClusterizerComponent::AliHLTEMCALClusterizerComponent():
49 AliHLTCaloClusterizerComponent("EMCAL")
4a8f32a0 50{
f7e647fe 51 //See headerfile for documentation
4a8f32a0 52
f7e647fe 53 fDataOrigin = const_cast<char*>(kAliHLTDataOriginEMCAL);
a558187d 54
a6db7bcd 55 //AliHLTEMCALGeometry *geom = new AliHLTEMCALGeometry;
f7e647fe 56
f7e647fe 57
a558187d 58}
59
f7e647fe 60AliHLTEMCALClusterizerComponent::~AliHLTEMCALClusterizerComponent()
a558187d 61{
f7e647fe 62 //See headerfile for documentation
a558187d 63}
64
f7e647fe 65void
66AliHLTEMCALClusterizerComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
4a8f32a0 67{
f7e647fe 68 //See headerfile for documentation
69 list.clear();
bb29f0e9 70 //list.push_back(AliHLTCaloDefinitions::fgkDigitDataType|kAliHLTDataOriginEMCAL);
71 list.push_back(AliHLTEMCALDefinitions::fgkDigitDataType);
4a8f32a0 72}
73
f7e647fe 74AliHLTComponentDataType
75AliHLTEMCALClusterizerComponent::GetOutputDataType()
4a8f32a0 76{
f7e647fe 77 //See headerfile for documentation
bb29f0e9 78 return kAliHLTDataTypeCaloCluster|kAliHLTDataOriginEMCAL;
4a8f32a0 79}
80
f7e647fe 81void
82AliHLTEMCALClusterizerComponent::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier )
a558187d 83
4a8f32a0 84{
f7e647fe 85 //See headerfile for documentation
86 constBase = sizeof(AliHLTCaloRecPointHeaderStruct) + sizeof(AliHLTCaloRecPointDataStruct) + (sizeof(AliHLTCaloDigitDataStruct) << 7); //Reasonable estimate... ;
87 inputMultiplier = 2.0;
4a8f32a0 88}
89
f7e647fe 90
91const Char_t*
92AliHLTEMCALClusterizerComponent::GetComponentID()
4a8f32a0 93{
f7e647fe 94 //See headerfile for documentation
a6db7bcd 95 return "EmcalClusterizer";
4a8f32a0 96}
97
f7e647fe 98AliHLTComponent*
99AliHLTEMCALClusterizerComponent::Spawn()
4a8f32a0 100{
f7e647fe 101 //See headerfile for documentation
102
103 return new AliHLTEMCALClusterizerComponent();
4a8f32a0 104}
427c373f 105int AliHLTEMCALClusterizerComponent::DoInit(int argc, const char** argv)
106{
4e33deaf 107 fClusterizerPtr = new AliHLTCaloClusterizer("EMCAL");
108
109 fRecoParamsPtr = new AliHLTEMCALRecoParamHandler();
427c373f 110
111 return AliHLTCaloClusterizerComponent::DoInit(argc, argv);
112}
113
114int AliHLTEMCALClusterizerComponent::DoDeinit()
115{
116 if(fRecoParamsPtr)
117 {
118 delete fRecoParamsPtr;
119 fRecoParamsPtr = 0;
120 }
121 return AliHLTCaloClusterizerComponent::DoDeinit();
122}
123
7b3a0a0e 124
125int AliHLTEMCALClusterizerComponent::InitialiseGeometry()
126{
127 fAnalyserPtr->SetGeometry(new AliHLTEMCALGeometry());
427c373f 128
7b3a0a0e 129 return 0;
130}