]>
Commit | Line | Data |
---|---|---|
d522588e | 1 | |
2 | /************************************************************************** | |
3 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * * | |
5 | * Authors: Anders Knospe <anders.knospe@cern.ch> * | |
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 "AliHLTEMCALClusterizerComponentNbyN.h" | |
18 | #include "AliHLTCaloClusterizerNbyN.h" | |
19 | #include "AliHLTEMCALRecoParamHandler.h" | |
20 | ||
21 | ClassImp(AliHLTEMCALClusterizerComponentNbyN); | |
22 | ||
d522588e | 23 | AliHLTEMCALClusterizerComponentNbyN::AliHLTEMCALClusterizerComponentNbyN() : AliHLTEMCALClusterizerComponent() |
24 | { | |
25 | // Constructor | |
26 | } | |
27 | ||
28 | AliHLTEMCALClusterizerComponentNbyN::~AliHLTEMCALClusterizerComponentNbyN() | |
29 | { | |
30 | // Destructor | |
31 | } | |
32 | ||
33 | ||
34 | const char* AliHLTEMCALClusterizerComponentNbyN::GetComponentID() | |
35 | { | |
36 | // See header file for class documentation | |
37 | return "EmcalClusterizerNbyN"; | |
38 | } | |
39 | ||
40 | ||
41 | int AliHLTEMCALClusterizerComponentNbyN::DoInit(int argc, const char** argv) | |
42 | { | |
43 | // See header file for class documentation | |
44 | fClusterizerPtr = new AliHLTCaloClusterizerNbyN("EMCAL"); | |
45 | ||
46 | //return AliHLTEMCALClusterizerComponent::DoInit(argc, argv); | |
47 | ||
48 | fRecoParamsPtr = new AliHLTEMCALRecoParamHandler(); | |
49 | ||
50 | return AliHLTCaloClusterizerComponent::DoInit(argc, argv); | |
51 | } | |
52 | ||
53 | int AliHLTEMCALClusterizerComponentNbyN::ScanConfigurationArgument(int argc, const char** argv) | |
54 | { | |
55 | // See header file for class documentation | |
56 | ||
57 | if (argc <= 0) return 0; | |
58 | ||
59 | int i=0; | |
60 | ||
61 | TString argument=argv[i]; | |
62 | ||
63 | if (argument.CompareTo("-gridsize") == 0) | |
64 | { | |
65 | if (++i >= argc) return -EPROTO; | |
66 | argument = argv[i]; | |
67 | AliHLTCaloClusterizerNbyN* tmp = dynamic_cast<AliHLTCaloClusterizerNbyN*>(fClusterizerPtr); | |
68 | if(tmp) | |
69 | { | |
70 | tmp->SetGridDimension(argument.Atoi()); | |
71 | } | |
72 | else | |
73 | { | |
74 | return -1; | |
75 | } | |
76 | return 1; | |
77 | } | |
78 | ||
79 | return AliHLTCaloClusterizerComponent::ScanConfigurationArgument(argc, argv); | |
80 | ||
81 | } | |
82 | ||
83 | AliHLTComponent* | |
84 | AliHLTEMCALClusterizerComponentNbyN::Spawn() | |
85 | { | |
86 | //See headerfile for documentation | |
87 | ||
88 | return new AliHLTEMCALClusterizerComponentNbyN(); | |
89 | } |