CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTSCTrigUnit.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: DTSCTrigUnit.cpp
4 //
5 // Description: Muon Barrel Trigger Unit (Chamber trigger)
6 //
7 //
8 // Author List:
9 // C. Grandi
10 // Modifications:
11 // 09/01/07 C. Battilana : moved to local conf
12 // 30/03/07 SV : configuration through DTConfigManager
13 //
14 //--------------------------------------------------
15 
16 //-----------------------
17 // This Class's Header --
18 //-----------------------
20 
21 //-------------------------------
22 // Collaborating Class Headers --
23 //-------------------------------
24 
25 
26 //---------------
27 // C++ Headers --
28 //---------------
29 #include <iostream>
30 #include <cmath>
31 
32 //----------------
33 // Constructors --
34 //----------------
36 
37  // DTChamberId chambid = stat->id();
38  // bool geom_debug = conf_manager->getDTConfigTrigUnit(chambid)->debug();
39 
40  // create the geometry from the station
41  //_geom = new DTTrigGeom(stat, geom_debug);
42  _geom = new DTTrigGeom(stat, false); // CB FIXME: update when debug will be read via PSet
43 
44  // create BTI
45  _theBTIs = new DTBtiCard(_geom);
46 
47  // create TSTheta
49 
50  // create TRACO
52 
53  // create TSPhi
55 
56 }
57 
58 
59 //--------------
60 // Destructor --
61 //--------------
63  delete _theBTIs;
64  delete _theTRACOs;
65  delete _theTSPhi;
66  delete _theTSTheta;
67  delete _geom;
68 }
69 
72  //@@ patch for Sun 4.2 compiler
73  DTTrigData* tr = const_cast<DTTrigData*>(trig);
74  if(dynamic_cast<DTBtiTrigData*>(tr))return _theBTIs;
75  if(dynamic_cast<DTTracoTrigData*>(tr))return _theTRACOs;
76  if(dynamic_cast<DTChambPhSegm*>(tr))return _theTSPhi;
77  if(dynamic_cast<DTChambThSegm*>(tr))return _theTSTheta;
78  // if(dynamic_cast<const DTBtiTrigData*>(trig))return _theBTIs;
79  // if(dynamic_cast<const DTTracoTrigData*>(trig))return _theTRACOs;
80  // if(dynamic_cast<const DTChambPhSegm*>(trig))return _theTSPhi;
81  // if(dynamic_cast<const DTChambThSegm*>(trig))return _theTSTheta;
82  return 0;
83  }
84 
86 
87  _theBTIs->setConfig(conf);
88  _theTSTheta->setConfig(conf);
89  _theTRACOs->setConfig(conf);
90  _theTSPhi->setConfig(conf);
91 
92 }
93 
94 
95 
96 
97 
DTGeomSupplier * GeomSupplier(const DTTrigData *trig) const
Return the appropriate coordinate supplier.
Definition: DTSCTrigUnit.cc:71
DTTrigGeom * _geom
Definition: DTSCTrigUnit.h:158
DTSCTrigUnit(DTChamber *stat)
Constructor.
Definition: DTSCTrigUnit.cc:35
DTTSPhi * _theTSPhi
Definition: DTSCTrigUnit.h:163
void setConfig(const DTConfigManager *conf)
Set configuration.
Definition: DTTracoCard.cc:78
void setConfig(const DTConfigManager *conf)
Set configuration.
Definition: DTBtiCard.cc:103
DTBtiCard * _theBTIs
Definition: DTSCTrigUnit.h:161
DTTracoCard * _theTRACOs
Definition: DTSCTrigUnit.h:162
tuple conf
Definition: dbtoconf.py:185
void setConfig(const DTConfigManager *conf)
Set configuration.
Definition: DTTSPhi.cc:127
DTTSTheta * _theTSTheta
Definition: DTSCTrigUnit.h:164
void setConfig(const DTConfigManager *conf)
Set configuration.
Definition: DTTSTheta.cc:74
~DTSCTrigUnit()
Destructor.
Definition: DTSCTrigUnit.cc:62
void setConfig(const DTConfigManager *conf)
Set configuration.
Definition: DTSCTrigUnit.cc:85