X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=EMCAL%2FEMCALPEDda.cxx;h=cd443bf8d921c8adb0cacbc226127467a7398a49;hb=5890e23488f5596faf6ec3d00d43066a2391bb8c;hp=e5abc033a6742dd99100c9755605259958e4ef21;hpb=37f9d42078457f3f12b823b2d574ea48961ab3f3;p=u%2Fmrichter%2FAliRoot.git diff --git a/EMCAL/EMCALPEDda.cxx b/EMCAL/EMCALPEDda.cxx index e5abc033a67..cd443bf8d92 100644 --- a/EMCAL/EMCALPEDda.cxx +++ b/EMCAL/EMCALPEDda.cxx @@ -22,7 +22,7 @@ */ #define RESULT_FILE "EMCALPED.root" -#define FILE_ID "EMCALPED" +#define FILE_ID "pedestals" #define AliDebugLevel() -1 #define FILE_PEDClassName "emcCalibPedestal" const int kNRCU = 4; @@ -64,29 +64,29 @@ extern "C" { Arguments: list of DATE raw data files */ -int main(int argc, char **argv) { - +int main(int argc, char **argv) { // Main routine, EMC pedestal detector algorithm + AliLog::SetClassDebugLevel("AliCaloRawStreamV3",-5); AliLog::SetClassDebugLevel("AliRawReaderDate",-5); AliLog::SetModuleDebugLevel("RAW",-5); - + if (argc<2) { printf("Wrong number of arguments\n"); return -1; } - + /* magic line - for TStreamerInfo */ gROOT->GetPluginManager()->AddHandler("TVirtualStreamerInfo", "*", "TStreamerInfo", "RIO", "TStreamerInfo()"); - + int i, status; - + /* log start of process */ printf("EMCAL DA started - %s\n",__FILE__); - + /* declare monitoring program */ status=monitorDeclareMp( __FILE__ ); if (status!=0) { @@ -96,10 +96,10 @@ int main(int argc, char **argv) { /* define wait event timeout - 1s max */ monitorSetNowait(); monitorSetNoWaitNetworkTimeout(1000); - + /* Retrieve mapping files from DAQ DB */ const char* mapFiles[kNRCU] = {"RCU0A.data","RCU1A.data","RCU0C.data","RCU1C.data"}; - + for(Int_t iFile=0; iFileSetAltroMapping( mapping ); + calibPedestal->SetParametersFromFile( parameterFile ); AliRawReader *rawReader = NULL; int nevents=0; - + /* loop over RAW data files */ for ( i=1; ieventType; /* just convenient shorthand */ - + /* skip start/end of run events */ if ( (eventT != physicsEvent) && (eventT != calibrationEvent) && (eventT != systemSoftwareTriggerEvent) && (eventT != detectorSoftwareTriggerEvent) ) { + free(event); continue; } - + nevents++; // count how many acceptable events we have - + // Pedestal calibration rawReader = new AliRawReaderDate((void*)event); + calibPedestal->SetRunNumber(event->eventRunNb); calibPedestal->ProcessEvent(rawReader); delete rawReader; - + /* free resources */ free(event); - + } //until EOF } // loop over files - + // // write class to rootfile // - + printf ("%d physics/calibration events processed.\n",nevents); + /* Fitting/compute methods step commented out for now (March 31, 2010) + - not necessary to do here + // look for dead, hot and noisy towers + calibPedestal->ComputeDeadTowers(); + calibPedestal->ComputeHotAndWarningTowers(); + */ + TFile f(RESULT_FILE, "recreate"); if (!f.IsZombie()) { f.cd(); @@ -208,7 +232,7 @@ int main(int argc, char **argv) { printf("Could not save the object to file \"%s\".\n", RESULT_FILE); } - + // // closing down; see if we can delete our analysis helper also // @@ -216,12 +240,12 @@ int main(int argc, char **argv) { for(Int_t iFile=0; iFile