From: ivana Date: Fri, 12 Jan 2007 11:28:32 +0000 (+0000) Subject: Adding fSlatMotifMap data member to keep track of st345/trigger motifs (Laurent) X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=f54f81ea7d0ec2fc34ca60e5e55460223f2055cd Adding fSlatMotifMap data member to keep track of st345/trigger motifs (Laurent) --- diff --git a/MUON/mapping/AliMpSegmentation.cxx b/MUON/mapping/AliMpSegmentation.cxx index c31d979d072..f7c7770b85b 100644 --- a/MUON/mapping/AliMpSegmentation.cxx +++ b/MUON/mapping/AliMpSegmentation.cxx @@ -76,7 +76,8 @@ AliMpSegmentation* AliMpSegmentation::Instance() AliMpSegmentation::AliMpSegmentation() : TObject(), fMpSegmentations(true), - fElCardsMap(true) + fElCardsMap(true), + fSlatMotifMap() { /// Standard constructor @@ -84,21 +85,24 @@ AliMpSegmentation::AliMpSegmentation() fElCardsMap.SetOwner(true); // Create mapping segmentations for all detection elements - for ( Int_t cath = 0; cath < 2; cath ++ ) { + for ( Int_t cath = 0; cath < 2; cath ++ ) + { AliMpDEIterator it; - for ( it.First(); ! it.IsDone(); it.Next() ) { - //if ( AliMpDEManager::GetChamberId(it.CurrentDE()) >= 4 ) break; - CreateMpSegmentation(it.CurrentDE(), cath); + for ( it.First(); ! it.IsDone(); it.Next() ) + { + CreateMpSegmentation(it.CurrentDE(), cath); } } // Fill el cards map for all detection elements // of tracking chambers AliMpDEIterator it; - for ( it.First(); ! it.IsDone(); it.Next() ) { - //if ( AliMpDEManager::GetChamberId(it.CurrentDE()) >= 4 ) break; - if ( AliMpDEManager::GetChamberId(it.CurrentDE()) >= 10 ) break; - FillElCardsMap(it.CurrentDE()); + for ( it.First(); ! it.IsDone(); it.Next() ) + { + if ( AliMpDEManager::GetStationType(it.CurrentDE()) != kStationTrigger ) + { + FillElCardsMap(it.CurrentDE()); + } } } @@ -106,7 +110,8 @@ AliMpSegmentation::AliMpSegmentation() AliMpSegmentation::AliMpSegmentation(TRootIOCtor* /*ioCtor*/) : TObject(), fMpSegmentations(), - fElCardsMap() + fElCardsMap(), + fSlatMotifMap() { /// Constructor for IO @@ -164,17 +169,22 @@ AliMpSegmentation::CreateMpSegmentation(Int_t detElemId, Int_t cath) mpSegmentation = new AliMpSectorSegmentation(sector, true); } else if ( stationType == kStation345 ) { - AliMpSlat* slat = AliMpSt345Reader::ReadSlat(deTypeName, planeType); + AliMpSt345Reader reader(fSlatMotifMap); + AliMpSlat* slat = reader.ReadSlat(deTypeName, planeType); mpSegmentation = new AliMpSlatSegmentation(slat, true); } else if ( stationType == kStationTrigger ) { - AliMpTrigger* trigger = AliMpTriggerReader::ReadSlat(deTypeName, planeType); + AliMpTriggerReader reader(fSlatMotifMap); + AliMpTrigger* trigger = reader.ReadSlat(deTypeName, planeType); mpSegmentation = new AliMpTriggerSegmentation(trigger, true); } else AliErrorStream() << "Unknown station type" << endl; fMpSegmentations.Add(deName, mpSegmentation); + + StdoutToAliDebug(3,fSlatMotifMap.Print();); + return mpSegmentation; } diff --git a/MUON/mapping/AliMpSegmentation.h b/MUON/mapping/AliMpSegmentation.h index 5210ac977b3..caed95d588b 100644 --- a/MUON/mapping/AliMpSegmentation.h +++ b/MUON/mapping/AliMpSegmentation.h @@ -32,9 +32,12 @@ # include "AliMpExMap.h" #endif +#ifndef ALIMPSLATMOTIFMAP_H +# include "AliMpSlatMotifMap.h" +#endif + class AliMpVSegmentation; class AliMpSegmentation; - class TRootIOCtor; class AliMpSegmentation : public TObject { @@ -71,7 +74,7 @@ class AliMpSegmentation : public TObject { // data members AliMpStringObjMap fMpSegmentations;///< Map of mapping segmentations to DE seg names AliMpExMap fElCardsMap; ///< Map of el. cards IDs to segmentations - + AliMpSlatMotifMap fSlatMotifMap; ///< Map of motif, motifTypes to avoid duplications and allow proper deletion ClassDef(AliMpSegmentation,1) // The factory for building mapping segmentations };