3 /**************************************************************************
4 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6 * Authors: Oystein Djuvsland <oysteind@ift.uib.no> *
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 **************************************************************************/
19 #include "AliHLTEMCALClusterizerComponent.h"
20 #include "AliHLTCaloRecPointDataStruct.h"
21 #include "AliHLTCaloRecPointHeaderStruct.h"
22 #include "AliHLTEMCALGeometry.h"
23 #include "AliHLTEMCALRecoParamHandler.h"
24 #include "AliHLTCaloClusterAnalyser.h"
29 /** @file AliHLTEMCALClusterizerComponent.cxx
30 @author Oystein Djuvsland
32 @brief A clusterizer component for EMCAL HLT
35 // see header file for class documentation
37 // refer to README to build package
39 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
41 #include "AliHLTCaloDefinitions.h"
42 #include "AliHLTEMCALDefinitions.h"
43 #include "AliHLTCaloClusterizer.h"
46 AliHLTEMCALClusterizerComponent gAliHLTEMCALClusterizerComponent;
48 AliHLTEMCALClusterizerComponent::AliHLTEMCALClusterizerComponent():
49 AliHLTCaloClusterizerComponent("EMCAL")
51 //See headerfile for documentation
53 fDataOrigin = const_cast<char*>(kAliHLTDataOriginEMCAL);
55 //AliHLTEMCALGeometry *geom = new AliHLTEMCALGeometry;
60 AliHLTEMCALClusterizerComponent::~AliHLTEMCALClusterizerComponent()
62 //See headerfile for documentation
66 AliHLTEMCALClusterizerComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
68 //See headerfile for documentation
70 //list.push_back(AliHLTCaloDefinitions::fgkDigitDataType|kAliHLTDataOriginEMCAL);
71 list.push_back(AliHLTEMCALDefinitions::fgkDigitDataType);
74 AliHLTComponentDataType
75 AliHLTEMCALClusterizerComponent::GetOutputDataType()
77 //See headerfile for documentation
78 return kAliHLTDataTypeCaloCluster|kAliHLTDataOriginEMCAL;
82 AliHLTEMCALClusterizerComponent::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier )
85 //See headerfile for documentation
86 constBase = sizeof(AliHLTCaloRecPointHeaderStruct) + sizeof(AliHLTCaloRecPointDataStruct) + (sizeof(AliHLTCaloDigitDataStruct) << 7); //Reasonable estimate... ;
87 inputMultiplier = 2.0;
92 AliHLTEMCALClusterizerComponent::GetComponentID()
94 //See headerfile for documentation
95 return "EmcalClusterizer";
99 AliHLTEMCALClusterizerComponent::Spawn()
101 //See headerfile for documentation
103 return new AliHLTEMCALClusterizerComponent();
105 int AliHLTEMCALClusterizerComponent::DoInit(int argc, const char** argv)
107 fClusterizerPtr = new AliHLTCaloClusterizer("EMCAL");
109 fRecoParamsPtr = new AliHLTEMCALRecoParamHandler();
111 return AliHLTCaloClusterizerComponent::DoInit(argc, argv);
114 int AliHLTEMCALClusterizerComponent::DoDeinit()
118 delete fRecoParamsPtr;
121 return AliHLTCaloClusterizerComponent::DoDeinit();
125 int AliHLTEMCALClusterizerComponent::InitialiseGeometry()
127 fAnalyserPtr->SetGeometry(new AliHLTEMCALGeometry());