CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 // C++ Headers --
27 //---------------
28 #include <iostream>
29 #include <cmath>
30 
31 //----------------
32 // Constructors --
33 //----------------
35  // DTChamberId chambid = stat->id();
36  // bool geom_debug = conf_manager->getDTConfigTrigUnit(chambid)->debug();
37 
38  // create the geometry from the station
39  //_geom = new DTTrigGeom(stat, geom_debug);
40  _geom = new DTTrigGeom(stat, false); // CB FIXME: update when debug will be read via PSet
41 
42  // create BTI
43  _theBTIs = new DTBtiCard(_geom);
44 
45  // create TSTheta
47 
48  // create TRACO
50 
51  // create TSPhi
53 }
54 
55 //--------------
56 // Destructor --
57 //--------------
59  delete _theBTIs;
60  delete _theTRACOs;
61  delete _theTSPhi;
62  delete _theTSTheta;
63  delete _geom;
64 }
65 
67  //@@ patch for Sun 4.2 compiler
68  DTTrigData* tr = const_cast<DTTrigData*>(trig);
69  if (dynamic_cast<DTBtiTrigData*>(tr))
70  return _theBTIs;
71  if (dynamic_cast<DTTracoTrigData*>(tr))
72  return _theTRACOs;
73  if (dynamic_cast<DTChambPhSegm*>(tr))
74  return _theTSPhi;
75  if (dynamic_cast<DTChambThSegm*>(tr))
76  return _theTSTheta;
77  // if(dynamic_cast<const DTBtiTrigData*>(trig))return _theBTIs;
78  // if(dynamic_cast<const DTTracoTrigData*>(trig))return _theTRACOs;
79  // if(dynamic_cast<const DTChambPhSegm*>(trig))return _theTSPhi;
80  // if(dynamic_cast<const DTChambThSegm*>(trig))return _theTSTheta;
81  return nullptr;
82 }
83 
85  _theBTIs->setConfig(conf);
86  _theTSTheta->setConfig(conf);
87  _theTRACOs->setConfig(conf);
88  _theTSPhi->setConfig(conf);
89 }
DTGeomSupplier * GeomSupplier(const DTTrigData *trig) const
Return the appropriate coordinate supplier.
Definition: DTSCTrigUnit.cc:66
DTTrigGeom * _geom
Definition: DTSCTrigUnit.h:138
DTTSPhi * _theTSPhi
Definition: DTSCTrigUnit.h:143
void setConfig(const DTConfigManager *conf)
Set configuration.
Definition: DTTracoCard.cc:66
void setConfig(const DTConfigManager *conf)
Set configuration.
Definition: DTBtiCard.cc:90
DTBtiCard * _theBTIs
Definition: DTSCTrigUnit.h:141
DTSCTrigUnit(const DTChamber *stat)
Constructor.
Definition: DTSCTrigUnit.cc:34
DTTracoCard * _theTRACOs
Definition: DTSCTrigUnit.h:142
void setConfig(const DTConfigManager *conf)
Set configuration.
Definition: DTTSPhi.cc:117
DTTSTheta * _theTSTheta
Definition: DTSCTrigUnit.h:144
void setConfig(const DTConfigManager *conf)
Set configuration.
Definition: DTTSTheta.cc:67
~DTSCTrigUnit()
Destructor.
Definition: DTSCTrigUnit.cc:58
void setConfig(const DTConfigManager *conf)
Set configuration.
Definition: DTSCTrigUnit.cc:84