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

#include <LArRawDataReadingAlg.h>

Inheritance diagram for LArRawDataReadingAlg:
Collaboration diagram for LArRawDataReadingAlg:

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 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
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
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< StoreGateSvc > StoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

SG::WriteHandleKey< LArRawChannelContainer > m_rawChannelKey
SG::WriteHandleKey< LArDigitContainer > m_digitKey {this,"LArDigitKey","FREE"}
SG::WriteHandleKey< LArFebHeaderContainer > m_febHeaderKey {this,"LArFebHeaderKey","LArFebHeader"}
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey {this, "eventInfoKey", "EventInfo", "Key for EventInfo object"}
ServiceHandle< IROBDataProviderSvc > m_robDataProviderSvc {this,"ROBDataProviderSvc","ROBDataProviderSvc"}
BooleanProperty m_verifyChecksum {this,"VerifyChecksum",true,"Calculate and compare checksums to detect data transmission errors"}
BooleanProperty m_failOnCorruption {this,"FailOnCorruption",false,"Return FAILURE if data corruption is found"}
Gaudi::Property< std::string > m_subCaloPreselection {this,"SubCaloPreselection","","One of 'EM', 'HEC' or 'FCAL'"}
Gaudi::Property< std::vector< unsigned > > m_vBEPreselection {this,"BEPreselection",{},"For channel-selection: Barrel=0, Endcap=1"}
Gaudi::Property< std::vector< unsigned > > m_vPosNegPreselection {this,"PosNegPreselection",{}, "For channel-selection: C-Side:0, A-Side: 1"}
Gaudi::Property< std::vector< unsigned > > m_vFTPreselection {this,"FTNumPreselection",{}, "For channel-selection: Feedthrough numbers (e.g. 0 - 31 for barrel)"}
std::set< HWIdentifier > m_vFinalPreselection
const LArOnlineID * m_onlineId =nullptr
bool m_doRawChannels =true
bool m_doDigits =true
bool m_doFebHeaders =true
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

Definition at line 25 of file LArRawDataReadingAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 376 of file AthCommonDataStore.h.

Member Function Documentation

◆ 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 LArRawDataReadingAlg::execute ( const EventContext & ctx) const
override

Definition at line 122 of file LArRawDataReadingAlg.cxx.

122 {
123 LArRawChannelContainer* rawChannels=nullptr;
124 LArDigitContainer* digits=nullptr;
125 LArFebHeaderContainer* febHeaders=nullptr;
126
127 if (m_doRawChannels) {
128 SG::WriteHandle<LArRawChannelContainer> rawChannelsHdl(m_rawChannelKey,ctx);
129 ATH_CHECK(rawChannelsHdl.record(std::make_unique<LArRawChannelContainer>()));
130 rawChannels=rawChannelsHdl.ptr();
131 rawChannels->reserve(182468); //Total number of LAr readout channels
132 }
133
134 if (m_doDigits) {
135 SG::WriteHandle<LArDigitContainer> digitsHdl(m_digitKey,ctx);
136 ATH_CHECK(digitsHdl.record(std::make_unique<LArDigitContainer>()));
137 digits=digitsHdl.ptr();
138 digits->reserve(1000); //Approximate number of Digits above threshold
139 }
140
141 if (m_doFebHeaders) {
142 SG::WriteHandle<LArFebHeaderContainer> febHeadersHdl(m_febHeaderKey,ctx);
143 ATH_CHECK(febHeadersHdl.record(std::make_unique<LArFebHeaderContainer>()));
144 febHeaders=febHeadersHdl.ptr();
145 febHeaders->reserve(1524); //Total number of LAr Front End Boards
146 }
147
148 //Get full events and filter out LAr ROBs
149 const RawEvent* fullEvent=m_robDataProviderSvc->getEvent(ctx);
150 std::map<eformat::SubDetectorGroup, std::vector<const uint32_t*> > rawEventTOC;
151 eformat::helper::build_toc(*fullEvent, rawEventTOC);
152 auto larRobs=rawEventTOC.find(eformat::LAR);
153 if (larRobs==rawEventTOC.end()) {
154 ATH_MSG_DEBUG("No LAr data found in this event. Recording empty LArRawChannelContainer");
155 return StatusCode::SUCCESS;
156 }
157
158
159 std::unique_ptr<LArRodBlockStructure> rodBlock;
160 uint16_t rodMinorVersion=0x0;
161 uint32_t rodBlockType=0x0;
162
163
164 for (const uint32_t* robPtr : larRobs->second) {
166 ATH_MSG_VERBOSE("Decoding ROB fragment 0x" << std::hex << rob.rob_source_id () << " with " << std::dec << rob.rod_fragment_size_word() << " ROB words");
167
168 if (rob.rod_fragment_size_word() <3) {
169 if (m_failOnCorruption) {
170 ATH_MSG_ERROR("Encountered corrupt ROD fragment, less than 3 words!");
171 return StatusCode::FAILURE;
172 }else {
173 continue;
174 }
175 } else if(rob.rob_source_id()& 0x1000 ){
176 //ATH_MSG_DEBUG(" skip Latome fragment with source ID "<< std::hex << rob.rob_source_id()
177 rodBlock=nullptr;
178 continue;
179 } else if(!(rob.rod_source_id()>>12& 0x0F) //0xnn0nnn must be
180 && !((rob.rod_source_id()>>20) == 4) ){ //0x4nnnnn must be
181
182 ATH_MSG_WARNING("Found not LAr fragment " << " event: "<<ctx.eventID().event_number());
183 SG::ReadHandle<xAOD::EventInfo> eventInfo (m_eventInfoKey, ctx);
184 ATH_MSG_WARNING("Rob source id.: 0x"<< std::hex << rob.rob_source_id () <<std::dec <<" ROD Source id: 0x"<<std::hex<<rob.rod_source_id()<<std::dec<<" Lvl1ID: "<<eventInfo->extendedLevel1ID());
185 continue;
186 }
187
188
189 eformat::helper::Version ver(rob.rod_version());
190 //(re-)init rodBlock only once per event or if (very unlikly or even impossible) some FEBs have a different firmware
191 if (rodBlock==nullptr || rodMinorVersion !=ver.minor_version() || rodBlockType!=(rob.rod_detev_type()&0xff)) {
192 rodMinorVersion=ver.minor_version();
193 rodBlockType=rob.rod_detev_type()&0xff;
194 ATH_MSG_VERBOSE("Found version " << rodMinorVersion << " of Rod Block Type " << rodBlockType);
195 if (rodBlockType==4) { //Physics mode
196 switch(rodMinorVersion) {
197 case 12: //Physics mode v6 09.03.2011 for LHC
198 rodBlock.reset(new LArRodBlockPhysicsV6 (this->msgSvc().get()));
199 break;
200 case 11: //Physics mode v5 16.06.2008 for LHC
201 case 10: //Physics mode v5 16.06.2008 for LHC
202 rodBlock.reset(new LArRodBlockPhysicsV5 (this->msgSvc().get()));
203 break;
204 default: // Unknown version of rod block type 4 (Physics mode)
205 if (m_failOnCorruption) {
206 ATH_MSG_ERROR("Found unsupported ROD Block version " << rodMinorVersion
207 << " of ROD block type " << rodBlockType << ". ROD Source id: 0x" <<std::hex<<rob.rod_source_id());
208 return StatusCode::FAILURE;
209 }
210 else {
211 ATH_MSG_WARNING("Found unsupported ROD Block version " << rodMinorVersion
212 << " of ROD block type " << rodBlockType << ". ROD Source id: 0x" <<std::hex<<rob.rod_source_id());
213 continue;
214 }
215 }// end switch(rodMinorVersion)
216 }//end rodBlockType==4 (physics mode)
217 else if (rodBlockType==2) { //Transparent mode
218 switch(rodMinorVersion) {
219 case 4:
220 rodBlock.reset(new LArRodBlockTransparentV0<LArRodBlockHeaderTransparentV0> (this->msgSvc().get()));
221 break;
222 case 12:
223 rodBlock.reset(new LArRodBlockCalibrationV3 (this->msgSvc().get()));
224 break;
225 default:
226 ATH_MSG_WARNING("Found unsupported ROD Block version " << rodMinorVersion
227 << " of ROD block type " << rodBlockType);
228 return m_failOnCorruption ? StatusCode::FAILURE : StatusCode::SUCCESS;
229 }
230 }
231 }//End if need to re-init RodBlock
232
233 const uint32_t* pData=rob.rod_data();
234 const uint32_t nData=rob.rod_ndata();
235 if (nData==0) {
236 if (m_failOnCorruption) {
237 ATH_MSG_ERROR("ROD 0x"<<std::hex<<rob.rod_source_id() << std::dec << " reports data block size 0");
238 return StatusCode::FAILURE;
239 }
240 else {
241 ATH_MSG_WARNING("ROD 0x"<<std::hex<<rob.rod_source_id() << std::dec << " reports data block size 0");
242 continue; //Jump to next ROD
243 }
244 }
245
246 if (!rodBlock || !rodBlock->setFragment(pData,nData)) {
247 if (m_failOnCorruption) {
248 ATH_MSG_ERROR("Failed to assign fragment pointer to LArRodBlockStructure");
249 return StatusCode::FAILURE;
250 }
251 else {
252 ATH_MSG_WARNING("Failed to assign fragment pointer to LArRodBlockStructure");
253 continue; // Jump to next ROD
254 }
255 }
256
257 if(m_verifyChecksum) {
258 const uint32_t onsum = rodBlock->onlineCheckSum();
259 const uint32_t offsum = rodBlock->offlineCheckSum();
260 if(onsum!=offsum) {
261 if (m_failOnCorruption) {
262 ATH_MSG_ERROR("Checksum error:");
263 ATH_MSG_ERROR("online checksum = 0x" << MSG::hex << onsum);
264 ATH_MSG_ERROR("offline checksum = 0x" << MSG::hex << offsum << MSG::dec);
265 return StatusCode::FAILURE;
266 } else {
267 continue; //Jump to the next ROD-block
268 }
269 }
270 }
271
272 //Loop over FEBs in ROD:
273 do {
274 HWIdentifier fId(Identifier32(rodBlock->getFEBID()));
275 if (!m_onlineId->isValidId(fId)) {
276 if (m_failOnCorruption){
277 ATH_MSG_ERROR("Invalid FEB identifer 0x" << std::hex << fId.get_identifier32().get_compact());
278 return StatusCode::FAILURE;
279 } else {
280 ATH_MSG_WARNING("Invalid FEB identifer 0x" << std::hex << fId.get_identifier32().get_compact());
281 continue; //Jump to next FEB
282 }
283 }
284
285 if (m_vFinalPreselection.size()) {
286 const auto ftId=m_onlineId->feedthrough_Id(fId);
287 if (m_vFinalPreselection.find(ftId)==m_vFinalPreselection.end()) {
288 ATH_MSG_DEBUG("Feedthrough with id " << MSG::hex << ftId << MSG::dec <<" not in preselection. Ignored.");
289 continue;
290 } else {
291 ATH_MSG_DEBUG("Feedthrough with id " << MSG::hex << ftId << MSG::dec <<" is preselected.");
292 }
293 }
294
295 const int NthisFebChannel=m_onlineId->channelInSlotMax(fId);
296
297 //Decode RawChanels (if requested)
298 if (m_doRawChannels) {
299 int32_t energy;
300 int32_t time;
301 int32_t quality;
303 int fcNb;
304 while (rodBlock->getNextEnergy(fcNb,energy,time,quality,gain)) {
305 if (fcNb>=NthisFebChannel)
306 continue;
307
308 HWIdentifier cId = m_onlineId->channel_Id(fId,fcNb);
309 uint16_t iquality = 0;
310 uint16_t iprovenance = LArProv::DSPCALC; //0x1000
311 if (quality>0) {
312 iprovenance |= LArProv::QTPRESENT; //0x2000
313 iquality = (quality & 0xFFFF);
314 }
315 rawChannels->emplace_back(cId, energy, time, iquality, iprovenance, (CaloGain::CaloGain)gain);
316 }//end getNextEnergyLoop
317 }//end if m_doRawChannels
318
319 //Decode LArDigits (if requested)
320 if (m_doDigits) {
322 int fcNb;
323 std::vector<short> samples;
324 while (rodBlock->getNextRawData(fcNb,samples,gain)) {
325 if (fcNb>=NthisFebChannel)
326 continue;
327 if (samples.size()==0) continue; // Ignore missing cells
328 HWIdentifier cId = m_onlineId->channel_Id(fId,fcNb);
329 digits->emplace_back(new LArDigit(cId, (CaloGain::CaloGain)gain, std::move(samples)));
330 samples.clear();
331 }//end getNextRawData loop
332 }//end if m_doDigits
333
334 //Decode FebHeaders (if requested)
335 if (m_doFebHeaders) {
336 std::unique_ptr<LArFebHeader> larFebHeader(new LArFebHeader(fId));
337 LArFebHeaderReader::fillFebHeader(larFebHeader.get(),rodBlock.get(),rob);
338 febHeaders->push_back(std::move(larFebHeader));
339 }//end if m_doFebHeaders
340
341 }while (rodBlock->nextFEB()); //Get NextFeb
342 } //end loop over ROBs
343 return StatusCode::SUCCESS;
344}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_WARNING(x,...)
#define ATH_MSG_VERBOSE(x,...)
Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Old LArRawChannelContainer
Definition LArTPCnv.cxx:86
OFFLINE_FRAGMENTS_NAMESPACE::FullEventFragment RawEvent
data type for reading raw event
Definition RawEvent.h:37
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
value_type emplace_back(value_type pElem)
Add an element to the end of the collection.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
std::set< HWIdentifier > m_vFinalPreselection
BooleanProperty m_failOnCorruption
SG::WriteHandleKey< LArRawChannelContainer > m_rawChannelKey
const LArOnlineID * m_onlineId
ServiceHandle< IROBDataProviderSvc > m_robDataProviderSvc
SG::WriteHandleKey< LArFebHeaderContainer > m_febHeaderKey
BooleanProperty m_verifyChecksum
SG::WriteHandleKey< LArDigitContainer > m_digitKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition hcg.cxx:132
time(flags, cells_name, *args, **kw)
void fillFebHeader(LArFebHeader *lfh, const LArRodBlockStructure *bl, const ROBFragment &robFrag)
Fill info for one FEB Header.
eformat::ROBFragment< PointerType > ROBFragment
Definition RawEvent.h:27
setWord1 uint16_t
setEventNumber uint32_t

◆ 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 & AthCommonAlgorithm< 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 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ filterPassed()

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

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ initialize()

StatusCode LArRawDataReadingAlg::initialize ( )
override

Definition at line 24 of file LArRawDataReadingAlg.cxx.

24 {
27
28 m_doDigits = !m_digitKey.empty();
29 ATH_CHECK(m_digitKey.initialize(m_doDigits));
30
33
34 ATH_CHECK(m_eventInfoKey.initialize() );
35
37 ATH_CHECK(detStore()->retrieve(m_onlineId,"LArOnlineID"));
38 //
39 //Fill FT list if only Barrel/EC and side is given:
40 if (m_vBEPreselection.size() && m_vPosNegPreselection.size() && m_vFTPreselection.size()==0) {
41 std::set<unsigned> fts;
42 if (std::find(m_vBEPreselection.begin(),m_vBEPreselection.end(),0)!=m_vBEPreselection.end()) { //Barrel selected
43 fts.insert({0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31});
44 }
45 if (std::find(m_vBEPreselection.begin(),m_vBEPreselection.end(),1)!=m_vBEPreselection.end()) { //Endcap selected
46 fts.insert({0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24});
47 }
48 m_vFTPreselection.value().insert(m_vFTPreselection.begin(),fts.begin(),fts.end());
49 }
50
51 //Build list of preselected Feedthroughs
52 if (m_vBEPreselection.size() && m_vPosNegPreselection.size() && m_vFTPreselection.size()) {
53 ATH_MSG_INFO("Building list of selected feedthroughs");
54 for (const unsigned iBE : m_vBEPreselection) {
55 for (const unsigned iPN: m_vPosNegPreselection) {
56 for (const unsigned iFT: m_vFTPreselection) {
57 HWIdentifier finalFTId=m_onlineId->feedthrough_Id(iBE,iPN,iFT);
58 //unsigned int finalFTId32 = finalFTId.get_identifier32().get_compact();
59 ATH_MSG_INFO("Adding feedthrough Barrel/Endcap=" << iBE << " pos/neg=" << iPN << " FT=" << iFT
60 //<< " (0x" << std::hex << finalFTId.get_identifier32().get_compact() << std::dec << ")");
61 << " " << std::hex << finalFTId << std::dec << ")");
62 m_vFinalPreselection.insert(finalFTId);
63 }
64 }
65 }
66 }//end if something set
67
68 if (!m_subCaloPreselection.value().empty()) {
69 ATH_MSG_INFO("Adding list of selected subcalo"<<m_subCaloPreselection.value());
70 std::set<HWIdentifier> subcaloFTs;
71 if (m_subCaloPreselection.value().compare("EM")==0) {
72 for (auto febid : m_onlineId->feb_range()) {
73 if (m_onlineId->isEMBchannel(febid) || m_onlineId->isEMECchannel(febid)) {
74 subcaloFTs.insert(m_onlineId->feedthrough_Id(febid));
75 }
76 }
77 }
78 else if (m_subCaloPreselection.value().find("HEC")!=std::string::npos || m_subCaloPreselection.value().find("FCAL")!=std::string::npos) {
79 if (m_subCaloPreselection.value().find("HEC")!=std::string::npos) {
80 for (auto febid : m_onlineId->feb_range()) {
81 if (m_onlineId->isHECchannel(febid)) {
82 subcaloFTs.insert(m_onlineId->feedthrough_Id(febid));
83 }
84 }
85 }
86 if (m_subCaloPreselection.value().find("FCAL")!=std::string::npos) {
87 for (auto febid : m_onlineId->feb_range()) {
88 if (m_onlineId->isFCALchannel(febid)) {
89 subcaloFTs.insert(m_onlineId->feedthrough_Id(febid));
90 }
91 }
92 }
93 } else {
94 ATH_MSG_ERROR("Configuration problem, property 'SubCaloPreselection' set to " << m_subCaloPreselection.value() << ", expect 'EM', 'HEC' or 'FCAL'");
95 return StatusCode::FAILURE;
96 }
97 ATH_MSG_INFO("set sizes:" << subcaloFTs.size() << ", " << m_vFinalPreselection.size());
98 if (m_vFinalPreselection.size()>0) {
99 //Form the intersection of the preselection give as subdet and side/FT/slot
100 for(auto it = m_vFinalPreselection.begin(); it != m_vFinalPreselection.end(); ) {
101 if (subcaloFTs.find(*it)==subcaloFTs.end())
102 it=m_vFinalPreselection.erase(it);
103 else
104 ++it;
105 }
106 if (m_vFinalPreselection.empty()) {
107 ATH_MSG_WARNING("Apparently inconistent configuration of FT preselections. No preselection left after intersecting 'SubCaloPreselection' with 'PosNeg/BE/FT' preselection");
108 }
109 }
110 else {
111 m_vFinalPreselection.swap(subcaloFTs);
112 }
113 }//end if subCaloPreselection set
114
115 if (!m_vFinalPreselection.empty()) {
116 ATH_MSG_INFO("Give pre-selection covers " << m_vFinalPreselection.size() << " feedthroughts. first is: "<< MSG::hex << *(m_vFinalPreselection.begin()) << MSG::dec <<" Will ignore bytestream data from other feedthroughs.");
117 }
118
119 return StatusCode::SUCCESS;
120}
#define ATH_MSG_INFO(x,...)
const ServiceHandle< StoreGateSvc > & detStore() const
Gaudi::Property< std::vector< unsigned > > m_vPosNegPreselection
Gaudi::Property< std::vector< unsigned > > m_vBEPreselection
Gaudi::Property< std::string > m_subCaloPreselection
Gaudi::Property< std::vector< unsigned > > m_vFTPreselection

◆ 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()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ 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.

◆ 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 368 of file AthCommonDataStore.h.

369 {
370 h.renounce();
372 }
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 352 of file AthCommonDataStore.h.

352 {
354 }

◆ setFilterPassed()

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

Set filter decision:

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ sysExecute()

StatusCode AthCommonAlgorithm< 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.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< 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 AthAnalysisAlgorithm, AthHistogramAlgorithm, HypoBase, InputMakerBase, and PyAthena::Alg.

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
virtual StatusCode sysInitialize() override
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 298 of file AthCommonDataStore.h.

298 {
299 for (auto &a : m_vhka) {
301 for (auto k : keys) {
302 k->setOwner(this);
303 }
304 }
305 }

Member Data Documentation

◆ m_detStore

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

Pointer to StoreGate (detector store by default).

Definition at line 381 of file AthCommonDataStore.h.

◆ m_digitKey

SG::WriteHandleKey<LArDigitContainer> LArRawDataReadingAlg::m_digitKey {this,"LArDigitKey","FREE"}
private

Definition at line 37 of file LArRawDataReadingAlg.h.

37{this,"LArDigitKey","FREE"};

◆ m_doDigits

bool LArRawDataReadingAlg::m_doDigits =true
private

Definition at line 62 of file LArRawDataReadingAlg.h.

◆ m_doFebHeaders

bool LArRawDataReadingAlg::m_doFebHeaders =true
private

Definition at line 63 of file LArRawDataReadingAlg.h.

◆ m_doRawChannels

bool LArRawDataReadingAlg::m_doRawChannels =true
private

Definition at line 61 of file LArRawDataReadingAlg.h.

◆ m_eventInfoKey

SG::ReadHandleKey<xAOD::EventInfo> LArRawDataReadingAlg::m_eventInfoKey {this, "eventInfoKey", "EventInfo", "Key for EventInfo object"}
private

Definition at line 40 of file LArRawDataReadingAlg.h.

40{this, "eventInfoKey", "EventInfo", "Key for EventInfo object"};

◆ m_evtStore

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

Pointer to StoreGate (event store by default).

Definition at line 378 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

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

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

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_failOnCorruption

BooleanProperty LArRawDataReadingAlg::m_failOnCorruption {this,"FailOnCorruption",false,"Return FAILURE if data corruption is found"}
private

Definition at line 47 of file LArRawDataReadingAlg.h.

47{this,"FailOnCorruption",false,"Return FAILURE if data corruption is found"};

◆ m_febHeaderKey

SG::WriteHandleKey<LArFebHeaderContainer> LArRawDataReadingAlg::m_febHeaderKey {this,"LArFebHeaderKey","LArFebHeader"}
private

Definition at line 38 of file LArRawDataReadingAlg.h.

38{this,"LArFebHeaderKey","LArFebHeader"};

◆ m_onlineId

const LArOnlineID* LArRawDataReadingAlg::m_onlineId =nullptr
private

Definition at line 58 of file LArRawDataReadingAlg.h.

◆ m_rawChannelKey

SG::WriteHandleKey<LArRawChannelContainer> LArRawDataReadingAlg::m_rawChannelKey
private
Initial value:
{this,"LArRawChannelKey","LArRawChannels",
"SG key of the LArRawChannelContainer"}

Definition at line 35 of file LArRawDataReadingAlg.h.

35 {this,"LArRawChannelKey","LArRawChannels",
36 "SG key of the LArRawChannelContainer"};

◆ m_robDataProviderSvc

ServiceHandle<IROBDataProviderSvc> LArRawDataReadingAlg::m_robDataProviderSvc {this,"ROBDataProviderSvc","ROBDataProviderSvc"}
private

Definition at line 43 of file LArRawDataReadingAlg.h.

43{this,"ROBDataProviderSvc","ROBDataProviderSvc"};

◆ m_subCaloPreselection

Gaudi::Property<std::string> LArRawDataReadingAlg::m_subCaloPreselection {this,"SubCaloPreselection","","One of 'EM', 'HEC' or 'FCAL'"}
private

Definition at line 49 of file LArRawDataReadingAlg.h.

49{this,"SubCaloPreselection","","One of 'EM', 'HEC' or 'FCAL'"};

◆ m_varHandleArraysDeclared

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

Definition at line 387 of file AthCommonDataStore.h.

◆ m_vBEPreselection

Gaudi::Property<std::vector<unsigned> > LArRawDataReadingAlg::m_vBEPreselection {this,"BEPreselection",{},"For channel-selection: Barrel=0, Endcap=1"}
private

Definition at line 51 of file LArRawDataReadingAlg.h.

51{this,"BEPreselection",{},"For channel-selection: Barrel=0, Endcap=1"};

◆ m_verifyChecksum

BooleanProperty LArRawDataReadingAlg::m_verifyChecksum {this,"VerifyChecksum",true,"Calculate and compare checksums to detect data transmission errors"}
private

Definition at line 46 of file LArRawDataReadingAlg.h.

46{this,"VerifyChecksum",true,"Calculate and compare checksums to detect data transmission errors"};

◆ m_vFinalPreselection

std::set<HWIdentifier> LArRawDataReadingAlg::m_vFinalPreselection
private

Definition at line 55 of file LArRawDataReadingAlg.h.

◆ m_vFTPreselection

Gaudi::Property<std::vector<unsigned> > LArRawDataReadingAlg::m_vFTPreselection {this,"FTNumPreselection",{}, "For channel-selection: Feedthrough numbers (e.g. 0 - 31 for barrel)"}
private

Definition at line 53 of file LArRawDataReadingAlg.h.

53{this,"FTNumPreselection",{}, "For channel-selection: Feedthrough numbers (e.g. 0 - 31 for barrel)"};

◆ m_vhka

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

Definition at line 386 of file AthCommonDataStore.h.

◆ m_vPosNegPreselection

Gaudi::Property<std::vector<unsigned> > LArRawDataReadingAlg::m_vPosNegPreselection {this,"PosNegPreselection",{}, "For channel-selection: C-Side:0, A-Side: 1"}
private

Definition at line 52 of file LArRawDataReadingAlg.h.

52{this,"PosNegPreselection",{}, "For channel-selection: C-Side:0, A-Side: 1"};

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