]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Unused DAs removed.
authorpolicheh <policheh@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 22 Jul 2008 16:01:21 +0000 (16:01 +0000)
committerpolicheh <policheh@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 22 Jul 2008 16:01:21 +0000 (16:01 +0000)
PHOS/PHOSDA2da.cxx [deleted file]
PHOS/PHOSda.cxx [deleted file]
PHOS/PHSGAINda.cxx [deleted file]

diff --git a/PHOS/PHOSDA2da.cxx b/PHOS/PHOSDA2da.cxx
deleted file mode 100644 (file)
index d95cf61..0000000
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
-
-DAcase2.c
-
-This program connects to the DAQ data source passed as argument
-and populates local "./result.txt" file with the ids of events received
-during the run.
-
-The program exits when being asked to shut down (daqDA_checkshutdown)
-or End of Run event.
-
-Messages on stdout are exported to DAQ log system.
-
-contact: alice-datesupport@cern.ch
-
-*/
-
-
-#include "event.h"
-#include "monitor.h"
-extern "C" {
-#include "daqDA.h"
-}
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <TSystem.h>
-
-#include "AliRawReader.h"
-#include "AliRawReaderDate.h"
-#include "AliPHOSDA2.h"
-#include "AliPHOSRawDecoderv1.h"
-#include "AliCaloAltroMapping.h"
-
-
-/* Main routine
-      Arguments: 
-      1- monitoring data source
-*/
-int main(int argc, char **argv) {
-
-  int status;
-  
-  if (argc!=2) {
-    printf("Wrong number of arguments\n");
-    return -1;
-  }
-
-
-  /* open result file */
-  FILE *fp=NULL;
-  fp=fopen("./result.txt","a");
-  if (fp==NULL) {
-    printf("Failed to open file\n");
-    return -1;
-  }
-
-  /* Open mapping files */
-  AliAltroMapping *mapping[4];
-  TString path = gSystem->Getenv("ALICE_ROOT");
-  path += "/PHOS/mapping/RCU";
-  TString path2;
-  for(Int_t i = 0; i < 4; i++) {
-    path2 = path;
-    path2 += i;
-    path2 += ".data";
-    mapping[i] = new AliCaloAltroMapping(path2.Data());
-  }
-  
-
-  /* define data source : this is argument 1 */  
-  status=monitorSetDataSource( argv[1] );
-  if (status!=0) {
-    printf("monitorSetDataSource() failed : %s\n",monitorDecodeError(status));
-    return -1;
-  }
-
-
-  /* declare monitoring program */
-  status=monitorDeclareMp( __FILE__ );
-  if (status!=0) {
-    printf("monitorDeclareMp() failed : %s\n",monitorDecodeError(status));
-    return -1;
-  }
-
-
-  /* define wait event timeout - 1s max */
-  monitorSetNowait();
-  monitorSetNoWaitNetworkTimeout(1000);
-  
-
-  /* log start of process */
-  printf("DA2 (bad channels finding) started.\n");  
-
-
-  /* init some counters */
-  int nevents_physics=0;
-  int nevents_total=0;
-
-  AliRawReader *rawReader = NULL;
-
-  AliPHOSDA2 da2(2); // DA2 ("Checking for bad channels") for module2
-  
-  Float_t q[64][56][2];
-
-  Int_t gain = -1;
-  Int_t X = -1;
-  Int_t Z = -1;
-
-  /* main loop (infinite) */
-  for(;;) {
-    struct eventHeaderStruct *event;
-    eventTypeType eventT;
-  
-    /* check shutdown condition */
-    if (daqDA_checkShutdown()) {break;}
-    
-    /* get next event (blocking call until timeout) */
-    status=monitorGetEventDynamic((void **)&event);
-    if (status==MON_ERR_EOF) {
-      printf ("End of File detected\n");
-      break; /* end of monitoring file has been reached */
-    }
-    
-    if (status!=0) {
-      printf("monitorGetEventDynamic() failed : %s\n",monitorDecodeError(status));
-      break;
-    }
-
-    /* retry if got no event */
-    if (event==NULL) {
-      continue;
-    }
-
-
-    /* use event - here, just write event id to result file */
-    eventT=event->eventType;
-    
-    if (eventT==PHYSICS_EVENT) {
-      fprintf(fp,"Run #%lu, event size: %lu, BC:%u, Orbit:%u, Period:%u\n",
-         (unsigned long)event->eventRunNb,
-        (unsigned long)event->eventSize,
-        EVENT_ID_GET_BUNCH_CROSSING(event->eventId),
-        EVENT_ID_GET_ORBIT(event->eventId),
-        EVENT_ID_GET_PERIOD(event->eventId)
-      );
-      
-      for(Int_t iX=0; iX<64; iX++) {
-       for(Int_t iZ=0; iZ<56; iZ++) {
-         for(Int_t iGain=0; iGain<2; iGain++) {
-           q[iX][iZ][iGain] = 0.;
-         }
-       }
-      }
-
-      rawReader = new AliRawReaderDate((void*)event);
-      AliPHOSRawDecoderv1 dc(rawReader,mapping);
-      dc.SubtractPedestals(kTRUE);
-      
-      while(dc.NextDigit()) {
-
-       X = dc.GetRow() - 1;
-       Z = dc.GetColumn() - 1;
-
-       if(dc.IsLowGain()) gain = 0;
-       else
-         gain = 1;
-       
-       q[X][Z][gain] = dc.GetSampleQuality();
-       
-      }
-      
-      da2.FillQualityHistograms(q);       
-      //da1.UpdateHistoFile();
-      
-      delete rawReader;     
-      nevents_physics++;
-    }
-    
-    nevents_total++;
-    
-    /* free resources */
-    free(event);
-    
-    /* exit when last event received, no need to wait for TERM signal */
-    if (eventT==END_OF_RUN) {
-      printf("EOR event detected\n");
-      break;
-    }
-  }
-
-  for(Int_t i = 0; i < 4; i++) delete mapping[i];  
-
-  /* write report */
-  fprintf(fp,"Run #%s, received %d physics events out of %d\n",getenv("DATE_RUN_NUMBER"),nevents_physics,nevents_total);
-
-  /* close result file */
-  fclose(fp);
-
-
-  return status;
-}
diff --git a/PHOS/PHOSda.cxx b/PHOS/PHOSda.cxx
deleted file mode 100644 (file)
index 51884cd..0000000
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
-
-DAcase2.c
-
-This program connects to the DAQ data source passed as argument
-and populates local "./result.txt" file with the ids of events received
-during the run.
-
-The program exits when being asked to shut down (daqDA_checkshutdown)
-or End of Run event.
-
-Messages on stdout are exported to DAQ log system.
-
-contact: alice-datesupport@cern.ch
-
-*/
-
-
-#include "event.h"
-#include "monitor.h"
-extern "C" {
-#include "daqDA.h"
-}
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <TSystem.h>
-
-#include "AliRawReader.h"
-#include "AliRawReaderDate.h"
-#include "AliPHOSCalibHistoProducer.h"
-#include "AliPHOSRawDecoder.h"
-#include "AliCaloAltroMapping.h"
-
-
-/* Main routine
-      Arguments: 
-      1- monitoring data source
-*/
-int main(int argc, char **argv) {
-
-  int status;
-  
-  if (argc!=2) {
-    printf("Wrong number of arguments\n");
-    return -1;
-  }
-
-
-  /* open result file */
-  FILE *fp=NULL;
-  fp=fopen("./result.txt","a");
-  if (fp==NULL) {
-    printf("Failed to open file\n");
-    return -1;
-  }
-
-  /* Open mapping files */
-  AliAltroMapping *mapping[4];
-  TString path = gSystem->Getenv("ALICE_ROOT");
-  path += "/PHOS/mapping/RCU";
-  TString path2;
-  for(Int_t i = 0; i < 4; i++) {
-    path2 = path;
-    path2 += i;
-    path2 += ".data";
-    mapping[i] = new AliCaloAltroMapping(path2.Data());
-  }
-  
-
-  /* define data source : this is argument 1 */  
-  status=monitorSetDataSource( argv[1] );
-  if (status!=0) {
-    printf("monitorSetDataSource() failed : %s\n",monitorDecodeError(status));
-    return -1;
-  }
-
-
-  /* declare monitoring program */
-  status=monitorDeclareMp( __FILE__ );
-  if (status!=0) {
-    printf("monitorDeclareMp() failed : %s\n",monitorDecodeError(status));
-    return -1;
-  }
-
-
-  /* define wait event timeout - 1s max */
-  monitorSetNowait();
-  monitorSetNoWaitNetworkTimeout(1000);
-  
-
-  /* log start of process */
-  printf("DA example case2 monitoring program started\n");  
-
-
-  /* init some counters */
-  int nevents_physics=0;
-  int nevents_total=0;
-
-  AliRawReader *rawReader = NULL;
-
-  AliPHOSCalibHistoProducer hp(200,0.,200.);
-  hp.SetUpdatingRate(200000);
-  
-  /* main loop (infinite) */
-  for(;;) {
-    struct eventHeaderStruct *event;
-    eventTypeType eventT;
-  
-    /* check shutdown condition */
-    if (daqDA_checkShutdown()) {break;}
-    
-    /* get next event (blocking call until timeout) */
-    status=monitorGetEventDynamic((void **)&event);
-    if (status==MON_ERR_EOF) {
-      printf ("End of File detected\n");
-      break; /* end of monitoring file has been reached */
-    }
-    
-    if (status!=0) {
-      printf("monitorGetEventDynamic() failed : %s\n",monitorDecodeError(status));
-      break;
-    }
-
-    /* retry if got no event */
-    if (event==NULL) {
-      continue;
-    }
-
-
-    /* use event - here, just write event id to result file */
-    eventT=event->eventType;
-    
-    if (eventT==PHYSICS_EVENT) {
-      fprintf(fp,"Run #%lu, event size: %lu, BC:%u, Orbit:%u, Period:%u\n",
-         (unsigned long)event->eventRunNb,
-        (unsigned long)event->eventSize,
-        EVENT_ID_GET_BUNCH_CROSSING(event->eventId),
-        EVENT_ID_GET_ORBIT(event->eventId),
-        EVENT_ID_GET_PERIOD(event->eventId)
-      );
-      
-      rawReader = new AliRawReaderDate((void*)event);
-      AliPHOSRawDecoder dc(rawReader,mapping);
-      dc.SubtractPedestals(kTRUE);
-      hp.SetRawDecoder(&dc);
-      hp.Run();
-
-      delete rawReader;
-      
-      nevents_physics++;
-    }
-    nevents_total++;
-
-    /* free resources */
-    free(event);
-    
-    /* exit when last event received, no need to wait for TERM signal */
-    if (eventT==END_OF_RUN) {
-      printf("EOR event detected\n");
-      break;
-    }
-  }
-
-  for(Int_t i = 0; i < 4; i++) delete mapping[i];  
-
-  /* write report */
-  fprintf(fp,"Run #%s, received %d physics events out of %d\n",getenv("DATE_RUN_NUMBER"),nevents_physics,nevents_total);
-
-  /* close result file */
-  fclose(fp);
-
-
-  return status;
-}
diff --git a/PHOS/PHSGAINda.cxx b/PHOS/PHSGAINda.cxx
deleted file mode 100644 (file)
index bc0c994..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
-contact: Boris.Polishchuk@cern.ch
-link: see comments in the $ALICE_ROOT/PHOS/AliPHOSRcuDA1.cxx
-reference run: /castor/cern.ch/alice/phos/2007/10/04/18/07000008249001.1000.root
-run type: PHYSICS, STANDALONE
-DA type: MON 
-number of events needed: 1000
-input files: RCU0.data  RCU1.data  RCU2.data  RCU3.data
-Output files: PHOS_Module2_Calib.root
-trigger types used: L0
-*/
-
-
-#include "event.h"
-#include "monitor.h"
-extern "C" {
-#include "daqDA.h"
-}
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <TSystem.h>
-
-#include "AliRawReader.h"
-#include "AliRawReaderDate.h"
-#include "AliPHOSRcuDA1.h"
-#include "AliPHOSRawDecoder.h"
-#include "AliCaloAltroMapping.h"
-
-
-/* Main routine
-      Arguments: 
-      1- monitoring data source
-*/
-int main(int argc, char **argv) {
-
-  int status;
-  
-  if (argc!=2) {
-    printf("Wrong number of arguments\n");
-    return -1;
-  }
-  
-  /* Open mapping files */
-  AliAltroMapping *mapping[4];
-  TString path = "./";
-  path += "RCU";
-  TString path2;
-  for(Int_t i = 0; i < 4; i++) {
-    path2 = path;
-    path2 += i;
-    path2 += ".data";
-    mapping[i] = new AliCaloAltroMapping(path2.Data());
-  }
-  
-
-  /* define data source : this is argument 1 */  
-  status=monitorSetDataSource( argv[1] );
-  if (status!=0) {
-    printf("monitorSetDataSource() failed : %s\n",monitorDecodeError(status));
-    return -1;
-  }
-
-
-  /* declare monitoring program */
-  status=monitorDeclareMp( __FILE__ );
-  if (status!=0) {
-    printf("monitorDeclareMp() failed : %s\n",monitorDecodeError(status));
-    return -1;
-  }
-
-
-  /* define wait event timeout - 1s max */
-  monitorSetNowait();
-  monitorSetNoWaitNetworkTimeout(1000);
-  
-   /* init some counters */
-  int nevents_physics=0;
-  int nevents_total=0;
-
-  AliRawReader *rawReader = NULL;
-
-  AliPHOSRcuDA1 da1(2,-1); // DA1 (Calibration DA) for module2
-  
-  Float_t e[64][56][2];
-  Float_t t[64][56][2];
-
-  Int_t gain = -1;
-  Int_t X = -1;
-  Int_t Z = -1;
-
-  /* main loop (infinite) */
-  for(;;) {
-    struct eventHeaderStruct *event;
-    eventTypeType eventT;
-  
-    /* check shutdown condition */
-    if (daqDA_checkShutdown()) {break;}
-    
-    /* get next event (blocking call until timeout) */
-    status=monitorGetEventDynamic((void **)&event);
-    if (status==MON_ERR_EOF) {
-      printf ("End of File detected\n");
-      break; /* end of monitoring file has been reached */
-    }
-    
-    if (status!=0) {
-      printf("monitorGetEventDynamic() failed : %s\n",monitorDecodeError(status));
-      break;
-    }
-
-    /* retry if got no event */
-    if (event==NULL) {
-      continue;
-    }
-
-
-    /* use event - here, just write event id to result file */
-    eventT=event->eventType;
-    
-    if (eventT==PHYSICS_EVENT) {
-      
-      for(Int_t iX=0; iX<64; iX++) {
-       for(Int_t iZ=0; iZ<56; iZ++) {
-         for(Int_t iGain=0; iGain<2; iGain++) {
-           e[iX][iZ][iGain] = 0.;
-           t[iX][iZ][iGain] = 0.;
-         }
-       }
-      }
-
-      rawReader = new AliRawReaderDate((void*)event);
-//       AliPHOSRawDecoderv1 dc(rawReader,mapping);
-      AliPHOSRawDecoder dc(rawReader,mapping);
-      dc.SubtractPedestals(kTRUE);
-      
-      while(dc.NextDigit()) {
-
-       X = dc.GetRow() - 1;
-       Z = dc.GetColumn() - 1;
-
-       if(dc.IsLowGain()) gain = 0;
-       else
-         gain = 1;
-       
-       e[X][Z][gain] = dc.GetEnergy();
-       t[X][Z][gain] = dc.GetTime();
-       
-      }
-
-      da1.FillHistograms(e,t);
-      //da1.UpdateHistoFile();
-      
-      delete rawReader;     
-      nevents_physics++;
-    }
-    
-    nevents_total++;
-    
-    /* free resources */
-    free(event);
-    
-    /* exit when last event received, no need to wait for TERM signal */
-    if (eventT==END_OF_RUN) {
-      printf("EOR event detected\n");
-      break;
-    }
-  }
-  
-  for(Int_t i = 0; i < 4; i++) delete mapping[i];  
-  
-  return status;
-}