]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONTrackerACFDataMaker.cxx
Adding the array of the recosntruction parameters (Marian)
[u/mrichter/AliRoot.git] / MUON / AliMUONTrackerACFDataMaker.cxx
CommitLineData
1286237e 1/**************************************************************************
2* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3* *
4* Author: The ALICE Off-line Project. *
5* Contributors are mentioned in the code where appropriate. *
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// $Id$
17
18#include "AliMUONTrackerACFDataMaker.h"
19
20#include "AliMUONTrackerData.h"
21#include "AliMUONTrackerIO.h"
22#include "AliMUON2DMap.h"
23#include "AliMUON1DMap.h"
24#include "AliLog.h"
25#include <TString.h>
26#include <TSystem.h>
1ffbeb9d 27#include "AliMUONTrackerOCDBDataMaker.h"
1286237e 28
29///\class AliMUONTrackerACFDataMaker
30///
31/// Producer of AliMUONVTrackerData from ASCII calibration files
32///
33///\author Laurent Aphecetche, Subatech
34
35///\cond CLASSIMP
36ClassImp(AliMUONTrackerACFDataMaker)
37///\endcond
38
39//_____________________________________________________________________________
40AliMUONTrackerACFDataMaker::AliMUONTrackerACFDataMaker(const char* acfPath,
41 const char* type)
42: AliMUONVTrackerDataMaker(),
43 fIsValid(kTRUE),
44 fData(0x0),
45 fSource(Form("%s-%s",acfPath,type))
46{
47 /// Ctor
48
49 static Int_t number(0);
50
51 ++number;
52
53 AliMUONVStore* store(0x0);
54
55 TString stype(type);
56 stype.ToUpper();
1286237e 57 TString filename(gSystem->ExpandPathName(acfPath));
58
59 if ( stype == "PEDESTALS" )
60 {
1ffbeb9d 61 fData = AliMUONTrackerOCDBDataMaker::CreateDataPedestals(number);
1286237e 62 store = new AliMUON2DMap(kTRUE);
63 AliMUONTrackerIO::ReadPedestals(filename.Data(),*store);
64 }
65 else if ( stype == "GAINS" )
66 {
1ffbeb9d 67 fData = AliMUONTrackerOCDBDataMaker::CreateDataGains(number);
68 AliMUONVStore* gains = new AliMUON2DMap(kTRUE);
1286237e 69 TString comment;
1ffbeb9d 70 AliMUONTrackerIO::ReadGains(filename.Data(),*gains,comment);
71 store = AliMUONTrackerOCDBDataMaker::SplitQuality(*gains);
72 delete gains;
1286237e 73 }
74 else if ( stype == "CAPACITANCES" )
75 {
1ffbeb9d 76 fData = AliMUONTrackerOCDBDataMaker::CreateDataCapacitances(number);
1286237e 77 store = new AliMUON1DMap(20000);
78 AliMUONTrackerIO::ReadCapacitances(filename.Data(),*store);
79 }
80
81 if (!store)
82 {
83 fIsValid = kFALSE;
84 delete fData;
85 fData = 0x0;
86 AliError("Could not create store");
87 return;
88 }
89
90 fData->Add(*store);
91}
92
93//_____________________________________________________________________________
94AliMUONTrackerACFDataMaker::~AliMUONTrackerACFDataMaker()
95{
96 /// dtor
97 delete fData;
98}
99
100//_____________________________________________________________________________
101Long64_t
102AliMUONTrackerACFDataMaker::Merge(TCollection*)
103{
104 /// Merge
105 AliError("Not implemented. Does it have sense ?");
106 return 0;
107}
108