]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliShuttleInterface.cxx
Fixing a memory leak.
[u/mrichter/AliRoot.git] / STEER / AliShuttleInterface.cxx
CommitLineData
57459306 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/*
17$Log$
1b82b32d 18Revision 1.1 2006/06/02 14:14:36 hristov
19Separate library for CDB (Jan)
20
57459306 21Revision 1.2 2006/03/07 07:52:34 hristov
22New version (B.Yordanov)
23
24Revision 1.3 2005/11/17 17:47:34 byordano
25TList changed to TObjArray
26
27Revision 1.2 2005/11/17 14:43:22 byordano
28import to local CVS
29
30Revision 1.1.1.1 2005/10/28 07:33:58 hristov
31Initial import as subdirectory in AliRoot
32
33Revision 1.1.1.1 2005/09/12 22:11:40 byordano
34SHUTTLE package
35
36Revision 1.2 2005/08/29 21:15:47 byordano
37some docs added
38
39*/
40
41//
42// abstract interface class to AliShuttle
43// This class is implemented by AliTestShuttle for testing and
44// by AliShuttle for the full setup
45//
46
47#include "AliShuttleInterface.h"
1b82b32d 48#include "AliLog.h"
49#include <TSystem.h>
57459306 50
51ClassImp(AliShuttleInterface)
52
53const char* AliShuttleInterface::fkSystemNames[3] = { "DAQ", "DCS", "HLT" };
1b82b32d 54
55// names of the detectors preprocessors
56const char* AliShuttleInterface::fgkDetName[kNDetectors] = {"SPD", "SDD", "SSD", "TPC", "TRD", "TOF",
57 "PHS", "CPV", "HMP", "EMC", "MCH", "MTR", "FMD", "ZDC", "PMD", "T00", "V00"};
58
59// names of the detectors in OCDB
60const char* AliShuttleInterface::fgkOfflineDetName[kNDetectors] = {"ITS", "ITS", "ITS", "TPC", "TRD", "TOF",
61 "PHOS", "PHOS", "RICH", "EMCAL", "MUON", "MUON", "FMD", "ZDC", "PMD", "START", "VZERO"};
62
63//______________________________________________________________________________________________
64const char* AliShuttleInterface::GetOfflineDetName(const char* detName){
65// Return "offline" detector name
66
67 Int_t detPos = GetDetPos(detName);
68 if(detPos < 0) {
69 AliErrorClass(Form("Unknown detector: %s",detName));
70 return 0;
71 }
72
73 return fgkOfflineDetName[detPos];
74}
75
76//______________________________________________________________________________________________
77const char* AliShuttleInterface::GetDetName(UInt_t detPos){
78// Return detector code
79
80 if(detPos >= kNDetectors) {
81 AliErrorClass(Form("Parameter out of bound: %d", detPos));
82 return 0;
83 }
84
85 return fgkDetName[detPos];
86}
87
88//______________________________________________________________________________________________
89const Int_t AliShuttleInterface::GetDetPos(const char* detName){
90// Return detector position in the detector code array
91
92 for(UInt_t iDet=0; iDet < kNDetectors; iDet++){
93 if(!strcmp(fgkDetName[iDet], detName)) return iDet;
94 }
95 return -1;
96}