]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpTriggerReader.cxx
Implementations of VCalibParam for 2 floats (used by pedestals and gains)
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpTriggerReader.cxx
1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 *                                                                        *
4 * Author: The ALICE Off-line Project.                                    *
5 * Contributors are mentioned in the code where appropriate.              *
6 *                                                                        *
7 * Permission to use, copy, modify and distribute this software and its   *
8 * documentation strictly for non-commercial purposes is hereby granted   *
9 * without fee, provided that the above copyright notice appears in all   *
10 * copies and that both the copyright notice and this permission notice   *
11 * appear in the supporting documentation. The authors make no claims     *
12 * about the suitability of this software for any purpeateose. It is      *
13 * provided "as is" without express or implied warranty.                  *
14 **************************************************************************/
15
16 // $Id$
17 // $MpId$
18
19 #include <assert.h>
20 #include "AliMpTriggerReader.h"
21
22 #include "AliLog.h"
23 #include "AliMpMotifReader.h"
24 #include "AliMpFiles.h"
25 #include "AliMpMotifType.h"
26 #include "AliMpPCB.h"
27 #include "AliMpSlat.h"
28 #include "AliMpMotifMap.h"
29 #include "AliMpMotifPosition.h"
30 #include "AliMpMotif.h"
31 #include "AliMpHelper.h"
32 #include "AliMpSt345Reader.h"
33 #include "AliMpTrigger.h"
34
35 #include "Riostream.h"
36
37 #include "TClass.h"
38 #include "TObjString.h"
39 #include "TList.h"
40 #include "TString.h"
41
42 #include <sstream>
43
44 ClassImp(AliMpTriggerReader)
45
46 TMap AliMpTriggerReader::fgPCBMap;
47 TMap AliMpTriggerReader::fgLocalBoardMap;
48
49 namespace
50 {
51   const TString KEYWORD_LAYER("LAYER");
52   const TString KEYWORD_SCALE("SCALE");
53   const TString KEYWORD_PCB("PCB");  
54   const TString KEYWORD_FLIPX("FLIP_X");
55   const TString KEYWORD_FLIPY("FLIP_Y");
56 }
57
58 //_____________________________________________________________________________
59 AliMpTriggerReader::AliMpTriggerReader() : TObject()
60 {
61   //
62   // Default ctor.
63   //
64
65
66 //_____________________________________________________________________________
67 AliMpTriggerReader::~AliMpTriggerReader()
68 {
69   //
70   // Dtor.
71   //
72   fgPCBMap.Delete();
73   fgLocalBoardMap.Delete();
74 }
75
76 //_____________________________________________________________________________
77 AliMpSlat*
78 AliMpTriggerReader::BuildSlat(const char* slatName,
79                               AliMpPlaneType planeType,
80                               const TList& lines,
81                               Double_t scale)
82 {
83   AliMpSlat* slat = new AliMpSlat(slatName, planeType);
84     
85   TIter it(&lines);
86   TObjString* osline;
87   while ( ( osline = (TObjString*)it.Next() ) )
88   {
89     // note that at this stage lines should not be empty.
90     TString sline(osline->String());
91     
92     TObjArray* tokens = sline.Tokenize(' ');
93     
94     TString& keyword = ((TObjString*)tokens->At(0))->String();
95     
96     if ( keyword == KEYWORD_PCB )
97     {
98       if ( tokens->GetEntriesFast() != 3 )
99       {
100         AliErrorClass(Form("Syntax error : expecting PCB type localboard-list"
101                            " in following line:\n%s",sline.Data()));
102         delete slat;
103         delete tokens;
104         return 0;
105       }
106       TString pcbName = ((TObjString*)tokens->At(1))->String();
107       
108       TObjArray* localBoardList = ((TObjString*)tokens->At(2))->String().Tokenize(',');
109       
110       if ( scale != 1.0 )
111       {
112         std::ostringstream s;
113         s << pcbName.Data() << "x" << scale;
114         pcbName = s.str().c_str();
115       }
116       
117       AliMpPCB* pcbType = PCB(pcbName.Data());    
118       if (!pcbType)
119       {
120         AliErrorClass(Form("Cannot read pcbType=%s",pcbName.Data()));
121         delete slat;
122         return 0;
123       }      
124
125       TArrayI allLocalBoards;
126       
127       for ( Int_t ilb = 0; ilb < localBoardList->GetEntriesFast(); ++ilb)
128       {
129         TArrayI localBoardNumbers;
130         TString& localBoards = ((TObjString*)localBoardList->At(ilb))->String();
131         Ssiz_t pos = localBoards.First('-');
132         if ( pos < 0 ) 
133         {
134           pos = localBoards.Length();
135         }
136         AliMpHelper::DecodeName(localBoards(pos-1,localBoards.Length()-pos+1).Data(),
137                                 ';',localBoardNumbers);      
138         for ( int i = 0; i < localBoardNumbers.GetSize(); ++i )
139         {
140           std::ostringstream name;
141           name << localBoards(0,pos-1) << localBoardNumbers[i];
142           AliDebugClass(3,name.str().c_str());
143           localBoardNumbers[i] = LocalBoardNumber(name.str().c_str());
144           AliDebugClass(3,Form("LOCALBOARDNUMBER %d\n",localBoardNumbers[i]));
145           allLocalBoards.Set(allLocalBoards.GetSize()+1);
146           allLocalBoards[allLocalBoards.GetSize()-1] = localBoardNumbers[i];
147           if (localBoardNumbers[i] < 0 )
148           {
149             AliErrorClass(Form("Got a negative local board number in %s ? Unlikely"
150                                " to be correct... : %s\n",slatName,name.str().c_str()));
151           }
152         }
153       }
154       delete tokens;
155       delete localBoardList;
156       slat->Add(pcbType,allLocalBoards);
157     }
158   }
159   
160   if ( slat->DX()== 0 || slat->DY() == 0 )
161   {
162     AliFatalClass(Form("Slat %s has invalid null size\n",slat->GetID()));
163   }
164   return slat;
165 }
166
167 //_____________________________________________________________________________
168 TString
169 AliMpTriggerReader::GetBoardNameFromPCBLine(const TString& s)
170 {
171   TString boardName;
172   
173   TObjArray* tokens = s.Tokenize(' ');
174   
175   TString& keyword = ((TObjString*)tokens->At(0))->String();
176
177   if ( keyword == KEYWORD_PCB &&
178        tokens->GetEntriesFast() == 3 )
179   {
180     boardName = ((TObjString*)tokens->At(2))->String();
181   }
182   
183   delete tokens;
184   
185   return boardName;
186 }
187   
188 //_____________________________________________________________________________
189 void
190 AliMpTriggerReader::FlipLines(TList& lines, Bool_t flipX, Bool_t flipY,
191                               Int_t srcLine, Int_t destLine)
192 {
193   //
194   // Change the local board names contained in lines, 
195   // to go from right to left, and/or
196   // from top to bottom
197   //
198  
199 //  cout << "--- Original lines (flipX=" << flipX << " flipY=" << flipY
200 //  << " srcLine=" << srcLine << " destLine=" << destLine << " : " << endl;
201 //  lines.Print();
202 //
203   if ( flipX )
204   {
205     // Simply swaps R(ight) and L(eft) in the first character of local board names
206
207     TObjString* oline;
208     TIter it(&lines);
209     while ( ( oline = (TObjString*)it.Next() ) )
210     {
211       TString& s = oline->String();
212       if ( s.Contains("RC") ) 
213       {
214         // Change right to left
215         s.ReplaceAll("RC","LC");
216       }
217       else if ( s.Contains("LC") )
218       {
219         // Change left to right
220         s.ReplaceAll("LC","RC");
221       }
222     }
223   }
224   
225 //  cout << "*** After flipX :" << endl;
226 //  lines.Print();
227
228   if ( flipY )
229   {
230     // Change line number, according to parameters srcLine and destLine
231     // Note that because of road opening (for planes 3 and 4 at least),
232     // we loop for srcLine +-1
233     //
234     for ( Int_t line = -1; line <=1; ++line )
235     {
236       std::ostringstream src,dest;
237       src << "L" << srcLine+line;
238       dest << "L" << destLine-line;
239       if ( src.str() == dest.str() ) continue;
240       
241       for ( Int_t i = 0; i < lines.GetSize(); ++i )
242       {
243         TObjString* oline = (TObjString*)lines.At(i);
244         
245         TString& s = oline->String();
246         
247         if ( !s.Contains(KEYWORD_PCB) ) 
248         {
249           // Only consider PCB lines.
250           continue;
251         }
252         
253         if ( s.Contains(src.str().c_str()) )
254         {
255           AliDebugClass(4,Form("Replacing %s by %s in %s\n",
256                                src.str().c_str(),dest.str().c_str(),s.Data()));
257           
258           s.ReplaceAll(src.str().c_str(),dest.str().c_str());
259           
260           AliDebugClass(4,s.Data());
261           
262           TString boardName(GetBoardNameFromPCBLine(s));
263           
264           if ( line )
265           {
266             // We must also change board numbers, with the tricky
267             // thing that up and down must be swapped...
268             // Up can only be 1 card so it must be B1
269             // Down must be the uppper card of the line before, so
270             // the biggest possible board number for this Line,Column
271             
272             if (line>0)
273             {
274                 // force to B1
275               AliDebugClass(4,Form("Forcing B1 in %s\n",s.Data()));
276               s.ReplaceAll(boardName(boardName.Length()-2,2),"B1");
277               AliDebugClass(4,s.Data());
278             }
279             else
280             {
281               // find the largest valid board number
282               for ( int b = 4; b>=1; --b )
283               {
284                 std::ostringstream bs;
285                 bs << boardName(0,boardName.Length()-1) << b;
286                 if ( LocalBoardNumber(bs.str().c_str()) >= 0 )
287                 {
288                   AliDebugClass(4,Form("Replacing %s by %s in %s\n",
289                                   boardName(boardName.Length()-2,2).Data(),
290                                   Form("B%d",b),
291                                   s.Data()));
292                   s.ReplaceAll(boardName(boardName.Length()-2,2),
293                                Form("B%d",b));
294                   AliDebugClass(4,s);
295                   break;
296                 }
297               }
298             }  
299             // Check that the replacement we did is ok. If not,
300             // skip the line.
301             Int_t lbn = LocalBoardNumber(GetBoardNameFromPCBLine(s));
302             if ( lbn < 0 )
303             {
304               AliDebugClass(4,Form("Removing line %s\n",s.Data()));
305               lines.Remove(oline);
306             }
307             
308           } // if (line)          
309         }
310       }    
311     }
312   }
313 //  cout << "*** After flipY :" << endl;
314 //  lines.Print();
315 }
316
317 //___________________________________________________________________________
318 Int_t
319 AliMpTriggerReader::IsLayerLine(const TString& sline)
320 {
321   if ( sline.BeginsWith(KEYWORD_LAYER) )
322   {
323     return 1;
324   }
325   else
326   {
327     return 0;
328   }
329 }
330
331 //___________________________________________________________________________
332 Int_t
333 AliMpTriggerReader::DecodeFlipLine(const TString& sline,
334                                    TString& slatType2,
335                                    Bool_t& flipX, Bool_t& flipY)
336 {
337   Ssiz_t blankPos = sline.First(' ');
338   if ( blankPos < 0 ) return 0;
339   
340   TString keyword(sline(0,blankPos));
341   
342   if ( keyword == KEYWORD_FLIPX ) 
343   {
344     flipX = kTRUE;
345   } else if ( keyword == KEYWORD_FLIPY ) 
346   {
347     flipY = kTRUE;
348   }
349   else
350   {
351     return 0;
352   }
353   
354   slatType2 = sline(blankPos+1,sline.Length()-blankPos-1);
355   return 1;
356 }
357
358 //___________________________________________________________________________
359 Int_t
360 AliMpTriggerReader::DecodeScaleLine(const TString& sline, 
361                                     Double_t& scale, TString& slatType)
362 {
363   if ( sline(0,KEYWORD_SCALE.Length()) == KEYWORD_SCALE )
364   {
365     TString tmp(sline(KEYWORD_SCALE.Length()+1,
366                       sline.Length()-KEYWORD_SCALE.Length()-1));
367     Ssiz_t blankPos = tmp.First(' ');
368     if ( blankPos < 0 )
369     {
370       AliErrorClass(Form("Syntax error in slat file, should get a slatType after "
371                     " SCALE keyword : %s\n",tmp.Data()));
372       return -1;
373     }
374     else
375     {
376       slatType = tmp(0,blankPos);
377       scale = TString(tmp(blankPos+1,tmp.Length()-blankPos-1)).Atof();
378       return 1;
379     }
380   }
381   scale = 1.0;
382   return 0;
383 }
384
385 //_____________________________________________________________________________
386 Int_t
387 AliMpTriggerReader::GetLine(const TString& slatType)
388 {
389   //
390   // Assuming slatType is a 4 character string of the form XSLN
391   // where X=1,2,3 or 4
392   // S = R or L
393   // N is the line number
394   // returns N
395   if ( isdigit(slatType[0]) && 
396        ( slatType[1] == 'R' || slatType[1] == 'L' ) &&
397        slatType[2] == 'L' )
398   {
399     return atoi(slatType(3,1).Data());
400   }
401   return -1;
402 }
403
404 //_____________________________________________________________________________
405 int
406 AliMpTriggerReader::LocalBoardNumber(const char* localBoardName)
407 {
408   if ( !fgLocalBoardMap.GetSize() ) 
409   {
410     ReadLocalBoardMapping();
411   }
412   
413   TPair* pair = (TPair*)fgLocalBoardMap.FindObject(localBoardName);
414   
415   if (pair)
416   {
417     return atoi(((TObjString*)pair->Value())->String().Data());
418   }
419   return -1;
420 }
421
422 //_____________________________________________________________________________
423 AliMpPCB*
424 AliMpTriggerReader::PCB(const char* pcbType)
425 {
426   //
427   // Get access to an AliMpPCB object, given its type (e.g. N1, SB2, etc...)
428   //
429   // Note that the returned object is either a new one (read from file) or a 
430   // reused one if it is already present in the internal map.
431   //
432   
433   TPair* pair = (TPair*)fgPCBMap.FindObject(pcbType);
434   if ( pair )
435   {
436     AliDebugClass(1,Form("Getting pcb %s from internal map",pcbType));
437     return (AliMpPCB*)pair->Value();
438   }
439   else
440   {
441     AliDebugClass(1,Form("Reading pcb %s from file",pcbType));
442     return ReadPCB(pcbType);
443   }
444 }
445
446 //_____________________________________________________________________________
447 void 
448 AliMpTriggerReader::ReadLines(const char* slatType,
449                               AliMpPlaneType planeType,
450                               TList& lines,
451                               Double_t& scale,
452                               Bool_t& flipX, Bool_t& flipY,
453                               Int_t& srcLine, Int_t& destLine)
454 {
455   AliDebugClass(1,Form("SlatType %s Scale %e FlipX %d FlipY %d srcLine %d"
456                        " destLine %d\n",slatType,scale,flipX,flipY,
457                        srcLine,destLine));
458   
459   TString filename(AliMpFiles::SlatFilePath(kStationTrigger,slatType,
460                                             planeType).Data());
461   std::ifstream in(filename.Data());
462   if (!in.good()) 
463   {
464     AliErrorClass(Form("Cannot read slat from %s",filename.Data()));
465   }
466   
467   char line[80];
468   
469   while ( in.getline(line,80) )
470   {
471     TString sline(AliMpHelper::Normalize(line));
472
473     if ( sline.Length() == 0 || sline[0] == '#' ) continue;
474     
475     Bool_t isKeywordThere = 
476       sline.Contains(KEYWORD_PCB) || 
477       sline.Contains(KEYWORD_LAYER) ||
478       sline.Contains(KEYWORD_SCALE) || 
479       sline.Contains(KEYWORD_FLIPY) || sline.Contains(KEYWORD_FLIPX);
480     
481     if ( !isKeywordThere ) 
482     {
483       AliErrorClass(Form("Got a line with no keyword : %s."
484                          "That's not valid\n",line));
485       continue; 
486     }
487     
488     Double_t scale2;
489     TString slatType2;
490     
491     Int_t isScaleLine = DecodeScaleLine(sline,scale2,slatType2);
492     
493     scale *= scale2;
494
495     if ( isScaleLine < 0 )
496     {
497       AliFatalClass(Form("Syntax error near %s keyword\n",KEYWORD_SCALE.Data()));
498     }
499     else if ( isScaleLine > 0 && slatType2 != slatType )
500     {
501       ReadLines(slatType2.Data(),planeType,lines,scale,flipX,flipY,srcLine,destLine);
502     }
503     else    
504     {
505       Bool_t fx(kFALSE);
506       Bool_t fy(kFALSE);
507       Int_t isFlipLine = DecodeFlipLine(sline,slatType2,fx,fy);
508       if ( isFlipLine )
509       {
510         if (fy)
511         {
512           srcLine = GetLine(slatType2);
513           destLine = GetLine(slatType);
514         }
515         flipX |= fx;
516         flipY |= fy;
517         ReadLines(slatType2.Data(),planeType,lines,scale,flipX,flipY,srcLine,destLine);
518       }
519       else
520       {
521         lines.Add(new TObjString(sline.Data()));
522       }
523     }
524   }
525   
526   in.close();
527 }
528                                         
529 //_____________________________________________________________________________
530 void
531 AliMpTriggerReader::ReadLocalBoardMapping()
532 {
533   TString filename(AliMpFiles::LocalTriggerBoardMapping());
534   
535   AliDebugClass(1,Form("Reading from %s\n",filename.Data()));
536
537   fgLocalBoardMap.Delete();
538   
539   ifstream in(filename.Data());
540   if (!in.good())
541   {
542     AliErrorClass(Form("Cannot read file %s\n",filename.Data()));    
543   }
544   else
545   {
546     char line[80];
547     
548     while ( in.getline(line,80) )
549     {
550       if ( line[0] == '#' ) continue;
551       
552       TString sline(line);
553       TObjArray* tokens = sline.Tokenize(' ');
554       TString& number = ((TObjString*)(tokens->At(0)))->String();
555       TString& name = ((TObjString*)(tokens->At(1)))->String();
556       fgLocalBoardMap.Add(new TObjString(name), new TObjString(number));
557       AliDebugClass(10,Form("Board %s has number %s\n",name.Data(),number.Data()));
558       delete tokens;
559     }      
560   }
561   in.close();
562 }
563
564 //_____________________________________________________________________________
565 AliMpPCB*
566 AliMpTriggerReader::ReadPCB(const char* pcbType)
567
568   //
569   // Create a new AliMpPCB object, by reading it from file.
570   //
571   
572   AliDebugClass(1,Form("pcbType=%s\n",pcbType));
573   
574   TString pcbName(pcbType);
575   
576   Ssiz_t pos = pcbName.First('x');
577
578   Double_t scale = 1.0;
579   
580   if ( pos > 0 )
581   {
582     scale = TString(pcbName(pos+1,pcbName.Length()-pos-1)).Atof();
583     pcbName = pcbName(0,pos);
584   }
585   
586   std::ifstream in(AliMpFiles::SlatPCBFilePath(kStationTrigger,pcbName).Data());
587   if (!in.good()) 
588   {
589     AliErrorClass(Form("Cannot open file for PCB %s",pcbName.Data()));
590     return 0;
591   }
592  
593   AliMpMotifReader reader(kStationTrigger,kNonBendingPlane); 
594   // note that the nonbending
595   // parameter is of no use for trigger, as far as reading motif is 
596   // concerned, as all motifs are supposed to be in the same directory
597   // (as they are shared by bending/non-bending planes).
598      
599   char line[80];
600   
601   const TString sizeKeyword("SIZES");
602   const TString motifKeyword("MOTIF");
603   const TString motifSpecialKeyword("SPECIAL_MOTIF");
604   
605   AliMpPCB* pcb = 0;
606   
607   while ( in.getline(line,80) )
608   {
609     if ( line[0] == '#' ) continue;
610     
611     TString sline(line);
612     
613     if ( sline(0,sizeKeyword.Length()) == sizeKeyword )
614     {
615       std::istringstream sin(sline(sizeKeyword.Length(),
616                                    sline.Length()-sizeKeyword.Length()-1).Data());
617       float padSizeX = 0.0;
618       float padSizeY = 0.0;
619       float pcbSizeX = 0.0;
620       float pcbSizeY = 0.0;
621       sin >> padSizeX >> padSizeY >> pcbSizeX >> pcbSizeY;
622       assert(pcb==0);
623       pcb = new AliMpPCB(pcbType,padSizeX*scale,padSizeY*scale,
624                          pcbSizeX*scale,pcbSizeY*scale);
625     }
626     
627     if ( sline(0,motifSpecialKeyword.Length()) == motifSpecialKeyword )
628     {
629       std::istringstream sin(sline(motifSpecialKeyword.Length(),
630                                    sline.Length()-motifSpecialKeyword.Length()).Data());
631       TString sMotifSpecial;
632       TString sMotifType;
633       sin >> sMotifSpecial >> sMotifType;
634       
635       AliMpMotifType* motifType = reader.BuildMotifType(sMotifType);
636       AliMpMotifSpecial* specialMotif = 
637         reader.BuildMotifSpecial(sMotifSpecial,motifType,scale);
638       
639       assert(pcb==0);      
640       pcb = new AliMpPCB(pcbType,specialMotif);
641     }
642     
643     if ( sline(0,motifKeyword.Length()) == motifKeyword )
644     {
645       std::istringstream sin(sline(motifKeyword.Length(),
646                                    sline.Length()-motifKeyword.Length()).Data());
647       TString sMotifType;
648       int ix;
649       int iy;
650       sin >> sMotifType >> ix >> iy;
651       
652       AliMpMotifType* motifType = reader.BuildMotifType(sMotifType.Data());
653       
654       assert(pcb!=0);
655       pcb->Add(motifType,ix,iy);
656     }
657   }
658   
659   in.close();
660   
661   fgPCBMap.Add(new TObjString(pcbType),pcb);
662   return pcb;
663 }
664
665 //_____________________________________________________________________________
666 AliMpTrigger*
667 AliMpTriggerReader::ReadSlat(const char* slatType, AliMpPlaneType planeType)
668 {
669   //
670   // Create a new AliMpTrigger object, by reading it from file.
671   //
672
673   Double_t scale = 1.0;
674   Bool_t flipX = kFALSE;
675   Bool_t flipY = kFALSE;
676   TList lines;
677   Int_t srcLine(-1);
678   Int_t destLine(-1);
679   
680   // Read the file and its include (if any) and store the result
681   // in a TObjArray of TObjStrings.
682   ReadLines(slatType,planeType,lines,scale,flipX,flipY,srcLine,destLine);
683
684   // Here some more sanity checks could be done.
685   // For the moment we only insure that the first line contains 
686   // a layer keyword.
687   TString& firstLine = ((TObjString*)lines.First())->String();
688   if ( !IsLayerLine(firstLine) ) 
689   {
690     std::ostringstream s;
691     s << KEYWORD_LAYER;
692     lines.AddFirst(new TObjString(s.str().c_str()));
693   }
694   
695   AliDebugClass(2,Form("Scale=%g\n",scale));
696   
697   FlipLines(lines,flipX,flipY,srcLine,destLine);
698   
699   // Now splits the lines in packets corresponding to different layers 
700   // (if any), and create sub-slats.
701   TObjArray layers;
702   Int_t ilayer(-1);
703   TIter it(&lines);
704   TObjString* osline;
705   
706   while ( ( osline = (TObjString*)it.Next() ) )
707   {
708     TString& s = osline->String();
709     if ( IsLayerLine(s) )
710     {
711       layers.Add(new TList);
712       ++ilayer;
713     }
714     else
715     {
716       ((TList*)layers.At(ilayer))->Add(new TObjString(s));
717     }
718   }
719
720   AliDebugClass(2,Form("nlayers=%d\n",layers.GetEntriesFast()));
721
722   AliMpTrigger* triggerSlat = new AliMpTrigger(slatType, planeType);
723     
724   for ( Int_t ilayer = 0; ilayer < layers.GetEntriesFast(); ++ilayer )
725   {
726     TList& lines = *((TList*)layers.At(ilayer));
727     std::ostringstream slatName;
728     slatName << slatType << "-LAYER" << ilayer;
729     AliMpSlat* slat = BuildSlat(slatName.str().c_str(),planeType,lines,scale);
730     if ( slat )
731     {
732       triggerSlat->AdoptLayer(slat);
733     }
734     else
735     {
736       AliErrorClass(Form("Could not read %s\n",slatName.str().c_str()));
737       delete triggerSlat;
738       return 0;
739     }
740   }
741   
742   layers.SetOwner(kTRUE);
743   layers.Delete();
744   
745   return triggerSlat;
746 }
747
748 //_____________________________________________________________________________
749 void
750 AliMpTriggerReader::Reset()
751 {
752   fgPCBMap.Delete();
753 }