ATLAS Offline Software
Loading...
Searching...
No Matches
CscRawDataCollection.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
6#include "GaudiKernel/MsgStream.h"
7
9
12 return (m_eventType & 0xFF);
13
14}
15
17
19 return (m_eventType >> 8) & 0xFF;
20
21}
22
25
27 bool rateBit = (m_eventType >> 31) & 0x1;
28 uint8_t samplingRate = 50;
29 if ( rateBit ) samplingRate = 25;
30 return samplingRate;
31}
32
35 return (m_eventType >> 16) & 0x3F;
36}
37
40 return (m_eventType >> 24) & 0x3F;
41}
42
45 return (m_eventType >> 22) & 0x1;
46}
47
50 return (m_eventType >> 23) & 0x1;
51}
52
55 return (m_eventType >> 30) & 0x1;
56}
57
60 uint32_t rt = ( rate == 20 ) ? 0x0 : 0x1;
61 uint32_t rateWord = 0x7FFF & m_eventType;
62 m_eventType = rateWord | ( rt << 31 );
63
64}
65
67void CscRawDataCollection::setNumSamples (const uint16_t n) {
68 uint32_t ns = m_eventType & 0xFFFFFF00;
69 m_eventType = ns | n;
70}
71
74 uint32_t lt = m_eventType & 0xFFFF00FF;
75 m_eventType = lt | latency;
76}
77
80 uint32_t sp = m_eventType & 0xFFDFFFFF;
81 m_eventType = sp | (1 << 22);
82}
83
86 uint32_t ne = m_eventType & 0xFFBFFFFF;
87 m_eventType = ne | (1 << 23);
88}
89
92 uint32_t en = m_eventType & 0xBFFFFFFF;
93 m_eventType = en | (1 << 30);
94}
95
97void CscRawDataCollection::set_calAmplitude ( const uint8_t calAmp ) {
98 uint32_t la = m_eventType & 0xC0FFFFFF;
99 m_eventType = la | (calAmp << 24);
100}
101
103void CscRawDataCollection::set_calLayer ( const uint8_t calLay ) {
104 uint32_t la = m_eventType & 0xFFC0FFFF;
105 m_eventType = la | (calLay << 16);
106
107}
108
110void CscRawDataCollection::setNumDPU (const uint16_t numDPU) {
111 m_numRPU = numDPU;
112}
113
114std::ostream& operator << ( std::ostream& sl, const CscRawDataCollection& coll)
115{
116 sl << "CscRawDataCollection: "
117 << "identify()="<< coll.identify()
118 << ", rodId()="<< coll.rodId()
119 << ", subDetectorId()="<< coll.subDetectorId()
120 << ", numRPU()="<< coll.numRPU()
121 << ", detector event type="<< coll.eventType()
122 << ", sampling phase="<< coll.samplingPhase()
123 << ", trigger type="<< coll.triggerType()
124 << ", first bit summary="<< coll.firstBitSummary()
125 <<" CscRawData=[";
128 for (;it!=itEnd;++it) sl<< (**it)<<", ";
129 sl <<" ]"<<std::endl;
130 return sl;}
131
std::ostream & operator<<(std::ostream &sl, const CscRawDataCollection &coll)
Overload of << operator for std::ostream for debug output.
static Double_t sp
Collection of CSC Raw Hits, arranged according to CSC Detector Elements Author: Ketevi A.
bool sparsified() const
is sparsified data?
uint32_t m_eventType
event type/data type
uint16_t m_numRPU
number of RPU
void set_enableCal()
is calibration enabled
void set_sparsified()
is this sparsified data?
void setLatency(const uint16_t latency)
insert the latency into the detector event type word
void setNumSamples(const uint16_t n)
insert the number of samples into the detector event type word
uint8_t calAmplitude() const
Calibration pulser amplitude.
void set_calAmplitude(const uint8_t calAmp)
set the calibration amplitude
uint8_t firstBitSummary() const
uint16_t identify() const
access methods
bool calEnabled() const
is calibration enabled?
void set_neutron()
is neutron rejection applied?
uint16_t subDetectorId() const
bool neutron() const
is neutron rejection ON?
void setNumDPU(const uint16_t numDPU)
obsolete - just backward compatibility with old data
uint8_t calLayer() const
Calibration layer.
void setSamplingRate(const uint16_t rate)
insert the rate into the detector event type word - the rate can 20 or 40 MHz
void set_calLayer(const uint8_t calLay)
set the layer number where the calibration is been done
uint8_t rate() const
the rate could be 25 or 50 ns
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.