Avoid message E-TClonesArray::At: during digitization due to try to access non existi...
[u/mrichter/AliRoot.git] / EMCAL / AliCaloRawAnalyzerFactory.cxx
CommitLineData
92d9f317 1// -*- mode: c++ -*-
2
3/**************************************************************************
4 * This file is property of and copyright by the Experimental Nuclear *
5 * Physics Group, Dep. of Physics *
6 * University of Oslo, Norway, 2007 *
7 * *
8 * Author: Per Thomas Hille <perthi@fys.uio.no> for the ALICE HLT Project.*
9 * Contributors are mentioned in the code where appropriate. *
10 * Please report bugs to perthi@fys.uio.no *
11 * *
12 * Permission to use, copy, modify and distribute this software and its *
13 * documentation strictly for non-commercial purposes is hereby granted *
14 * without fee, provided that the above copyright notice appears in all *
15 * copies and that both the copyright notice and this permission notice *
16 * appear in the supporting documentation. The authors make no claims *
17 * about the suitability of this software for any purpose. It is *
18 * provided "as is" without express or implied warranty. *
19 **************************************************************************/
20
21#include "AliCaloRawAnalyzerFactory.h"
22#include "AliCaloRawAnalyzerFastFit.h"
23#include "AliCaloRawAnalyzerNN.h"
92d9f317 24#include "AliCaloRawAnalyzerPeakFinder.h"
25#include "AliCaloRawAnalyzerCrude.h"
92d9f317 26#include "AliCaloRawAnalyzerKStandard.h"
27#include "AliCaloRawAnalyzerFakeALTRO.h"
28
4074cc41 29#include "stdlib.h"
30
31#include <iostream>
32
33using std::cout;
34using std::endl;
35
92d9f317 36AliCaloRawAnalyzerFactory::AliCaloRawAnalyzerFactory()
37{
4074cc41 38 // Shutting up the rule checker
92d9f317 39}
40
41AliCaloRawAnalyzerFactory::~AliCaloRawAnalyzerFactory()
42{
4074cc41 43 // Shutting up the rule checker
92d9f317 44}
45
396baaf6 46
92d9f317 47AliCaloRawAnalyzer*
48AliCaloRawAnalyzerFactory::CreateAnalyzer( const int algo )
49{
396baaf6 50 // return new AliCaloRawAnalyzerKStandard();
92d9f317 51 switch ( algo)
52 {
53 case kFastFit:
54 return new AliCaloRawAnalyzerFastFit();
55 break;
56 case kNeuralNet:
57 return new AliCaloRawAnalyzerNN();
58 break;
92d9f317 59 case kPeakFinder:
f67ce0df 60 // cout << __FILE__ << ":" << __LINE__ << ": Returning new peakFinder " << endl;
92d9f317 61 return new AliCaloRawAnalyzerPeakFinder();
62 break;
63 case kCrude:
64 return new AliCaloRawAnalyzerCrude();
65 break;
92d9f317 66 case kStandard:
67 return new AliCaloRawAnalyzerKStandard();
68 break;
69 case kFakeAltro:
70 return new AliCaloRawAnalyzerFakeALTRO();
71 break;
72 default:
73 return new AliCaloRawAnalyzerCrude();
4074cc41 74 // cout << __FILE__ << __LINE__ << " ERROR, invalid analyzer" << endl;
75 //exit(-99);
92d9f317 76 break;
77 }
78}
79
80
81
82
83