PandaRoot
FsmDetTypes.h
Go to the documentation of this file.
1 //==========================================================================
2 // File and Version Information:
3 // $Id: FsmDetTypes.hh,v 1.4 2006/10/05 14:05:53 aida Exp $
4 //
5 //--------------------------------------------------------------------------
6 // Description:
7 // this structure is helpful for the easy treatment of the individual subdetectors.
8 // Attention: the correct order for "enum" and "FsmDetName::name" is mandatory"
9 //
10 // Author List:
11 // Bertram Kopf (Original author)
12 //
13 //
14 //==========================================================================
15 
16 #ifndef FSMDETTYPES_H
17 #define FSMDETTYPES_H
18 
19 struct FsmDetEnum {
20  enum {
21  Mvd = 0,
23  Tpc,
24  Stt,
25  Tof,
26  Drc,
31  Muo,
43  }; // attention: if you want to add/remove detectors don't forget to modify FsmDetName; keep an eye on the correct order!!!
44 };
45 
46 struct FsmDetName {
47  static const std::string &name(unsigned int t)
48  {
49  static std::string detName[FsmDetEnum::numSystems + 1] = {"Mvd", "Mvd2", "Tpc", "Stt", "Tof", "Drc", "EmcBarrel", "EmcBwCap", "EmcFwCap", "EmcFS", "Muo",
50  "Dch1", "Dch2", "Dch3", "Dch4", "Dch5", "Dch6", "Dch7", "Dch8", "FwkRch", "CmpDet", "unknown"};
51  if (t >= FsmDetEnum::numSystems)
53  return detName[t];
54  }
55 };
56 
57 #endif
static const std::string & name(unsigned int t)
Definition: FsmDetTypes.h:47