]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Update macros for prompt offline (Mikolaj)
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 7 Oct 2008 07:15:56 +0000 (07:15 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 7 Oct 2008 07:15:56 +0000 (07:15 +0000)
test/prompt/RunOnlineAlieve
test/prompt/RunOnlineDisplay
test/prompt/RunPromptOffline.C [new file with mode: 0644]
test/prompt/RunPromptReco
test/prompt/RunQAViewer [new file with mode: 0755]
test/prompt/qam.C [new file with mode: 0644]

index 0a0c5f50a3fe9fe6f2d0e9407607f5ff4a2ef4d3..3fae82635829e79136c6e109d0c5ada84fcbf6f7 100755 (executable)
 # origin: Mikolaj Krzewicki, Nikhef, Mikolaj.Krzewicki@cern.ch
 #################################################################
 
-if [ $# -ne 2 ]
+if [ $# -lt 2 ]
 then
   echo ""
-  echo "  Usage: `basename $0` RunNumber GDCnumber"
+  echo "  Usage: `basename $0` RunNumber GDCnumber [Trigger]"
+  echo "          (don't use the Trigger argument unless you're really sure what you're doing!)"
   echo ""
   exit 999
 fi
@@ -45,7 +46,7 @@ then
 fi
 
 # data gets put in a dir named after the run number
-DATADIR="${DATADIRBASE}/${1}"
+DATADIR="${DATADIRBASE}/${1}_OnlineDisplay"
 
 # never overwrite existing data, make a new directory if necessary
 # and give it a unique (sequential) number
@@ -72,5 +73,10 @@ mkdir ${DATADIR}
 
 cp ${RECMACRO} ${DATADIR}
 cd ${DATADIR}
-alieve ${PROMPTOFFLINEMACRO}\(${1},${2}\)
 
+if [ $# -eq 3 ]
+then
+  alieve ${PROMPTOFFLINEMACRO}\(${1},${2},${3}\) | tee alieve.log
+else
+  alieve ${PROMPTOFFLINEMACRO}\(${1},${2}\) | tee alieve.log
+fi
index 29bc87412feab6abccb07c4beb0f5104e7bbb61d..0962b5b91f0f6c5b0168663a07f3a795715e705d 100755 (executable)
@@ -73,7 +73,7 @@ mkdir ${DATADIR}
 cp ${RECMACRO} ${DATADIR}
 cd ${DATADIR}
 
-xterm -T "Reconstruction run: ${1} GDC: ${2}" -e "cd $DATADIR;aliroot ${PROMPTOFFLINEMACRO}\(${1},${2}\)"&
+xterm -T "Reconstruction run: ${1} GDC: ${2}" -e "cd $DATADIR; aliroot ${PROMPTOFFLINEMACRO}\(${1},${2}\) | tee rec.log"&
 
 #wait some time for data to appear
 waitcount=0
@@ -89,5 +89,5 @@ while [ ! -f AliESDs.root ]; do
 done
 
 if [[ $runalieve -eq 1 ]]; then
-  alieve anyscan_init.C > display.log
+  alieve anyscan_init.C | tee alieve.log
 fi
diff --git a/test/prompt/RunPromptOffline.C b/test/prompt/RunPromptOffline.C
new file mode 100644 (file)
index 0000000..997574d
--- /dev/null
@@ -0,0 +1,32 @@
+Bool_t RunPromptOffline(Int_t run, Int_t gdcNumber, TString trg="" )
+{
+    //
+    //  origin: Mikolaj Krzewicki, Nikhef, Mikolaj.Krzewicki@cern.ch
+    //
+
+    //check arguments
+    if (gdcNumber>999) return kFALSE;
+
+    gROOT->LoadMacro("/local/home/daq/alisoft/macros/grp.C");
+    Int_t grpRetCode = grp(run);
+    if (grpRetCode<=0) return kFALSE;
+
+    TString gdcNumberStr = "";
+    gdcNumberStr += gdcNumber;
+    if (gdcNumberStr.Length()==2) gdcNumberStr.Prepend("0");
+    TString datasource = "mem://@aldaqpc";
+    datasource.Append(gdcNumberStr);
+    datasource.Append(":");  //no trg, do nothing
+
+    //handle the low-level trigger selection
+    if (trg!="")
+    {
+      datasource.Append("?Trigger=");
+      datasource.Append(trg);
+    }
+
+    cout<<endl<<"RunPromptOffline datasource: "<<datasource<<endl<<endl;
+
+    gROOT->LoadMacro("./rec.C");
+    rec(datasource);
+}
index d0042c6d647db6c9a7a72d79d55ec328a04ee3da..fe614fb2b3558bed419a89f3171cd4324e315c0e 100755 (executable)
@@ -72,5 +72,5 @@ mkdir ${DATADIR}
 
 cp ${RECMACRO} ${DATADIR}
 cd ${DATADIR}
-aliroot ${PROMPTOFFLINEMACRO}\(${1},${2}\)
+aliroot ${PROMPTOFFLINEMACRO}\(${1},${2}\) | tee rec.log
 
diff --git a/test/prompt/RunQAViewer b/test/prompt/RunQAViewer
new file mode 100755 (executable)
index 0000000..1dcf684
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/bash
+#################################################################
+#
+#  Runs the QA histogram viewer in a specified directory
+#
+#  Origin: Mikolaj Krzewicki, Nikhef, Mikolaj.Krzewicki@cern.ch
+#
+#################################################################
+cd ~/data/current
+ls -1tr
+echo ""
+read -p "  Choose directory from the list above: " dir
+if [[ -d $dir ]]
+then
+  cd $dir
+else
+  echo "no such directory - typo?"
+  return 999
+fi
+
+aliroot qam.C
+
+echo "done"
diff --git a/test/prompt/qam.C b/test/prompt/qam.C
new file mode 100644 (file)
index 0000000..253f87f
--- /dev/null
@@ -0,0 +1,6 @@
+{
+   // libMONITOR is not loaded by default...
+   gSystem->Load("libMONITOR.so");
+   // Popup the GUI...
+   new AliQAHistViewer(gClient->GetRoot(), 800, 400, kFALSE);
+}