X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=TPC%2FTPCPEDESTALda.cxx;h=e919d85a4eb2b2b2875d72bcf0b49dd3ac2cbe54;hb=ce4b42552642b79f93a1453e98786c6b3c527372;hp=faca07b9d6bb95bfa27126eabe00d9f732d9a809;hpb=30255695a2a82b2b625cb8cd7f8f189dc67cb1f6;p=u%2Fmrichter%2FAliRoot.git diff --git a/TPC/TPCPEDESTALda.cxx b/TPC/TPCPEDESTALda.cxx index faca07b9d6b..e919d85a4eb 100644 --- a/TPC/TPCPEDESTALda.cxx +++ b/TPC/TPCPEDESTALda.cxx @@ -211,22 +211,19 @@ int main(int argc, char **argv) { break; } - /* skip start/end of run events */ - if ( (event->eventType != physicsEvent) && (event->eventType != calibrationEvent) ) - continue; - /* retry if got no event */ if (event==NULL) continue; + /* skip start/end of run events */ + if ( (event->eventType != physicsEvent) && (event->eventType != calibrationEvent) ) + continue; + nevents++; // get the run number runNb = event->eventRunNb; // Pedestal calibration - AliRawReader *rawReader = new AliRawReaderDate((void*)event); - if ( fastDecoding ) calibPedestal.ProcessEventFast(rawReader); - else calibPedestal.ProcessEvent(rawReader); - delete rawReader; + calibPedestal.ProcessEvent(event); /* free resources */ free(event); @@ -265,30 +262,33 @@ int main(int argc, char **argv) { //find processed sector Char_t sideName='A'; - Int_t sector = 0; + Int_t sector = -1; for ( Int_t roc = 0; roc < 72; roc++ ) { if ( !calibPedestal.GetCalRocPedestal(roc) ) continue; if (mapping->GetSideFromRoc(roc)==1) sideName='C'; sector = mapping->GetSectorFromRoc(roc); } gSystem->Setenv("AMORE_DA_NAME",Form("TPC-%c%02d-%s",sideName,sector,FILE_ID)); - + // // end cheet - TDatime time; - TObjString info(Form("Run: %u; Date: %s",runNb,time.AsString())); - - amore::da::AmoreDA amoreDA(amore::da::AmoreDA::kSender); - Int_t statusDA=0; - statusDA+=amoreDA.Send("Pedestals",calibPedestal.GetCalPadPedestal()); - statusDA+=amoreDA.Send("Noise",calibPedestal.GetCalPadRMS()); - statusDA+=amoreDA.Send("Info",&info); - if ( statusDA ) - printf("Waring: Failed to write one of the calib objects to the AMORE database\n"); + if (sector>-1){ + TDatime time; + TObjString info(Form("Run: %u; Date: %s",runNb,time.AsSQLString())); + + amore::da::AmoreDA amoreDA(amore::da::AmoreDA::kSender); + Int_t statusDA=0; + statusDA+=amoreDA.Send("Pedestals",calibPedestal.GetCalPadPedestal()); + statusDA+=amoreDA.Send("Noise",calibPedestal.GetCalPadRMS()); + statusDA+=amoreDA.Send("Info",&info); + if ( statusDA ) + printf("Waring: Failed to write one of the calib objects to the AMORE database\n"); + } else { + printf("Waring: No data found!\n"); + } // reset env var if (amoreDANameorig) gSystem->Setenv("AMORE_DA_NAME",amoreDANameorig); - - + // // Now prepare ASCII files for local ALTRO configuration through DDL. //