]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliShuttleInterface.cxx
Removing the run DB. The information contained in the DB is still stored in the raw...
[u/mrichter/AliRoot.git] / STEER / AliShuttleInterface.cxx
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$
18 Revision 1.4  2006/11/29 16:08:01  hristov
19 START becomes T0
20
21 Revision 1.3  2006/11/29 09:53:27  hristov
22 RICH becomes HMPID
23
24 Revision 1.2  2006/11/06 14:24:21  jgrosseo
25 reading of run parameters from the logbook
26 online offline naming conversion
27
28 Revision 1.1  2006/06/02 14:14:36  hristov
29 Separate library for CDB (Jan)
30
31 Revision 1.2  2006/03/07 07:52:34  hristov
32 New version (B.Yordanov)
33
34 Revision 1.3  2005/11/17 17:47:34  byordano
35 TList changed to TObjArray
36
37 Revision 1.2  2005/11/17 14:43:22  byordano
38 import to local CVS
39
40 Revision 1.1.1.1  2005/10/28 07:33:58  hristov
41 Initial import as subdirectory in AliRoot
42
43 Revision 1.1.1.1  2005/09/12 22:11:40  byordano
44 SHUTTLE package
45
46 Revision 1.2  2005/08/29 21:15:47  byordano
47 some 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"
58 #include "AliLog.h"
59 #include <TSystem.h>
60
61 ClassImp(AliShuttleInterface)
62
63 const char* AliShuttleInterface::fkSystemNames[3] = { "DAQ", "DCS", "HLT" };
64
65 // names of the detectors preprocessors
66 const char* AliShuttleInterface::fgkDetName[kNDetectors] = {"SPD", "SDD", "SSD", "TPC", "TRD", "TOF",
67        "PHS", "CPV", "HMP", "EMC", "MCH", "MTR", "FMD", "ZDC", "PMD", "T00", "V00", "GRP"};
68
69 // names of the detectors in OCDB
70 const char* AliShuttleInterface::fgkOfflineDetName[kNDetectors] = {"ITS", "ITS", "ITS", "TPC", "TRD", "TOF",
71        "PHOS", "PHOS", "HMPID", "EMCAL", "MUON", "MUON", "FMD", "ZDC", "PMD", "T0", "VZERO", "GRP"};
72
73 //______________________________________________________________________________________________
74 const 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 //______________________________________________________________________________________________
87 const 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 //______________________________________________________________________________________________
99 const 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 }