ATLAS Offline Software
Loading...
Searching...
No Matches
TileRawDataReadingAlg Class Reference

Class for Tile raw data reading from BS. More...

#include <TileRawDataReadingAlg.h>

Inheritance diagram for TileRawDataReadingAlg:

Public Member Functions

StatusCode initialize () override
StatusCode execute (const EventContext &ctx) const override
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
virtual void setFilterPassed (bool state, const EventContext &ctx) const
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

template<class GetRobOperation, class FillCollOperation>
StatusCode readDigits (const SG::WriteHandleKey< TileDigitsContainer > &digitsKey, const EventContext &ctx, const TileHid2RESrcID *hid2re, GetRobOperation getRobFromFragID, FillCollOperation fillCollection, unsigned int offsetID=0) const
template<class GetRobOperation, class FillCollOperation>
StatusCode readRawChannels (const SG::WriteHandleKey< TileRawChannelContainer > &rawChannelsKey, const EventContext &ctx, const TileHid2RESrcID *hid2re, GetRobOperation getRobFromFragID, FillCollOperation fillCollection, TileFragHash::TYPE type=TileFragHash::OptFilterDsp) const
StatusCode readBeamElements (const SG::WriteHandleKey< TileBeamElemContainer > &beamElementsKey, const EventContext &ctx, const TileHid2RESrcID *hid2re) const
StatusCode readLaserObject (const SG::WriteHandleKey< TileLaserObject > &laserObjectKey, const EventContext &ctx, const TileHid2RESrcID *hid2re) const
StatusCode readMuonReceiver (const SG::WriteHandleKey< TileMuonReceiverContainer > &muRcvKey, const EventContext &ctx) const
StatusCode readL2 (const SG::WriteHandleKey< TileL2Container > &l2Key, const EventContext &ctx) const
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

SG::WriteHandleKey< TileDigitsContainerm_digitsContainerKey
SG::WriteHandleKey< TileDigitsContainerm_flxDigitsContainerKey
SG::WriteHandleKey< TileDigitsContainerm_muRcvDigitsContainerKey
SG::WriteHandleKey< TileRawChannelContainerm_rawChannelContainerKey
SG::WriteHandleKey< TileRawChannelContainerm_muRcvRawChannelContainerKey
SG::WriteHandleKey< TileBeamElemContainerm_beamElemContainerKey
SG::WriteHandleKey< TileLaserObjectm_laserObjectKey
SG::WriteHandleKey< TileMuonReceiverContainerm_muonReceiverContainerKey
SG::WriteHandleKey< TileL2Containerm_l2ContainerKey
SG::ReadCondHandleKey< TileHid2RESrcIDm_hid2RESrcIDKey
ServiceHandle< IROBDataProviderSvcm_robSvc
 Name of ROB data provider service.
ToolHandle< TileROD_Decoderm_decoder
ServiceHandle< TileCablingSvcm_cablingSvc
bool m_doDigits {false}
bool m_doMuRcvDigits {false}
bool m_doFlxDigits {false}
bool m_doRawChannels {false}
bool m_doMuRcvRawChannels {false}
bool m_doBeamElements {false}
bool m_doLaserObject {false}
bool m_doMuonReceiver {false}
bool m_doL2 {false}
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Class for Tile raw data reading from BS.

Definition at line 30 of file TileRawDataReadingAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Member Function Documentation

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64{
65 return 0;
66}

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode TileRawDataReadingAlg::execute ( const EventContext & ctx) const
override

Definition at line 70 of file TileRawDataReadingAlg.cxx.

70 {
71
72 SG::ReadCondHandle<TileHid2RESrcID> hid2re(m_hid2RESrcIDKey, ctx);
73 ATH_CHECK(hid2re.isValid());
74
75 if (m_doDigits) {
78 [] (const TileROD_Decoder* decoder, const ROBDataProviderSvc::ROBF* rob, TileDigitsCollection& digitsCollection) {
79 decoder->fillCollection(rob, digitsCollection);
80 }));
81 }
82
83 if (m_doRawChannels) {
86 [] (const TileROD_Decoder* decoder, const ROBDataProviderSvc::ROBF* rob,
87 TileRawChannelCollection& rawChannelCollection, TileRawChannelContainer* container) {
88 decoder->fillCollection(rob, rawChannelCollection, container);
89 }));
90 }
91
92 if (m_doMuonReceiver) {
94 }
95
96 if (m_doMuRcvDigits) {
100 }
101
105 [] (const TileROD_Decoder* decoder, const ROBDataProviderSvc::ROBF* rob,
106 TileRawChannelCollection& rawChannelCollection, TileRawChannelContainer*) {
107 decoder->fillCollection_TileMuRcv_RawChannel(rob, rawChannelCollection);
108 }, TileFragHash::MF));
109 }
110
111 if (m_doBeamElements) {
113 }
114
115 if (m_doLaserObject) {
117 }
118
119 if (m_doFlxDigits) {
124 }
125
126 if (m_doL2) {
128 }
129
130 return StatusCode::SUCCESS;
131}
#define ATH_CHECK
Evaluate an expression and check for errors.
Athena::TPCnvVers::Old Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current TileRawChannelContainer
OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment ROBF
ROB Fragment class.
static const unsigned int FELIX_FRAGID_OFFSET
Offset for frag ID used for FELIX in frag ID to ROB ID map.
uint32_t getRobFromFragID(int frag_id) const
make a ROB SrcID for a fragment ID
uint32_t getRobFromTileMuRcvFragID(int frag_id) const
void fillCollection_TileMuRcv_Digi(const ROBData *rob, TileDigitsCollection &v) const
void fillCollection_FELIX_Digi(const ROBData *rob, TileDigitsCollection &v) const
SG::WriteHandleKey< TileRawChannelContainer > m_rawChannelContainerKey
SG::WriteHandleKey< TileLaserObject > m_laserObjectKey
SG::ReadCondHandleKey< TileHid2RESrcID > m_hid2RESrcIDKey
StatusCode readL2(const SG::WriteHandleKey< TileL2Container > &l2Key, const EventContext &ctx) const
SG::WriteHandleKey< TileL2Container > m_l2ContainerKey
SG::WriteHandleKey< TileDigitsContainer > m_muRcvDigitsContainerKey
SG::WriteHandleKey< TileDigitsContainer > m_digitsContainerKey
StatusCode readMuonReceiver(const SG::WriteHandleKey< TileMuonReceiverContainer > &muRcvKey, const EventContext &ctx) const
StatusCode readRawChannels(const SG::WriteHandleKey< TileRawChannelContainer > &rawChannelsKey, const EventContext &ctx, const TileHid2RESrcID *hid2re, GetRobOperation getRobFromFragID, FillCollOperation fillCollection, TileFragHash::TYPE type=TileFragHash::OptFilterDsp) const
StatusCode readBeamElements(const SG::WriteHandleKey< TileBeamElemContainer > &beamElementsKey, const EventContext &ctx, const TileHid2RESrcID *hid2re) const
StatusCode readLaserObject(const SG::WriteHandleKey< TileLaserObject > &laserObjectKey, const EventContext &ctx, const TileHid2RESrcID *hid2re) const
SG::WriteHandleKey< TileRawChannelContainer > m_muRcvRawChannelContainerKey
SG::WriteHandleKey< TileMuonReceiverContainer > m_muonReceiverContainerKey
SG::WriteHandleKey< TileDigitsContainer > m_flxDigitsContainerKey
SG::WriteHandleKey< TileBeamElemContainer > m_beamElemContainerKey
StatusCode readDigits(const SG::WriteHandleKey< TileDigitsContainer > &digitsKey, const EventContext &ctx, const TileHid2RESrcID *hid2re, GetRobOperation getRobFromFragID, FillCollOperation fillCollection, unsigned int offsetID=0) const

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthCommonReentrantAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.

90{
91 // If we didn't find any symlinks to add, just return the collection
92 // from the base class. Otherwise, return the extended collection.
93 if (!m_extendedExtraObjects.empty()) {
95 }
97}
An algorithm that can be simultaneously executed in multiple threads.

◆ filterPassed()

virtual bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96 {
97 return execState( ctx ).filterPassed();
98 }
virtual bool filterPassed(const EventContext &ctx) const

◆ initialize()

StatusCode TileRawDataReadingAlg::initialize ( )
override

Definition at line 20 of file TileRawDataReadingAlg.cxx.

20 {
21
24
27
30
33
36
39
42
45
46 m_doL2 = !m_l2ContainerKey.empty();
48
49
50 ATH_MSG_DEBUG("Initialize Tile raw data reading: "
51 << ((m_doDigits) ? m_digitsContainerKey.key() + " " : "")
52 << ((m_doMuRcvDigits) ? m_muRcvDigitsContainerKey.key() + " " : "")
53 << ((m_doFlxDigits) ? m_flxDigitsContainerKey.key() + " " : "")
54 << ((m_doRawChannels) ? m_rawChannelContainerKey.key() + " " : "")
56 << ((m_doBeamElements) ? m_beamElemContainerKey.key() + " " : "")
57 << ((m_doLaserObject) ? m_laserObjectKey.key() + " " : "")
58 << ((m_doMuonReceiver) ? m_muonReceiverContainerKey.key() + " " : "")
59 << ((m_doL2) ? m_l2ContainerKey.key() + " " : ""));
60
61 ATH_CHECK(m_hid2RESrcIDKey.initialize());
62
63 ATH_CHECK(m_robSvc.retrieve());
64 ATH_CHECK(m_cablingSvc.retrieve());
65 ATH_CHECK(m_decoder.retrieve());
66
67 return StatusCode::SUCCESS;
68}
#define ATH_MSG_DEBUG(x)
ToolHandle< TileROD_Decoder > m_decoder
ServiceHandle< TileCablingSvc > m_cablingSvc
ServiceHandle< IROBDataProviderSvc > m_robSvc
Name of ROB data provider service.

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ readBeamElements()

StatusCode TileRawDataReadingAlg::readBeamElements ( const SG::WriteHandleKey< TileBeamElemContainer > & beamElementsKey,
const EventContext & ctx,
const TileHid2RESrcID * hid2re ) const
private

Definition at line 257 of file TileRawDataReadingAlg.cxx.

258 {
259
260 std::vector<uint32_t> robid{0};
261 std::vector<const ROBDataProviderSvc::ROBF*> robf;
262
263 auto beamElementsContainer = std::make_unique<TileMutableBeamElemContainer>(true);
264 ATH_CHECK( beamElementsContainer->status() );
265
266 // Iterate over all collections in a container and fill them
267 for (IdentifierHash hash : beamElementsContainer->GetAllCurrentHashes()) {
268 TileBeamElemCollection* beamElementsCollection = beamElementsContainer->indexFindPtr(hash);
269 TileBeamElemCollection::ID collID = beamElementsCollection->identify();
270
271 // Find ROB
272 uint32_t newrob = hid2re->getRobFromFragID(collID);
273 if (newrob != robid[0]) {
274 robid[0] = newrob;
275 robf.clear();
276 m_robSvc->getROBData(ctx, robid, robf);
277 }
278
279 // Unpack ROB data
280 if (robf.size() > 0 ) {
281 m_decoder->fillCollection(robf[0], *beamElementsCollection);
282 }
283 }
284
285 ATH_MSG_DEBUG( "Creating beam elements container: " << beamElementsKey );
286
287 SG::WriteHandle<TileBeamElemContainer> beamElementsCnt(beamElementsKey, ctx);
288 ATH_CHECK( beamElementsCnt.record(std::move(beamElementsContainer)) );
289
290 return StatusCode::SUCCESS;
291}
setEventNumber uint32_t

◆ readDigits()

template<class GetRobOperation, class FillCollOperation>
StatusCode TileRawDataReadingAlg::readDigits ( const SG::WriteHandleKey< TileDigitsContainer > & digitsKey,
const EventContext & ctx,
const TileHid2RESrcID * hid2re,
GetRobOperation getRobFromFragID,
FillCollOperation fillCollection,
unsigned int offsetID = 0 ) const
private

Definition at line 135 of file TileRawDataReadingAlg.cxx.

138 {
139
140 uint32_t newrob = 0x0;
141 std::vector<uint32_t> robid{0};
142 std::vector<const ROBDataProviderSvc::ROBF*> robf;
143 auto digitsContainer = std::make_unique<TileMutableDigitsContainer>(true, TileFragHash::Digitizer);
144 ATH_CHECK( digitsContainer->status() );
145
146 // Iterate over all collections in a container and fill them
147 for (IdentifierHash hash : digitsContainer->GetAllCurrentHashes()) {
148 TileDigitsCollection* digitsCollection = digitsContainer->indexFindPtr (hash);
149 TileDigitsCollection::ID collID = digitsCollection->identify();
150
151 // Find ROB
152 newrob = getRobFromFragID(hid2re, collID + offsetID);
153 if (newrob != robid[0]) {
154 robid[0] = newrob;
155 robf.clear();
156 m_robSvc->getROBData(ctx, robid, robf);
157 }
158
159 if (robf.size() > 0 ) {
160 fillCollection(&*m_decoder, robf[0], *digitsCollection);
161 } else {
163 digitsCollection->setFragBCID(0xDEAD | (status << 16));
164 ATH_MSG_DEBUG( "Status [" << digitsKey.key() << "] for " << "drawer 0x" << MSG::hex
165 << collID << " in Digi frag is 0x" << status << MSG::dec);
166 }
167 }
168
169 ATH_MSG_DEBUG( "Creating digits container: " << digitsKey.key() );
170
171 SG::WriteHandle<TileDigitsContainer> digitsCnt(digitsKey, ctx);
172 ATH_CHECK( digitsCnt.record(std::move(digitsContainer)) );
173
174 return StatusCode::SUCCESS;
175}
void setFragBCID(uint32_t bcid)
Set BCID.
status
Definition merge.py:16

◆ readL2()

StatusCode TileRawDataReadingAlg::readL2 ( const SG::WriteHandleKey< TileL2Container > & l2Key,
const EventContext & ctx ) const
private

Definition at line 343 of file TileRawDataReadingAlg.cxx.

344 {
345
346 const RawEvent* re = m_robSvc->getEvent(ctx);
347 if (!re) {
348 ATH_MSG_ERROR( "Could not get raw event from ByteStreamInputSvc" );
349 return StatusCode::FAILURE;
350 }
351
352 auto l2Container = std::make_unique<TileL2Container>();
353 l2Container->reserve(256);
354 for(int i = 0; i < 256; ++i) {
355 int collId = m_decoder->hashFunc()->identifier(i);
356 l2Container->push_back (std::make_unique<TileL2>(collId));
357 }
358
359 if (!m_decoder->convert(re, l2Container.get()).isSuccess()) {
360 ATH_MSG_WARNING( "Conversion tool returned an error. TileL2Container might be empty." );
361 }
362
363 SG::WriteHandle<TileL2Container> l2Cnt(l2Key, ctx);
364 ATH_CHECK( l2Cnt.record(std::move(l2Container)) );
365
366 return StatusCode::SUCCESS;
367}
const boost::regex re(r_e)
#define ATH_MSG_ERROR(x)
#define ATH_MSG_WARNING(x)
OFFLINE_FRAGMENTS_NAMESPACE::FullEventFragment RawEvent
data type for reading raw event
Definition RawEvent.h:37

◆ readLaserObject()

StatusCode TileRawDataReadingAlg::readLaserObject ( const SG::WriteHandleKey< TileLaserObject > & laserObjectKey,
const EventContext & ctx,
const TileHid2RESrcID * hid2re ) const
private

Definition at line 294 of file TileRawDataReadingAlg.cxx.

295 {
296
297 std::vector<uint32_t> robid{0};
298 std::vector<const ROBDataProviderSvc::ROBF*> robf;
299
300 auto laserObject = std::make_unique<TileLaserObject>() ;
301 m_decoder->setLaserVersion(*laserObject);
302
303 robid[0] = hid2re->getRobFromFragID(LASER_OBJ_FRAG);
304 m_robSvc->getROBData(ctx, robid, robf);
305
306 if (robf.size() > 0 ) {
307 m_decoder->fillTileLaserObj(robf[0], *laserObject);
308 } else {
309 ATH_MSG_DEBUG( " No LASTROD fragment in BS, TileLaserObject will be empty." );
310 }
311
312 ATH_MSG_DEBUG( "Creating laser object: " << laserObjectKey );
313
314 SG::WriteHandle<TileLaserObject> laserObj(laserObjectKey, ctx);
315 ATH_CHECK( laserObj.record(std::move(laserObject)) );
316
317 return StatusCode::SUCCESS;
318}
#define LASER_OBJ_FRAG
Definition TileTBFrag.h:49

◆ readMuonReceiver()

StatusCode TileRawDataReadingAlg::readMuonReceiver ( const SG::WriteHandleKey< TileMuonReceiverContainer > & muRcvKey,
const EventContext & ctx ) const
private

Definition at line 321 of file TileRawDataReadingAlg.cxx.

322 {
323
324 const RawEvent* re = m_robSvc->getEvent(ctx);
325 if (!re) {
326 ATH_MSG_ERROR( "Could not get raw event from ByteStreamInputSvc" );
327 return StatusCode::FAILURE;
328 }
329
330 auto muonReceiverContainer = std::make_unique<TileMuonReceiverContainer>();
331
332 if (!m_decoder->convertTMDBDecision(re, muonReceiverContainer.get()).isSuccess()) {
333 ATH_MSG_WARNING( "Conversion tool returned an error. TileMuonReceiverContainer might be empty." );
334 }
335
336 SG::WriteHandle<TileMuonReceiverContainer> muRcvCnt(muRcvKey, ctx);
337 ATH_CHECK( muRcvCnt.record(std::move(muonReceiverContainer)) );
338
339 return StatusCode::SUCCESS;
340}

◆ readRawChannels()

template<class GetRobOperation, class FillCollOperation>
StatusCode TileRawDataReadingAlg::readRawChannels ( const SG::WriteHandleKey< TileRawChannelContainer > & rawChannelsKey,
const EventContext & ctx,
const TileHid2RESrcID * hid2re,
GetRobOperation getRobFromFragID,
FillCollOperation fillCollection,
TileFragHash::TYPE type = TileFragHash::OptFilterDsp ) const
private

Definition at line 178 of file TileRawDataReadingAlg.cxx.

181 {
182
183
184 uint32_t newrob = 0x0;
185 std::vector<uint32_t> robid{0};
186 std::vector<const ROBDataProviderSvc::ROBF*> robf;
187 std::unordered_map<uint32_t, int> bsflags;
189
190 auto rawChannelContainer = std::make_unique<TileMutableRawChannelContainer>(true, type);
191 ATH_CHECK( rawChannelContainer->status() );
192
193 // Iterate over all collections in a container and fill them
194 for (IdentifierHash hash : rawChannelContainer->GetAllCurrentHashes()) {
195 TileRawChannelCollection* rawChannelCollection = rawChannelContainer->indexFindPtr (hash);
196 TileRawChannelCollection::ID collID = rawChannelCollection->identify();
197
198 // Find ROB
199 newrob = getRobFromFragID(hid2re, collID);
200 if (newrob != robid[0]) {
201 robid[0] = newrob;
202 robf.clear();
203 m_robSvc->getROBData(ctx, robid, robf);
204 }
205
206 // Unpack ROB data
207 if (robf.size() > 0 ) {
208 fillCollection(&*m_decoder, robf[0], *rawChannelCollection, &*rawChannelContainer);
209
210 flags = rawChannelContainer->get_bsflags();
211 auto result = bsflags.insert(std::pair<uint32_t, int>(flags, 1));
212 if (result.second == false) {
213 result.first->second++;
214 }
215 } else {
216 ATH_MSG_DEBUG( "ROB [" << rawChannelsKey.key() << "] for " << "drawer 0x" << MSG::hex << collID << MSG::dec << " not found in BS" );
218 rawChannelCollection->setFragGlobalCRC(status);
219 ATH_MSG_DEBUG( "Status [" << rawChannelsKey.key() << "] for " << "drawer 0x" << MSG::hex << collID << " is 0x" << status << MSG::dec);
220 }
221 }
222
223 if (bsflags.size() > 1) {
224 int n = 0;
225 for (const auto & elem : bsflags) {
226 if (elem.second > n) {
227 n = elem.second;
228 flags = elem.first;
229 }
230 }
231
232 if (flags != rawChannelContainer->get_bsflags()) {
233
234 uint32_t unit = ((flags & 0xC0000000) >> 30);
235 if ((flags & 0x30000000) < 0x30000000) {
236 unit += TileRawChannelUnit::OnlineOffset; // Online units in real data
237 }
238
239 ATH_MSG_DEBUG( "Changing units [" << rawChannelsKey.key() << "] for " << "RawChannelContainer from "
240 << rawChannelContainer->get_unit() << " to " << unit << MSG::hex
241 << " and BS flags from 0x" << rawChannelContainer->get_bsflags() << " to 0x" << flags << MSG::dec);
242
244 rawChannelContainer->set_bsflags(flags);
245 }
246 }
247
248 ATH_MSG_DEBUG( "Creating raw channel container: " << rawChannelsKey );
249
250 SG::WriteHandle<TileRawChannelContainer> rawChannelsCnt(rawChannelsKey, ctx);
251 ATH_CHECK( rawChannelsCnt.record(std::move(rawChannelContainer)) );
252
253 return StatusCode::SUCCESS;
254}
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
const std::string & key() const
Return the StoreGate ID for the referenced object.
void setFragGlobalCRC(uint32_t globalcrc)
Various set methods.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

virtual void AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100 {
102 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

77{
78 return BaseAlg::sysExecute (ctx);
79}

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107 {
109
110 if (sc.isFailure()) {
111 return sc;
112 }
113
114 ServiceHandle<ICondSvc> cs("CondSvc",name());
115 for (auto h : outputHandles()) {
116 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117 // do this inside the loop so we don't create the CondSvc until needed
118 if ( cs.retrieve().isFailure() ) {
119 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120 return StatusCode::SUCCESS;
121 }
122 if (cs->regHandle(this,*h).isFailure()) {
124 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125 << " with CondSvc");
126 }
127 }
128 }
129 return sc;
130}
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ m_beamElemContainerKey

SG::WriteHandleKey<TileBeamElemContainer> TileRawDataReadingAlg::m_beamElemContainerKey
private
Initial value:
{this,
"TileBeamElemContainer", "", "Output Tile beam elements container key"}

Definition at line 78 of file TileRawDataReadingAlg.h.

78 {this,
79 "TileBeamElemContainer", "", "Output Tile beam elements container key"};

◆ m_cablingSvc

ServiceHandle<TileCablingSvc> TileRawDataReadingAlg::m_cablingSvc
private
Initial value:
{ this,
"TileCablingSvc", "TileCablingSvc", "The Tile cabling service"}

Definition at line 105 of file TileRawDataReadingAlg.h.

105 { this,
106 "TileCablingSvc", "TileCablingSvc", "The Tile cabling service"};

◆ m_decoder

ToolHandle<TileROD_Decoder> TileRawDataReadingAlg::m_decoder
private
Initial value:
{this,
"TileROD_Decoder", "TileROD_Decoder", "Tile ROD decoder"}

Definition at line 99 of file TileRawDataReadingAlg.h.

99 {this,
100 "TileROD_Decoder", "TileROD_Decoder", "Tile ROD decoder"};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_digitsContainerKey

SG::WriteHandleKey<TileDigitsContainer> TileRawDataReadingAlg::m_digitsContainerKey
private
Initial value:
{this,
"TileDigitsContainer", "", "Output Tile digits container key"}

Definition at line 63 of file TileRawDataReadingAlg.h.

63 {this,
64 "TileDigitsContainer", "", "Output Tile digits container key"};

◆ m_doBeamElements

bool TileRawDataReadingAlg::m_doBeamElements {false}
private

Definition at line 114 of file TileRawDataReadingAlg.h.

114{false};

◆ m_doDigits

bool TileRawDataReadingAlg::m_doDigits {false}
private

Definition at line 109 of file TileRawDataReadingAlg.h.

109{false};

◆ m_doFlxDigits

bool TileRawDataReadingAlg::m_doFlxDigits {false}
private

Definition at line 111 of file TileRawDataReadingAlg.h.

111{false};

◆ m_doL2

bool TileRawDataReadingAlg::m_doL2 {false}
private

Definition at line 117 of file TileRawDataReadingAlg.h.

117{false};

◆ m_doLaserObject

bool TileRawDataReadingAlg::m_doLaserObject {false}
private

Definition at line 115 of file TileRawDataReadingAlg.h.

115{false};

◆ m_doMuonReceiver

bool TileRawDataReadingAlg::m_doMuonReceiver {false}
private

Definition at line 116 of file TileRawDataReadingAlg.h.

116{false};

◆ m_doMuRcvDigits

bool TileRawDataReadingAlg::m_doMuRcvDigits {false}
private

Definition at line 110 of file TileRawDataReadingAlg.h.

110{false};

◆ m_doMuRcvRawChannels

bool TileRawDataReadingAlg::m_doMuRcvRawChannels {false}
private

Definition at line 113 of file TileRawDataReadingAlg.h.

113{false};

◆ m_doRawChannels

bool TileRawDataReadingAlg::m_doRawChannels {false}
private

Definition at line 112 of file TileRawDataReadingAlg.h.

112{false};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_flxDigitsContainerKey

SG::WriteHandleKey<TileDigitsContainer> TileRawDataReadingAlg::m_flxDigitsContainerKey
private
Initial value:
{this,
"TileDigitsFlxContainer", "", "Output Tile FELIX digits container key"}

Definition at line 66 of file TileRawDataReadingAlg.h.

66 {this,
67 "TileDigitsFlxContainer", "", "Output Tile FELIX digits container key"};

◆ m_hid2RESrcIDKey

SG::ReadCondHandleKey<TileHid2RESrcID> TileRawDataReadingAlg::m_hid2RESrcIDKey
private
Initial value:
{this,
"TileHid2RESrcID", "TileHid2RESrcID", "TileHid2RESrcID key"}

Definition at line 90 of file TileRawDataReadingAlg.h.

90 {this,
91 "TileHid2RESrcID", "TileHid2RESrcID", "TileHid2RESrcID key"};

◆ m_l2ContainerKey

SG::WriteHandleKey<TileL2Container> TileRawDataReadingAlg::m_l2ContainerKey
private
Initial value:
{this,
"TileL2Container", "", "Output Tile L2 container key"}

Definition at line 87 of file TileRawDataReadingAlg.h.

87 {this,
88 "TileL2Container", "", "Output Tile L2 container key"};

◆ m_laserObjectKey

SG::WriteHandleKey<TileLaserObject> TileRawDataReadingAlg::m_laserObjectKey
private
Initial value:
{this,
"TileLaserObject", "", "Output Tile object key"}

Definition at line 81 of file TileRawDataReadingAlg.h.

81 {this,
82 "TileLaserObject", "", "Output Tile object key"};

◆ m_muonReceiverContainerKey

SG::WriteHandleKey<TileMuonReceiverContainer> TileRawDataReadingAlg::m_muonReceiverContainerKey
private
Initial value:
{this,
"TileMuonReceiverContainer", "", "Output Tile muon receiver container key"}

Definition at line 84 of file TileRawDataReadingAlg.h.

84 {this,
85 "TileMuonReceiverContainer", "", "Output Tile muon receiver container key"};

◆ m_muRcvDigitsContainerKey

SG::WriteHandleKey<TileDigitsContainer> TileRawDataReadingAlg::m_muRcvDigitsContainerKey
private
Initial value:
{this,
"MuRcvDigitsContainer", "", "Output Tile TMDB digits container key"}

Definition at line 69 of file TileRawDataReadingAlg.h.

69 {this,
70 "MuRcvDigitsContainer", "", "Output Tile TMDB digits container key"};

◆ m_muRcvRawChannelContainerKey

SG::WriteHandleKey<TileRawChannelContainer> TileRawDataReadingAlg::m_muRcvRawChannelContainerKey
private
Initial value:
{this,
"MuRcvRawChannelContainer", "", "Output Tile TMDB raw channels container key"}

Definition at line 75 of file TileRawDataReadingAlg.h.

75 {this,
76 "MuRcvRawChannelContainer", "", "Output Tile TMDB raw channels container key"};

◆ m_rawChannelContainerKey

SG::WriteHandleKey<TileRawChannelContainer> TileRawDataReadingAlg::m_rawChannelContainerKey
private
Initial value:
{this,
"TileRawChannelContainer", "", "Output Tile raw channels container key"}

Definition at line 72 of file TileRawDataReadingAlg.h.

72 {this,
73 "TileRawChannelContainer", "", "Output Tile raw channels container key"};

◆ m_robSvc

ServiceHandle<IROBDataProviderSvc> TileRawDataReadingAlg::m_robSvc
private
Initial value:
{this,
"ROBDataProviderSvc", "ROBDataProviderSvc", "The ROB data provider service"}

Name of ROB data provider service.

Definition at line 96 of file TileRawDataReadingAlg.h.

96 {this,
97 "ROBDataProviderSvc", "ROBDataProviderSvc", "The ROB data provider service"};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: