AliRoot Core  a565103 (a565103)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMpDCSNamer.cxx
Go to the documentation of this file.
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 purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15 
16 // $Id$
17 
18 #include "AliMpDCSNamer.h"
19 
20 #include "AliCodeTimer.h"
21 #include "AliLog.h"
22 #include "AliMpArea.h"
23 #include "AliMpDEIterator.h"
24 #include "AliMpDEManager.h"
25 #include "AliMpHelper.h"
26 #include "AliMpMotifMap.h"
27 #include "AliMpMotifPosition.h"
28 #include "AliMpSector.h"
29 #include "AliMpSegmentation.h"
30 #include "AliMpSlat.h"
31 #include "AliMpConstants.h"
32 #include <Riostream.h>
33 #include <TMap.h>
34 #include <TObjArray.h>
35 #include <TObjString.h>
36 #include <TString.h>
37 #include <TSystem.h>
38 #include <cassert>
39 
40 //-----------------------------------------------------------------------------
47 //-----------------------------------------------------------------------------
48 
49 using std::cout;
50 using std::endl;
54 
55 const char* AliMpDCSNamer::fgkDCSChannelSt345Pattern[] =
56 { "MchHvLvLeft/Chamber%02dLeft/Slat%02d.actual.vMon",
57  "MchHvLvRight/Chamber%02dRight/Slat%02d.actual.vMon"
58 };
59 
61 {
62  "MchHvLvLeft/Chamber%02dLeft/Quad%dSect%d.actual.vMon",
63  "MchHvLvRight/Chamber%02dRight/Quad%dSect%d.actual.vMon"
64 };
65 
67 {
68  "MchHvLvLeft/Chamber%02dLeft/Quad%d",
69  "MchHvLvRight/Chamber%02dRight/Quad%d"
70 };
71 
73 
74 {
75  "MchHvLvLeft/Chamber%02dLeft",
76  "MchHvLvRight/Chamber%02dRight"
77 };
78 
79 
81 {
82  "MchHvLvLeft/Chamber%02dLeft/Group%d%s.MeasurementSenseVoltage",
83  "MchHvLvRight/Chamber%02dRight/Group%d%s.MeasurementSenseVoltage"
84 };
85 
86 const char* AliMpDCSNamer::fgkDCSSideTrackerName[] = { "Left", "Right" };
87 
88 
89 const char* AliMpDCSNamer::fgkDCSSwitchSt345Pattern = "MchDE%04dsw%d.inValue";
90 
91 const char* AliMpDCSNamer::fgkDCSChannelTriggerPatternRead[] = {"MTR_%3sSIDE_MT%2i_RPC%i_HV.%14s", "MTR_%2sSIDE_MT%2i_RPC%i_HV.%14s"};
92 const char* AliMpDCSNamer::fgkDCSChannelTriggerPattern[] = {"MTR_%3sSIDE_MT%2i_RPC%i_HV.%s", "MTR_%2sSIDE_MT%2i_RPC%i_HV.%s"};
93 const char* AliMpDCSNamer::fgkDCSSideTriggerName[] = { "OUT", "IN" };
94 const char* AliMpDCSNamer::fgkDCSMeasureName[] = { "vEff", "actual.iMon" };
95 
96 const char* AliMpDCSNamer::fgkDetectorName[] = { "TRACKER", "TRIGGER" };
97 
98 //_____________________________________________________________________________
100 fDetector(-1)
101 {
102  SetDetector("TRACKER");
104 }
105 
106 //_____________________________________________________________________________
107 AliMpDCSNamer::AliMpDCSNamer(const char* detName):
108 fDetector(-1)
109 {
111  SetDetector(detName);
112 }
113 
114 //_____________________________________________________________________________
116 {
118 }
119 
120 //_____________________________________________________________________________
121 Bool_t AliMpDCSNamer::SetDetector(const char* detName)
122 {
125 
126  TString sDetName(detName);
127  Bool_t isOk(kTRUE);
128  sDetName.ToUpper();
129  if(sDetName.Contains(fgkDetectorName[kTrackerDet]))
130  fDetector = kTrackerDet;
131  else if(sDetName.Contains(fgkDetectorName[kTriggerDet]))
132  fDetector = kTriggerDet;
133  else {
134  AliWarning("Detector name must be either tracker or trigger. Default tracker selected");
135  isOk = kFALSE;
136  }
137  return isOk;
138 }
139 
140 
141 //_____________________________________________________________________________
142 void
143 AliMpDCSNamer::AliasesAsLdif(const char* ldiffile) const
144 {
146 
147  ofstream out(ldiffile);
148 
149  TObjArray* a = CompactAliases();
150 
151  TIter next(a);
152  TObjString* s;
153 
154  // Some header. host name and port probably not up to date.
155  TString detName = (fDetector == kTriggerDet) ? "MTR" : "MCH";
156 
157  out << "#" << detName.Data() << " config" << endl
158  << "dn: det=" << detName.Data() <<",o=alice,dc=cern,dc=ch" << endl
159  << "objectClass: AliShuttleDetector" << endl
160  << "det: " << detName.Data() << endl
161  << "StrictRunOrder: 1" << endl
162  << "responsible: aphecetc@in2p3.fr" << endl
163  << "DCSHost: aldcs053.cern.ch" << endl
164  << "DCSPort: 4242" <<endl;
165 
166  while ( ( s = (TObjString*)(next()) ) )
167  {
168  out << "DCSalias: " << s->String().Data() << endl;
169  }
170 
171  out.close();
172 
173  delete a;
174 }
175 
176 //_____________________________________________________________________________
177 TObjArray*
179 {
183 
184  TObjArray* a = new TObjArray;
185  a->SetOwner(kTRUE);
186 
187  switch(fDetector){
188  case kTrackerDet:
189  // St 12 (DCS HV Channels)
190  a->Add(new TObjString("MchHvLvRight/Chamber[00..03]Right/Quad0Sect[0..2].actual.vMon"));
191  a->Add(new TObjString("MchHvLvLeft/Chamber[00..03]Left/Quad1Sect[0..2].actual.vMon"));
192  a->Add(new TObjString("MchHvLvLeft/Chamber[00..03]Left/Quad2Sect[0..2].actual.vMon"));
193  a->Add(new TObjString("MchHvLvRight/Chamber[00..03]Right/Quad3Sect[0..2].actual.vMon"));
194 
195  // St345 (DCS HV Channels)
196 
197  a->Add(new TObjString("MchHvLvRight/Chamber[04..09]Right/Slat[00..08].actual.vMon"));
198  a->Add(new TObjString("MchHvLvLeft/Chamber[04..09]Left/Slat[00..08].actual.vMon"));
199 
200  a->Add(new TObjString("MchHvLvRight/Chamber[06..09]Right/Slat[09..12].actual.vMon"));
201  a->Add(new TObjString("MchHvLvLeft/Chamber[06..09]Left/Slat[09..12].actual.vMon"));
202 
203  // (LV groups)
204 
205  // St12 have 4 LV groups
206 
207  a->Add(new TObjString("MchHvLvLeft/Chamber[01..10]Left/Group[1..4]dig.MeasurementSenseVoltage"));
208  a->Add(new TObjString("MchHvLvLeft/Chamber[01..10]Left/Group[1..4]ann.MeasurementSenseVoltage"));
209  a->Add(new TObjString("MchHvLvLeft/Chamber[01..10]Left/Group[1..4]anp.MeasurementSenseVoltage"));
210  a->Add(new TObjString("MchHvLvRight/Chamber[01..10]Right/Group[1..4]dig.MeasurementSenseVoltage"));
211  a->Add(new TObjString("MchHvLvRight/Chamber[01..10]Right/Group[1..4]ann.MeasurementSenseVoltage"));
212  a->Add(new TObjString("MchHvLvRight/Chamber[01..10]Right/Group[1..4]anp.MeasurementSenseVoltage"));
213 
214  // St3 has 5 LV groups
215 
216  a->Add(new TObjString("MchHvLvLeft/Chamber[05..06]Left/Group[5..5]dig.MeasurementSenseVoltage"));
217  a->Add(new TObjString("MchHvLvLeft/Chamber[05..06]Left/Group[5..5]ann.MeasurementSenseVoltage"));
218  a->Add(new TObjString("MchHvLvLeft/Chamber[05..06]Left/Group[5..5]anp.MeasurementSenseVoltage"));
219  a->Add(new TObjString("MchHvLvRight/Chamber[05..06]Right/Group[5..5]dig.MeasurementSenseVoltage"));
220  a->Add(new TObjString("MchHvLvRight/Chamber[05..06]Right/Group[5..5]ann.MeasurementSenseVoltage"));
221  a->Add(new TObjString("MchHvLvRight/Chamber[05..06]Right/Group[5..5]anp.MeasurementSenseVoltage"));
222 
223  // St4-5 have 7 LV groups
224  a->Add(new TObjString("MchHvLvLeft/Chamber[07..10]Left/Group[5..7]dig.MeasurementSenseVoltage"));
225  a->Add(new TObjString("MchHvLvLeft/Chamber[07..10]Left/Group[5..7]ann.MeasurementSenseVoltage"));
226  a->Add(new TObjString("MchHvLvLeft/Chamber[07..10]Left/Group[5..7]anp.MeasurementSenseVoltage"));
227  a->Add(new TObjString("MchHvLvRight/Chamber[07..10]Right/Group[5..7]dig.MeasurementSenseVoltage"));
228  a->Add(new TObjString("MchHvLvRight/Chamber[07..10]Right/Group[5..7]ann.MeasurementSenseVoltage"));
229  a->Add(new TObjString("MchHvLvRight/Chamber[07..10]Right/Group[5..7]anp.MeasurementSenseVoltage"));
230 
231  break;
232 
233  case kTriggerDet:
234  a->Add(new TObjString("MTR_OUTSIDE_MT[11..12]Right/RPC[1..9]_HV.imon"));
235  a->Add(new TObjString("MTR_OUTSIDE_MT[21..22]Right/RPC[1..9]_HV.imon"));
236  a->Add(new TObjString("MTR_INSIDE_MT[11..12]Right/RPC[1..9]_HV.imon"));
237  a->Add(new TObjString("MTR_INSIDE_MT[21..22]Right/RPC[1..9]_HV.imon"));
238 
239  a->Add(new TObjString("MTR_OUTSIDE_MT[11..12]Right/RPC[1..9]_HV.vmon"));
240  a->Add(new TObjString("MTR_OUTSIDE_MT[21..22]Right/RPC[1..9]_HV.vmon"));
241  a->Add(new TObjString("MTR_INSIDE_MT[11..12]Right/RPC[1..9]_HV.vmon"));
242  a->Add(new TObjString("MTR_INSIDE_MT[21..22]Right/RPC[1..9]_HV.vmon"));
243  }
244 
245 
246  if(fDetector == kTrackerDet){
247  // St345 (DCS Switches)
248  AliMpDEIterator it;
249 
250  it.First();
251 
252  while (!it.IsDone())
253  {
254  Int_t detElemId = it.CurrentDEId();
256  {
257  a->Add(new TObjString(Form("MchDE%04dsw[0..%d].inValue",detElemId,NumberOfPCBs(detElemId)-1)));
258  }
259  it.Next();
260  }
261  }
262 
263  return a;
264 }
265 
266 //_____________________________________________________________________________
267 Int_t
268 AliMpDCSNamer::DCS2DE(Int_t chId, Int_t side, Int_t dcsNumber) const
269 {
277 
278  Int_t de(-1);
279  Int_t chamberId = chId;
280 
281  if(fDetector == kTrackerDet){ // Tracker
282 
283  Int_t nofDE = AliMpDEManager::GetNofDEInChamber(chamberId);
284 
285  Int_t half = nofDE/2;
286 
287  dcsNumber = half - dcsNumber;
288 
289  Int_t quarter = nofDE/4;
290  Int_t threeQuarter = half + quarter;
291 
292  if ( side == 0 ) // left
293  {
294  de = threeQuarter + 1 - dcsNumber;
295  }
296  else if ( side == 1 ) // right
297  {
298  if ( dcsNumber <= quarter )
299  {
300  de = dcsNumber + threeQuarter;
301  }
302  else
303  {
304  de = dcsNumber - quarter - 1;
305  }
306  }
307  }
308  else { // Trigger
309 
310  if ( chId < 19 ) chamberId = chId - 1;
311  else chamberId = chId - 9;
312 
313  Int_t nofDE = AliMpDEManager::GetNofDEInChamber(chamberId);
314 
315  if ( side == 0 ) // left -> Outside
316  {
317  de = 14 - dcsNumber;
318  }
319  else if ( side == 1 ) // right -> Inside
320  {
321  if (nofDE>0)
322  de = (13 + dcsNumber) % nofDE;
323  }
324  }
325 
326  return (chamberId+1)*100 + de;
327 }
328 
329 
330 //_____________________________________________________________________________
331 Int_t
332 AliMpDCSNamer::DetElemId2DCS(Int_t detElemId, Int_t& side, Int_t &chId) const
333 {
336 
337  CheckConsistency(detElemId);
338 
339  Int_t chamberId = AliMpDEManager::GetChamberId(detElemId);
340  if ( chamberId < 0 )
341  {
342  AliDebug(1,Form("DetElemId %d invalid",detElemId));
343  return -1;
344  }
345  Int_t dcsNumber = (detElemId-(chamberId+1)*100);
346 
347  switch ( AliMpDEManager::GetStationType(detElemId) )
348  {
349  case AliMp::kStation12:
350  {
351  chId = chamberId;
352 
353  switch (dcsNumber)
354  {
355  case 0:
356  case 3:
357  side = 1; // right
358  break;
359  case 1:
360  case 2:
361  side = 0; // left
362  default:
363  break;
364  }
365  }
366  break;
367  case AliMp::kStation345:
368  {
369  chId = chamberId;
370 
371  Int_t nofDE = AliMpDEManager::GetNofDEInChamber(chamberId);
372 
373  Int_t quarter = nofDE/4;
374 
375  Int_t half = nofDE/2;
376 
377  Int_t threeQuarter = half + quarter;
378 
379  side = -1;
380 
381  if ( dcsNumber <= quarter )
382  {
383  dcsNumber += quarter + 1 ;
384  side = 1; // right
385  }
386  else if ( dcsNumber <= threeQuarter )
387  {
388  dcsNumber = ( threeQuarter - dcsNumber + 1 );
389  side = 0; // left
390  }
391  else if ( dcsNumber > threeQuarter )
392  {
393  dcsNumber = dcsNumber - threeQuarter;
394  side = 1; // right
395  }
396  else
397  {
398  AliFatal("oups");
399  }
400  // dcs convention change : numbering from top, not from bottom
401  dcsNumber = half-dcsNumber;
402  }
403  break;
405  {
406  if (chamberId < AliMpConstants::NofChambers()-2)
407  chId = chamberId + 1;
408  else chId = 23 + chamberId - AliMpConstants::NofChambers();
409 
410  Int_t nofDE = AliMpDEManager::GetNofDEInChamber(chamberId);
411 
412  if ( dcsNumber >=5 && dcsNumber <= 13 ) {
413  side = 0;
414  dcsNumber = 14 - dcsNumber;
415  }
416  else {
417  side = 1;
418  if (nofDE>0)
419  dcsNumber = (5 + dcsNumber) % nofDE;
420  }
421  AliDebug(10, Form("detElemId %i -> MT%i_side%i_L%i", detElemId, chId, side, dcsNumber));
422  }
423  break;
424  default:
425  break;
426  }
427 
428  return dcsNumber;
429 }
430 
431 //_____________________________________________________________________________
432 TString
433 AliMpDCSNamer::DCSNameFromAlias(const char* dcsAlias) const
434 {
436 
437  TString salias(dcsAlias);
438 
439  if ( !salias.Contains("MchHvLv") ) return dcsAlias; // not MCH
440  if ( salias.Contains("Group")) return dcsAlias; // not MCH HV (but LV)
441 
442  Int_t quadrantNumber(-1);
443  Int_t chamberNumber(-1);
444  Int_t side(-1);
445 
446  if ( salias.Contains("Left")) side = 0;
447  if ( salias.Contains("Right")) side = 1;
448 
449  if ( side < 0 ) return "";
450 
451  TString channelName;
452 
453  if ( salias.Contains("Slat") )
454  {
455  Int_t slatNumber(-1);
456  sscanf(salias.Data(),fgkDCSChannelSt345Pattern[side],&chamberNumber,&slatNumber);
457  ++chamberNumber;
458  ++slatNumber;
459  channelName = TString::Format(fgkDCSChannelSt345Pattern[side],chamberNumber,slatNumber);
460  }
461  else if ( salias.Contains("Sect") )
462  {
463  Int_t sectorNumber(-1);
464  sscanf(salias.Data(),fgkDCSChannelSt12Pattern[side],&chamberNumber,&quadrantNumber,&sectorNumber);
465  ++chamberNumber;
466  ++quadrantNumber;
467  ++sectorNumber;
468  channelName = TString::Format(fgkDCSChannelSt12Pattern[side],chamberNumber,quadrantNumber,sectorNumber);
469  }
470  else if ( salias.Contains("Quad") )
471  {
472  sscanf(salias.Data(),fgkDCSQuadrantPattern[side],&chamberNumber,&quadrantNumber);
473  ++chamberNumber;
474  ++quadrantNumber;
475  channelName = TString::Format(fgkDCSQuadrantPattern[side],chamberNumber,quadrantNumber);
476  }
477  else if ( salias.Contains("Chamber") )
478  {
479  sscanf(salias.Data(),fgkDCSChamberPattern[side],&chamberNumber);
480  ++chamberNumber;
481  channelName = TString::Format(fgkDCSChamberPattern[side],chamberNumber);
482  }
483 
484  if ( TString(dcsAlias).Contains("iMon") )
485  {
486  channelName.ReplaceAll("vMon","iMon");
487  }
488 
489  return channelName;
490 }
491 
492 //_____________________________________________________________________________
493 TString
494 AliMpDCSNamer::DCSAliasFromName(const char* dcsName) const
495 {
497 
498  TString sname(dcsName);
499 
500  if ( !sname.Contains("MchHvLv") ) return dcsName;
501  if ( sname.Contains("Group")) return dcsName; // not MCH HV (but LV)
502 
503  Int_t quadrantNumber(-1);
504  Int_t chamberNumber(-1);
505  Int_t side(-1);
506 
507  if ( sname.Contains("Left")) side = 0;
508  if ( sname.Contains("Right")) side = 1;
509 
510  if ( side < 0 ) return "";
511 
512  TString channelName;
513 
514  if ( sname.Contains("Slat") )
515  {
516  Int_t slatNumber(-1);
517  sscanf(sname.Data(),fgkDCSChannelSt345Pattern[side],&chamberNumber,&slatNumber);
518  --chamberNumber;
519  --slatNumber;
520  channelName = TString::Format(fgkDCSChannelSt345Pattern[side],chamberNumber,slatNumber);
521  }
522  else if ( sname.Contains("Sect") )
523  {
524  Int_t sectorNumber(-1);
525  sscanf(sname.Data(),fgkDCSChannelSt12Pattern[side],&chamberNumber,&quadrantNumber,&sectorNumber);
526  --chamberNumber;
527  --quadrantNumber;
528  --sectorNumber;
529  channelName = TString::Format(fgkDCSChannelSt12Pattern[side],chamberNumber,quadrantNumber,sectorNumber);
530  }
531  else if ( sname.Contains("Quad") )
532  {
533  sscanf(sname.Data(),fgkDCSQuadrantPattern[side],&chamberNumber,&quadrantNumber);
534  --chamberNumber;
535  --quadrantNumber;
536  channelName = TString::Format(fgkDCSQuadrantPattern[side],chamberNumber,quadrantNumber);
537  }
538  else if ( sname.Contains("Chamber") )
539  {
540  sscanf(sname.Data(),fgkDCSChamberPattern[side],&chamberNumber);
541  --chamberNumber;
542  channelName = TString::Format(fgkDCSChamberPattern[side],chamberNumber);
543  }
544 
545  if ( TString(dcsName).Contains("iMon") )
546  {
547  channelName.ReplaceAll("vMon","iMon");
548  }
549 
550  return channelName;
551 }
552 
553 //_____________________________________________________________________________
554 Bool_t AliMpDCSNamer::DecodeDCSMCHLVAlias(const char* dcsAlias, Int_t*& detElemId, Int_t& numberOfDetectionElements, AliMp::PlaneType& planeType ) const
555 {
559 
560  TString salias(dcsAlias);
561 
562  detElemId = 0x0;
563  planeType = AliMp::kBendingPlane;
564 
565  if (!salias.Contains("Group"))
566  {
567  // not a MCH LV alias
568  return kFALSE;
569  }
570 
571  Int_t side(-1);
572 
573  if ( salias.Contains("Left"))
574  {
575  side = 0;
576  }
577  else if ( salias.Contains("Right"))
578  {
579  side = 1;
580  }
581  else {
582  AliError(Form("unexpected alias=%s",salias.Data()));
583  return kFALSE;
584  }
585 
586  Bool_t left = ( side == 0 );
587 
588  Int_t chamberNumber, groupNumber;
589  TString voltageType;
590 
591  sscanf(salias.Data(),fgkDCSMCHLVGroupPattern[side],&chamberNumber,&groupNumber,&voltageType[0]);
592 
593  if ( chamberNumber >= 1 && chamberNumber <= 4 )
594  {
595  Int_t deOffset = 0;
596  if ( groupNumber == 1 )
597  {
598  if ( left )
599  {
600  deOffset = 1;
601  planeType = AliMp::kBendingPlane;
602  }
603  else
604  {
605  deOffset = 0;
606  planeType = AliMp::kNonBendingPlane;
607  }
608  }
609  else if ( groupNumber == 2 )
610  {
611  if ( left )
612  {
613  deOffset = 2;
614  planeType = AliMp::kNonBendingPlane;
615  }
616  else
617  {
618  deOffset = 3;
619  planeType = AliMp::kBendingPlane;
620  }
621  }
622  else if ( groupNumber == 3 )
623  {
624  if ( left )
625  {
626  deOffset = 1;
627  planeType = AliMp::kNonBendingPlane;
628  }
629  else
630  {
631  deOffset = 0;
632  planeType = AliMp::kBendingPlane;
633  }
634  }
635  else if ( groupNumber == 4 )
636  {
637  if ( left )
638  {
639  deOffset = 2;
640  planeType = AliMp::kBendingPlane;
641  }
642  else
643  {
644  deOffset = 3;
645  planeType = AliMp::kNonBendingPlane;
646  }
647  }
648  else
649  {
650  AliError(Form("Got incorrect group number=%d from alias=%s",groupNumber,salias.Data()));
651  return kFALSE;
652  }
653 
654  numberOfDetectionElements=1;
655  detElemId = new Int_t[numberOfDetectionElements];
656  detElemId[0] = chamberNumber*100 + deOffset;
657  }
658  else if ( chamberNumber >= 5 && chamberNumber <= 10 )
659  {
660  Int_t* dcsSlatNumber(0x0);
661 
662  if ( chamberNumber >= 5 && chamberNumber <= 6 )
663  {
664  if ( groupNumber == 1 )
665  {
666  numberOfDetectionElements=3;
667  dcsSlatNumber=new Int_t[numberOfDetectionElements];
668  dcsSlatNumber[0]=1;
669  dcsSlatNumber[1]=2;
670  dcsSlatNumber[2]=3;
671  }
672  else if ( groupNumber == 5 )
673  {
674  numberOfDetectionElements=3;
675  dcsSlatNumber=new Int_t[numberOfDetectionElements];
676  dcsSlatNumber[0]=7;
677  dcsSlatNumber[1]=8;
678  dcsSlatNumber[2]=9;
679  }
680  else if ( groupNumber > 1 && groupNumber < 5 )
681  {
682  numberOfDetectionElements=1;
683  dcsSlatNumber=new Int_t[numberOfDetectionElements];
684  dcsSlatNumber[0]=groupNumber+2;
685  }
686  else
687  {
688  AliError(Form("Got incorrect group number=%d from alias=%s",groupNumber,salias.Data()));
689  return kFALSE;
690  }
691  }
692  else if ( chamberNumber >= 7 )
693  {
694  if ( groupNumber == 1 )
695  {
696  numberOfDetectionElements=4;
697  dcsSlatNumber=new Int_t[numberOfDetectionElements];
698  dcsSlatNumber[0]=1;
699  dcsSlatNumber[1]=2;
700  dcsSlatNumber[2]=3;
701  dcsSlatNumber[3]=4;
702  }
703  else if ( groupNumber == 7 )
704  {
705  numberOfDetectionElements=4;
706  dcsSlatNumber=new Int_t[numberOfDetectionElements];
707  dcsSlatNumber[0]=10;
708  dcsSlatNumber[1]=11;
709  dcsSlatNumber[2]=12;
710  dcsSlatNumber[3]=13;
711  }
712  else if ( groupNumber > 1 && groupNumber < 7 )
713  {
714  numberOfDetectionElements=1;
715  dcsSlatNumber=new Int_t[numberOfDetectionElements];
716  dcsSlatNumber[0]=groupNumber+3;
717  }
718  else
719  {
720  AliError(Form("Got incorrect group number=%d from alias=%s",groupNumber,salias.Data()));
721  return kFALSE;
722  }
723  }
724 
725  detElemId = new Int_t[numberOfDetectionElements];
726  for ( int i = 0; i < numberOfDetectionElements; ++i )
727  {
728  detElemId[i] = DCS2DE(chamberNumber-1,side,dcsSlatNumber[i]-1);
729  }
730  }
731  else
732  {
733  AliError(Form("Got an invalid chamberNumber=%d from alias=%s",chamberNumber,salias.Data()));
734  return kFALSE;
735  }
736 
737  return kTRUE;
738 }
739 
740 //_____________________________________________________________________________
741 TString
742 AliMpDCSNamer::DCSMCHLVAliasName(Int_t detElemId, Int_t voltageType, AliMp::PlaneType planeType) const
743 {
744  TString voltage;
745 
746  if ( voltageType == -1 ) {
747  voltage = "ann";
748  } else if ( voltageType == 0 ) {
749  voltage = "dig";
750  } else if ( voltageType == 1 ) {
751  voltage = "anp";
752  }
753 
754  if ( !voltage.Length() )
755  {
756  AliError(Form("Incorrect voltageType=%d. Expected -1,0 or 1.",voltageType));
757  return "";
758  }
759 
760  Int_t chamberId = AliMpDEManager::GetChamberId(detElemId);
761  if ( chamberId < 0 )
762  {
763  AliError(Form("Got an incorrect chamberId=%d from detElemId=%d",chamberId,detElemId));
764  return "";
765  }
766  Int_t stationId = 1 + chamberId / 2;
767 
768  Int_t side(-1);
769  Int_t cham;
770  Int_t dcsNumber = DetElemId2DCS(detElemId, side, cham);
771 
772  Int_t group(0);
773 
774  switch (AliMpDEManager::GetStationType(detElemId))
775  {
776  case AliMp::kStation12:
777  {
778  // For Chamber 1 to 4 Left the relationship between DCS GUI names and groups is:
779  // Quad2B --> Group3 = DE x01 Non Bending
780  // Quad2F --> Group1 = DE x01 Bending
781  // Quad3B --> Group4 = DE x02 Bending
782  // Quad3F --> Group2 = DE x02 Non Bending
783  // for Chamber 1 to 4 Right the relationship is:
784  // Quad1B --> Group3 = DE x00 Bending
785  // Quad1F --> Group1 = DE x00 Non Bending
786  // Quad4B --> Group4 = DE x03 Non Bending
787  // Quad4F --> Group2 = DE x03 Bending
788  // where x = 1,2,3,4
789  // and Quad#B = Back = towards IP = cath1
790  // while Quad#F = Front = towards muon trigger = cath0
791  //
792 
793  Int_t remnant = detElemId % 100;
794  switch (remnant) {
795  case 0: // DE x00
796  group = ( planeType == AliMp::kBendingPlane ) ? 3 : 1;
797  break;
798  case 1: // DE x01
799  group = ( planeType == AliMp::kBendingPlane ) ? 1 : 3;
800  break;
801  case 2: // DE x02
802  group = ( planeType == AliMp::kBendingPlane ) ? 4 : 2;
803  break;
804  case 3: // DE x03
805  group = ( planeType == AliMp::kBendingPlane ) ? 2 : 4;
806  break;
807  default:
808  AliFatal("");
809  break;
810  }
811  }
812  break;
813  case AliMp::kStation345:
814  {
815  Int_t dcsSlatNumber = 1 + dcsNumber;
816  if ( stationId == 3 ) {
817  switch (dcsSlatNumber) {
818  case 1:
819  case 2:
820  case 3:
821  group = 1;
822  break;
823  case 4:
824  case 5:
825  case 6:
826  group = dcsSlatNumber - 2;
827  break;
828  case 7:
829  case 8:
830  case 9:
831  group = 5;
832  break;
833  default:
834  break;
835  }
836  }
837  else
838  {
839  switch (dcsSlatNumber) {
840  case 1:
841  case 2:
842  case 3:
843  case 4:
844  group = 1;
845  break;
846  case 5:
847  case 6:
848  case 7:
849  case 8:
850  case 9:
851  group = dcsSlatNumber - 3;
852  break;
853  case 10:
854  case 11:
855  case 12:
856  case 13:
857  group = 7;
858  break;
859  default:
860  break;
861  }
862  }
863  }
864  break;
865  default:
866  break;
867  }
868 
869  if ( group == 0 ) {
870  AliError(Form("Could not get LV group id for detection element %d",detElemId));
871  return "";
872  }
873 
874  TString aliasName;
875 
876  aliasName.Form(fgkDCSMCHLVGroupPattern[side],chamberId+1,group,voltage.Data());
877 
878  return aliasName;
879 }
880 
881 //_____________________________________________________________________________
882 TString
883 AliMpDCSNamer::DCSAliasName(Int_t detElemId, Int_t sector, Int_t dcsMeasure) const
884 {
889 
890  Int_t chamberId = AliMpDEManager::GetChamberId(detElemId);
891  if ( chamberId < 0 ) return "";
892 
893  Int_t side(-1), chId(-1);
894  Int_t dcsNumber = DetElemId2DCS(detElemId,side,chId);
895 
896  TString aliasName;
897 
898  switch (AliMpDEManager::GetStationType(detElemId))
899  {
900  case AliMp::kStation12:
901  aliasName.Form(fgkDCSChannelSt12Pattern[side],chamberId,dcsNumber,sector);
902  break;
903  case AliMp::kStation345:
904  aliasName.Form(fgkDCSChannelSt345Pattern[side],chamberId,dcsNumber);
905  break;
907  return TString::Format(fgkDCSChannelTriggerPattern[side],fgkDCSSideTriggerName[side],chId,dcsNumber,fgkDCSMeasureName[dcsMeasure]);
908  break;
909  default:
910  return "";
911  break;
912  }
913 
914  if ( dcsMeasure == AliMpDCSNamer::kDCSI )
915  {
916  aliasName.ReplaceAll("vMon","iMon");
917  }
918 
919  return aliasName;
920 
921 }
922 
923 //_____________________________________________________________________________
924 TString
925 AliMpDCSNamer::DCSSwitchAliasName(Int_t detElemId, Int_t pcbNumber) const
926 {
929 
931  {
932  return TString::Format(fgkDCSSwitchSt345Pattern,detElemId,pcbNumber);
933  }
934  return "";
935 }
936 
937 //_____________________________________________________________________________
938 Int_t
939 AliMpDCSNamer::DCSIndexFromDCSAlias(const char* dcsAlias) const
940 {
950 
951  TString sDcsAlias(dcsAlias);
952  Int_t de(-1);
953  Int_t sw(-1);
954 
955  int side(-1);
956 
957  if ( sDcsAlias.Contains("Left") )
958  {
959  side = 0;
960  }
961  else if ( sDcsAlias.Contains("Right") )
962  {
963  side = 1;
964  }
965  else
966  {
968  sscanf(sDcsAlias.Data(),fgkDCSSwitchSt345Pattern,&de,&sw);
969  return sw;
970  }
971 
972  int n1(-1);
973  int n3(-1);
974  int n4(-1);
975 
976  if ( sDcsAlias.Contains("Quad") )
977  {
978  sscanf(sDcsAlias.Data(),fgkDCSChannelSt12Pattern[side],&n1,&n3,&n4);
979  return n4;
980  }
981 
982  return -2;
983 }
984 
985 //_____________________________________________________________________________
986 Int_t
987 AliMpDCSNamer::DetElemIdFromDCSAlias(const char* dcsAlias) const
988 {
998 
999  AliDebug(1,Form("dcsAlias=%s",dcsAlias));
1000 
1001  TString sDcsAlias(dcsAlias);
1002 
1003  int side(-1);
1004 
1005  const char** sideName = (fDetector == kTriggerDet) ? fgkDCSSideTriggerName : fgkDCSSideTrackerName;
1006 
1007  for(Int_t iside=0; iside<2; iside++){
1008  if ( sDcsAlias.Contains(sideName[iside]) ) {
1009  side = iside;
1010  break;
1011  }
1012  }
1013  if(side<0) return -2;
1014 
1015  int n1(-1);
1016  int n3(-1);
1017  int n4(-1);
1018  char type[15];
1019  char cside[4];
1020  int detElemId(-1);
1021 
1022  if ( sDcsAlias.Contains("Slat") )
1023  {
1024  sscanf(sDcsAlias.Data(),fgkDCSChannelSt345Pattern[side],&n1,&n3);
1025  detElemId = DCS2DE(n1,side,n3);
1026  AliDebug(1,Form("Slat side=%d n1=%d n3=%d de=%d",side,n1,n3,detElemId));
1027  }
1028  else if ( sDcsAlias.Contains("Quad") )
1029  {
1030  sscanf(sDcsAlias.Data(),fgkDCSChannelSt12Pattern[side],&n1,&n3,&n4);
1031  detElemId = 100*(n1+1) + n3;
1032  AliDebug(1,Form("Quad side=%d n1=%d n3=%d n4=%d de=%d",side,n1,n3,n4,detElemId));
1033  }
1034  else if ( sDcsAlias.Contains("MT") )
1035  {
1036  sscanf(sDcsAlias.Data(),fgkDCSChannelTriggerPatternRead[side],cside,&n1,&n3,type);
1037  detElemId = DCS2DE(n1,side,n3);
1038  AliDebug(1,Form("Slat side=%d n1=%d n3=%d de=%d",side,n1,n3,detElemId));
1039  }
1040  else
1041  {
1042  return -3;
1043  }
1044 
1045  if ( !AliMpDEManager::IsValidDetElemId(detElemId) )
1046  {
1047  AliError(Form("Invalid aliasName %s",dcsAlias));
1048  return -1;
1049  }
1050 
1051  return detElemId;
1052 }
1053 
1054 //_____________________________________________________________________________
1055 Int_t AliMpDCSNamer::DCSvariableFromDCSAlias(const char* dcsAlias) const
1056 {
1058 
1059  TString sDcsAlias(dcsAlias);
1060 
1061  Int_t dcsMeasurement = -1;
1062 
1063  for(Int_t iMeas=0; iMeas<kNDCSMeas; iMeas++){
1064  if ( sDcsAlias.Contains(fgkDCSMeasureName[iMeas]) ) {
1065  dcsMeasurement = iMeas;
1066  break;
1067  }
1068  }
1069 
1070  return dcsMeasurement;
1071 }
1072 
1073 
1074 //_____________________________________________________________________________
1075 TObjArray*
1076 AliMpDCSNamer::GenerateAliases(const char* pattern) const
1077 {
1110 
1111  TObjArray* aliases = new TObjArray;
1112  aliases->SetOwner(kTRUE);
1113 
1114  Int_t nMeasures = (fDetector == kTriggerDet) ? kNDCSMeas : 1;
1115 
1116  for(Int_t iMeas=0; iMeas<nMeasures; iMeas++){
1117 
1118  AliMpDEIterator it;
1119 
1120  it.First();
1121 
1122  Int_t voltageType[] = { -1,0,1 };
1123 
1124  while (!it.IsDone())
1125  {
1126  Int_t detElemId = it.CurrentDEId();
1127 
1128  switch (fDetector){
1129  case kTrackerDet:
1130  {
1131  switch ( AliMpDEManager::GetStationType(detElemId) )
1132  {
1133  case AliMp::kStation12:
1134  {
1135  for ( int sector = 0; sector < 3; ++sector)
1136  {
1137  // HV voltage
1138  aliases->Add(new TObjString(DCSAliasName(detElemId,sector)));
1139  // HV current
1140  aliases->Add(new TObjString(DCSAliasName(detElemId,sector,AliMpDCSNamer::kDCSI)));
1141  }
1142 
1144 
1145  // LV groups, one per voltage (analog negative, digital, analog positive)
1146  // per plane (bending / non-bending)
1147  for ( int pt = 0; pt < 2; ++pt )
1148  {
1149  for ( int i = 0; i < 3; ++i )
1150  {
1151  TString name = DCSMCHLVAliasName(detElemId,voltageType[i],planeType[pt]);
1152  aliases->Add(new TObjString(name));
1153  }
1154  }
1155  }
1156  break;
1157  case AliMp::kStation345:
1158  {
1159  // HV voltage
1160  aliases->Add(new TObjString(DCSAliasName(detElemId)));
1161  // HV current
1162  aliases->Add(new TObjString(DCSAliasName(detElemId,0,AliMpDCSNamer::kDCSI)));
1163  // HV switches
1164  for ( Int_t i = 0; i < NumberOfPCBs(detElemId); ++i )
1165  {
1166  aliases->Add(new TObjString(DCSSwitchAliasName(detElemId,i)));
1167  }
1168  // LV groups, one per voltage (analog negative, digital, analog positive)
1169  for ( int i = 0; i < 3; ++i )
1170  {
1171  TString name = DCSMCHLVAliasName(detElemId,voltageType[i]);
1172  // for Station345 some detection elements share the same voltage group,
1173  // so we must insure we're not adding the same one several times
1174  if (!aliases->FindObject(name))
1175  {
1176  aliases->Add(new TObjString(name));
1177  }
1178  }
1179  }
1180  break;
1181  default:
1182  break;
1183  }
1184  }
1185  break;
1186  case kTriggerDet:
1187  {
1188  switch ( AliMpDEManager::GetStationType(detElemId) )
1189  {
1191  AliDebug(10,Form("Current DetElemId %i",detElemId));
1192  aliases->Add(new TObjString(DCSAliasName(detElemId,0,iMeas)));
1193  break;
1194  default:
1195  break;
1196  }
1197  }
1198  break;
1199  }
1200  it.Next();
1201  } // loop on detElemId
1202  } // Loop on measurement type
1203 
1204  if (pattern && strlen(pattern)>0)
1205  {
1206  // remove aliases not containing the input pattern
1207  TObjArray* tmp = new TObjArray;
1208  tmp->SetOwner(kTRUE);
1209  for ( Int_t i = 0; i <= aliases->GetLast(); ++i )
1210  {
1211  TString name = static_cast<TObjString*>(aliases->At(i))->String();
1212  if (name.Contains(pattern))
1213  {
1214  tmp->Add(new TObjString(name.Data()));
1215  }
1216  }
1217  delete aliases;
1218  aliases = tmp;
1219  }
1220  return aliases;
1221 }
1222 
1223 //_____________________________________________________________________________
1224 Int_t
1225 AliMpDCSNamer::ManuId2Index(Int_t detElemId, Int_t manuId) const
1226 {
1228 
1229  AliMp::StationType stationType = AliMpDEManager::GetStationType(detElemId);
1230  if ( stationType == AliMp::kStation345 )
1231  {
1232  return ManuId2PCBIndex(detElemId,manuId);
1233  }
1234  else if ( stationType == AliMp::kStation12 )
1235  {
1236  return ManuId2Sector(detElemId,manuId);
1237  }
1238  return -1;
1239 }
1240 
1241 //_____________________________________________________________________________
1242 Int_t
1243 AliMpDCSNamer::ManuId2PCBIndex(Int_t detElemId, Int_t manuId) const
1244 {
1247 
1248  AliCodeTimerAuto("",0)
1249 
1250  const AliMpSlat* slat
1251  = AliMpSegmentation::Instance()->GetSlatByElectronics(detElemId, manuId);
1252  if ( ! slat ) return -1;
1253 
1254  return slat->FindPCBIndexByMotifPositionID(manuId);
1255 }
1256 
1257 //_____________________________________________________________________________
1258 Int_t
1259 AliMpDCSNamer::ManuId2Sector(Int_t detElemId, Int_t manuId) const
1260 {
1262 
1263  AliCodeTimerAuto("",0)
1264 
1265  const AliMpSector* sector
1266  = AliMpSegmentation::Instance()->GetSectorByElectronics(detElemId, manuId);
1267  if ( ! sector ) return -1;
1268 
1269  const AliMpMotifMap* motifMap = sector->GetMotifMap();
1270  const AliMpMotifPosition* motifPos = motifMap->FindMotifPosition(manuId);
1271 
1272  Double_t lowerLeftX
1273  = motifPos->GetPositionX()-motifPos->GetDimensionX();
1274 
1275  Double_t x = lowerLeftX*10.0; // cm -> mm
1276  Int_t isector(-1);
1277 
1278  AliMq::Station12Type stationType = AliMpDEManager::GetStation12Type(detElemId);
1279 
1280  if ( stationType == AliMq::kStation1 )
1281  {
1282  if ( x < -10 ) AliFatal("");
1283 
1284  if ( x < 291.65 ) isector = 0;
1285  else if ( x < 585.65 ) isector = 1;
1286  else if ( x < 879.65 ) isector = 2;
1287  }
1288  else
1289  {
1290  if ( x < -140 ) AliFatal("");
1291 
1292  if ( x < 283.75 ) isector = 0;
1293  else if ( x < 606.25 ) isector = 1;
1294  else if ( x < 1158.75 ) isector = 2;
1295  }
1296 
1297  return isector;
1298 }
1299 
1300 //_____________________________________________________________________________
1301 Int_t
1302 AliMpDCSNamer::NumberOfPCBs(Int_t detElemId) const
1303 {
1306 
1307  AliMp::StationType stationType = AliMpDEManager::GetStationType(detElemId);
1308  if ( stationType != AliMp::kStation345 )
1309  {
1310  return 0;
1311  }
1312  else
1313  {
1314  const AliMpSlat* slat
1316  return slat->GetSize();
1317  }
1318 }
1319 
1320 //_____________________________________________________________________________
1321 Bool_t AliMpDCSNamer::CheckConsistency(Int_t detElemId) const
1322 {
1323  //
1326  //
1327 
1328  Bool_t isConsistent(kFALSE);
1329  TString requestInfo;
1330  switch(AliMpDEManager::GetStationType(detElemId))
1331  {
1332  case AliMp::kStation12:
1333  case AliMp::kStation345:
1334  if (fDetector == kTrackerDet) isConsistent = kTRUE;
1335  requestInfo = "TRACKER";
1336  break;
1338  if (fDetector == kTriggerDet) isConsistent = kTRUE;
1339  requestInfo = "TRIGGER";
1340  break;
1341  default:
1342  break;
1343  }
1344 
1345  if(!isConsistent) AliWarning(Form("Requesting information for %s station but class initialized for %s",requestInfo.Data(), fgkDetectorName[fDetector]));
1346 
1347  return isConsistent;
1348 }
1349 
1350 //_____________________________________________________________________________
1352 {
1354 
1355  TObjArray* aliases = GenerateAliases("Group");
1356 
1357  const char* voltageTypeName[] = { "ann","dig","anp"};
1358  Int_t voltageType[] = { -1,0,1 };
1359  Int_t n(0);
1360 
1361  for ( Int_t iv = 0; iv < 3; ++iv )
1362  {
1363  for ( Int_t i = 0; i < aliases->GetEntries(); ++i )
1364  {
1365  TString dcsAlias = static_cast<TObjString*>(aliases->At(i))->String();
1366  if ( !dcsAlias.Contains(voltageTypeName[iv])) continue;
1367 
1368  Int_t* detElemId(0x0);
1369  Int_t numberOfDetectionElements(0);
1370  AliMp::PlaneType planeType;
1371 
1372  Bool_t ok = DecodeDCSMCHLVAlias(dcsAlias.Data(), detElemId, numberOfDetectionElements, planeType);
1373 
1374  if (!ok)
1375  {
1376  AliError(Form("Could not decode alias=%s",dcsAlias.Data()));
1377  delete[] detElemId;
1378  return kFALSE;
1379  }
1380 
1381  for ( Int_t id = 0; id < numberOfDetectionElements; ++id )
1382  {
1383  TString check =
1384  DCSMCHLVAliasName(detElemId[id], voltageType[iv], planeType);
1385 
1386  if (check!=dcsAlias)
1387  {
1388  AliError(Form("%s != %s",check.Data(),dcsAlias.Data()));
1389  return kFALSE;
1390  }
1391  else
1392  {
1393  ++n;
1394  }
1395  }
1396 
1397  delete[] detElemId;
1398  }
1399  }
1400 
1401  delete aliases;
1402 
1403  AliInfo(Form("%d aliases successfully tested",n));
1404 
1405  return kTRUE;
1406 }
static AliMq::Station12Type GetStation12Type(Int_t detElemId)
static Int_t NofChambers()
Return number of chambers.
static const char * fgkDCSChannelSt12Pattern[]
DCS Tracker Channel name template.
The iterator over detection elements.
Int_t ManuId2PCBIndex(Int_t detElemId, Int_t manuId) const
Returns the index of PCB (within a St345 slat) for a given manu number.
station 1,2 (quadrants)
Number of measured quantities.
Definition: AliMpDCSNamer.h:81
void AliasesAsLdif(const char *ldiffile) const
static AliMpSegmentation * Instance(Bool_t warn=true)
TString DCSMCHLVAliasName(Int_t detElemId, Int_t voltageType, AliMp::PlaneType planeType=AliMp::kBendingPlane) const
#define TObjArray
const AliMpSlat * GetSlatByElectronics(Int_t detElemId, Int_t elCardID, Bool_t warn=true) const
static const char * fgkDCSChamberPattern[]
DCS Tracker chamber name template.
Int_t ManuId2Sector(Int_t detElemId, Int_t manuId) const
Return the HV-sector number (within a St12 quadrant) for a given manu number.
static const char * fgkDCSQuadrantPattern[]
DCS Tracker quadrant name template.
Bool_t IsDone() const
const AliMpSlat * GetSlat(const AliMpVSegmentation *kSegmentation, Bool_t warn=true) const
station 3,4,5 (slats)
Double_t GetDimensionX() const
Return x dimension.
Collection of methods usefull to DCS handling for MUON TRK and TRG.
Definition: AliMpDCSNamer.h:22
Int_t NumberOfPCBs(Int_t detElemId) const
Int_t FindPCBIndexByMotifPositionID(Int_t manuId) const
Find the index of the PCB containing a given manu.
Definition: AliMpSlat.cxx:308
Int_t CurrentDEId() const
static const char * fgkDCSMCHLVGroupPattern[]
DCS Tracker chamber LV group name template.
A slat (building block of stations 3, 4 and 5)
Definition: AliMpSlat.h:51
Bool_t TestMCHLV() const
static const char * fgkDCSSideTrackerName[]
DCS Tracker Name of the side written in DCS.
Int_t DetElemId2DCS(Int_t detElemId, Int_t &side, Int_t &chId) const
static const char * fgkDCSChannelSt345Pattern[]
DCS Tracker Channel name template.
Definition: AliMpDCSNamer.h:99
ClassImp(TPCGenInfo)
Definition: AliTPCCmpNG.C:254
TString DCSNameFromAlias(const char *dcsAlias) const
static Int_t GetChamberId(Int_t detElemId, Bool_t warn=true)
static const char * fgkDCSChannelTriggerPattern[]
DCS Trigger Channel name template for output.
A placed motif.
Bool_t DecodeDCSMCHLVAlias(const char *dcsAlias, Int_t *&detElemId, Int_t &numberOfDetectionElements, AliMp::PlaneType &planeType) const
Bool_t CheckConsistency(Int_t detElemId) const
Int_t ManuId2Index(Int_t detElemId, Int_t manuId) const
static Int_t GetNofDEInChamber(Int_t chamberId, Bool_t warn=true)
TString DCSAliasFromName(const char *dcsName) const
const AliMpSector * GetSectorByElectronics(Int_t detElemId, Int_t elCardID, Bool_t warn=true) const
Motif map containers.
Definition: AliMpMotifMap.h:34
non-bending plane
static AliMp::StationType GetStationType(Int_t detElemId)
Int_t DCSIndexFromDCSAlias(const char *dcsAlias) const
A sector (quadrant) of the MUON chamber of stations 1 and 2.
Definition: AliMpSector.h:34
static const char * fgkDCSChannelTriggerPatternRead[]
DCS Trigger Channel name template for input.
AliMpMotifMap * GetMotifMap() const
Return the motif map.
Definition: AliMpSector.h:159
bending plane
Bool_t SetDetector(const char *detName)
Int_t DCSvariableFromDCSAlias(const char *dcsAlias) const
Int_t DCS2DE(Int_t chamberId, Int_t side, Int_t dcsNumber) const
trigger stations (slats)
AliMpMotifPosition * FindMotifPosition(Int_t motifPositionID) const
static const char * fgkDCSSwitchSt345Pattern
DCS Tracker Switch name template.
TObjArray * GenerateAliases(const char *pattern="") const
TObjArray * CompactAliases() const
TString DCSSwitchAliasName(Int_t detElemId, Int_t pcbNumber) const
Namer for trigger.
Definition: AliMpDCSNamer.h:87
Double_t GetPositionX() const
Return x position.
static const char * fgkDCSSideTriggerName[]
DCS Trigger Name of the side written in DCS.
static const char * fgkDetectorName[]
Name of detector (Tracker or Trigger)
static const char * fgkDCSMeasureName[]
DCS Trigger Name of the measure (HV or current) written in DCS.
Int_t DetElemIdFromDCSAlias(const char *dcsAlias) const
TString DCSAliasName(Int_t detElemId, Int_t sector=0, Int_t dcsMeasure=0) const
static Bool_t IsValidDetElemId(Int_t detElemId, Bool_t warn=false)
Namer for tracker.
Definition: AliMpDCSNamer.h:86
Int_t GetSize() const
Returns the number of PCBs of this slat.
Definition: AliMpSlat.cxx:446
Int_t fDetector
Detector type (either tracker or trigger)
virtual ~AliMpDCSNamer()