]> git.uio.no Git - u/mrichter/AliRoot.git/blob - SHUTTLE/Shuttle.C
adding monalisa monitoring
[u/mrichter/AliRoot.git] / SHUTTLE / Shuttle.C
1 Bool_t Shuttle(const char* param = "listen") {
2
3         // WARNING: if ldap is built with ssl support it may cause confilcts with the 
4         // AliEn interface. If this happens, grid storage activation must be done BEFORE 
5         // loading LDAP libraries!!!
6
7         gSystem->Load("libRLDAP.so");
8         gSystem->Load("libMonaLisa");
9         gSystem->Load("libSHUTTLE");
10         gSystem->Load("$ROOTSYS/lib/libThread");
11         gSystem->Load("$ALICE_ROOT/SHUTTLE/test/libTest.so");
12         
13         // libRalien complains otherwise, weird...
14         //gSystem->Load("libNetx");
15
16
17 //      AliLog::SetGlobalDebugLevel(1);
18
19         // Setting local CDB and reference storage locations
20         AliShuttle::SetMainCDB("alien://user=aliprod?folder=colla/GridShuttleCDB");
21         AliShuttle::SetMainRefStorage("alien://user=aliprod?folder=colla/GridShuttleRefStorage");
22
23 //      AliShuttle::SetMainCDB("local://testLeakCDB");
24 //      AliShuttle::SetMainRefStorage("local://testLeakRef");
25
26         AliShuttle::SetLocalCDB("local://LocalShuttleCDB");
27         AliShuttle::SetLocalRefStorage("local://LocalShuttleRefStorage");
28
29         AliShuttle::SetProcessDCS(kFALSE);
30
31
32 //      AliCDBManager *man = AliCDBManager::Instance();
33 //      man->SetDefaultStorage("local://MainCDB");
34 //      man->SetDefaultStorage("alien://DBFolder=ShuttleMainCDB");
35
36
37         AliShuttleConfig config("pcalice290.cern.ch", 389, "o=alice,dc=cern,dc=ch");
38         config.SetProcessAll(kTRUE);
39         config.Print();
40
41         AliShuttleTrigger trigger(&config);
42
43         AliShuttle* shuttle = trigger.GetShuttle();
44
45         // Add here detectors preprocessor ...
46         TestTPCPreprocessor *tpcPrep = new TestTPCPreprocessor(shuttle);
47         TestITSPreprocessorSPD *spdPrep = new TestITSPreprocessorSPD(shuttle);
48         TestHMPIDPreprocessor *richPrep = new TestHMPIDPreprocessor(shuttle);
49         TestZDCPreprocessor *zdcPrep = new TestZDCPreprocessor(shuttle);
50
51         TString paramStr(param);
52         
53         if (paramStr.IsDigit() || paramStr == "-1") {
54                 Int_t run = paramStr.Atoi();
55                 trigger.Collect(run);
56         } else if (paramStr == "new") {
57                 Bool_t result = trigger.Collect();
58         } else if (paramStr == "listen") {
59                 trigger.Run();
60         } else {
61                 cout<<"Bad parameter: "<<param<<endl;
62                 cout<<"Parameter options: "<<endl;
63                 cout<<"<run> - collect data for the given run"<<endl;
64                 cout<<"new - collect data only for the new runs"<<endl;
65                 cout<<"listen - start listening for DAQ notification"<<endl;
66                 cout<<"<empty parameter> - the same as 'listen'"<<endl;
67         }
68
69         AliCDBManager::Destroy();
70 }
71
72