]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/PHOS/AliHLTPHOSClusterizerComponentNbyN.cxx
- fixing major bug in clusterizer causing almost all events to contain only one cluster
[u/mrichter/AliRoot.git] / HLT / PHOS / AliHLTPHOSClusterizerComponentNbyN.cxx
CommitLineData
60909644 1
2/**************************************************************************
3 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * *
5 * Authors: Oystein Djuvsland <oysteind@ift.uib.no> *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16
17#include "AliHLTPHOSClusterizerComponentNbyN.h"
18#include "AliHLTCaloClusterizerNbyN.h"
19
20ClassImp(AliHLTPHOSClusterizerComponentNbyN);
21
22AliHLTPHOSClusterizerComponentNbyN gAliHLTPHOSClusterizerComponentNbyN;
23
24AliHLTPHOSClusterizerComponentNbyN::AliHLTPHOSClusterizerComponentNbyN() : AliHLTPHOSClusterizerComponent()
25{
26// Constructor
27}
28
29AliHLTPHOSClusterizerComponentNbyN::~AliHLTPHOSClusterizerComponentNbyN()
30{
31// Destructor
32}
33
34
35const char* AliHLTPHOSClusterizerComponentNbyN::GetComponentID()
36{
37 // See header file for class documentation
38 return "PhosClusterizerNbyN";
39}
40
41
42int AliHLTPHOSClusterizerComponentNbyN::DoInit(int argc, const char** argv)
43{
44 // See header file for class documentation
45 fClusterizerPtr = new AliHLTCaloClusterizerNbyN("PHOS");
46
47 return AliHLTPHOSClusterizerComponent::DoInit(argc, argv);
48}
49
50int AliHLTPHOSClusterizerComponentNbyN::ScanConfigurationArgument(int argc, const char** argv)
51{
52// See header file for class documentation
53
54 if (argc <= 0) return 0;
55
56 int i=0;
57
58 TString argument=argv[i];
59
60 if (argument.CompareTo("-gridsize") == 0)
61 {
62 if (++i >= argc) return -EPROTO;
63 argument = argv[i];
8eb80570 64 AliHLTCaloClusterizerNbyN* tmp = dynamic_cast<AliHLTCaloClusterizerNbyN*>(fClusterizerPtr);
44b28d5c 65 if(tmp)
66 {
67 tmp->SetGridDimension(argument.Atoi());
68 }
69 else
70 {
71 return -1;
72 }
60909644 73 return 1;
74 }
75
76 return AliHLTCaloClusterizerComponent::ScanConfigurationArgument(argc, argv);
77
78}
79
80AliHLTComponent*
81AliHLTPHOSClusterizerComponentNbyN::Spawn()
82{
83 //See headerfile for documentation
84
85 return new AliHLTPHOSClusterizerComponentNbyN();
86}