]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/EMCAL/AliHLTEMCALClusterizerComponent.cxx
Update master to aliroot
[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
f7e647fe 45AliHLTEMCALClusterizerComponent::AliHLTEMCALClusterizerComponent():
46 AliHLTCaloClusterizerComponent("EMCAL")
4a8f32a0 47{
f7e647fe 48 //See headerfile for documentation
4a8f32a0 49
f7e647fe 50 fDataOrigin = const_cast<char*>(kAliHLTDataOriginEMCAL);
a558187d 51
a6db7bcd 52 //AliHLTEMCALGeometry *geom = new AliHLTEMCALGeometry;
f7e647fe 53
f7e647fe 54
a558187d 55}
56
f7e647fe 57AliHLTEMCALClusterizerComponent::~AliHLTEMCALClusterizerComponent()
a558187d 58{
f7e647fe 59 //See headerfile for documentation
a558187d 60}
61
f7e647fe 62void
63AliHLTEMCALClusterizerComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
4a8f32a0 64{
f7e647fe 65 //See headerfile for documentation
66 list.clear();
bb29f0e9 67 //list.push_back(AliHLTCaloDefinitions::fgkDigitDataType|kAliHLTDataOriginEMCAL);
68 list.push_back(AliHLTEMCALDefinitions::fgkDigitDataType);
4a8f32a0 69}
70
f7e647fe 71AliHLTComponentDataType
72AliHLTEMCALClusterizerComponent::GetOutputDataType()
4a8f32a0 73{
f7e647fe 74 //See headerfile for documentation
bb29f0e9 75 return kAliHLTDataTypeCaloCluster|kAliHLTDataOriginEMCAL;
4a8f32a0 76}
77
f7e647fe 78void
79AliHLTEMCALClusterizerComponent::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier )
a558187d 80
4a8f32a0 81{
f7e647fe 82 //See headerfile for documentation
83 constBase = sizeof(AliHLTCaloRecPointHeaderStruct) + sizeof(AliHLTCaloRecPointDataStruct) + (sizeof(AliHLTCaloDigitDataStruct) << 7); //Reasonable estimate... ;
84 inputMultiplier = 2.0;
4a8f32a0 85}
86
f7e647fe 87
88const Char_t*
89AliHLTEMCALClusterizerComponent::GetComponentID()
4a8f32a0 90{
f7e647fe 91 //See headerfile for documentation
a6db7bcd 92 return "EmcalClusterizer";
4a8f32a0 93}
94
f7e647fe 95AliHLTComponent*
96AliHLTEMCALClusterizerComponent::Spawn()
4a8f32a0 97{
f7e647fe 98 //See headerfile for documentation
99
100 return new AliHLTEMCALClusterizerComponent();
4a8f32a0 101}
427c373f 102int AliHLTEMCALClusterizerComponent::DoInit(int argc, const char** argv)
103{
4e33deaf 104 fClusterizerPtr = new AliHLTCaloClusterizer("EMCAL");
105
106 fRecoParamsPtr = new AliHLTEMCALRecoParamHandler();
427c373f 107
108 return AliHLTCaloClusterizerComponent::DoInit(argc, argv);
109}
110
111int AliHLTEMCALClusterizerComponent::DoDeinit()
112{
113 if(fRecoParamsPtr)
114 {
115 delete fRecoParamsPtr;
116 fRecoParamsPtr = 0;
117 }
118 return AliHLTCaloClusterizerComponent::DoDeinit();
119}
120
7b3a0a0e 121
122int AliHLTEMCALClusterizerComponent::InitialiseGeometry()
123{
124 fAnalyserPtr->SetGeometry(new AliHLTEMCALGeometry());
427c373f 125
7b3a0a0e 126 return 0;
127}