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

This class provides conversion between ROD data and LArRawChannels. More...

#include <LArRodDecoder.h>

Inheritance diagram for LArRodDecoder:
Collaboration diagram for LArRodDecoder:

Public Member Functions

 LArRodDecoder (const std::string &type, const std::string &name, const IInterface *parent)
 Constructor Standard AlgTool constructor.
virtual ~LArRodDecoder ()
 Destructor.
virtual StatusCode initialize ATLAS_NOT_THREAD_SAFE () override
void setsecfeb (HWIdentifier feb)
uint32_t fillCollectionHLT (const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment &robFrag, const uint32_t *p, uint32_t n, LArCellCollection &coll, LArRodBlockStructure *&providedRodBlockStructure, uint16_t &rodMinorVersion, uint32_t &robBlockType) const
void fillCollection (const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment &robFrag, const uint32_t *p, uint32_t n, LArRawChannelContainer &coll, const CaloGain::CaloGain gain) const
template<class T>
bool check_valid (const T *frag, MsgStream &log) 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 sysInitialize () override
 Perform system initialization for an algorithm.
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

Static Public Member Functions

static const InterfaceID & interfaceID ()

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

LArRodBlockStructure * prepareBlockStructure1 (const uint16_t rodMinorVersion, const uint32_t robBlockType) const
LArRodBlockStructure * prepareBlockStructure (const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment &robFrag, const uint32_t *p, uint32_t n, const CaloGain::CaloGain RequestedGain) const
std::unique_ptr< LArRodBlockStructure > makeBlockStructure (unsigned int rodBlockType, unsigned int rodMinorVersion) const
void setCellEnergy (LArCell *element, int energy, int time, int quality, CaloGain::CaloGain gain) const
void writeFebInfo (LArCellCollection &m_coll, LArFebEnergy &febene) const
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

SG::ReadHandleKey< xAOD::EventInfo > m_evt {this, "EvtInfo", "EventInfo", "EventInfo name"}
float m_LArCellEthreshold
bool m_readtdc
bool m_febExchange
unsigned int m_febId1
unsigned int m_febId2
unsigned int m_febIdHLT = 0U
int m_firstSample
std::vector< int > m_vFTPreselection
std::vector< int > m_vBEPreselection
std::vector< int > m_vPosNegPreselection
std::vector< unsigned int > m_vFinalPreselection
uint32_t m_StatusMask
uint32_t m_StatusNMask = 0U
const LArOnlineID * m_onlineHelper
std::vector< std::string > m_LArCellCorrNames
std::vector< unsigned int > m_IgnoreCheckFEBs
std::vector< const CaloCellCorrection * > m_LArCellCorrTools
double m_delayScale
SG::SlotSpecificObj< std::vector< std::unique_ptr< LArRodBlockStructure > > > m_blstructs ATLAS_THREAD_SAFE
bool m_MultiDSPMode
bool m_CheckSum
unsigned short m_requiredPhysicsNSamples
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

This class provides conversion between ROD data and LArRawChannels.

Author
H. Ma
Version
0-0-1 , Oct 7, 2002

Modified, Dec 4, 2002 Create either LArRawChannel or LArCell.

Modified, Jan 02, 2003 Moved Encoding part to LArROD_Encoder.

Modified, Jul 23, 2003 by R. Lafaye Added LArDigit support Build on the same structure as LArROD_Encoder No longer an AlgTool

Modified, Aug 5 2003 by W. Lampl Have now functionality to decode:

Modified, Aug 7 2003 by W. Lampl Made a template-function for LArRawChannelCollection and LArRawCellCollection

Modified, Aug 17 2003 by W. Lampl Introduce ability to decode different ROD format versions by using a map of LArRodBlockStructures

Modified, Sept 9 2003 by W. Lampl Change implementation of multiple-version feature. A ROD block type/version is now written as second word of the fragment. Replace std::map by c-style array to increase performance

Modified, Sept 28 2003 by W. Lampl Adapt for new constructor of LArRawChannels. (Needs also gain as parameter)

Modified, November 10 2005 by D.O. Damazio Inclusion of new RodBlock format (Bertrand Laforge). Inclusion of methods for fast decoding of data.

Modified,January 04 2006 by I. Wingerter Inclusion of Accumulated Calib Digit

Modified, May 03 2006 by I. Aracena Inclusion of fillCollectionHLTFeb

Modified, Dec 03 2006 by G. Rosenbaum Loop over all possible pusled calib lines and make isPulsed int which stores which lines 1-4 have been pulsed. (needed for HEC)

Modified Aug 16 2009 by W. Lampl Remove internal accumlation of LArAccumulatedCalibDigit. They are now put in the event store for each substep and contain only data of this substep.

Definition at line 127 of file LArRodDecoder.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 376 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ LArRodDecoder()

LArRodDecoder::LArRodDecoder ( const std::string & type,
const std::string & name,
const IInterface * parent )

Constructor Standard AlgTool constructor.

Definition at line 26 of file LArRodDecoder.cxx.

27 : AthAlgTool(type,name,parent),
29 m_readtdc(false),
31 {
32 declareInterface< LArRodDecoder >( this );
33 declareProperty("IgnoreCheckFEBs",m_IgnoreCheckFEBs);
34 declareProperty("CellCorrections",m_LArCellCorrNames );
35 declareProperty("LArCellEthreshold",m_LArCellEthreshold );
36 declareProperty("ReadTDC",m_readtdc);
37 declareProperty("DelayScale",m_delayScale=(25./240.)*CLHEP::ns);
38 declareProperty("FebExchange", m_febExchange=0); //FIXME: Very ugly hack! See explanation in .h file
39 declareProperty("FebId1", m_febId1=0);
40 declareProperty("FebId2", m_febId2=0);
41 declareProperty("FirstSample", m_firstSample=0); //FIXME: Very ugly hack! See explanation in .h file
42
43 declareProperty("BEPreselection",m_vBEPreselection,"For channel-selection: Barrel=0, Endcap=1");
44 declareProperty("PosNegPreselection",m_vPosNegPreselection,"For channel-selection: C-Side:0, A-Side: 1");
45 declareProperty("FTNumPreselection",m_vFTPreselection,"For channel-selection: Feedthrough numbers (e.g. 0 - 31 for barrel)");
46 declareProperty("MultiDSPMode", m_MultiDSPMode=false);
47 declareProperty("CheckSum", m_CheckSum=false);
48 declareProperty("StatusMask", m_StatusMask=0x00000212);
49 declareProperty("RequiredPhysicsNSamples", m_requiredPhysicsNSamples = 0);
50}
AthAlgTool()
Default constructor:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
std::vector< std::string > m_LArCellCorrNames
std::vector< int > m_vFTPreselection
const LArOnlineID * m_onlineHelper
std::vector< unsigned int > m_IgnoreCheckFEBs
unsigned int m_febId1
float m_LArCellEthreshold
unsigned short m_requiredPhysicsNSamples
std::vector< int > m_vBEPreselection
unsigned int m_febId2
uint32_t m_StatusMask
std::vector< int > m_vPosNegPreselection

◆ ~LArRodDecoder()

LArRodDecoder::~LArRodDecoder ( )
virtual

Destructor.

Definition at line 53 of file LArRodDecoder.cxx.

54{
55}

Member Function Documentation

◆ ATLAS_NOT_THREAD_SAFE()

virtual StatusCode initialize LArRodDecoder::ATLAS_NOT_THREAD_SAFE ( )
overridevirtual

◆ check_valid()

template<class T>
bool LArRodDecoder::check_valid ( const T * frag,
MsgStream & log ) const
inline

Definition at line 215 of file LArRodDecoder.h.

216{
217 bool ret=false;
218 try {
219 ret=frag->check();
220 }
221 catch (eformat::Issue& ex) {
222 msg(MSG::WARNING) << "Exception while checking eformat fragment validity: " << ex.what() << endmsg;
223 ret=false;
224 }
225 return ret;
226
227}
#define endmsg
MsgStream & msg() const

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::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 }

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::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< AlgTool > >::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< AlgTool > >::evtStore ( )
inlineinherited

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

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::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

◆ fillCollection()

void LArRodDecoder::fillCollection ( const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment & robFrag,
const uint32_t * p,
uint32_t n,
LArRawChannelContainer & coll,
const CaloGain::CaloGain gain ) const

Definition at line 127 of file LArRodDecoder.cxx.

129{
130 int32_t energy;
131 int32_t time;
132 int32_t quality;
134 int fcNb;
135 HWIdentifier cId;
136 LArRodBlockStructure* BlStruct=prepareBlockStructure(robFrag, p, n, RequestedGain);
137 if (!BlStruct) return;
138
139 do {
140 HWIdentifier fId( Identifier32(BlStruct->getFEBID()) );
141 unsigned int fId32 = fId.get_identifier32().get_compact();
142 if (!m_onlineHelper->isValidId(fId)) {
143 ATH_MSG_WARNING("Invalid FEB identifer " << std::hex << fId32 << std::dec << ". Skipping");
144 continue;
145 }
146
147 if(m_febExchange) {
148 if (fId32 == m_febId1) {
149 fId = HWIdentifier(Identifier32(m_febId2));
150 fId32 = fId.get_identifier32().get_compact();
151 }
152 else if(fId32 == m_febId2) {
153 fId = HWIdentifier(Identifier32(m_febId1));
154 fId32 = fId.get_identifier32().get_compact();
155 }
156 }
157 if (!BlStruct->hasPhysicsBlock()) {
158 ATH_MSG_DEBUG("No Physics Data for this FEB - NULL event for FEBID 0x" << std::hex << BlStruct->getFEBID() << std::dec);
159 continue;
160 }
161
162 // RL 04.17.2008 skip check for some FEBs
163 int do_check=1;
164 std::vector<unsigned int>::const_iterator it_feb = m_IgnoreCheckFEBs.begin();
165 std::vector<unsigned int>::const_iterator it_feb_end = m_IgnoreCheckFEBs.end();
166 for(; it_feb!=it_feb_end;++it_feb)
167 if(fId==*it_feb) {
168 do_check=0;
169 break;
170 }
171 if(do_check) {
172 //WL 31.10.2007 //check RodStatus-word to catch corrupt events
173 if (BlStruct->getStatus() & m_StatusNMask) {
174 ATH_MSG_WARNING("RodStatus&0x" << std::hex << m_StatusNMask << " indicates corrupt data for FEB "<< std::hex << fId32 << std::dec <<". Ignored.");
175 continue;
176 }
177 }
178
179 // RL 05.11.2007 checksum
180 if(m_CheckSum) {
181 const uint32_t onsum = BlStruct->onlineCheckSum();
182 const uint32_t offsum = BlStruct->offlineCheckSum();
183 if(onsum!=offsum) {
184 ATH_MSG_WARNING("Checksum error:");
185 ATH_MSG_WARNING(" online checksum = " << MSG::hex << onsum);
186 ATH_MSG_WARNING(" offline checksum = " << MSG::hex << offsum);
187 continue;
188 }
189 }
190
191 if (m_vFTPreselection.size()) {
192 int ftId=m_onlineHelper->feedthrough_Id(fId).get_identifier32().get_compact();
193 if (!std::binary_search(m_vFTPreselection.begin(), m_vFTPreselection.end(),ftId)) {
194 ATH_MSG_DEBUG("Feedthrough with id " << std::hex << ftId << std::dec <<" not in preselection. Ignored.");
195 continue;
196 }
197 }
198 const int NthisFebChannel=m_onlineHelper->channelInSlotMax(fId);
199 while (BlStruct->getNextEnergy(fcNb,energy,time,quality,gain)) {
200 if (fcNb>=NthisFebChannel)
201 continue;
202 cId = m_onlineHelper->channel_Id(fId,fcNb);
203 uint16_t iquality = 0;
204 uint16_t iprovenance = 0x1000;
205 if (quality>0) {
206 iprovenance |= 0x2000;
207 iquality = (quality & 0xFFFF);
208 }
209 LArRawChannel chan(cId, energy, time, iquality, iprovenance, (CaloGain::CaloGain)gain);
210 coll.push_back(chan);
211 }
212 }
213 while (BlStruct->nextFEB()); //Get NextFeb
214}
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_WARNING(x,...)
virtual uint32_t hasPhysicsBlock() const
virtual int getNextEnergy(int &channelNumber, int32_t &energy, int32_t &time, int32_t &quality, uint32_t &gain)
virtual uint32_t offlineCheckSum() const
virtual uint32_t getStatus() const
virtual uint32_t onlineCheckSum() const
uint32_t m_StatusNMask
LArRodBlockStructure * prepareBlockStructure(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment &robFrag, const uint32_t *p, uint32_t n, const CaloGain::CaloGain RequestedGain) const
time(flags, cells_name, *args, **kw)
setWord1 uint16_t
setEventNumber uint32_t

◆ fillCollectionHLT()

uint32_t LArRodDecoder::fillCollectionHLT ( const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment & robFrag,
const uint32_t * p,
uint32_t n,
LArCellCollection & coll,
LArRodBlockStructure *& providedRodBlockStructure,
uint16_t & rodMinorVersion = rMV,
uint32_t & robBlockType = rBT ) const
inline

Definition at line 233 of file LArRodDecoder.h.

237{
238 LArCell *collElem=0; //Pointer to a new element to be added to the collection
239 uint32_t error = 0;
240
241#ifndef NDEBUG
242 ATH_MSG_VERBOSE("Prepare LArRodBlockStructure. Got a fragment of size " << n);
243#endif
244 const uint32_t blocksize=p[0]; //First word contains block size
245 if (blocksize>n) {
246 msg(MSG::ERROR) << "Got truncated ROD Fragment!" << endmsg;
247 // First Bit is truncated (see also below)
248 error|= 0x1;
249 return error;
250 }
251
252 //Get version and blocktype form header
253 eformat::helper::Version ver(robFrag.rod_version());
254 const uint16_t rMV_present=ver.minor_version();
255 const uint32_t rBT_present=robFrag.rod_detev_type()&0xff;
256
257 LArRodBlockStructure* BlStruct(nullptr);
258 if ( !providedRodBlockStructure || (rodMinorVersion!=rMV_present) || (robBlockType!=rBT_present) ){
259 BlStruct = prepareBlockStructure1 (rMV_present, rBT_present);
260 if (!BlStruct) {
261 // Second Bit is block empty or unknown
262 error|= 0x2;
263 return error;
264 }
265 providedRodBlockStructure = BlStruct;
266 rodMinorVersion = rMV_present;
267 robBlockType = rBT_present;
268 } else BlStruct = providedRodBlockStructure;
269
270 BlStruct->setFragment(p,n);
271 for(LArCellCollection::iterator ii=coll.begin();ii!=coll.end();++ii)
272 (*ii)->setEnergyFast(0.0);
273
274 int32_t energy(0);
275 int32_t time;
276 int32_t quality;
278 CaloGain::CaloGain calogain;
279 int fcNb;
280 int nfeb;
281 calogain=CaloGain::LARNGAIN;
282 if(!BlStruct->setGain(calogain)){
283 ATH_MSG_DEBUG("Setting the Gain Problem");
284 }
285
286 int feb_number=0;
287 do //Loop over FEB's
288 {
289 HWIdentifier fId(BlStruct->getFEBID());
290 if (!(fId.get_identifier32().get_compact())) {
291#ifndef NDEBUG
292 ATH_MSG_DEBUG("Bad FebID=0x"<< std::hex << BlStruct->getFEBID() << std::dec << " found for this FEB, skipping it!");
293#endif
294 // Third Bit is FEB ID issue (disabled - use 0x20 instead)
295 //error|= 0x4;
296 continue;
297 }
298 // RL 05.11.2007 checksum
299 if(m_CheckSum) {
300 uint32_t onsum = BlStruct->onlineCheckSum();
301 uint32_t offsum = BlStruct->offlineCheckSum();
302 if(onsum!=offsum) {
303 msg(MSG::WARNING) << "Checksum error:" << endmsg;
304 msg(MSG::WARNING) << " online checksum = 0x" << MSG::hex << onsum << endmsg;
305 msg(MSG::WARNING) << " offline checksum = 0x" << MSG::hex << offsum << MSG::dec << endmsg;
306 // Fourth Bit CheckSum issue (maybe disabled!)
307 error|= 0x8;
308 continue;
309 }
310 }
311 feb_number++;
312
313 if ( BlStruct->hasPhysicsBlock() ) {
314 if ( fId == m_febIdHLT ) nfeb = 128; // This is the second feb
315 else nfeb = 0;
316 int NthisFebChannel=128 ; // m_onlineHelper->channelInSlotMax(fId);
317 uint16_t iquality;
318 uint16_t iprovenance;
319 while (BlStruct->getNextEnergy(fcNb,energy,time,quality,gain)) {
320 if (fcNb>=NthisFebChannel) continue;
321 collElem = coll[fcNb+nfeb];
322 iprovenance=0x1000; // data comes from DSP computation
323 iquality=0;
324 if ( quality>=0 ) { iprovenance|= 0x2000; iquality=(quality& 0xffff);}
325 // time converted to ns
326 collElem->set(energy, time*1e-3, iquality, iprovenance, (CaloGain::CaloGain)gain);
327 }
328 continue;
329 }
330 }
331 while (BlStruct->nextFEB()); //Get NextFeb
332 // Error meaning data corruption. Maybe in any FEB
333 if ( BlStruct->report_error() ) error |= 0x1;
334 // error of uncompatible number of cells is bit 5
335 unsigned int collection_size = coll.size();
336 if ( feb_number== 0 && collection_size>0 ) error |= 0x20;
337 if ( feb_number== 1 && collection_size !=128 ) error |= 0x20;
338 if ( feb_number== 2 && collection_size !=256 ) error |= 0x20;
339 return error;
340}
#define ATH_MSG_VERBOSE(x,...)
void set(const CaloDetDescrElement *caloDDE, const Identifier &ID)
Fast method to change the identity of a cell.
Definition CaloCell.h:511
DataModel_detail::iterator< DataVector > iterator
Definition DataVector.h:865
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.
size_type size() const noexcept
Returns the number of elements in the collection.
bool setFragment(const uint32_t *p, uint32_t n)
unsigned int m_febIdHLT
LArRodBlockStructure * prepareBlockStructure1(const uint16_t rodMinorVersion, const uint32_t robBlockType) const
@ LARNGAIN
Definition CaloGain.h:19

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::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.

◆ interfaceID()

const InterfaceID & LArRodDecoder::interfaceID ( )
static

Definition at line 57 of file LArRodDecoder.cxx.

58{ return IID_ILArRodDecoder; }
static const InterfaceID IID_ILArRodDecoder("LArRodDecoder", 1, 0)

◆ makeBlockStructure()

std::unique_ptr< LArRodBlockStructure > LArRodDecoder::makeBlockStructure ( unsigned int rodBlockType,
unsigned int rodMinorVersion ) const
private

Definition at line 293 of file LArRodDecoder.cxx.

295{
296 switch (rodBlockType) {
297 case 2:
298 break;
299
300 case 3:
301 // RodBlockType 3 = Test mode
302 //return std::make_unique<LArRodBlockTransparentV0<LArRodBlockHeaderTransparentV0> >(this->msgSvc().get());
303 break;
304
305 case 4:
306 // RodBlockType 4 = Physics mode
307 switch (rodMinorVersion) {
308 case 10: // Physics mode v5 16.06.2008 for LHC
309 case 11: // Physics mode v5 16.06.2008 for LHC
310 {
311 auto bl = std::make_unique<LArRodBlockPhysicsV5>(this->msgSvc().get());
313 bl->setRequiredNSamples(m_requiredPhysicsNSamples);
314 }
315 return bl;
316 }
317 case 12: // Physics mode v5 09.03.2011 for LHC
318 {
319 auto bl = std::make_unique<LArRodBlockPhysicsV6>(this->msgSvc().get());
321 bl->setRequiredNSamples(m_requiredPhysicsNSamples);
322 }
323 return bl;
324 }
325 default:
326 break;
327 }
328 break;
329
330 case 5:
331 // RodBlockType 5 = Physics simulation mode
332 // Physics mode v3 11.04.2005 for simulation
333 //return std::make_unique<LArRodBlockPhysicsV3>(this->msgSvc().get());
334 break;
335
336 case 6:
337 // RodBlockType 6 = Physics test mode
338 break;
339
340 case 7:
341 // RodBlockType 7 = Calibration mode
342 break;
343
344 case 10:
345 // RodBlockType 10 = Accumulated mode (used for pre-processed pedestal runs)
346 // Accumulated mode v3 10.06.2008
347 //return std::make_unique<LArRodBlockAccumulatedV3>(this->msgSvc().get());
348 break;
349
350 default:
351 break;
352 }
353
354 return std::unique_ptr<LArRodBlockStructure>();
355}
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition hcg.cxx:132

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

bool AthCommonMsg< AlgTool >::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< AlgTool > >::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.

◆ prepareBlockStructure()

LArRodBlockStructure * LArRodDecoder::prepareBlockStructure ( const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment & robFrag,
const uint32_t * p,
uint32_t n,
const CaloGain::CaloGain RequestedGain ) const
private

Definition at line 252 of file LArRodDecoder.cxx.

254{
255#ifndef NDEBUG
256 ATH_MSG_DEBUG("Prepare LArRodBlockStructure. Got a fragement of size " << n);
257#endif
258
259 //Get version and blocktype form header
260 eformat::helper::Version ver(robFrag.rod_version());
261 const uint16_t rodMinorVersion=ver.minor_version();
262 const uint32_t rodBlockType=robFrag.rod_detev_type()&0xff;
263 LArRodBlockStructure* BlStruct = prepareBlockStructure1 (rodMinorVersion, rodBlockType);
264 if (!BlStruct) {
265 return nullptr;
266 }
267
268 if (!BlStruct->setFragment(p,n)) {
269 constexpr int maxMess = 100;
270 static std::atomic<int> nMess = 1;
271 int thismess = nMess++;
272 if (thismess <= maxMess) {
273 ATH_MSG_ERROR("Could not set fragment (wrong number of samples in data ?) - container will not be filled");
274 if (thismess == maxMess)
275 ATH_MSG_ERROR("This message will not be repeated");
276 }
277 return NULL;
278 }
279#ifndef NDEBUG
280 ATH_MSG_VERBOSE("Set Fragment at address "<< &(p[0]) << " " << p[5]);
281#endif
282
283 BlStruct->setGain(RequestedGain); //Will be ignored if BlockStructure does not support fixed gains.
284 //FIXME: Very ugly hack! See explanation in LArRodDecoder.h
285 if (m_firstSample) {
286 BlStruct->setFirstSample(m_firstSample);
287 }
288 return BlStruct;
289}
#define ATH_MSG_ERROR(x,...)
virtual int setGain(const int GainValue)
void setFirstSample(const int rearrangeFirstSample)

◆ prepareBlockStructure1()

LArRodBlockStructure * LArRodDecoder::prepareBlockStructure1 ( const uint16_t rodMinorVersion,
const uint32_t robBlockType ) const
private

Definition at line 218 of file LArRodDecoder.cxx.

219{
220 const unsigned MAXMINOR = 12;
221 const unsigned MAXTYPE = 10;
222
223 if (rodMinorVersion > MAXMINOR || robBlockType > MAXTYPE) {
224 ATH_MSG_ERROR("Bad Rod block type " << robBlockType
225 << " / " << rodMinorVersion);
226 return nullptr;
227 }
228 std::vector<std::unique_ptr<LArRodBlockStructure> >& blstructs =
229 *m_blstructs.get();
230 unsigned int index = robBlockType * (MAXMINOR+1) + rodMinorVersion;
231 if (blstructs.empty()) {
232 blstructs.resize ((MAXMINOR+1)*(MAXTYPE+1));
233 }
234 if (!blstructs[index]) {
235 blstructs[index] = makeBlockStructure (robBlockType, rodMinorVersion);
236 }
237 if (!blstructs[index]) {
238 ATH_MSG_ERROR("Bad Rod block type " << robBlockType
239 << " / " << rodMinorVersion);
240 return nullptr;
241 }
242
243#ifndef NDEBUG
244 ATH_MSG_DEBUG("Found version " << rodMinorVersion << " of Rod block type " << robBlockType);
245#endif
246
247 return blstructs[index].get();
248}
std::unique_ptr< LArRodBlockStructure > makeBlockStructure(unsigned int rodBlockType, unsigned int rodMinorVersion) const
str index
Definition DeMoScan.py:362

◆ 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< AlgTool > >::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< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 352 of file AthCommonDataStore.h.

352 {
354 }

◆ setCellEnergy()

void LArRodDecoder::setCellEnergy ( LArCell * element,
int energy,
int time,
int quality,
CaloGain::CaloGain gain ) const
inlineprivate

Definition at line 342 of file LArRodDecoder.h.

345{
346 // Set energy, time, quality and hardware gain
347 element->set((float)energy, (float)time, (double)quality, gain);
348}

◆ setsecfeb()

void LArRodDecoder::setsecfeb ( HWIdentifier feb)
inline

Definition at line 145 of file LArRodDecoder.h.

value_type get_compact() const
Get the compact id.
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, and AthCheckedComponent<::AthAlgTool >.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::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< AlgTool > >::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 }
std::vector< SG::VarHandleKeyArray * > m_vhka

◆ writeFebInfo()

void LArRodDecoder::writeFebInfo ( LArCellCollection & m_coll,
LArFebEnergy & febene ) const
inlineprivate

Definition at line 350 of file LArRodDecoder.h.

352 {
353 coll.addfebenergy(febene);
354 }

Member Data Documentation

◆ ATLAS_THREAD_SAFE

SG::SlotSpecificObj<std::vector<std::unique_ptr<LArRodBlockStructure> > > m_blstructs LArRodDecoder::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 207 of file LArRodDecoder.h.

◆ m_CheckSum

bool LArRodDecoder::m_CheckSum
private

Definition at line 210 of file LArRodDecoder.h.

◆ m_delayScale

double LArRodDecoder::m_delayScale
private

Definition at line 205 of file LArRodDecoder.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 381 of file AthCommonDataStore.h.

◆ m_evt

SG::ReadHandleKey<xAOD::EventInfo> LArRodDecoder::m_evt {this, "EvtInfo", "EventInfo", "EventInfo name"}
private

Definition at line 181 of file LArRodDecoder.h.

181{this, "EvtInfo", "EventInfo", "EventInfo name"};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 378 of file AthCommonDataStore.h.

◆ m_febExchange

bool LArRodDecoder::m_febExchange
private

Definition at line 184 of file LArRodDecoder.h.

◆ m_febId1

unsigned int LArRodDecoder::m_febId1
private

Definition at line 185 of file LArRodDecoder.h.

◆ m_febId2

unsigned int LArRodDecoder::m_febId2
private

Definition at line 185 of file LArRodDecoder.h.

◆ m_febIdHLT

unsigned int LArRodDecoder::m_febIdHLT = 0U
private

Definition at line 185 of file LArRodDecoder.h.

◆ m_firstSample

int LArRodDecoder::m_firstSample
private

Definition at line 187 of file LArRodDecoder.h.

◆ m_IgnoreCheckFEBs

std::vector<unsigned int> LArRodDecoder::m_IgnoreCheckFEBs
private

Definition at line 202 of file LArRodDecoder.h.

◆ m_LArCellCorrNames

std::vector<std::string> LArRodDecoder::m_LArCellCorrNames
private

Definition at line 201 of file LArRodDecoder.h.

◆ m_LArCellCorrTools

std::vector<const CaloCellCorrection*> LArRodDecoder::m_LArCellCorrTools
private

Definition at line 203 of file LArRodDecoder.h.

◆ m_LArCellEthreshold

float LArRodDecoder::m_LArCellEthreshold
private

Definition at line 182 of file LArRodDecoder.h.

◆ m_MultiDSPMode

bool LArRodDecoder::m_MultiDSPMode
private

Definition at line 209 of file LArRodDecoder.h.

◆ m_onlineHelper

const LArOnlineID* LArRodDecoder::m_onlineHelper
private

Definition at line 200 of file LArRodDecoder.h.

◆ m_readtdc

bool LArRodDecoder::m_readtdc
private

Definition at line 183 of file LArRodDecoder.h.

◆ m_requiredPhysicsNSamples

unsigned short LArRodDecoder::m_requiredPhysicsNSamples
private

Definition at line 211 of file LArRodDecoder.h.

◆ m_StatusMask

uint32_t LArRodDecoder::m_StatusMask
private

Definition at line 199 of file LArRodDecoder.h.

◆ m_StatusNMask

uint32_t LArRodDecoder::m_StatusNMask = 0U
private

Definition at line 199 of file LArRodDecoder.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 387 of file AthCommonDataStore.h.

◆ m_vBEPreselection

std::vector<int> LArRodDecoder::m_vBEPreselection
private

Definition at line 196 of file LArRodDecoder.h.

◆ m_vFinalPreselection

std::vector<unsigned int> LArRodDecoder::m_vFinalPreselection
private

Definition at line 198 of file LArRodDecoder.h.

◆ m_vFTPreselection

std::vector<int> LArRodDecoder::m_vFTPreselection
private

Definition at line 195 of file LArRodDecoder.h.

◆ m_vhka

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

Definition at line 386 of file AthCommonDataStore.h.

◆ m_vPosNegPreselection

std::vector<int> LArRodDecoder::m_vPosNegPreselection
private

Definition at line 197 of file LArRodDecoder.h.


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