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"
45 AliHLTEMCALClusterizerComponent gAliHLTEMCALClusterizerComponent;
47 AliHLTEMCALClusterizerComponent::AliHLTEMCALClusterizerComponent():
48 AliHLTCaloClusterizerComponent("EMCAL")
50 //See headerfile for documentation
52 fDataOrigin = const_cast<char*>(kAliHLTDataOriginEMCAL);
54 //AliHLTEMCALGeometry *geom = new AliHLTEMCALGeometry;
59 AliHLTEMCALClusterizerComponent::~AliHLTEMCALClusterizerComponent()
61 //See headerfile for documentation
65 AliHLTEMCALClusterizerComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
67 //See headerfile for documentation
69 //list.push_back(AliHLTCaloDefinitions::fgkDigitDataType|kAliHLTDataOriginEMCAL);
70 list.push_back(AliHLTEMCALDefinitions::fgkDigitDataType);
73 AliHLTComponentDataType
74 AliHLTEMCALClusterizerComponent::GetOutputDataType()
76 //See headerfile for documentation
77 return kAliHLTDataTypeCaloCluster|kAliHLTDataOriginEMCAL;
81 AliHLTEMCALClusterizerComponent::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier )
84 //See headerfile for documentation
85 constBase = sizeof(AliHLTCaloRecPointHeaderStruct) + sizeof(AliHLTCaloRecPointDataStruct) + (sizeof(AliHLTCaloDigitDataStruct) << 7); //Reasonable estimate... ;
86 inputMultiplier = 2.0;
91 AliHLTEMCALClusterizerComponent::GetComponentID()
93 //See headerfile for documentation
94 return "EmcalClusterizer";
98 AliHLTEMCALClusterizerComponent::Spawn()
100 //See headerfile for documentation
102 return new AliHLTEMCALClusterizerComponent();
104 int AliHLTEMCALClusterizerComponent::DoInit(int argc, const char** argv)
106 fRecoParamsPtr = new AliHLTEMCALRecoParamHandler();
108 return AliHLTCaloClusterizerComponent::DoInit(argc, argv);
111 int AliHLTEMCALClusterizerComponent::DoDeinit()
115 delete fRecoParamsPtr;
118 return AliHLTCaloClusterizerComponent::DoDeinit();
122 int AliHLTEMCALClusterizerComponent::InitialiseGeometry()
124 fAnalyserPtr->SetGeometry(new AliHLTEMCALGeometry());