online gain calibration added
authorbnandi <bnandi@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 27 Sep 2007 07:42:21 +0000 (07:42 +0000)
committerbnandi <bnandi@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 27 Sep 2007 07:42:21 +0000 (07:42 +0000)
PMD/PMDda.cxx
PMD/PMDrecLinkDef.h
PMD/libPMDrec.pkg

index 1ecfe9dd96cb25778b69e8a262dd86d148e0b7c5..920e8294e46c7d501567f14af506e5035c79e3f5 100644 (file)
@@ -44,6 +44,9 @@ int main(int argc, char **argv) {
   
   AliPMDCalibPedestal calibped;
 
+  TTree *ped  = new TTree("ped","PMD Pedestal tree");
+  TTree *gain = new TTree("gain","PMD Gain tree");
+
   TH1F::AddDirectory(0);
   
       
@@ -135,7 +138,9 @@ int main(int argc, char **argv) {
       printf(" event number = %i \n",iev);
       AliRawReader *rawReader = new AliRawReaderDate((void*)event);
       calibped.ProcessEvent(rawReader);
-      
+
+      calibgain.ProcessEvent(rawReader);
+
       delete rawReader;
       rawReader = 0x0;
 
@@ -147,9 +152,8 @@ int main(int argc, char **argv) {
     /* exit when last event received, no need to wait for TERM signal */
     if (eventT==END_OF_RUN) {
       printf("EOR event detected\n");
-      calibped.Analyse();
-
-
+      calibped.Analyse(ped);
+      calibgain.Analyse(gain);
 
       break;
     }
@@ -166,6 +170,17 @@ int main(int argc, char **argv) {
   /* write report */
   fprintf(fp,"Run #%s, received %d physics events out of %d\n",getenv("DATE_RUN_NUMBER"),nevents_physics,nevents_total);
 
+
+  TFile * pedRun = new TFile ("pmd_ped.root","RECREATE"); 
+  ped->Write();
+  pedRun->Close();
+
+  TFile * gainRun = new TFile ("pmd_calib.root","RECREATE"); 
+  gain->Write();
+  gainRun->Close();
+
+
+
   /* close result file */
   fclose(fp);
 
index 5a5bb776680f5194f5e5d308a338da9e94c609d9..758adfc23549f2f01d96f1902e3d09a5356bb44a 100644 (file)
@@ -24,4 +24,5 @@
 #pragma link C++ class  AliPMDtracker+;
 #pragma link C++ class  AliPMDReconstructor+;
 #pragma link C++ class  AliPMDCalibPedestal+;
+#pragma link C++ class  AliPMDCalibGain+;
 #endif
index 4e62e303518fd36b79fcfc28e6aaa13212a7cef6..1f24d0cbf7132c1b0e9cae060010b483997e051c 100644 (file)
@@ -1,7 +1,7 @@
 #-*- Mode: Makefile -*-
 # $Id$
 
-SRCS:= AliPMDRecPoint.cxx AliPMDUtility.cxx AliPMDrecpoint1.cxx AliPMDrechit.cxx AliPMDcluster.cxx AliPMDClusteringV1.cxx AliPMDClusteringV2.cxx AliPMDclupid.cxx AliPMDEmpDiscriminator.cxx AliPMDClusterFinder.cxx AliPMDtracker.cxx AliPMDReconstructor.cxx AliPMDcludata.cxx AliPMDCalibPedestal.cxx
+SRCS:= AliPMDRecPoint.cxx AliPMDUtility.cxx AliPMDrecpoint1.cxx AliPMDrechit.cxx AliPMDcluster.cxx AliPMDClusteringV1.cxx AliPMDClusteringV2.cxx AliPMDclupid.cxx AliPMDEmpDiscriminator.cxx AliPMDClusterFinder.cxx AliPMDtracker.cxx AliPMDReconstructor.cxx AliPMDcludata.cxx AliPMDCalibPedestal.cxx AliPMDCalibGain.cxx
 
 HDRS:= $(SRCS:.cxx=.h) AliPMDClustering.h AliPMDDiscriminator.h AliPMDcludata.h