ATLAS Offline Software
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 
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 
98  uint32_t la = m_eventType & 0xC0FFFFFF;
99  m_eventType = la | (calAmp << 24);
100 }
101 
104  uint32_t la = m_eventType & 0xFFC0FFFF;
105  m_eventType = la | (calLay << 16);
106 
107 }
108 
111  m_numRPU = numDPU;
112 }
113 
114 std::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 
CscRawDataCollection::set_enableCal
void set_enableCal()
is calibration enabled
Definition: CscRawDataCollection.cxx:91
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
CscRawDataCollection::identify
uint16_t identify() const
access methods
Definition: CscRawDataCollection.h:107
CscRawDataCollection::neutron
bool neutron() const
is neutron rejection ON?
Definition: CscRawDataCollection.cxx:49
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
CscRawDataCollection::set_calLayer
void set_calLayer(const uint8_t calLay)
set the layer number where the calibration is been done
Definition: CscRawDataCollection.cxx:103
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
CscRawDataCollection::set_neutron
void set_neutron()
is neutron rejection applied?
Definition: CscRawDataCollection.cxx:85
CscRawDataCollection::sparsified
bool sparsified() const
is sparsified data? is neutron rejection ON? is calibration enabled?
Definition: CscRawDataCollection.cxx:44
skel.it
it
Definition: skel.GENtoEVGEN.py:396
CscRawDataCollection::samplingPhase
bool samplingPhase() const
Definition: CscRawDataCollection.h:117
CscRawDataCollection::m_eventType
uint32_t m_eventType
event type/data type
Definition: CscRawDataCollection.h:51
CscRawDataCollection::eventType
uint32_t eventType() const
Definition: CscRawDataCollection.h:120
CscRawDataCollection::calLayer
uint8_t calLayer() const
Calibration layer.
Definition: CscRawDataCollection.cxx:34
CscRawDataCollection::latency
uint16_t latency() const
Definition: CscRawDataCollection.cxx:16
CscRawDataCollection::triggerType
bool triggerType() const
Definition: CscRawDataCollection.h:118
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
CscRawDataCollection::firstBitSummary
uint8_t firstBitSummary() const
Definition: CscRawDataCollection.h:119
beamspotman.n
n
Definition: beamspotman.py:731
CscRawDataCollection::rodId
uint16_t rodId() const
Definition: CscRawDataCollection.h:112
CscRawDataCollection::calAmplitude
uint8_t calAmplitude() const
Calibration pulser amplitude.
Definition: CscRawDataCollection.cxx:39
CscRawDataCollection::calEnabled
bool calEnabled() const
is calibration enabled?
Definition: CscRawDataCollection.cxx:54
CscRawDataCollection
Collection of CSC Raw Hits, arranged according to CSC Detector Elements Author: Ketevi A.
Definition: CscRawDataCollection.h:24
CscRawDataCollection::set_sparsified
void set_sparsified()
is this sparsified data?
Definition: CscRawDataCollection.cxx:79
operator<<
std::ostream & operator<<(std::ostream &sl, const CscRawDataCollection &coll)
Overload of << operator for std::ostream for debug output.
Definition: CscRawDataCollection.cxx:114
CscRawDataCollection::numSamples
uint16_t numSamples() const
Definition: CscRawDataCollection.cxx:8
CscRawDataCollection.h
PlotCalibFromCool.en
en
Definition: PlotCalibFromCool.py:399
CscRawDataCollection::m_numRPU
uint16_t m_numRPU
number of RPU
Definition: CscRawDataCollection.h:39
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
CscRawDataCollection::setNumSamples
void setNumSamples(const uint16_t n)
insert the number of samples into the detector event type word
Definition: CscRawDataCollection.cxx:67
CscRawDataCollection::numRPU
uint16_t numRPU() const
Definition: CscRawDataCollection.h:114
CscRawDataCollection::setSamplingRate
void setSamplingRate(const uint16_t rate)
insert the rate into the detector event type word - the rate can 20 or 40 MHz
Definition: CscRawDataCollection.cxx:59
python.SystemOfUnits.ns
int ns
Definition: SystemOfUnits.py:130
CscRawDataCollection::set_calAmplitude
void set_calAmplitude(const uint8_t calAmp)
set the calibration amplitude
Definition: CscRawDataCollection.cxx:97
CscRawDataCollection::subDetectorId
uint16_t subDetectorId() const
Definition: CscRawDataCollection.h:113
CscRawDataCollection::setLatency
void setLatency(const uint16_t latency)
insert the latency into the detector event type word
Definition: CscRawDataCollection.cxx:73
CscRawDataCollection::rate
uint8_t rate() const
the rate could be 25 or 50 ns
Definition: CscRawDataCollection.cxx:24
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
CscRawDataCollection::setNumDPU
void setNumDPU(const uint16_t numDPU)
obsolete - just backward compatibility with old data
Definition: CscRawDataCollection.cxx:110