LCOV - code coverage report
Current view: top level - STEER/CDB - AliShuttleInterface.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 8 23 34.8 %
Date: 2016-06-14 17:26:59 Functions: 8 11 72.7 %

          Line data    Source code
       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             : /* $Id$ */
      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"
      25             : #include "AliLog.h"
      26             : #include <TClass.h>
      27             : #include <TSystem.h>
      28             : 
      29         128 : ClassImp(AliShuttleInterface)
      30             : 
      31             : const char* AliShuttleInterface::fkSystemNames[4] = { "DAQ", "DCS", "HLT", "DQM" };
      32             : 
      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", "AD0", "GRP", "HLT", "ACO", "TRI"
      36             : };
      37             : 
      38             : // names of the detectors in OCDB
      39             : const char* AliShuttleInterface::fgkOfflineDetName[kNDetectors] = {"ITS", "ITS", "ITS", "TPC", "TRD", "TOF",
      40             :   "PHOS", "PHOS", "HMPID", "EMCAL", "MUON", "MUON", "FMD", "ZDC", "PMD", "T0", "VZERO", "AD", "GRP", "HLT", "ACORDE", "TRIGGER"
      41             : };
      42             : 
      43         128 : TString AliShuttleInterface::fgkMainCDB("alien://folder=ShuttleCDB");
      44         128 : TString AliShuttleInterface::fgkLocalCDB("local://LocalShuttleCDB");
      45         128 : TString AliShuttleInterface::fgkMainRefStorage("alien://folder=ShuttleReference");
      46         128 : TString AliShuttleInterface::fgkLocalRefStorage("local://LocalReferenceStorage");
      47         128 : TString AliShuttleInterface::fgkMirrorSEs("ALICE::CERN::OCDB");
      48             : 
      49         128 : TString AliShuttleInterface::fgkShuttleTempDir("/tmp");
      50         128 : TString AliShuttleInterface::fgkShuttleLogDir("/tmp/log");
      51             : 
      52             : //______________________________________________________________________________________________
      53             : const char* AliShuttleInterface::GetOfflineDetName(const char* detName){
      54             :   // Return "offline" detector name
      55             : 
      56           0 :   Int_t detPos = GetDetPos(detName);
      57           0 :   if(detPos < 0) {
      58           0 :     AliErrorClass(Form("Unknown detector: %s",detName));
      59           0 :     return 0;
      60             :   }
      61             : 
      62           0 :   return fgkOfflineDetName[detPos];
      63           0 : }
      64             : 
      65             : //______________________________________________________________________________________________
      66             : const char* AliShuttleInterface::GetDetName(UInt_t detPos){
      67             :   // Return detector code
      68             : 
      69           0 :   if(detPos >= kNDetectors) {
      70           0 :     AliErrorClass(Form("Parameter out of bound: %d", detPos));
      71           0 :     return 0;
      72             :   }
      73             : 
      74           0 :   return fgkDetName[detPos];
      75           0 : }
      76             : 
      77             : //______________________________________________________________________________________________
      78             : Int_t AliShuttleInterface::GetDetPos(const char* detName){
      79             :   // Return detector position in the detector code array
      80             : 
      81           0 :   for(UInt_t iDet=0; iDet < kNDetectors; iDet++){
      82           0 :     if(!strcmp(fgkDetName[iDet], detName)) return iDet;
      83             :   }
      84           0 :   return -1;
      85           0 : }

Generated by: LCOV version 1.11