Commented out the large arrays of TH2 histograms as it is not used yet.
[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
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
31const char* AliShuttleInterface::fkSystemNames[3] = { "DAQ", "DCS", "HLT" };
1b82b32d 32
33// names of the detectors preprocessors
34const char* AliShuttleInterface::fgkDetName[kNDetectors] = {"SPD", "SDD", "SSD", "TPC", "TRD", "TOF",
a4e34333 35 "PHS", "CPV", "HMP", "EMC", "MCH", "MTR", "FMD", "ZDC", "PMD", "T00", "V00", "GRP"};
1b82b32d 36
37// names of the detectors in OCDB
38const char* AliShuttleInterface::fgkOfflineDetName[kNDetectors] = {"ITS", "ITS", "ITS", "TPC", "TRD", "TOF",
a4e34333 39 "PHOS", "PHOS", "HMPID", "EMCAL", "MUON", "MUON", "FMD", "ZDC", "PMD", "T0", "VZERO", "GRP"};
1b82b32d 40
3fe92ec0 41TString AliShuttleInterface::fgkMainCDB("alien://folder=ShuttleCDB");
42TString AliShuttleInterface::fgkLocalCDB("local://LocalShuttleCDB");
43TString AliShuttleInterface::fgkMainRefStorage("alien://folder=ShuttleReference");
44TString AliShuttleInterface::fgkLocalRefStorage("local://LocalReferenceStorage");
45
b2eec760 46TString AliShuttleInterface::fgkShuttleTempDir("/tmp");
47TString AliShuttleInterface::fgkShuttleLogDir("/tmp");
3fe92ec0 48
1b82b32d 49//______________________________________________________________________________________________
50const char* AliShuttleInterface::GetOfflineDetName(const char* detName){
51// Return "offline" detector name
52
53 Int_t detPos = GetDetPos(detName);
54 if(detPos < 0) {
55 AliErrorClass(Form("Unknown detector: %s",detName));
56 return 0;
57 }
58
59 return fgkOfflineDetName[detPos];
60}
61
62//______________________________________________________________________________________________
63const char* AliShuttleInterface::GetDetName(UInt_t detPos){
64// Return detector code
65
66 if(detPos >= kNDetectors) {
67 AliErrorClass(Form("Parameter out of bound: %d", detPos));
68 return 0;
69 }
70
71 return fgkDetName[detPos];
72}
73
74//______________________________________________________________________________________________
14b34be5 75Int_t AliShuttleInterface::GetDetPos(const char* detName){
1b82b32d 76// Return detector position in the detector code array
77
78 for(UInt_t iDet=0; iDet < kNDetectors; iDet++){
79 if(!strcmp(fgkDetName[iDet], detName)) return iDet;
80 }
81 return -1;
82}
3fe92ec0 83
84//______________________________________________________________________________________________
85void AliShuttleInterface::SetShuttleTempDir(const char* tmpDir)
86{
87// sets Shuttle temp directory
88
89 fgkShuttleTempDir = gSystem->ExpandPathName(tmpDir);
90}
91
92//______________________________________________________________________________________________
93void AliShuttleInterface::SetShuttleLogDir(const char* logDir)
94{
95// sets Shuttle log directory
96
97 fgkShuttleLogDir = gSystem->ExpandPathName(logDir);
98}