adding macro to retrieve DPs to a file
authorjgrosseo <jgrosseo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 13 Mar 2008 15:16:36 +0000 (15:16 +0000)
committerjgrosseo <jgrosseo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 13 Mar 2008 15:16:36 +0000 (15:16 +0000)
removing alberto from mail targets

SHUTTLE/schema/Global.ldif
SHUTTLE/schema_prod/Global.ldif
SHUTTLE/schema_prod/RetrieveDPs.C [new file with mode: 0644]

index c27fa03aaf6f6f5d4bc509874e3711a58c3f7c30..96fd2c64eee9d3c3693d848b129a7a257b2c40a7 100644 (file)
@@ -17,8 +17,6 @@ monitorHost: aliendb1.cern.ch
 monitorTable: SHUTTLE
 mode: test
 triggerWait: 100
-shuttleAdmin: alberto.colla@cern.ch
-shuttleAdmin: Jan.Fiete.Grosse-Oetringhaus@cern.ch
 shuttleAdmin: chiara.zampolli@cern.ch
 shuttleAdmin: raffaele.grosso@cern.ch
 sendMail: 1
index ae5523e01157a8c3b519c74207024435672b92fb..aca0072674615ad9c21a7197e919dbeedb34aed5 100644 (file)
@@ -21,10 +21,8 @@ keepDCSMap: 1
 keepTempFolder: 1
 dcsTimeOut: 1100
 sendMail: 1
-shuttleAdmin: alberto.colla@cern.ch
 shuttleAdmin: chiara.zampolli@cern.ch
 shuttleAdmin: raffaele.grosso@cern.ch
-amandaAdmin: Jan.Fiete.Grosse-Oetringhaus@cern.ch
 amandaAdmin: svetozar.kapusta@cern.ch
 nDCSretries: 5
 
diff --git a/SHUTTLE/schema_prod/RetrieveDPs.C b/SHUTTLE/schema_prod/RetrieveDPs.C
new file mode 100644 (file)
index 0000000..fa86074
--- /dev/null
@@ -0,0 +1,25 @@
+void RetrieveDPs(const char* detector, int tsFrom, int tsTo)
+{
+       //
+       // Query amanda for DPs for detector from timestamp tsFrom to tsTo
+       //
+       // date --> unix date
+       // date --date='2008-02-28' '+%s'
+       
+       gSystem->Load("libRLDAP.so");
+       gSystem->Load("libMonaLisa");
+       gSystem->Load("libSHUTTLE");
+
+       AliDCSClient client("alidcsamanda.cern.ch",1337,1000,500,100);
+       //AliLog::SetClassDebugLevel("AliDCSClient",5);
+
+       AliShuttleConfig config("pcalishuttle01.cern.ch", 389, "", "", "o=shuttle_prod,dc=cern,dc=ch");
+       
+       TObjArray* list = config.GetDCSAliases(detector, 0);
+       TMap* map = client.GetAliasValues(list, tsFrom, tsTo);
+       
+       TFile* file = TFile::Open("DCSMap.root", "RECREATE");
+       map->Write("DCSMap", TObject::kSingleKey);
+       file->Close();
+       
+}