Line data Source code
1 : // $Id$
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 :
20 6 : ClassImp(AliHLTPHOSClusterizerComponentNbyN);
21 :
22 0 : AliHLTPHOSClusterizerComponentNbyN::AliHLTPHOSClusterizerComponentNbyN() : AliHLTPHOSClusterizerComponent()
23 0 : {
24 : // Constructor
25 0 : }
26 :
27 0 : AliHLTPHOSClusterizerComponentNbyN::~AliHLTPHOSClusterizerComponentNbyN()
28 0 : {
29 : // Destructor
30 0 : }
31 :
32 :
33 : const char* AliHLTPHOSClusterizerComponentNbyN::GetComponentID()
34 : {
35 : // See header file for class documentation
36 0 : return "PhosClusterizerNbyN";
37 : }
38 :
39 :
40 : int AliHLTPHOSClusterizerComponentNbyN::DoInit(int argc, const char** argv)
41 : {
42 : // See header file for class documentation
43 0 : fClusterizerPtr = new AliHLTCaloClusterizerNbyN("PHOS");
44 :
45 0 : return AliHLTPHOSClusterizerComponent::DoInit(argc, argv);
46 0 : }
47 :
48 : int AliHLTPHOSClusterizerComponentNbyN::ScanConfigurationArgument(int argc, const char** argv)
49 : {
50 : // See header file for class documentation
51 :
52 0 : if (argc <= 0) return 0;
53 :
54 : int i=0;
55 :
56 0 : TString argument=argv[i];
57 :
58 0 : if (argument.CompareTo("-gridsize") == 0)
59 : {
60 0 : if (++i >= argc) return -EPROTO;
61 0 : argument = argv[i];
62 0 : AliHLTCaloClusterizerNbyN* tmp = dynamic_cast<AliHLTCaloClusterizerNbyN*>(fClusterizerPtr);
63 0 : if(tmp)
64 : {
65 0 : tmp->SetGridDimension(argument.Atoi());
66 : }
67 : else
68 : {
69 0 : return -1;
70 : }
71 0 : return 1;
72 : }
73 :
74 0 : return AliHLTCaloClusterizerComponent::ScanConfigurationArgument(argc, argv);
75 :
76 0 : }
77 :
78 : AliHLTComponent*
79 : AliHLTPHOSClusterizerComponentNbyN::Spawn()
80 : {
81 : //See headerfile for documentation
82 :
83 0 : return new AliHLTPHOSClusterizerComponentNbyN();
84 0 : }
|