X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2FAliMUONTrackerQADataMakerRec.cxx;h=b7d206b09e8947c4c34a3dc1312c2a97109d5c68;hb=2176e8cffb1bf74705a0b9654e040ab08dc57210;hp=03e77e8d88de7b44b293279d7b4f795a4b7c9b8f;hpb=b3d5776767e4241b5cb5f3a9870767739d5ffe9f;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/AliMUONTrackerQADataMakerRec.cxx b/MUON/AliMUONTrackerQADataMakerRec.cxx index 03e77e8d88d..b7d206b09e8 100644 --- a/MUON/AliMUONTrackerQADataMakerRec.cxx +++ b/MUON/AliMUONTrackerQADataMakerRec.cxx @@ -52,11 +52,8 @@ #include "AliMpDetElement.h" #include "AliMpManuIterator.h" #include "AliQAv1.h" -#include "AliRawEquipment.h" -#include "AliRawEquipmentHeader.h" -#include "AliRawEventHeaderBase.h" #include "AliRawReader.h" -#include "AliRawVEvent.h" +#include "AliRawEventHeaderBase.h" #include #include #include @@ -719,7 +716,8 @@ void AliMUONTrackerQADataMakerRec::FillReadoutStatus(AliMUONLogger& log, AliMUON Double_t nbuspatches = fBusPatchConfig->GetEntries(); - hrostatus->Fill(1.0*AliMUONQAIndices::kTrackerRawNofMissingBusPatchesFromConfig,nofBusPatchesNotInConfig*nevents/nbuspatches); + Int_t bin = hrostatus->FindBin(1.0*AliMUONQAIndices::kTrackerRawNofMissingBusPatchesFromConfig); + hrostatus->SetBinContent(bin,nofBusPatchesNotInConfig*nevents/nbuspatches); Double_t nofBusPatchesNotInData(0); @@ -731,57 +729,37 @@ void AliMUONTrackerQADataMakerRec::FillReadoutStatus(AliMUONLogger& log, AliMUON if ( !data->HasBusPatch(bp->GetId()) ) ++nofBusPatchesNotInData; } - hrostatus->Fill(1.0*AliMUONQAIndices::kTrackerRawNofMissingBusPatchesFromDataStream,nofBusPatchesNotInData*nevents/nbuspatches); + bin = hrostatus->FindBin(1.0*AliMUONQAIndices::kTrackerRawNofMissingBusPatchesFromDataStream); + hrostatus->SetBinContent(bin,nofBusPatchesNotInData*nevents/nbuspatches); } //____________________________________________________________________________ -void AliMUONTrackerQADataMakerRec::FillEventSize(const AliRawVEvent* cevent) +void AliMUONTrackerQADataMakerRec::FillEventSize(AliRawReader* rawReader) { /// Fill event size histogram(s) - if (!cevent) - { - AliError("Got a null cevent..."); - return; - } - - AliRawVEvent* event = const_cast(cevent); // not good, but the Get*Event() methods are not const... - TH1* hnevents = GetRawsData(AliMUONQAIndices::kTrackerNofPhysicsEventsSeen); TH1* hddlevents = GetRawsData(AliMUONQAIndices::kTrackerDDLNofEventsSeen); TH1* hDDLEventSize = GetRawsData(AliMUONQAIndices::kTrackerDDLEventSize); - Double_t eventSize = 0; - hnevents->Fill(0.0); - for ( int i = 0; i < event->GetNSubEvents(); ++i ) + Int_t offset = AliDAQ::DdlIDOffset("MUONTRK"); + + for ( int i = 0; i < AliDAQ::NumberOfDdls("MUONTRK"); ++i ) { - AliRawVEvent* sub = event->GetSubEvent(i); - - for ( int j = 0; j < sub->GetNEquipments(); ++j ) + rawReader->Reset(); + rawReader->Select("MUONTRK",i,i); + if (rawReader->ReadHeader() ) { - AliRawVEquipment* eq = sub->GetEquipment(j); - - AliRawEquipmentHeader* equipmentHeader = eq->GetEquipmentHeader(); - - UInt_t uid = equipmentHeader->GetId(); - - int index; - - TString det(AliDAQ::DetectorNameFromDdlID(uid,index)); - - if (det=="MUONTRK") - { - UInt_t ddlsize = equipmentHeader->GetEquipmentSize(); - hDDLEventSize->Fill(uid,ddlsize); - hddlevents->Fill(uid); - eventSize += ddlsize; - } - } - } + UInt_t ddlsize = rawReader->GetEquipmentSize(); + hDDLEventSize->Fill(i+offset,ddlsize); + hddlevents->Fill(i+offset); + } + } + rawReader->Reset(); } //____________________________________________________________________________ @@ -880,7 +858,7 @@ void AliMUONTrackerQADataMakerRec::BookHistograms(AliQAv1::TASKINDEX_t task) // for raw data, we differentiate events seen from events used to be able to detect // severe decoder errors that lead to no event decoded (i.e. zero event used) even if // events are there (i.e non-zero event seen). - hnevents = new TH1F("kTrackerNofPhysicsEventsSeen","Number of physics events seen",1,-0.5,0.5); + hnevents = new TH1F("hTrackerNofPhysicsEventsSeen","Number of physics events seen",1,-0.5,0.5); // this one will count the number of physics event the rawdatamaker is *seeing* TAxis* a = hnevents->GetXaxis(); a->SetBinLabel(1,"NPhysicsEvents"); @@ -888,7 +866,7 @@ void AliMUONTrackerQADataMakerRec::BookHistograms(AliQAv1::TASKINDEX_t task) Master()->Add2List(hnevents,AliMUONQAIndices::kTrackerNofPhysicsEventsSeen,task,expert,!image,!saveCorr); } - hnevents = new TH1F("kTrackerNofGoodPhysicsEventsUsed","Number of good physics events used",1,-0.5,0.5); + hnevents = new TH1F("hTrackerNofGoodPhysicsEventsUsed","Number of good physics events used",1,-0.5,0.5); // this one will get its content from the TrackerData, i.e. it will count the number of *good* physics events *used* // (i.e. not empty and with no fatal readout error) TAxis* a = hnevents->GetXaxis(); @@ -974,6 +952,7 @@ void AliMUONTrackerQADataMakerRec::InitRaws() h->SetStats(kFALSE); Add2RawsList(h,AliMUONQAIndices::kTrackerDDLEventSizePerEvent,kFALSE,kTRUE,kFALSE); + Add2RawsList(new TH1F("hTrackerIsThere","tracker is there",1,0,1),AliMUONQAIndices::kTrackerIsThere,kTRUE,kFALSE,kFALSE); } //__________________________________________________________________ @@ -983,6 +962,15 @@ void AliMUONTrackerQADataMakerRec::InitDigits() AliCodeTimerAuto("",0); + if ( GetRecoParam()->TryRecover() ) + { + fDigitMaker->SetTryRecover(kTRUE); + } + else + { + fDigitMaker->SetTryRecover(kFALSE); + } + TrackerCalData(AliRecoParam::AConvert(Master()->GetEventSpecie()),kTRUE); /// Book histograms that are common to Raws and Digits @@ -1331,8 +1319,6 @@ void AliMUONTrackerQADataMakerRec::MakeRaws(AliRawReader* rawReader) AliCodeTimerAuto(Form("%s",AliRecoParam::GetEventSpecieName(AliRecoParam::AConvert(Master()->GetEventSpecie()))),0); - AliInfo(Form("rawReader class=%s",rawReader->ClassName())); - /// forces init GetRawsData(AliMUONQAIndices::kTrackerBusPatchOccupancy); @@ -1346,8 +1332,8 @@ void AliMUONTrackerQADataMakerRec::MakeRaws(AliRawReader* rawReader) { dm->ProcessEvent(); - FillEventSize(rawReader->GetEvent()); - + FillEventSize(rawReader); + if ( dm->LastEventWasEmpty() ) { TH1* hrostatus = GetRawsData(AliMUONQAIndices::kTrackerReadoutStatus); @@ -1595,18 +1581,15 @@ AliMUONTrackerQADataMakerRec::ResetDetectorRaws(TObjArray* list) { TString hn(h->GetName()); - if ( hn.Contains("Tracker") ) + if ( !hn.Contains("TrackerBusPatchConfig") ) { - if ( !hn.Contains("hTrackerBusPatchNofPads") && - !hn.Contains("hTrackerBusPatchConfig" ) ) - { - AliDebug(1,Form("Resetting %s",hn.Data())); - h->Reset(); - } + AliDebug(1,Form("Resetting %s",hn.Data())); + + h->Reset(); } else { - AliDebug(1,Form("Will not reset histogram %s",hn.Data())); + AliDebug(1,Form("Will not reset histogram %s",hn.Data())); } } else @@ -1699,7 +1682,6 @@ AliMUONTrackerQADataMakerRec::TrackerCalData(Int_t specieIndex, Bool_t create) if (array) { - array->SetOwner(kFALSE); // as the tracker data will be attached to fQADigitsList which will become the owner o = array->At(specieIndex); if (!o && create) { @@ -1722,7 +1704,6 @@ AliMUONTrackerQADataMakerRec::TrackerRecData(Int_t specieIndex, Bool_t create) if (array) { - array->SetOwner(kFALSE); // as the tracker data will be attached to fQARecPointsList which will become the owner o = array->At(specieIndex); if (!o && create) { @@ -1745,8 +1726,8 @@ AliMUONTrackerQADataMakerRec::MappingCheckRecPoints(Int_t specieIndex, Bool_t cr if (array) { - array->SetOwner(kTRUE); o = array->At(specieIndex); + array->SetOwner(kTRUE); if (!o && create) { AliMUONQAMappingCheck* mcheck = new AliMUONQAMappingCheck(RunNumber());