FairRoot/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 
17 #ifndef FSMDETTYPES_H
18 #define FSMDETTYPES_H
19 
20 struct FsmDetEnum {
21  enum {Mvd=0, Mvd2, Tpc, Stt, Tof, Drc, EmcBarrel, EmcBwCap, EmcFwCap, EmcFS, Muo, Dch1, Dch2, Dch3, Dch4, Dch5, Dch6, Dch7, Dch8, FwkRch, CmpDet, numSystems}; // attention: if you want to add/remove detectors don't forget to modify FsmDetName; keep an eye on the correct order!!!
22 
23 };
24 
25  struct FsmDetName {
26  static const std::string& name(unsigned int t)
27  {
28  static std::string detName[FsmDetEnum::numSystems+1]={"Mvd","Mvd2","Tpc","Stt", "Tof", "Drc","EmcBarrel","EmcBwCap","EmcFwCap","EmcFS","Muo","Dch1","Dch2","Dch3","Dch4","Dch5","Dch6","Dch7","Dch8","FwkRch","CmpDet","unknown"};
30  return detName[t];
31  }
32  };
33 
34 
35 #endif
static const std::string & name(unsigned int t)
Definition: FsmDetTypes.h:26
TTree * t
Definition: bump_analys.C:13