X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2Fmapping%2FAliMpTriggerReader.cxx;h=25d7a4fa84a6830198c4605667c42b60223c78a6;hb=e95d49427b8bf389628e6b4ccfa42a4aa1cb7167;hp=b7b82f78cb9ccfb5e45eae0201ec59277e945c92;hpb=139856523defd6c842e24ef6640d45886e722bef;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/mapping/AliMpTriggerReader.cxx b/MUON/mapping/AliMpTriggerReader.cxx index b7b82f78cb9..25d7a4fa84a 100644 --- a/MUON/mapping/AliMpTriggerReader.cxx +++ b/MUON/mapping/AliMpTriggerReader.cxx @@ -17,82 +17,136 @@ // $MpId: AliMpTriggerReader.cxx,v 1.4 2006/05/24 13:58:52 ivana Exp $ #include "AliMpTriggerReader.h" -#include "AliMpMotifReader.h" + +#include "AliLog.h" +#include "AliMpConstants.h" +#include "AliMpDataStreams.h" #include "AliMpFiles.h" +#include "AliMpHelper.h" +#include "AliMpMotif.h" +#include "AliMpMotifPosition.h" +#include "AliMpMotifReader.h" +#include "AliMpMotifSpecial.h" #include "AliMpMotifType.h" #include "AliMpPCB.h" #include "AliMpSlat.h" -#include "AliMpMotifMap.h" -#include "AliMpMotifPosition.h" -#include "AliMpMotif.h" -#include "AliMpHelper.h" +#include "AliMpSlatMotifMap.h" +#include "AliMpSlatMotifMap.h" #include "AliMpSt345Reader.h" #include "AliMpTrigger.h" - -#include "AliLog.h" - #include "Riostream.h" #include "TClass.h" -#include "TObjString.h" #include "TList.h" +#include "TObjString.h" #include "TString.h" - +#include +#include #include -#include -/// +//----------------------------------------------------------------------------- /// \class AliMpTriggerReader /// Read trigger slat ASCII files -/// Basically provides 2 static methods: +/// Basically provides two methods: /// - AliMpTrigger* ReadSlat() /// - AliMpPCB* ReadPCB() /// /// \author Laurent Aphecetche +//----------------------------------------------------------------------------- /// \cond CLASSIMP ClassImp(AliMpTriggerReader) /// \endcond -TMap AliMpTriggerReader::fgPCBMap; -TMap AliMpTriggerReader::fgLocalBoardMap; +// +// static private methods +// -const TString AliMpTriggerReader::fgkKeywordLayer("LAYER"); -const TString AliMpTriggerReader::fgkKeywordScale("SCALE"); -const TString AliMpTriggerReader::fgkKeywordPcb("PCB"); -const TString AliMpTriggerReader::fgkKeywordFlipX("FLIP_X"); -const TString AliMpTriggerReader::fgkKeywordFlipY("FLIP_Y"); +//_____________________________________________________________________________ +const TString& AliMpTriggerReader::GetKeywordLayer() +{ + /// Keyword: LAYER + static const TString kKeywordLayer("LAYER"); + return kKeywordLayer; +} //_____________________________________________________________________________ -AliMpTriggerReader::AliMpTriggerReader() : TObject() +const TString& AliMpTriggerReader::GetKeywordScale() { - // - // Default ctor. - // + /// Keyword: SCALE + static const TString kKeywordScale("SCALE"); + return kKeywordScale; +} + +//_____________________________________________________________________________ +const TString& AliMpTriggerReader::GetKeywordPcb() +{ + /// Keyword : PCB + static const TString kKeywordPcb("PCB"); + return kKeywordPcb; +} + +//_____________________________________________________________________________ +const TString& AliMpTriggerReader::GetKeywordFlipX() +{ + /// Keyword : FLIPX + static const TString kKeywordFlipX("FLIP_X"); + return kKeywordFlipX; +} + +//_____________________________________________________________________________ +const TString& AliMpTriggerReader::GetKeywordFlipY() +{ + /// Keyword : FLIPY + static const TString kKeywordFlipY("FLIP_Y"); + return kKeywordFlipY; +} + +// +// ctors, dtor +// + +//_____________________________________________________________________________ +AliMpTriggerReader::AliMpTriggerReader(const AliMpDataStreams& dataStreams, AliMpSlatMotifMap* motifMap) +: TObject(), + fkDataStreams(dataStreams), + fMotifMap(motifMap), + fLocalBoardMap() +{ + /// + /// Default ctor. + /// + fLocalBoardMap.SetOwner(kTRUE); } //_____________________________________________________________________________ AliMpTriggerReader::~AliMpTriggerReader() { - // - // Dtor. - // - fgPCBMap.Delete(); - fgLocalBoardMap.Delete(); + /// + /// Dtor. + /// + fLocalBoardMap.DeleteAll(); } //_____________________________________________________________________________ AliMpSlat* AliMpTriggerReader::BuildSlat(const char* slatName, - AliMpPlaneType planeType, + AliMp::PlaneType planeType, const TList& lines, Double_t scale) { - // Construct a slat from the list of lines, taking into account - // the scale factor + /// Construct a slat from the list of lines, taking into account + /// the scale factor. The returned pointer must be deleted by the client + AliDebug(1,Form("slat %s %s scale %e", + slatName,PlaneTypeName(planeType).Data(),scale)) + ; + AliMpSlat* slat = new AliMpSlat(slatName, planeType); TIter it(&lines); + +// StdoutToAliDebug(3,lines.Print();); + TObjString* osline; while ( ( osline = (TObjString*)it.Next() ) ) { @@ -103,7 +157,7 @@ AliMpTriggerReader::BuildSlat(const char* slatName, TString& keyword = ((TObjString*)tokens->At(0))->String(); - if ( keyword == fgkKeywordPcb ) + if ( keyword == GetKeywordPcb() ) { if ( tokens->GetEntriesFast() != 3 ) { @@ -124,7 +178,7 @@ AliMpTriggerReader::BuildSlat(const char* slatName, pcbName = s.str().c_str(); } - AliMpPCB* pcbType = PCB(pcbName.Data()); + AliMpPCB* pcbType = ReadPCB(pcbName.Data()); if (!pcbType) { AliErrorClass(Form("Cannot read pcbType=%s",pcbName.Data())); @@ -161,9 +215,14 @@ AliMpTriggerReader::BuildSlat(const char* slatName, } } } + AliDebug(3,"Deleting tokens"); delete tokens; + AliDebug(3,"Deleting localBoardList"); delete localBoardList; - slat->Add(pcbType,allLocalBoards); + AliDebug(3,"Adding pcb to slat"); + slat->Add(*pcbType,allLocalBoards); + AliDebug(3,Form("Deleting pcbType=%p %s",pcbType,pcbName.Data())); + delete pcbType; } } @@ -178,14 +237,14 @@ AliMpTriggerReader::BuildSlat(const char* slatName, TString AliMpTriggerReader::GetBoardNameFromPCBLine(const TString& s) { - // Decode the string to get the board name + /// Decode the string to get the board name TString boardName; TObjArray* tokens = s.Tokenize(' '); TString& keyword = ((TObjString*)tokens->At(0))->String(); - if ( keyword == fgkKeywordPcb && + if ( keyword == GetKeywordPcb() && tokens->GetEntriesFast() == 3 ) { boardName = ((TObjString*)tokens->At(2))->String(); @@ -201,11 +260,11 @@ void AliMpTriggerReader::FlipLines(TList& lines, Bool_t flipX, Bool_t flipY, Int_t srcLine, Int_t destLine) { - // - // Change the local board names contained in lines, - // to go from right to left, and/or - // from top to bottom - // + /// + /// Change the local board names contained in lines, + /// to go from right to left, and/or + /// from top to bottom + /// if ( flipX ) @@ -250,7 +309,7 @@ AliMpTriggerReader::FlipLines(TList& lines, Bool_t flipX, Bool_t flipY, TString& s = oline->String(); - if ( !s.Contains(fgkKeywordPcb) ) + if ( !s.Contains(GetKeywordPcb()) ) { // Only consider PCB lines. continue; @@ -320,11 +379,11 @@ AliMpTriggerReader::FlipLines(TList& lines, Bool_t flipX, Bool_t flipY, //___________________________________________________________________________ Int_t -AliMpTriggerReader::IsLayerLine(const TString& sline) +AliMpTriggerReader::IsLayerLine(const TString& sline) const { - // Whether sline contains LAYER keyword + /// Whether sline contains LAYER keyword - if ( sline.BeginsWith(fgkKeywordLayer) ) + if ( sline.BeginsWith(GetKeywordLayer()) ) { return 1; } @@ -340,17 +399,17 @@ AliMpTriggerReader::DecodeFlipLine(const TString& sline, TString& slatType2, Bool_t& flipX, Bool_t& flipY) { - // Decode a line containing FLIP_X and/or FLIP_Y keywords + /// Decode a line containing FLIP_X and/or FLIP_Y keywords Ssiz_t blankPos = sline.First(' '); if ( blankPos < 0 ) return 0; TString keyword(sline(0,blankPos)); - if ( keyword == fgkKeywordFlipX ) + if ( keyword == GetKeywordFlipX() ) { flipX = kTRUE; - } else if ( keyword == fgkKeywordFlipY ) + } else if ( keyword == GetKeywordFlipY() ) { flipY = kTRUE; } @@ -368,12 +427,12 @@ Int_t AliMpTriggerReader::DecodeScaleLine(const TString& sline, Double_t& scale, TString& slatType) { - // Decode sline containing SCALE keyword + /// Decode sline containing SCALE keyword - if ( sline(0,fgkKeywordScale.Length()) == fgkKeywordScale ) + if ( sline(0,GetKeywordScale().Length()) == GetKeywordScale() ) { - TString tmp(sline(fgkKeywordScale.Length()+1, - sline.Length()-fgkKeywordScale.Length()-1)); + TString tmp(sline(GetKeywordScale().Length()+1, + sline.Length()-GetKeywordScale().Length()-1)); Ssiz_t blankPos = tmp.First(' '); if ( blankPos < 0 ) { @@ -396,12 +455,13 @@ AliMpTriggerReader::DecodeScaleLine(const TString& sline, Int_t AliMpTriggerReader::GetLine(const TString& slatType) { - // - // Assuming slatType is a 4 character string of the form XSLN - // where X=1,2,3 or 4 - // S = R or L - // N is the line number - // returns N + /// + /// Assuming slatType is a 4 character string of the form XSLN + /// where X=1,2,3 or 4 + /// S = R or L + /// N is the line number + /// returns N + if ( isdigit(slatType[0]) && ( slatType[1] == 'R' || slatType[1] == 'L' ) && slatType[2] == 'L' ) @@ -415,14 +475,14 @@ AliMpTriggerReader::GetLine(const TString& slatType) int AliMpTriggerReader::LocalBoardNumber(const char* localBoardName) { - // From local board name to local board number + /// From local board name to local board number - if ( !fgLocalBoardMap.GetSize() ) + if ( !fLocalBoardMap.GetSize() ) { ReadLocalBoardMapping(); } - TPair* pair = (TPair*)fgLocalBoardMap.FindObject(localBoardName); + TPair* pair = (TPair*)fLocalBoardMap.FindObject(localBoardName); if (pair) { @@ -431,55 +491,28 @@ AliMpTriggerReader::LocalBoardNumber(const char* localBoardName) return -1; } -//_____________________________________________________________________________ -AliMpPCB* -AliMpTriggerReader::PCB(const char* pcbType) -{ - // - // Get access to an AliMpPCB object, given its type (e.g. N1, SB2, etc...) - // - // Note that the returned object is either a new one (read from file) or a - // reused one if it is already present in the internal map. - // - - TPair* pair = (TPair*)fgPCBMap.FindObject(pcbType); - if ( pair ) - { - AliDebugClass(1,Form("Getting pcb %s from internal map",pcbType)); - return (AliMpPCB*)pair->Value(); - } - else - { - AliDebugClass(1,Form("Reading pcb %s from file",pcbType)); - return ReadPCB(pcbType); - } -} - //_____________________________________________________________________________ void AliMpTriggerReader::ReadLines(const char* slatType, - AliMpPlaneType planeType, + AliMp::PlaneType planeType, TList& lines, Double_t& scale, Bool_t& flipX, Bool_t& flipY, Int_t& srcLine, Int_t& destLine) { - // - // Reads in lines from file for a given slat - // Returns the list of lines (lines), together with some global - // information as the scale, whether to flip the lines, etc... - // - AliDebugClass(1,Form("SlatType %s Scale %e FlipX %d FlipY %d srcLine %d" + /// + /// Reads in lines from file for a given slat + /// Returns the list of lines (lines), together with some global + /// information as the scale, whether to flip the lines, etc... + /// + AliDebugClass(2,Form("SlatType %s Scale %e FlipX %d FlipY %d srcLine %d" " destLine %d\n",slatType,scale,flipX,flipY, srcLine,destLine)); - TString filename(AliMpFiles::SlatFilePath(kStationTrigger,slatType, - planeType).Data()); - std::ifstream in(filename.Data()); - if (!in.good()) - { - AliErrorClass(Form("Cannot read slat from %s",filename.Data())); - } + istream& in + = fkDataStreams. + CreateDataStream(AliMpFiles::SlatFilePath( + AliMp::kStationTrigger,slatType, planeType)); char line[80]; @@ -490,11 +523,11 @@ AliMpTriggerReader::ReadLines(const char* slatType, if ( sline.Length() == 0 || sline[0] == '#' ) continue; Bool_t isKeywordThere = - sline.Contains(fgkKeywordPcb) || - sline.Contains(fgkKeywordLayer) || - sline.Contains(fgkKeywordScale) || - sline.Contains(fgkKeywordFlipX) || - sline.Contains(fgkKeywordFlipY); + sline.Contains(GetKeywordPcb()) || + sline.Contains(GetKeywordLayer()) || + sline.Contains(GetKeywordScale()) || + sline.Contains(GetKeywordFlipX()) || + sline.Contains(GetKeywordFlipY()); if ( !isKeywordThere ) { @@ -512,7 +545,7 @@ AliMpTriggerReader::ReadLines(const char* slatType, if ( isScaleLine < 0 ) { - AliFatalClass(Form("Syntax error near %s keyword\n",fgkKeywordScale.Data())); + AliFatalClass(Form("Syntax error near %s keyword\n",GetKeywordScale().Data())); } else if ( isScaleLine > 0 && slatType2 != slatType ) { @@ -541,60 +574,71 @@ AliMpTriggerReader::ReadLines(const char* slatType, } } - in.close(); + delete ∈ } //_____________________________________________________________________________ void AliMpTriggerReader::ReadLocalBoardMapping() { - // Reads the file that contains the mapping local board name <-> number + /// Reads the file that contains the mapping local board name <-> number - TString filename(AliMpFiles::LocalTriggerBoardMapping()); + fLocalBoardMap.DeleteAll(); - AliDebugClass(1,Form("Reading from %s\n",filename.Data())); - - fgLocalBoardMap.Delete(); + UShort_t mask; - ifstream in(filename.Data()); - if (!in.good()) - { - AliErrorClass(Form("Cannot read file %s\n",filename.Data())); - } - else + istream& in + = fkDataStreams. + CreateDataStream(AliMpFiles::LocalTriggerBoardMapping()); + + char line[80]; + Char_t localBoardName[20]; + Int_t j,localBoardId; + UInt_t switches; + Int_t nofBoards; + + while (!in.eof()) { - char line[80]; - - while ( in.getline(line,80) ) - { - if ( line[0] == '#' ) continue; - - TString sline(line); - if ( sline.Contains("Board") ) + for (Int_t i = 0; i < 4; ++i) + if (!in.getline(line,80)) continue; //skip 4 first lines + + // read mask + if (!in.getline(line,80)) break; + sscanf(line,"%hx",&mask); + + // read # boards + if (!in.getline(line,80)) break; + sscanf(line,"%d",&nofBoards); + + for ( Int_t i = 0; i < nofBoards; ++i ) + { + + if (!in.getline(line,80)) break; + sscanf(line,"%02d %19s %03d %03x", &j, localBoardName, &localBoardId, &switches); + if (localBoardId <= AliMpConstants::NofLocalBoards()) { - TObjArray* tokens = sline.Tokenize(' '); - TString& number = ((TObjString*)(tokens->At(1)))->String(); - Int_t n = atoi(number.Data()); - if ( n == 0 ) continue; - TString& name = ((TObjString*)(tokens->At(4)))->String(); - fgLocalBoardMap.Add(new TObjString(name), new TObjString(number)); - AliDebugClass(10,Form("Board %s has number %s\n",name.Data(),number.Data())); - delete tokens; + fLocalBoardMap.Add(new TObjString(localBoardName), new TObjString(Form("%d",localBoardId))); + AliDebugClass(10,Form("Board %s has number %d\n", localBoardName, localBoardId)); } - } + // skip 2 following lines + if (!in.getline(line,80)) break; + if (!in.getline(line,80)) break; + + } } - in.close(); + + delete ∈ } //_____________________________________________________________________________ AliMpPCB* AliMpTriggerReader::ReadPCB(const char* pcbType) { - // - // Create a new AliMpPCB object, by reading it from file. - // + /// + /// Create a new AliMpPCB object, by reading it from file. + /// Returned pointer must be deleted by client. - AliDebugClass(1,Form("pcbType=%s\n",pcbType)); + AliDebugClass(2,Form("pcbType=%s\n",pcbType)); TString pcbName(pcbType); @@ -608,14 +652,13 @@ AliMpTriggerReader::ReadPCB(const char* pcbType) pcbName = pcbName(0,pos); } - std::ifstream in(AliMpFiles::SlatPCBFilePath(kStationTrigger,pcbName).Data()); - if (!in.good()) - { - AliErrorClass(Form("Cannot open file for PCB %s",pcbName.Data())); - return 0; - } + istream& in + = fkDataStreams. + CreateDataStream(AliMpFiles::SlatPCBFilePath( + AliMp::kStationTrigger,pcbName)); - AliMpMotifReader reader(kStationTrigger,kNonBendingPlane); + AliMpMotifReader reader(fkDataStreams, + AliMp::kStationTrigger, AliMq::kNotSt12, AliMp::kNonBendingPlane); // note that the nonbending // parameter is of no use for trigger, as far as reading motif is // concerned, as all motifs are supposed to be in the same directory @@ -627,7 +670,7 @@ AliMpTriggerReader::ReadPCB(const char* pcbType) const TString kMotifKeyword("MOTIF"); const TString kMotifSpecialKeyword("SPECIAL_MOTIF"); - AliMpPCB* pcb = 0; + AliMpPCB* pcb(0x0); while ( in.getline(line,80) ) { @@ -644,8 +687,11 @@ AliMpTriggerReader::ReadPCB(const char* pcbType) float pcbSizeX = 0.0; float pcbSizeY = 0.0; sin >> padSizeX >> padSizeY >> pcbSizeX >> pcbSizeY; - assert(pcb==0); - pcb = new AliMpPCB(pcbType,padSizeX*scale,padSizeY*scale, + if (pcb) + { + AliError("pcb not null as expected"); + } + pcb = new AliMpPCB(fMotifMap,pcbType,padSizeX*scale,padSizeY*scale, pcbSizeX*scale,pcbSizeY*scale); } @@ -657,11 +703,38 @@ AliMpTriggerReader::ReadPCB(const char* pcbType) TString sMotifType; sin >> sMotifSpecial >> sMotifType; - AliMpMotifType* motifType = reader.BuildMotifType(sMotifType); - AliMpMotifSpecial* specialMotif = - reader.BuildMotifSpecial(sMotifSpecial,motifType,scale); + TString id = reader.MotifSpecialName(sMotifSpecial,scale); - assert(pcb==0); + AliMpMotifSpecial* specialMotif = + dynamic_cast(fMotifMap->FindMotif(id)); + if (!specialMotif) + { + AliDebug(1,Form("Reading motifSpecial %s (%s) from file", + sMotifSpecial.Data(),id.Data())); + AliMpMotifType* motifType = fMotifMap->FindMotifType(sMotifType.Data()); + if ( !motifType) + { + AliDebug(1,Form("Reading motifType %s (%s) from file", + sMotifType.Data(),id.Data())); + motifType = reader.BuildMotifType(sMotifType.Data()); + fMotifMap->AddMotifType(motifType); + } + else + { + AliDebug(1,Form("Got motifType %s (%s) from motifMap", + sMotifType.Data(),id.Data())); + } + specialMotif = reader.BuildMotifSpecial(sMotifSpecial,motifType,scale); + fMotifMap->AddMotif(specialMotif); + } + else + { + AliDebug(1,Form("Got motifSpecial %s from motifMap",sMotifSpecial.Data())); + } + if (pcb) + { + AliError("pcb not null as expected"); + } pcb = new AliMpPCB(pcbType,specialMotif); } @@ -674,31 +747,45 @@ AliMpTriggerReader::ReadPCB(const char* pcbType) int iy; sin >> sMotifType >> ix >> iy; - AliMpMotifType* motifType = reader.BuildMotifType(sMotifType.Data()); + AliMpMotifType* motifType = fMotifMap->FindMotifType(sMotifType.Data()); + if ( !motifType) + { + AliDebug(1,Form("Reading motifType %s from file",sMotifType.Data())); + motifType = reader.BuildMotifType(sMotifType.Data()); + fMotifMap->AddMotifType(motifType); + } + else + { + AliDebug(1,Form("Got motifType %s from motifMap",sMotifType.Data())); + } - assert(pcb!=0); + if (! pcb) + { + AliError("pcb null"); + continue; + } pcb->Add(motifType,ix,iy); } } - in.close(); + delete ∈ - fgPCBMap.Add(new TObjString(pcbType),pcb); return pcb; } //_____________________________________________________________________________ AliMpTrigger* -AliMpTriggerReader::ReadSlat(const char* slatType, AliMpPlaneType planeType) +AliMpTriggerReader::ReadSlat(const char* slatType, AliMp::PlaneType planeType) { - // - // Create a new AliMpTrigger object, by reading it from file. - // + /// + /// Create a new AliMpTrigger object, by reading it from file. + /// Returned object must be deleted by client. Double_t scale = 1.0; Bool_t flipX = kFALSE; Bool_t flipY = kFALSE; TList lines; + lines.SetOwner(kTRUE); Int_t srcLine(-1); Int_t destLine(-1); @@ -713,7 +800,7 @@ AliMpTriggerReader::ReadSlat(const char* slatType, AliMpPlaneType planeType) if ( !IsLayerLine(firstLine) ) { std::ostringstream s; - s << fgkKeywordLayer; + s << GetKeywordLayer(); lines.AddFirst(new TObjString(s.str().c_str())); } @@ -724,6 +811,7 @@ AliMpTriggerReader::ReadSlat(const char* slatType, AliMpPlaneType planeType) // Now splits the lines in packets corresponding to different layers // (if any), and create sub-slats. TObjArray layers; + layers.SetOwner(kTRUE); Int_t ilayer(-1); TIter it(&lines); TObjString* osline; @@ -733,7 +821,9 @@ AliMpTriggerReader::ReadSlat(const char* slatType, AliMpPlaneType planeType) TString& s = osline->String(); if ( IsLayerLine(s) ) { - layers.Add(new TList); + TList* list = new TList; + list->SetOwner(kTRUE); + layers.Add(list); ++ilayer; } else @@ -746,15 +836,45 @@ AliMpTriggerReader::ReadSlat(const char* slatType, AliMpPlaneType planeType) AliMpTrigger* triggerSlat = new AliMpTrigger(slatType, planeType); - for ( Int_t ilayer = 0; ilayer < layers.GetEntriesFast(); ++ilayer ) + for ( ilayer = 0; ilayer < layers.GetEntriesFast(); ++ilayer ) { - TList& lines = *((TList*)layers.At(ilayer)); + TList& lines1 = *((TList*)layers.At(ilayer)); std::ostringstream slatName; slatName << slatType << "-LAYER" << ilayer; - AliMpSlat* slat = BuildSlat(slatName.str().c_str(),planeType,lines,scale); + AliMpSlat* slat = BuildSlat(slatName.str().c_str(),planeType,lines1,scale); if ( slat ) { - triggerSlat->AdoptLayer(slat); + Bool_t ok = triggerSlat->AdoptLayer(slat); + if (!ok) + { + StdoutToAliError(cout << "could not add slat=" << endl; + slat->Print(); + cout << "to the triggerSlat=" << endl; + triggerSlat->Print(); + ); + AliError("Slat is="); + for ( Int_t i = 0; i < slat->GetSize(); ++i ) + { + AliMpPCB* pcb = slat->GetPCB(i); + AliError(Form("ERR pcb %d size %e,%e (unscaled is %e,%e)", + i,pcb->DX()*2,pcb->DY()*2, + pcb->DX()*2/scale,pcb->DY()*2/scale)); + } + AliError("TriggerSlat is="); + for ( Int_t j = 0; j < triggerSlat->GetSize(); ++j ) + { + AliMpSlat* slat1 = triggerSlat->GetLayer(j); + AliError(Form("Layer %d",j)); + for ( Int_t i = 0; i < slat1->GetSize(); ++i ) + { + AliMpPCB* pcb = slat1->GetPCB(i); + AliError(Form("ERR pcb %d size %e,%e (unscaled is %e,%e)", + i,pcb->DX()*2,pcb->DY()*2, + pcb->DX()*2/scale,pcb->DY()*2/scale)); + } + } + StdoutToAliError(fMotifMap->Print();); + } } else { @@ -764,16 +884,5 @@ AliMpTriggerReader::ReadSlat(const char* slatType, AliMpPlaneType planeType) } } - layers.SetOwner(kTRUE); - layers.Delete(); - return triggerSlat; } - -//_____________________________________________________________________________ -void -AliMpTriggerReader::Reset() -{ - // Resets the PCB internal map - fgPCBMap.Delete(); -}