X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=TPC%2FTPCPULSERda.cxx;h=a8a71891d3455d6cb4afb8b9e0be14c2d4e4aece;hb=c8b13e82ebfce706b60dcafd0fc5b5b652b8eccf;hp=a668ffae03ed317c29f2eff8e3993944baade628;hpb=97b609eef74f13c6339a087fd0fe5f9a36bd5460;p=u%2Fmrichter%2FAliRoot.git diff --git a/TPC/TPCPULSERda.cxx b/TPC/TPCPULSERda.cxx index a668ffae03e..a8a71891d34 100644 --- a/TPC/TPCPULSERda.cxx +++ b/TPC/TPCPULSERda.cxx @@ -8,6 +8,7 @@ DA Type: LDC Number of events needed: 100 Input Files: Output Files: tpcPulser.root, to be exported to the DAQ FXS +fileId: pulser Trigger types used: CALIBRATION_EVENT */ @@ -28,7 +29,9 @@ and save results in a file (named from RESULT_FILE define - see below). */ #define RESULT_FILE "tpcPulser.root" +#define FILE_ID "pulser" #define MAPPING_FILE "tpcMapping.root" +#define AliDebugLevel() -1 #include @@ -55,7 +58,8 @@ and save results in a file (named from RESULT_FILE define - see below). #include "AliTPCCalPad.h" #include "AliMathBase.h" #include "TTreeStream.h" -#include "TTreeStream.h" +#include "AliLog.h" +#include "TSystem.h" // // TPC calibration algorithm includes @@ -69,6 +73,10 @@ and save results in a file (named from RESULT_FILE define - see below). Arguments: list of DATE raw data files */ int main(int argc, char **argv) { + AliLog::SetClassDebugLevel("AliTPCRawStream",-5); + AliLog::SetClassDebugLevel("AliRawReaderDate",-5); + AliLog::SetClassDebugLevel("AliTPCAltroMapping",-5); + AliLog::SetModuleDebugLevel("RAW",-5); gROOT->GetPluginManager()->AddHandler("TVirtualStreamerInfo", "*", @@ -78,29 +86,32 @@ int main(int argc, char **argv) { 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); } - AliTPCCalibPulser calibPulser; // pedestal and noise calibration if (argc<2) { @@ -176,13 +187,13 @@ int main(int argc, char **argv) { printf ("%d events processed\n",nevents); TFile * fileTPC = new TFile (RESULT_FILE,"recreate"); - calibPulser.Write("calibPulser"); + calibPulser.Write("tpcCalibPulser"); delete fileTPC; printf("Wrote %s\n",RESULT_FILE); /* 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; }