]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliShuttleInterface.cxx
- Added new method: AliAnalysisManager::StartAnalysis(const char *mode, const char...
[u/mrichter/AliRoot.git] / STEER / AliShuttleInterface.cxx
index 6af1b0b586c4472f0faaea228a58cab073309312..8d3b4e788779fa1db80c1deec58b7141a42012a6 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
-$Log$
-Revision 1.2  2006/03/07 07:52:34  hristov
-New version (B.Yordanov)
-
-Revision 1.3  2005/11/17 17:47:34  byordano
-TList changed to TObjArray
-
-Revision 1.2  2005/11/17 14:43:22  byordano
-import to local CVS
-
-Revision 1.1.1.1  2005/10/28 07:33:58  hristov
-Initial import as subdirectory in AliRoot
-
-Revision 1.1.1.1  2005/09/12 22:11:40  byordano
-SHUTTLE package
-
-Revision 1.2  2005/08/29 21:15:47  byordano
-some docs added
-
-*/
+/* $Id$ */
 
 //
 // abstract interface class to AliShuttle
@@ -42,7 +22,61 @@ some docs added
 //
 
 #include "AliShuttleInterface.h"
+#include "AliLog.h"
+#include <TClass.h>
+#include <TSystem.h>
 
 ClassImp(AliShuttleInterface)
 
 const char* AliShuttleInterface::fkSystemNames[3] = { "DAQ", "DCS", "HLT" };
+
+// names of the detectors preprocessors
+const char* AliShuttleInterface::fgkDetName[kNDetectors] = {"SPD", "SDD", "SSD", "TPC", "TRD", "TOF",
+       "PHS", "CPV", "HMP", "EMC", "MCH", "MTR", "FMD", "ZDC", "PMD", "T00", "V00", "GRP", "HLT", "ACO"};
+
+// names of the detectors in OCDB
+const char* AliShuttleInterface::fgkOfflineDetName[kNDetectors] = {"ITS", "ITS", "ITS", "TPC", "TRD", "TOF",
+       "PHOS", "PHOS", "HMPID", "EMCAL", "MUON", "MUON", "FMD", "ZDC", "PMD", "T0", "VZERO", "GRP", "HLT", "ACORDE"};
+
+TString AliShuttleInterface::fgkMainCDB("alien://folder=ShuttleCDB");
+TString AliShuttleInterface::fgkLocalCDB("local://LocalShuttleCDB");
+TString AliShuttleInterface::fgkMainRefStorage("alien://folder=ShuttleReference");
+TString AliShuttleInterface::fgkLocalRefStorage("local://LocalReferenceStorage");
+
+TString AliShuttleInterface::fgkShuttleTempDir("/tmp");
+TString AliShuttleInterface::fgkShuttleLogDir("/tmp/log");
+
+//______________________________________________________________________________________________
+const char* AliShuttleInterface::GetOfflineDetName(const char* detName){
+// Return "offline" detector name
+
+       Int_t detPos = GetDetPos(detName);
+       if(detPos < 0) {
+               AliErrorClass(Form("Unknown detector: %s",detName));
+               return 0;
+       }
+
+       return fgkOfflineDetName[detPos];
+}
+
+//______________________________________________________________________________________________
+const char* AliShuttleInterface::GetDetName(UInt_t detPos){
+// Return detector code
+
+       if(detPos >= kNDetectors) {
+               AliErrorClass(Form("Parameter out of bound: %d", detPos));
+               return 0;
+       }
+
+       return fgkDetName[detPos];
+}
+
+//______________________________________________________________________________________________
+const Int_t AliShuttleInterface::GetDetPos(const char* detName){
+// Return detector position in the detector code array
+
+       for(UInt_t iDet=0; iDet < kNDetectors; iDet++){
+               if(!strcmp(fgkDetName[iDet], detName)) return iDet;
+       }
+       return -1;
+}