]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - SHUTTLE/Shuttle.C
adapting to new CDB classes
[u/mrichter/AliRoot.git] / SHUTTLE / Shuttle.C
index fcf848753d40ca23ff173819f50a3ad4ba955f56..657f198e4fa90bd9eb3224deb596741ab50ce07b 100644 (file)
@@ -1,17 +1,35 @@
 void Shuttle(const char* param = "listen") {
 
+       // WARNING: if ldap is built with ssl support it may cause confilcts with the 
+       // AliEn interface. If this happens, grid storage activation must be done BEFORE 
+       // loading LDAP libraries!!!
+
+       gSystem->Load("libRLDAP.so");
        gSystem->Load("libSHUTTLE");
        gSystem->Load("$ROOTSYS/lib/libThread");
        gSystem->Load("$ALICE_ROOT/SHUTTLE/test/libTest.so");
 
 //     AliLog::SetGlobalDebugLevel(1);
 
-       AliCDBManager *man = AliCDBManager::Instance();
-       man->SetDefaultStorage("local://MainCDB");
+       // Setting local CDB and reference storage locations
+       AliShuttle::SetMainCDB("alien://user=aliprod?folder=colla/GridShuttleCDB");
+       AliShuttle::SetMainRefStorage("alien://user=aliprod?folder=colla/GridShuttleRefStorage");
+
+//     AliShuttle::SetMainCDB("local://testLeakCDB");
+//     AliShuttle::SetMainRefStorage("local://testLeakRef");
+
+       AliShuttle::SetLocalCDB("local://LocalShuttleCDB");
+       AliShuttle::SetLocalRefStorage("local://LocalShuttleRefStorage");
+
+       AliShuttle::SetProcessDCS(kFALSE);
+
+
+//     AliCDBManager *man = AliCDBManager::Instance();
+//     man->SetDefaultStorage("local://MainCDB");
 //     man->SetDefaultStorage("alien://DBFolder=ShuttleMainCDB");
 
-       AliShuttleConfig config("pcalice290.cern.ch", 389,
-                       "o=alice,dc=cern,dc=ch");
+
+       AliShuttleConfig config("pcalice290.cern.ch", 389, "o=alice,dc=cern,dc=ch");
        config.SetProcessAll(kTRUE);
         config.Print();
 
@@ -20,8 +38,8 @@ void Shuttle(const char* param = "listen") {
        AliShuttle* shuttle = trigger.GetShuttle();
 
        // Add here detectors preprocessor ...
-       //TestTPCPreprocessor *tpcPrep = new TestTPCPreprocessor("TPC",shuttle);
-       //TestITSPreprocessor *itsPrep = new TestITSPreprocessor("ITS",shuttle);
+       TestTPCPreprocessor *tpcPrep = new TestTPCPreprocessor("TPC",shuttle);
+       TestITSPreprocessor *itsPrep = new TestITSPreprocessor("ITS",shuttle);
        TestRICHPreprocessor *richPrep = new TestRICHPreprocessor("RICH",shuttle);
 
        TString paramStr(param);
@@ -35,6 +53,10 @@ void Shuttle(const char* param = "listen") {
                trigger.CollectAll();
        } else if (paramStr == "listen") {
                trigger.Run();
+  } else if (paramStr.BeginsWith("lastrun=")) {
+    Int_t run = TString(paramStr(8, paramStr.Length()-7).Data()).Atoi();
+    cout << run << endl;
+    trigger.SetNewLastRun(run);
        } else {
                cout<<"Bad parameter: "<<param<<endl;
                cout<<"Parameter options: "<<endl;
@@ -42,6 +64,7 @@ void Shuttle(const char* param = "listen") {
                cout<<"new - collect data only for the new runs"<<endl;
                cout<<"all - collect data for all runs"<<endl;
                cout<<"listen - start listening for DAQ notification"<<endl;
+               cout<<"lastrun=<run> - sets last run manually. use with caution!" << endl;
                cout<<"<empty parameter> - the same as 'listen'"<<endl;
        }