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