CMS 3D CMS Logo

DTTracoTrig.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: DTTracoTrig
4 //
5 // Description: TRACO Trigger Data
6 //
7 //
8 // Author List:
9 // C. Grandi
10 // Modifications:
11 // 22/VI/04 SV: last trigger code update
12 //
13 //
14 //--------------------------------------------------
15 
16 // #include "Utilities/Configuration/interface/Architecture.h"
17 
18 //-----------------------
19 // This Class's Header --
20 //-----------------------
22 
23 //-------------------------------
24 // Collaborating Class Headers --
25 //-------------------------------
28 
29 //---------------
30 // C++ Headers --
31 //---------------
32 
33 using namespace std;
34 
35 //----------------
36 // Constructors --
37 //----------------
39  // reserve the appropriate amount of space for vectors
40  _btitrig.reserve(2);
41  clear();
42 }
43 
44 DTTracoTrig::DTTracoTrig(DTTracoChip *tparent, int step) : _tparent(tparent) {
45  // reserve the appropriate amount of space for vectors
46  _btitrig.reserve(2);
47  clear();
48 
49  // data part of the trigger
51  _data.setParent(tparent->id());
52 }
53 
55  // reserve the appropriate amount of space for vectors
56  _btitrig.reserve(2);
57 }
58 
59 //--------------
60 // Destructor --
61 //--------------
63 
65  if (qdec() == 7 && tt.qdec() == 7)
66  return true;
67 
68  if (!(isFirst() == tt.isFirst()) || !(pvK() == tt.pvK()) ||
69  ((fmod(double(pvCode()), 8.) == 0) ^ (fmod(double(tt.pvCode()), 8.) == 0)) || !(pvCorr() == tt.pvCorr()) ||
70  !(psiR() == tt.psiR()) || !(DeltaPsiR() == tt.DeltaPsiR()) || !(qdec() == tt.qdec()) ||
71  !(data().pvIO() == tt.data().pvIO())) {
72  cout << "fs:" << isFirst() << "," << tt.isFirst() << endl;
73  cout << "pvCode:" << pvCode() << "," << tt.pvCode() << endl;
74  cout << "pvK:" << pvK() << "," << tt.pvK() << endl;
75  cout << "pvCorr:" << pvCorr() << "," << tt.pvCorr() << endl;
76  cout << "psiR:" << psiR() << "," << tt.psiR() << endl;
77  cout << "DeltaPsiR:" << DeltaPsiR() << "," << tt.DeltaPsiR() << endl;
78  cout << "qdec:" << qdec() << "," << tt.qdec() << endl;
79  cout << "data().pvIO:" << data().pvIO() << "," << tt.data().pvIO() << endl;
80 
81  return false;
82  }
83  return true;
84 }
DTTracoTrig::~DTTracoTrig
~DTTracoTrig() override
Destructor.
Definition: DTTracoTrig.cc:62
groupFilesInBlocks.tt
int tt
Definition: groupFilesInBlocks.py:144
step
step
Definition: StallMonitor.cc:94
DTTracoChip.h
DTTracoTrigData::setStep
void setStep(int step)
Set trigger step.
Definition: DTTracoTrigData.h:56
DTTracoTrig::_btitrig
std::vector< const DTBtiTrigData * > _btitrig
Definition: DTTracoTrig.h:185
gather_cfg.cout
cout
Definition: gather_cfg.py:144
DTTracoTrigData::setParent
void setParent(DTTracoId tracoid)
Set the parent TRACO Identifier.
Definition: DTTracoTrigData.h:53
DTTracoTrig::_data
DTTracoTrigData _data
Definition: DTTracoTrig.h:182
DTTracoTrig::clear
void clear()
Clear.
Definition: DTTracoTrig.h:100
DTTracoTrig::DeltaPsiR
int DeltaPsiR() const
Return DeltaPsiR.
Definition: DTTracoTrig.h:166
DTTracoTrig::data
DTTracoTrigData data() const
Return the data part.
Definition: DTTracoTrig.h:115
DTTracoTrig::operator==
bool operator==(const DTTracoTrig &) const
comparison operator
Definition: DTTracoTrig.cc:64
DTTracoTrigData::pvIO
int pvIO() const
Return the preview i/o bit.
Definition: DTTracoTrigData.h:195
DTTracoTrig::DTTracoTrig
DTTracoTrig()
Constructors.
Definition: DTTracoTrig.cc:38
DTTracoTrig::pvK
int pvK() const
Return the preview K.
Definition: DTTracoTrig.h:148
DTTracoTrig
Definition: DTTracoTrig.h:40
DTTracoChip
Definition: DTTracoChip.h:53
DTTracoTrig::qdec
int qdec() const
Return the trigger code in new format.
Definition: DTTracoTrig.h:169
clear
void clear(HadCaloObj &c)
Definition: data.h:124
DTTracoTrig::pvCode
int pvCode() const
Return the preview code.
Definition: DTTracoTrig.h:145
DTTracoTrig::pvCorr
int pvCorr() const
Return the preview correaltion bit.
Definition: DTTracoTrig.h:151
DTTracoTrig::isFirst
int isFirst() const
Return non 0 if the track is a first track.
Definition: DTTracoTrig.h:142
std
Definition: JetResolutionObject.h:76
DTTracoChip::id
DTTracoId id() const
Return TRACO id.
Definition: DTTracoChip.h:98
DTTracoTrigData
Definition: DTTracoTrigData.h:37
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
DTBtiTrigData.h
DTTracoTrig.h
DTTracoTrig::psiR
int psiR() const
Return trigger X parameter converted to angle.
Definition: DTTracoTrig.h:163
class-composition.parent
parent
Definition: class-composition.py:88