X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2FAliMUON2DStoreValidator.cxx;h=de5a02c27283f390ffdabf88a59bd171f5dd60af;hb=8f8ae0def5ec2580111b8bfafa054637984285eb;hp=f8b79ad46be94dbe0069702b2dd364ce41ba3ac6;hpb=a0eca50986ea6e10d419bf5c2af185e1a77093b7;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/AliMUON2DStoreValidator.cxx b/MUON/AliMUON2DStoreValidator.cxx index f8b79ad46be..de5a02c2728 100644 --- a/MUON/AliMUON2DStoreValidator.cxx +++ b/MUON/AliMUON2DStoreValidator.cxx @@ -19,18 +19,19 @@ #include "AliLog.h" #include "AliMUONCheckItem.h" -#include "AliMUONCheckItemIterator.h" -#include "AliMpConstants.h" -#include "AliMUONVStore.h" #include "AliMUONVCalibParam.h" +#include "AliMUONVStore.h" +#include "AliMpConstants.h" +#include "AliMpDDLStore.h" #include "AliMpDEManager.h" -#include "AliMpIntPair.h" -#include "AliMpManuList.h" +#include "AliMpDetElement.h" +#include "AliMpManuIterator.h" #include #include #include #include +//----------------------------------------------------------------------------- /// \class AliMUON2DStoreValidator /// /// Determine which channels, manus, DEs, stations are missing @@ -58,6 +59,7 @@ /// contains k TObjString = Form("%d",manuChannel) /// /// \author Laurent Aphecetche +//----------------------------------------------------------------------------- /// \cond CLASSIMP ClassImp(AliMUON2DStoreValidator) @@ -66,7 +68,6 @@ ClassImp(AliMUON2DStoreValidator) //_____________________________________________________________________________ AliMUON2DStoreValidator::AliMUON2DStoreValidator() : TObject(), - fManuList(0x0), fChambers(0x0), fStatus(0x0) { @@ -77,7 +78,6 @@ AliMUON2DStoreValidator::AliMUON2DStoreValidator() AliMUON2DStoreValidator::~AliMUON2DStoreValidator() { /// dtor - delete fManuList; delete fChambers; delete fStatus; } @@ -128,7 +128,7 @@ AliMUON2DStoreValidator::GetDE(Int_t detElemId) AliDebug(3,Form("Did not find DE %4d into chamber %d, will create it", detElemId,chamberID)); de = new AliMUONCheckItem(detElemId, - AliMpManuList::NumberOfManus(detElemId), + AliMpDDLStore::Instance()->GetDetElement(detElemId)->NofManus(), "Detection Element"); Bool_t ok = chamber->AddItem(detElemId,de); if (!ok) @@ -149,7 +149,7 @@ AliMUON2DStoreValidator::GetManu(Int_t detElemId, Int_t manuId) AliMUONCheckItem* manu = static_cast(de->GetItem(manuId)); if (!manu) { - manu = new AliMUONCheckItem(manuId,AliMpManuList::NumberOfChannels(detElemId,manuId),"Manu"); + manu = new AliMUONCheckItem(manuId,AliMpDDLStore::Instance()->GetDetElement(detElemId)->NofChannelsInManu(manuId),"Manu"); Bool_t ok = de->AddItem(manuId,manu); if (!ok) { @@ -188,7 +188,7 @@ AliMUON2DStoreValidator::AddMissingManu(Int_t detElemId, Int_t manuId) AliDebug(3,Form("DE %4d Manu %4d is completely missing", detElemId,manuId)); - Int_t n(AliMpManuList::NumberOfChannels(detElemId,manuId)); + Int_t n(AliMpDDLStore::Instance()->GetDetElement(detElemId)->NofChannelsInManu(manuId)); for ( Int_t i = 0; i < n; ++i ) { @@ -203,11 +203,9 @@ AliMUON2DStoreValidator::ReportManu(TList& lines, AliMUONCheckItem& manu) /// Report list of missing channels from this manu TObjString* channel(0x0); - AliMUONCheckItemIterator it(manu); - - it.First(); + TIter next(manu.CreateIterator()); - while ( ( channel = static_cast(it.Next()) ) ) + while ( ( channel = static_cast(next()) ) ) { lines.Add(new TObjString(Form("\t\t\tChannel %s is missing or dead", channel->GetString().Data()))); @@ -221,13 +219,13 @@ AliMUON2DStoreValidator::ReportDE(TList& lines, AliMUONCheckItem& de) { /// Report list of missing manus from this de AliMUONCheckItem* manu(0x0); - AliMUONCheckItemIterator it(de); + + TIter next(de.CreateIterator()); lines.Add(new TObjString(Form("DE %5d",de.GetID()))); - it.First(); - while ( ( manu = static_cast(it.Next()) ) ) + while ( ( manu = static_cast(next()) ) ) { if ( manu->IsDead() ) { @@ -247,11 +245,9 @@ AliMUON2DStoreValidator::ReportChamber(TList& lines, AliMUONCheckItem& chamber) /// Report list of missing de from this chamber AliMUONCheckItem* de(0x0); - AliMUONCheckItemIterator it(chamber); + TIter next(chamber.CreateIterator()); - it.First(); - - while ( ( de = static_cast(it.Next()) ) ) + while ( ( de = static_cast(next()) ) ) { if ( de->IsDead() ) { @@ -321,16 +317,15 @@ AliMUON2DStoreValidator::Validate(const AliMUONVStore& store, delete fChambers; fChambers = 0x0; - if (!fManuList) fManuList = AliMpManuList::ManuList(); - // Now checks if some full manus are missing - TIter next(fManuList); - AliMpIntPair* p; + + AliMpManuIterator it; + + Int_t detElemId; + Int_t manuId; - while ( ( p = (AliMpIntPair*)next() ) ) + while ( it.Next(detElemId,manuId) ) { - Int_t detElemId = p->GetFirst(); - Int_t manuId = p->GetSecond(); AliMUONVCalibParam* test = static_cast(store.FindObject(detElemId,manuId)); if (!test) @@ -341,10 +336,13 @@ AliMUON2DStoreValidator::Validate(const AliMUONVStore& store, else { if (!check) continue; + + AliMpDetElement* de = AliMpDDLStore::Instance()->GetDetElement(detElemId); + // manu is there, check all its channels for ( Int_t manuChannel = 0 ; manuChannel < test->Size(); ++manuChannel ) { - if ( AliMpManuList::DoesChannelExist(detElemId,manuId,manuChannel) && + if ( de->IsConnectedChannel(manuId,manuChannel) && !check(*test,manuChannel) ) { AddMissingChannel(detElemId,manuId,manuChannel); @@ -369,16 +367,14 @@ AliMUON2DStoreValidator::Validate(const AliMUONVStore& store, delete fChambers; fChambers = 0x0; - if (!fManuList) fManuList = AliMpManuList::ManuList(); - // Now checks if some full manus are missing - TIter next(fManuList); - AliMpIntPair* p; - while ( ( p = (AliMpIntPair*)next() ) ) + AliMpManuIterator it; + Int_t detElemId; + Int_t manuId; + + while ( it.Next(detElemId,manuId) ) { - Int_t detElemId = p->GetFirst(); - Int_t manuId = p->GetSecond(); AliMUONVCalibParam* test = static_cast(store.FindObject(detElemId,manuId)); if (!test) @@ -389,9 +385,11 @@ AliMUON2DStoreValidator::Validate(const AliMUONVStore& store, else { // manu is there, check all its channels + AliMpDetElement* de = AliMpDDLStore::Instance()->GetDetElement(detElemId); + for ( Int_t manuChannel = 0 ; manuChannel < test->Size(); ++manuChannel ) { - if ( AliMpManuList::DoesChannelExist(detElemId,manuId,manuChannel) && + if ( de->IsConnectedChannel(manuId,manuChannel) && ( test->ValueAsFloat(manuChannel,0) == invalidFloatValue || test->ValueAsFloat(manuChannel,1) == invalidFloatValue ) ) {