]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - SHUTTLE/Shuttle.C
adding monalisa monitoring
[u/mrichter/AliRoot.git] / SHUTTLE / Shuttle.C
index 9341df2cfce709d9dc990897660864e4d36b48d5..1226c464ad5a6e0cc051758031cefb640abdd940 100644 (file)
@@ -1,33 +1,60 @@
-void Shuttle(const char* param = "listen") {
+Bool_t 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("libMonaLisa");
        gSystem->Load("libSHUTTLE");
-        gSystem->Load("$ROOTSYS/lib/libRLDAP");
        gSystem->Load("$ROOTSYS/lib/libThread");
+       gSystem->Load("$ALICE_ROOT/SHUTTLE/test/libTest.so");
+       
+       // libRalien complains otherwise, weird...
+       //gSystem->Load("libNetx");
+
 
 //     AliLog::SetGlobalDebugLevel(1);
 
-        AliShuttleConfig config("pcepalice60.cern.ch", 389,
-                       "cn=Shuttle,dc=alice,dc=cern,dc=ch", "passhuttle");
-        config.Print();
+       // 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");
 
-       AliCDBStorage* cdbStorage = AliCDBManager::Instance()->
-                       GetStorage("local://~/temp/DCS");
+       AliShuttle::SetProcessDCS(kFALSE);
 
-       AliShuttleTrigger trigger(&config, cdbStorage);
+
+//     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");
+       config.SetProcessAll(kTRUE);
+        config.Print();
+
+       AliShuttleTrigger trigger(&config);
 
        AliShuttle* shuttle = trigger.GetShuttle();
+
        // Add here detectors preprocessor ...
-       //shuttle->RegisterCDBPreProcessor(new TestITSPreProcessor());
+       TestTPCPreprocessor *tpcPrep = new TestTPCPreprocessor(shuttle);
+       TestITSPreprocessorSPD *spdPrep = new TestITSPreprocessorSPD(shuttle);
+       TestHMPIDPreprocessor *richPrep = new TestHMPIDPreprocessor(shuttle);
+       TestZDCPreprocessor *zdcPrep = new TestZDCPreprocessor(shuttle);
 
        TString paramStr(param);
        
-       if (paramStr.IsDigit()) {
+       if (paramStr.IsDigit() || paramStr == "-1") {
                Int_t run = paramStr.Atoi();
                trigger.Collect(run);
        } else if (paramStr == "new") {
-               trigger.CollectNew();
-       } else if (paramStr == "all") {
-               trigger.CollectAll();
+               Bool_t result = trigger.Collect();
        } else if (paramStr == "listen") {
                trigger.Run();
        } else {
@@ -35,7 +62,6 @@ void Shuttle(const char* param = "listen") {
                cout<<"Parameter options: "<<endl;
                cout<<"<run> - collect data for the given run"<<endl;
                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<<"<empty parameter> - the same as 'listen'"<<endl;
        }