1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
19 // abstract interface class to AliShuttle
20 // This class is implemented by AliTestShuttle for testing and
21 // by AliShuttle for the full setup
24 #include "AliShuttleInterface.h"
29 ClassImp(AliShuttleInterface)
31 const char* AliShuttleInterface::fkSystemNames[3] = { "DAQ", "DCS", "HLT" };
33 // names of the detectors preprocessors
34 const char* AliShuttleInterface::fgkDetName[kNDetectors] = {"SPD", "SDD", "SSD", "TPC", "TRD", "TOF",
35 "PHS", "CPV", "HMP", "EMC", "MCH", "MTR", "FMD", "ZDC", "PMD", "T00", "V00", "GRP"};
37 // names of the detectors in OCDB
38 const char* AliShuttleInterface::fgkOfflineDetName[kNDetectors] = {"ITS", "ITS", "ITS", "TPC", "TRD", "TOF",
39 "PHOS", "PHOS", "HMPID", "EMCAL", "MUON", "MUON", "FMD", "ZDC", "PMD", "T0", "VZERO", "GRP"};
41 TString AliShuttleInterface::fgkMainCDB("alien://folder=ShuttleCDB");
42 TString AliShuttleInterface::fgkLocalCDB("local://LocalShuttleCDB");
43 TString AliShuttleInterface::fgkMainRefStorage("alien://folder=ShuttleReference");
44 TString AliShuttleInterface::fgkLocalRefStorage("local://LocalReferenceStorage");
46 TString AliShuttleInterface::fgkShuttleTempDir = gSystem->ExpandPathName("$ALICE_ROOT/SHUTTLE/temp");
47 TString AliShuttleInterface::fgkShuttleLogDir = gSystem->ExpandPathName("$ALICE_ROOT/SHUTTLE/log");
49 //______________________________________________________________________________________________
50 const char* AliShuttleInterface::GetOfflineDetName(const char* detName){
51 // Return "offline" detector name
53 Int_t detPos = GetDetPos(detName);
55 AliErrorClass(Form("Unknown detector: %s",detName));
59 return fgkOfflineDetName[detPos];
62 //______________________________________________________________________________________________
63 const char* AliShuttleInterface::GetDetName(UInt_t detPos){
64 // Return detector code
66 if(detPos >= kNDetectors) {
67 AliErrorClass(Form("Parameter out of bound: %d", detPos));
71 return fgkDetName[detPos];
74 //______________________________________________________________________________________________
75 const Int_t AliShuttleInterface::GetDetPos(const char* detName){
76 // Return detector position in the detector code array
78 for(UInt_t iDet=0; iDet < kNDetectors; iDet++){
79 if(!strcmp(fgkDetName[iDet], detName)) return iDet;
84 //______________________________________________________________________________________________
85 void AliShuttleInterface::SetShuttleTempDir(const char* tmpDir)
87 // sets Shuttle temp directory
89 fgkShuttleTempDir = gSystem->ExpandPathName(tmpDir);
92 //______________________________________________________________________________________________
93 void AliShuttleInterface::SetShuttleLogDir(const char* logDir)
95 // sets Shuttle log directory
97 fgkShuttleLogDir = gSystem->ExpandPathName(logDir);