]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Shuttle getters and setters of main/local OCDB/Reference storages, temp and log
authoracolla <acolla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 13 Feb 2007 11:22:25 +0000 (11:22 +0000)
committeracolla <acolla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 13 Feb 2007 11:22:25 +0000 (11:22 +0000)
folders moved to AliShuttleInterface

SHUTTLE/TestShuttle/AliTestShuttle.cxx
SHUTTLE/TestShuttle/AliTestShuttle.h
SHUTTLE/TestShuttle/TestPreprocessor.C

index 2fc67aa1b51053c790b11f758978017dbf2a2951..a9c87d0893922aee99e5860a53056d2beae3efdf 100644 (file)
@@ -87,12 +87,6 @@ some docs added
 
 ClassImp(AliTestShuttle)
 
-TString AliTestShuttle::fgkMainCDB("local://$ALICE_ROOT/SHUTTLE/TestShuttle/TestCDB");
-TString AliTestShuttle::fgkMainRefStorage("local://$ALICE_ROOT/SHUTTLE/TestShuttle/TestReference");
-
-TString AliTestShuttle::fgkShuttleTempDir = gSystem->ExpandPathName("$ALICE_ROOT/SHUTTLE/TestShuttle/temp");
-TString AliTestShuttle::fgkShuttleLogDir = gSystem->ExpandPathName("$ALICE_ROOT/SHUTTLE/TestShuttle/log");
-
 //______________________________________________________________________________________________
 AliTestShuttle::AliTestShuttle(Int_t run, UInt_t startTime, UInt_t endTime) :
   fRun(run),
@@ -326,19 +320,3 @@ const char* AliTestShuttle::GetRunParameter(const char* key){
        return value->GetName();
 }
 
-//______________________________________________________________________________________________
-void AliTestShuttle::SetShuttleTempDir(const char* tmpDir)
-{
-// sets Shuttle temp directory
-
-       fgkShuttleTempDir = gSystem->ExpandPathName(tmpDir);
-}
-
-//______________________________________________________________________________________________
-void AliTestShuttle::SetShuttleLogDir(const char* logDir)
-{
-// sets Shuttle log directory
-
-       fgkShuttleLogDir = gSystem->ExpandPathName(logDir);
-}
-
index 06ba6f700f657a1fbbb9dcdcd7c25e84ad7ad575..ef42d29dfe0bca0dc4cc0739a9407dac263bc94c 100644 (file)
@@ -39,23 +39,9 @@ class AliTestShuttle : public AliShuttleInterface
     virtual const char* GetRunParameter(const char* key);
     virtual void Log(const char* detector, const char* message);
 
-    static TString GetMainCDB () {return fgkMainCDB;}
-    static void SetMainCDB (TString mainCDB) {fgkMainCDB = mainCDB;}
-    static TString GetMainRefStorage() {return fgkMainRefStorage;}
-    static void SetMainRefStorage (TString mainRefStorage) {fgkMainRefStorage = mainRefStorage;}
-
-    static void SetShuttleTempDir (const char* tmpDir);
-    static const char* GetShuttleTempDir() {return fgkShuttleTempDir.Data();}
-    static void SetShuttleLogDir (const char* logDir);
-    static const char* GetShuttleLogDir() {return fgkShuttleLogDir.Data();}
-
     virtual void RegisterPreprocessor(AliPreprocessor* preprocessor);
 
   protected:
-    static TString         fgkMainCDB;         // URI of the main (Grid) CDB storage
-    static TString         fgkMainRefStorage;  // URI of the main (Grid) REFERENCE storage
-    static TString         fgkShuttleTempDir;  // base path of SHUTTLE temp folder
-    static TString         fgkShuttleLogDir;   // path of SHUTTLE log folder
 
     Int_t fRun;         // run that is simulated with the AliTestShuttle
     UInt_t fStartTime;  // starttime that is simulated with the AliTestShuttle
index 205d8b8da69e8c615ab53bfeba3dec8723d2f6fe..15d987e9c6c57c68bf91213b15e103ea33a1fcf2 100644 (file)
@@ -15,19 +15,19 @@ void TestPreprocessor()
 
   // TODO if needed, change location of OCDB and Reference test folders
   // by default they are set to $ALICE_ROOT/SHUTTLE/TestShuttle/TestCDB and TestReference
-  // AliTestShuttle::SetMainCDB("local://$ALICE_ROOT/SHUTTLE/TestShuttle/TestCDB");
-  // AliTestShuttle::SetMainRefStorage("local://$ALICE_ROOT/SHUTTLE/TestShuttle/TestCDB");
+  AliShuttleInterface::SetMainCDB("local://$ALICE_ROOT/SHUTTLE/TestShuttle/TestCDB");
+  AliShuttleInterface::SetMainRefStorage("local://$ALICE_ROOT/SHUTTLE/TestShuttle/TestCDB");
 
-  printf("Test OCDB storage Uri: %s\n", AliTestShuttle::GetMainCDB().Data());
-  printf("Test Reference storage Uri: %s\n", AliTestShuttle::GetMainRefStorage().Data());
+  printf("Test OCDB storage Uri: %s\n", AliShuttleInterface::GetMainCDB().Data());
+  printf("Test Reference storage Uri: %s\n", AliShuttleInterface::GetMainRefStorage().Data());
 
   // TODO if needed, change location of temp and log folders (however they are not explicitly used here)
   // by default they are set to $ALICE_ROOT/SHUTTLE/TestShuttle/temp and log
-  // AliTestShuttle::SetShuttleTempDir("local://$ALICE_ROOT/SHUTTLE/TestShuttle/temp");
-  // AliTestShuttle::SetShuttleLogDir("local://$ALICE_ROOT/SHUTTLE/TestShuttle/log");
+  AliShuttleInterface::SetShuttleTempDir("$ALICE_ROOT/SHUTTLE/TestShuttle/temp");
+  AliShuttleInterface::SetShuttleLogDir("$ALICE_ROOT/SHUTTLE/TestShuttle/log");
 
-  printf("Test Shuttle temp dir: %s\n", AliTestShuttle::GetShuttleTempDir());
-  printf("Test Shuttle log dir: %s\n", AliTestShuttle::GetShuttleLogDir());
+  printf("Test Shuttle temp dir: %s\n", AliShuttleInterface::GetShuttleTempDir());
+  printf("Test Shuttle log dir: %s\n", AliShuttleInterface::GetShuttleLogDir());
 
 
   // create AliTestShuttle instance
@@ -68,10 +68,10 @@ void TestPreprocessor()
   // Three files originating from different LDCs but with the same id are also added
   // Note that the test preprocessor name is TPC. The name of the detector's preprocessor must follow
   // the "online" naming convention ALICE-INT-2003-039.
-  shuttle->AddInputFile(AliTestShuttle::kDAQ, "TPC", "PEDESTALS", "GDC", "file1.root");
-  shuttle->AddInputFile(AliTestShuttle::kDAQ, "TPC", "DRIFTVELOCITY", "LDC0", "file2a.root");
-  shuttle->AddInputFile(AliTestShuttle::kDAQ, "TPC", "DRIFTVELOCITY", "LDC1", "file2b.root");
-  shuttle->AddInputFile(AliTestShuttle::kDAQ, "TPC", "DRIFTVELOCITY", "LDC2", "file2b.root");
+  shuttle->AddInputFile(AliShuttleInterface::kDAQ, "TPC", "PEDESTALS", "GDC", "file1.root");
+  shuttle->AddInputFile(AliShuttleInterface::kDAQ, "TPC", "DRIFTVELOCITY", "LDC0", "file2a.root");
+  shuttle->AddInputFile(AliShuttleInterface::kDAQ, "TPC", "DRIFTVELOCITY", "LDC1", "file2b.root");
+  shuttle->AddInputFile(AliShuttleInterface::kDAQ, "TPC", "DRIFTVELOCITY", "LDC2", "file2b.root");
 
   // TODO(3)
   //
@@ -95,7 +95,7 @@ void TestPreprocessor()
   // $ALICE_ROOT/SHUTTLE/TestShuttle/TestCDB/<detector>/SHUTTLE/Data
   //
   // Check the file which should have been created
-  AliCDBEntry* entry = AliCDBManager::Instance()->GetStorage(AliTestShuttle::GetMainCDB())
+  AliCDBEntry* entry = AliCDBManager::Instance()->GetStorage(AliShuttleInterface::GetMainCDB())
                        ->Get("TPC/SHUTTLE/Data", 7);
   if (!entry)
   {
@@ -156,8 +156,7 @@ TMap* ReadDCSAliasMap()
   // The file contains an AliCDBEntry that contains a TMap with the DCS structure.
   // An explanation of the structure can be found in CreateDCSAliasMap()
 
-  AliCDBManager::Instance()->GetStorage(AliTestShuttle::GetMainCDB())
-  AliCDBEntry *entry = AliCDBManager::Instance()->GetStorage(AliTestShuttle::GetMainCDB())
+  AliCDBEntry *entry = AliCDBManager::Instance()->GetStorage(AliShuttleInterface::GetMainCDB())
                        ->Get("DET/DCS/Data", 0);
   return dynamic_cast<TMap*> (entry->GetObject());
 }
@@ -177,6 +176,6 @@ void WriteDCSAliasMap()
 
   // look into AliTestShuttle's CDB main folder
 
-  AliCDBManager::Instance()->GetStorage(AliTestShuttle::GetMainCDB())
+  AliCDBManager::Instance()->GetStorage(AliShuttleInterface::GetMainCDB())
                        ->Put(dcsAliasMap, id, &metaData);
 }