ATLAS Offline Software
Static Public Member Functions | Private Member Functions | List of all members
L1CaloBsDecoderUtil Class Reference

#include <L1CaloBsDecoderUtil.h>

Collaboration diagram for L1CaloBsDecoderUtil:

Static Public Member Functions

static void decodeRodInfo (const eformat::ROBFragment< const uint32_t * > *rod, std::list< L1CaloRdoRodInfo > &dat)
 
template<typename Tar , typename Dat , typename Iter >
static Tar & findRdo (const Tar &target, Dat &data, Iter begin, Iter end)
 
template<typename Tar , typename Dat >
static Tar & findRdo (const Tar &target, Dat &data)
 

Private Member Functions

 L1CaloBsDecoderUtil ()
 

Detailed Description

Utility methods for bytestream decoder classes for runs 1, 2 and 3.

Definition at line 15 of file L1CaloBsDecoderUtil.h.

Constructor & Destructor Documentation

◆ L1CaloBsDecoderUtil()

L1CaloBsDecoderUtil::L1CaloBsDecoderUtil ( )
private

Definition at line 17 of file L1CaloBsDecoderUtil.cxx.

18 {
19 }

Member Function Documentation

◆ decodeRodInfo()

void L1CaloBsDecoderUtil::decodeRodInfo ( const eformat::ROBFragment< const uint32_t * > *  rod,
std::list< L1CaloRdoRodInfo > &  dat 
)
static

Definition at line 22 of file L1CaloBsDecoderUtil.cxx.

24 {
25  // Create the basic object
26  int sourceId = rod->rod_source_id() & 0xffffff;
27  int runNumber = rod->rod_run_no();
28  int bcNumber = rod->rod_bc_id();
29  int triggerType = rod->rod_lvl1_trigger_type();
30  int detEventType = rod->rod_detev_type();
31  int version = rod->rod_version();
32 //<< // **FIXME** Hack for testing Run 3: set rod version
33 //<< version |= 0x1004; // **FIXME** Remove this!
34  L1CaloRdoRodInfo rdo( sourceId>>16, sourceId&0xffff, runNumber, bcNumber, triggerType, detEventType, version );
35 
36  // Add in the Level-1 ID and size
37  rdo.setLvl1Id( rod->rod_lvl1_id() );
38  rdo.setSize( rod->rod_ndata() );
39 
40  // Add in the status words
41  const uint32_t* status;
42  rod->rod_status(status);
43  int stat = *status++;
44  rdo.setStatus1( stat );
45  stat = *status;
46  rdo.setStatus2( stat );
47 
48  // Now add in the module status words in the payload, if not RoI or CTP
49  bool hasModuleStatus = true;
50  if ( (sourceId>>16) > 0x74 )
51  hasModuleStatus = false;
52  if ( (sourceId>>16) == 0x73 )
53  hasModuleStatus = false;
54 
55  if ( hasModuleStatus )
56  {
57  const uint32_t* it_data;
58  rod->rod_data( it_data );
59  const uint32_t ndata = rod->rod_ndata();
60  ++it_data;
61  for ( uint32_t i = 1; i < ndata; ++i, ++it_data ) {
62  if ( ((*it_data)>>28) == 0xd )
63  {
64  int idat = (*it_data)&0xfff;
65  int module = idat>>8;
66  int modStat = rdo.getModuleStatus( module );
67  rdo.setModuleStatus( module, modStat | (idat&0xff) );
68  }
69  if ( ((*it_data)>>28) == 0xf )
70  {
71  int idat = (*it_data)&0x1ff;
72  int module = idat>>8;
73  int modStat = rdo.getModuleStatus( module );
74  rdo.setModuleStatus( module, modStat | (idat&0xff) );
75  }
76  }
77  }
78 
79  dat.push_back( rdo );
80 }

◆ findRdo() [1/2]

template<typename Tar , typename Dat >
Tar & L1CaloBsDecoderUtil::findRdo ( const Tar &  target,
Dat &  data 
)
static

Definition at line 48 of file L1CaloBsDecoderUtil.h.

49 {
50  return findRdo( target, data, data.rbegin(), data.rend() );
51 }

◆ findRdo() [2/2]

template<typename Tar , typename Dat , typename Iter >
Tar & L1CaloBsDecoderUtil::findRdo ( const Tar &  target,
Dat &  data,
Iter  begin,
Iter  end 
)
static

Definition at line 33 of file L1CaloBsDecoderUtil.h.

34 {
35  while ( (begin != end) && ( target < (*begin) ) )
36  ++begin;
37 
38  if ( begin == end )
39  return *(data.insert( end.base(), target ));
40 
41  if ( begin->sameDatum( target ) )
42  return *begin;
43 
44  return *(data.insert( begin.base(), target ));
45 }

The documentation for this class was generated from the following files:
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
L1CaloRdoRodInfo
Definition: L1CaloRdoRodInfo.h:11
python.PyAthena.module
module
Definition: PyAthena.py:134
lumiFormat.i
int i
Definition: lumiFormat.py:92
RunTileMonitoring.rod
rod
Definition: RunTileMonitoring.py:134
plotBeamSpotCompare.xd
xd
Definition: plotBeamSpotCompare.py:220
beamspotman.stat
stat
Definition: beamspotman.py:266
get_generator_info.version
version
Definition: get_generator_info.py:33
DeMoAtlasDataLoss.runNumber
string runNumber
Definition: DeMoAtlasDataLoss.py:64
RunTileMonitoring.triggerType
triggerType
Definition: RunTileMonitoring.py:162
L1CaloBsDecoderUtil::findRdo
static Tar & findRdo(const Tar &target, Dat &data, Iter begin, Iter end)
Definition: L1CaloBsDecoderUtil.h:33
merge.status
status
Definition: merge.py:17
COOLRates.target
target
Definition: COOLRates.py:1106