]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/CDB/AliShuttleInterface.cxx
Update master to aliroot
[u/mrichter/AliRoot.git] / STEER / CDB / 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
a1e17193 16/* $Id$ */
57459306 17
18//
19// abstract interface class to AliShuttle
20// This class is implemented by AliTestShuttle for testing and
21// by AliShuttle for the full setup
22//
23
24#include "AliShuttleInterface.h"
1b82b32d 25#include "AliLog.h"
a1e17193 26#include <TClass.h>
1b82b32d 27#include <TSystem.h>
57459306 28
29ClassImp(AliShuttleInterface)
30
5078a13f 31const char* AliShuttleInterface::fkSystemNames[4] = { "DAQ", "DCS", "HLT", "DQM" };
1b82b32d 32
33// names of the detectors preprocessors
34const char* AliShuttleInterface::fgkDetName[kNDetectors] = {"SPD", "SDD", "SSD", "TPC", "TRD", "TOF",
02a99c75 35 "PHS", "CPV", "HMP", "EMC", "MCH", "MTR", "FMD", "ZDC", "PMD", "T00", "V00", "AD0", "GRP", "HLT", "ACO", "TRI"
6299425b 36};
1b82b32d 37
38// names of the detectors in OCDB
39const char* AliShuttleInterface::fgkOfflineDetName[kNDetectors] = {"ITS", "ITS", "ITS", "TPC", "TRD", "TOF",
02a99c75 40 "PHOS", "PHOS", "HMPID", "EMCAL", "MUON", "MUON", "FMD", "ZDC", "PMD", "T0", "VZERO", "AD", "GRP", "HLT", "ACORDE", "TRIGGER"
6299425b 41};
1b82b32d 42
3fe92ec0 43TString AliShuttleInterface::fgkMainCDB("alien://folder=ShuttleCDB");
44TString AliShuttleInterface::fgkLocalCDB("local://LocalShuttleCDB");
45TString AliShuttleInterface::fgkMainRefStorage("alien://folder=ShuttleReference");
46TString AliShuttleInterface::fgkLocalRefStorage("local://LocalReferenceStorage");
c4918594 47TString AliShuttleInterface::fgkMirrorSEs("ALICE::CERN::OCDB");
3fe92ec0 48
b2eec760 49TString AliShuttleInterface::fgkShuttleTempDir("/tmp");
4426d64a 50TString AliShuttleInterface::fgkShuttleLogDir("/tmp/log");
3fe92ec0 51
1b82b32d 52//______________________________________________________________________________________________
53const char* AliShuttleInterface::GetOfflineDetName(const char* detName){
5078a13f 54 // Return "offline" detector name
1b82b32d 55
5078a13f 56 Int_t detPos = GetDetPos(detName);
57 if(detPos < 0) {
58 AliErrorClass(Form("Unknown detector: %s",detName));
59 return 0;
60 }
1b82b32d 61
5078a13f 62 return fgkOfflineDetName[detPos];
1b82b32d 63}
64
65//______________________________________________________________________________________________
66const char* AliShuttleInterface::GetDetName(UInt_t detPos){
5078a13f 67 // Return detector code
1b82b32d 68
5078a13f 69 if(detPos >= kNDetectors) {
70 AliErrorClass(Form("Parameter out of bound: %d", detPos));
71 return 0;
72 }
1b82b32d 73
5078a13f 74 return fgkDetName[detPos];
1b82b32d 75}
76
77//______________________________________________________________________________________________
f12d42ce 78Int_t AliShuttleInterface::GetDetPos(const char* detName){
5078a13f 79 // Return detector position in the detector code array
1b82b32d 80
5078a13f 81 for(UInt_t iDet=0; iDet < kNDetectors; iDet++){
82 if(!strcmp(fgkDetName[iDet], detName)) return iDet;
83 }
84 return -1;
1b82b32d 85}