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 "AliHLTPHOSClusterizerComponent.h"
20 #include "AliHLTCaloRecPointDataStruct.h"
21 #include "AliHLTCaloRecPointHeaderStruct.h"
22 #include "AliHLTPHOSGeometry.h"
23 #include "AliHLTCaloClusterAnalyser.h"
28 /** @file AliHLTPHOSClusterizerComponent.cxx
29 @author Oystein Djuvsland
31 @brief A clusterizer component for PHOS HLT
34 // see header file for class documentation
36 // refer to README to build package
38 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
39 #include "AliHLTCaloDefinitions.h"
40 #include "AliHLTPHOSGeometry.h"
41 #include "AliHLTPHOSRecoParamHandler.h"
42 #include "AliHLTCaloClusterizer.h"
44 AliHLTPHOSClusterizerComponent::AliHLTPHOSClusterizerComponent():
45 AliHLTCaloClusterizerComponent("PHOS")
47 //See headerfile for documentation
49 fDataOrigin = const_cast<char*>(kAliHLTDataOriginPHOS);
51 //AliHLTPHOSGeometry *geom = new AliHLTPHOSGeometry;
55 AliHLTPHOSClusterizerComponent::~AliHLTPHOSClusterizerComponent()
57 //See headerfile for documentation
61 AliHLTPHOSClusterizerComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
63 //See headerfile for documentation
65 list.push_back(AliHLTCaloDefinitions::fgkDigitDataType|kAliHLTDataOriginPHOS);
68 AliHLTComponentDataType
69 AliHLTPHOSClusterizerComponent::GetOutputDataType()
71 //See headerfile for documentation
72 return kAliHLTDataTypeCaloCluster|kAliHLTDataOriginPHOS;
76 AliHLTPHOSClusterizerComponent::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier )
79 //See headerfile for documentation
80 constBase = sizeof(AliHLTCaloRecPointHeaderStruct) + sizeof(AliHLTCaloRecPointDataStruct) + (sizeof(AliHLTCaloDigitDataStruct) << 7); //Reasonable estimate... ;
81 inputMultiplier = 2.0;
85 AliHLTPHOSClusterizerComponent::GetComponentID()
87 //See headerfile for documentation
88 return "PhosClusterizer";
92 AliHLTPHOSClusterizerComponent::Spawn()
94 //See headerfile for documentation
96 return new AliHLTPHOSClusterizerComponent();
99 int AliHLTPHOSClusterizerComponent::DoInit(int argc, const char** argv)
102 fClusterizerPtr = new AliHLTCaloClusterizer("PHOS");
104 fRecoParamsPtr = new AliHLTPHOSRecoParamHandler();
106 return AliHLTCaloClusterizerComponent::DoInit(argc, argv);
109 int AliHLTPHOSClusterizerComponent::DoDeinit()
113 delete fRecoParamsPtr;
116 return AliHLTCaloClusterizerComponent::DoDeinit();
120 Int_t AliHLTPHOSClusterizerComponent::InitialiseGeometry()
123 fAnalyserPtr->SetGeometry(new AliHLTPHOSGeometry);