/* TRDPEDESTALda.cxx - calibration algorithm for the pedestal to be run in parallel on the LDCs DAcase1.c AliTRDCalibPadStatus - pad status calibration This program reads the DAQ data files passed as argument using the monitoring library. It fills a TRD calib object AliTRDCalibPadStatus and write it in a local file trdPedestal.root before exporting it to the file exchange server. Messages on stdout are exported to DAQ log system. contact: alice-datesupport@cern.ch */ #define RESULT_FILE "trdCalibration.root" extern "C" { #include } #include "event.h" #include "monitor.h" #include #include // // Root includes // #include #include // // AliRoot includes // #include "AliRawReader.h" #include "AliRawReaderDate.h" #include "AliTRDRawStreamV2.h" #include "AliCDBManager.h" // // AliRoot TRD calib classes // #include "AliTRDCalibPadStatus.h" /* Main routine Arguments: list of DATE raw data files */ int main(int argc, char **argv) { int status; /* log start of process */ printf("TRD DA PEDESTAL started\n"); /* check that we got some arguments = list of files */ if (argc<2) { printf("Wrong number of arguments\n"); return -1; } /* copy locally a file from daq detector config db */ //status=daqDA_DB_getFile("myconfig","./myconfig.txt"); //if (status) { // printf("Failed to get config file : %d\n",status); // return -1; //} /* and possibly use it */ /* init some counters */ int nevents_total=0; int nevents =0; //Instance of AliCDBManager: needed by AliTRDRawStream AliCDBManager *man = AliCDBManager::Instance(); man->SetDefaultStorage("local://$ALICE_ROOT"); man->SetRun(0); // AliTRDCalibPadStatus object AliTRDCalibPadStatus calipad = AliTRDCalibPadStatus(); Bool_t passpadstatus = kTRUE; /*see the time*/ TStopwatch timer; timer.Start(); /* read the data files */ int n; for (n=1;nClose(); printf("Wrote local file %s\n",RESULT_FILE); /*see the time*/ timer1.Stop(); timer1.Print(); /* store the result file on FES */ status=daqDA_FES_storeFile(RESULT_FILE,RESULT_FILE); if (status) { printf("Failed to export file : %d\n",status); return -1; } /* report progress */ daqDA_progressReport(100); return status; }