]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/TPCCEda.cxx
Remove obsolete DA (Marian)
[u/mrichter/AliRoot.git] / TPC / TPCCEda.cxx
index 698616df3f61653d132332dcafb1cddaa31ff7ea..0aa621338f074b494c13705228154c2735671bab 100644 (file)
@@ -8,6 +8,7 @@ DA Type: MON
 Number of events needed: 500
 Input Files: 
 Output Files: tpcCE.root, to be exported to the DAQ FXS
+fileId:   CE
 Trigger types used: PHYSICS_EVENT
 
 */
@@ -28,6 +29,7 @@ and save results in a file (named from RESULT_FILE define - see below).
 */
 
 #define RESULT_FILE "tpcCE.root"
+#define FILE_ID "CE"
 #define MAPPING_FILE "tpcMapping.root"
 
 
@@ -55,6 +57,8 @@ and save results in a file (named from RESULT_FILE define - see below).
 #include "AliTPCCalPad.h"
 #include "AliMathBase.h"
 #include "TTreeStream.h"
+#include "AliLog.h"
+#include "TSystem.h"
 
 //
 // TPC calibration algorithm includes
@@ -75,25 +79,33 @@ int main(int argc, char **argv) {
                                          "RIO",
                                          "TStreamerInfo()");
 
+  AliLog::SetClassDebugLevel("AliTPCRawStream",-5);
+  AliLog::SetClassDebugLevel("AliRawReaderDate",-5);
+  AliLog::SetClassDebugLevel("AliTPCAltroMapping",-5);
+  AliLog::SetModuleDebugLevel("RAW",-5);
 
   int i,status;
+  AliTPCmapper *mapping = 0;   // The TPC mapping
+  // if  test setup get parameters from $DAQDA_TEST_DIR 
+  
+  if (!mapping){
+    /* copy locally the mapping file from daq detector config db */
+    status = daqDA_DB_getFile(MAPPING_FILE,"./tpcMapping.root");
+    if (status) {
+      printf("Failed to get mapping file (%s) from DAQdetDB, status=%d\n", MAPPING_FILE, status);
+      printf("Continue anyway ... maybe it works?\n");              // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+      return -1;   // temporarily uncommented for testing on pcald47 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+    }
 
-  /* copy locally the mapping file from daq detector config db */
-  status = daqDA_DB_getFile(MAPPING_FILE,"./tpcMapping.root");
-  if (status) {
-    printf("Failed to get mapping file (%s) from DAQdetDB, status=%d\n", MAPPING_FILE, status);
-    printf("Continue anyway ... maybe it works?\n");              // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-    //return -1;   // temporarily uncommented for testing on pcald47 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+    /* open the mapping file and retrieve mapping object */
+    TFile *fileMapping = new TFile(MAPPING_FILE, "read");
+    mapping = (AliTPCmapper*) fileMapping->Get("tpcMapping");
+    delete fileMapping;
   }
 
-  /* open the mapping file and retrieve mapping object */
-  AliTPCmapper *mapping = 0;   // The TPC mapping
-  TFile *fileMapping = new TFile(MAPPING_FILE, "read");
-  mapping = (AliTPCmapper*) fileMapping->Get("tpcMapping");
   if (mapping == 0) {
-    printf("Failed to get mapping object from %s. Exiting ...\n", MAPPING_FILE);
-    delete fileMapping;
-    return -1;
+    printf("Failed to get mapping object from %s.  ...\n", MAPPING_FILE);
+    //return -1;
   } else {
     printf("Got mapping object from %s\n", MAPPING_FILE);
   }
@@ -181,7 +193,7 @@ int main(int argc, char **argv) {
 
   /* store the result file on FES */
 
-  status=daqDA_FES_storeFile(RESULT_FILE,RESULT_FILE);
+  status=daqDA_FES_storeFile(RESULT_FILE,FILE_ID);
   if (status) {
     status = -2;
   }