2 /**************************************************************************
3 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * Authors: Oystein Djuvsland <oysteind@ift.uib.no> *
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 **************************************************************************/
17 #include "AliHLTPHOSClusterizerComponentNbyN.h"
18 #include "AliHLTCaloClusterizerNbyN.h"
20 ClassImp(AliHLTPHOSClusterizerComponentNbyN);
22 AliHLTPHOSClusterizerComponentNbyN gAliHLTPHOSClusterizerComponentNbyN;
24 AliHLTPHOSClusterizerComponentNbyN::AliHLTPHOSClusterizerComponentNbyN() : AliHLTPHOSClusterizerComponent()
29 AliHLTPHOSClusterizerComponentNbyN::~AliHLTPHOSClusterizerComponentNbyN()
35 const char* AliHLTPHOSClusterizerComponentNbyN::GetComponentID()
37 // See header file for class documentation
38 return "PhosClusterizerNbyN";
42 int AliHLTPHOSClusterizerComponentNbyN::DoInit(int argc, const char** argv)
44 // See header file for class documentation
45 fClusterizerPtr = new AliHLTCaloClusterizerNbyN("PHOS");
47 return AliHLTPHOSClusterizerComponent::DoInit(argc, argv);
50 int AliHLTPHOSClusterizerComponentNbyN::ScanConfigurationArgument(int argc, const char** argv)
52 // See header file for class documentation
54 if (argc <= 0) return 0;
58 TString argument=argv[i];
60 if (argument.CompareTo("-gridsize") == 0)
62 if (++i >= argc) return -EPROTO;
64 AliHLTCaloClusterizerNbyN* tmp = dynamic_cast<AliHLTCaloClusterizerNbyN*>(fClusterizerPtr);
65 tmp->SetGridDimension(argument.Atoi());
69 return AliHLTCaloClusterizerComponent::ScanConfigurationArgument(argc, argv);
74 AliHLTPHOSClusterizerComponentNbyN::Spawn()
76 //See headerfile for documentation
78 return new AliHLTPHOSClusterizerComponentNbyN();