ATLAS Offline Software
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
BCM_RodDecoder Class Reference

#include <BCM_RodDecoder.h>

Inheritance diagram for BCM_RodDecoder:
Collaboration diagram for BCM_RodDecoder:

Public Types

typedef BCM_RawData RDO
 
typedef BCM_RDO_Collection BCM_RawCollection
 

Public Member Functions

virtual ~BCM_RodDecoder ()
 
virtual StatusCode initialize () override
 
virtual StatusCode finalize () override
 
StatusCode fillCollection (const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment *robFrag, BCM_RDO_Container *rdoCont, std::vector< unsigned int > *vecHash=NULL) const
 
unsigned int getChannelID (int ROD_source_ID, unsigned int dataword_position) const
 
BCM_RDO_CollectiongetCollection (unsigned int chan, BCM_RDO_Container *cont) const
 
 AthAlgTool (const std::string &type, const std::string &name, const IInterface *parent)
 Constructor with parameters: More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) 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 More...
 
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. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

std::atomic< unsigned int > m_fragment_number {}
 
std::atomic< unsigned int > m_LVL1A_number {}
 
std::atomic< unsigned int > m_hit_number {}
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 26 of file BCM_RodDecoder.h.

Member Typedef Documentation

◆ BCM_RawCollection

Definition at line 33 of file BCM_RodDecoder.h.

◆ RDO

Definition at line 32 of file BCM_RodDecoder.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ ~BCM_RodDecoder()

BCM_RodDecoder::~BCM_RodDecoder ( )
virtual

Definition at line 28 of file BCM_RodDecoder.cxx.

29 {
30 }

Member Function Documentation

◆ AthAlgTool()

AthAlgTool::AthAlgTool

Constructor with parameters:

Definition at line 31 of file AthAlgTool.cxx.

18  :
20 {
21 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

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

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

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

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

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

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

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

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

95 { return m_detStore; }

◆ evtStore() [1/2]

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.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

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

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

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

StatusCode BCM_RodDecoder::fillCollection ( const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment robFrag,
BCM_RDO_Container rdoCont,
std::vector< unsigned int > *  vecHash = NULL 
) const

Definition at line 69 of file BCM_RodDecoder.cxx.

70 {
71 #ifdef BCM_DEBUG
72  ATH_MSG_INFO( "in BCM_RodDecoder::fillCollection" );
73 #endif
74 
75  StatusCode sc = StatusCode::SUCCESS;
76 
77  BCM_RDO_Collection* coll = nullptr;
78 
79  // set the data pointer type
81  robFrag->rod_data(vint);
82 
83  // get source ID
84  int ROD_source_ID = robFrag->rod_source_id();
85 
86  // get LVL1 ID
87  int ROD_LVL1_ID = robFrag->rod_lvl1_id();
88 
89  // get BC ID
90  //int m_ROD_BC_ID = robFrag->rod_bc_id();
91 
92  // get number of data words in the fragment
93  uint32_t dataword_it_end = robFrag->rod_ndata();
94 
95  unsigned int Channel = 0;
96  unsigned int Pulse1Position = 0;
97  unsigned int Pulse1Width = 0;
98  unsigned int Pulse2Position = 0;
99  unsigned int Pulse2Width = 0;
100  unsigned int LVL1A = 0;
101  unsigned int BCID = 0;
102  unsigned int Error = 0;
103  uint32_t rawDataWord_buffer = 0;
104 
106 
107  // loop over the data words in the fragment
108  for (uint32_t dataword_it = 0; dataword_it < dataword_it_end; ++dataword_it) {
109  uint32_t rawDataWord = vint[dataword_it]; // set the dataword to investigate
110  unsigned int dataword_position = dataword_it%6;
111  switch(dataword_position) {
112  case 0:
113  if (dataword_it + 5 <=dataword_it_end) {
114  uint32_t lastDataWord = vint[dataword_it+5];
115  Error = (lastDataWord & 0x0000000f);
116  } else {
117  Error = 15;
118  }
119  BCID = (rawDataWord & 0xfff00000) >> 20;
120  LVL1A = dataword_it / 6;
121  m_LVL1A_number++;
122  Channel = getChannelID(ROD_source_ID, 0);
123  coll = getCollection(Channel,rdoCont);
124  Pulse1Position = (rawDataWord & 0x000fc000) >> 14;
125  Pulse1Width = (rawDataWord & 0x00003e00) >> 9;
126  Pulse2Position = (rawDataWord & 0x000001f8) >> 3;
127  rawDataWord_buffer = (rawDataWord & 0x00000007);
128  break;
129  case 1:
130  Pulse2Width = ((rawDataWord & 0xc0000000) >> 30) | (rawDataWord_buffer << 2);
131 #ifdef BCM_DEBUG
132  if (Pulse1Width != 0 || Pulse2Width != 0) {
133  ATH_MSG_ERROR( "BCM-ISSUE L1ID: " << ROD_LVL1_ID << " Ch: " << Channel << " L1A: " << LVL1A << " BCID: " << BCID << " Hit: " << Pulse1Position << " " << Pulse1Width << " " << Pulse2Position << " " << Pulse2Width );
134  }
135  ATH_MSG_DEBUG( "Decoded ROD 0x"<< std::hex<<ROD_source_ID<<std::dec <<" channel: "<< Channel <<" - BCID: "<< BCID <<" : "<< Pulse1Position <<"-"<< Pulse1Width <<" "<< Pulse2Position <<"-"<< Pulse2Width );
136 #endif
137  coll->push_back(new RDO(Channel,Pulse1Position,Pulse1Width,Pulse2Position,Pulse2Width,LVL1A,BCID,ROD_LVL1_ID,Error));
138  m_hit_number++;
139  Channel = getChannelID(ROD_source_ID, 1);
140  coll = getCollection(Channel,rdoCont);
141  Pulse1Position = (rawDataWord & 0x3f000000) >> 24;
142  Pulse1Width = (rawDataWord & 0x00f80000) >> 19;
143  Pulse2Position = (rawDataWord & 0x0007e000) >> 13;
144  Pulse2Width = (rawDataWord & 0x00001f00) >> 8;
145 #ifdef BCM_DEBUG
146  if (Pulse1Width != 0 || Pulse2Width != 0) {
147  ATH_MSG_ERROR( "BCM-ISSUE L1ID: " << ROD_LVL1_ID << " Ch: " << Channel << " L1A: " << LVL1A << " BCID: " << BCID << " Hit: " << Pulse1Position << " " << Pulse1Width << " " << Pulse2Position << " " << Pulse2Width );
148  }
149  ATH_MSG_DEBUG( "Decoded ROD 0x"<< std::hex<<ROD_source_ID<<std::dec <<" channel: "<< Channel <<" - BCID: "<< BCID <<" : "<< Pulse1Position <<"-"<< Pulse1Width <<" "<< Pulse2Position <<"-"<< Pulse2Width );
150 #endif
151  coll->push_back(new RDO(Channel,Pulse1Position,Pulse1Width,Pulse2Position,Pulse2Width,LVL1A,BCID,ROD_LVL1_ID,Error));
152  m_hit_number++;
153  Channel = getChannelID(ROD_source_ID, 2);
154  coll = getCollection(Channel,rdoCont);
155  Pulse1Position = (rawDataWord & 0x000000fc) >> 2;
156  rawDataWord_buffer = (rawDataWord & 0x00000003);
157  break;
158  case 2:
159  Pulse1Width = ((rawDataWord & 0xe0000000) >> 29) | (rawDataWord_buffer << 3);
160  Pulse2Position = (rawDataWord & 0x1f800000) >> 23;
161  Pulse2Width = (rawDataWord & 0x007c0000) >> 18;
162 #ifdef BCM_DEBUG
163  if (Pulse1Width != 0 || Pulse2Width != 0) {
164  ATH_MSG_ERROR( "BCM-ISSUE L1ID: " << ROD_LVL1_ID << " Ch: " << Channel << " L1A: " << LVL1A << " BCID: " << BCID << " Hit: " << Pulse1Position << " " << Pulse1Width << " " << Pulse2Position << " " << Pulse2Width );
165  }
166  ATH_MSG_DEBUG( "Decoded ROD 0x"<< std::hex<<ROD_source_ID<<std::dec <<" channel: "<< Channel <<" - BCID: "<< BCID <<" : "<< Pulse1Position <<"-"<< Pulse1Width <<" "<< Pulse2Position <<"-"<< Pulse2Width );
167 #endif
168  coll->push_back(new RDO(Channel,Pulse1Position,Pulse1Width,Pulse2Position,Pulse2Width,LVL1A,BCID,ROD_LVL1_ID,Error));
169  m_hit_number++;
170  Channel = getChannelID(ROD_source_ID, 3);
171  coll = getCollection(Channel,rdoCont);
172  Pulse1Position = (rawDataWord & 0x0003f000) >> 12;
173  Pulse1Width = (rawDataWord & 0x00000f80) >> 7;
174  Pulse2Position = (rawDataWord & 0x0000007e) >> 1;
175  rawDataWord_buffer = (rawDataWord & 0x00000001);
176  break;
177  case 3:
178  Pulse2Width = ((rawDataWord & 0xf0000000) >> 28) | (rawDataWord_buffer << 4);
179 #ifdef BCM_DEBUG
180  if (Pulse1Width != 0 || Pulse2Width != 0) {
181  ATH_MSG_ERROR( "BCM-ISSUE L1ID: " << ROD_LVL1_ID << " Ch: " << Channel << " L1A: " << LVL1A << " BCID: " << BCID << " Hit: " << Pulse1Position << " " << Pulse1Width << " " << Pulse2Position << " " << Pulse2Width );
182  }
183  ATH_MSG_DEBUG( "Decoded ROD 0x"<< std::hex<<ROD_source_ID<<std::dec <<" channel: "<< Channel <<" - BCID: "<< BCID <<" : "<< Pulse1Position <<"-"<< Pulse1Width <<" "<< Pulse2Position <<"-"<< Pulse2Width );
184 #endif
185  coll->push_back(new RDO(Channel,Pulse1Position,Pulse1Width,Pulse2Position,Pulse2Width,LVL1A,BCID,ROD_LVL1_ID,Error));
186  m_hit_number++;
187  Channel = getChannelID(ROD_source_ID, 4);
188  coll = getCollection(Channel,rdoCont);
189  Pulse1Position = (rawDataWord & 0x0fc00000) >> 22;
190  Pulse1Width = (rawDataWord & 0x003e0000) >> 17;
191  Pulse2Position = (rawDataWord & 0x0001f800) >> 11;
192  Pulse2Width = (rawDataWord & 0x000007c0) >> 6;
193 #ifdef BCM_DEBUG
194  if (Pulse1Width != 0 || Pulse2Width != 0) {
195  ATH_MSG_ERROR( "BCM-ISSUE L1ID: " << ROD_LVL1_ID << " Ch: " << Channel << " L1A: " << LVL1A << " BCID: " << BCID << " Hit: " << Pulse1Position << " " << Pulse1Width << " " << Pulse2Position << " " << Pulse2Width );
196  }
197  ATH_MSG_DEBUG( "Decoded ROD 0x"<< std::hex<<ROD_source_ID<<std::dec <<" channel: "<< Channel <<" - BCID: "<< BCID <<" : "<< Pulse1Position <<"-"<< Pulse1Width <<" "<< Pulse2Position <<"-"<< Pulse2Width);
198 #endif
199  coll->push_back(new RDO(Channel,Pulse1Position,Pulse1Width,Pulse2Position,Pulse2Width,LVL1A,BCID,ROD_LVL1_ID,Error));
200  m_hit_number++;
201  Channel = getChannelID(ROD_source_ID, 5);
202  coll = getCollection(Channel,rdoCont);
203  Pulse1Position = (rawDataWord & 0x0000003f);
204  break;
205  case 4:
206  Pulse1Width = (rawDataWord & 0xf8000000) >> 27;
207  Pulse2Position = (rawDataWord & 0x07e00000) >> 21;
208  Pulse2Width = (rawDataWord & 0x001f0000) >> 16;
209 #ifdef BCM_DEBUG
210  if (Pulse1Width != 0 || Pulse2Width != 0) {
211  ATH_MSG_ERROR( "BCM-ISSUE L1ID: " << ROD_LVL1_ID << " Ch: " << Channel << " L1A: " << LVL1A << " BCID: " << BCID << " Hit: " << Pulse1Position << " " << Pulse1Width << " " << Pulse2Position << " " << Pulse2Width);
212  }
213  ATH_MSG_DEBUG( "Decoded ROD 0x"<< std::hex<<ROD_source_ID<<std::dec <<" channel: "<< Channel <<" - BCID: "<< BCID <<" : "<< Pulse1Position <<"-"<< Pulse1Width <<" "<< Pulse2Position <<"-"<< Pulse2Width );
214 #endif
215  coll->push_back(new RDO(Channel,Pulse1Position,Pulse1Width,Pulse2Position,Pulse2Width,LVL1A,BCID,ROD_LVL1_ID,Error));
216  m_hit_number++;
217  Channel = getChannelID(ROD_source_ID, 6);
218  coll = getCollection(Channel,rdoCont);
219  Pulse1Position = (rawDataWord & 0x0000fc00) >> 10;
220  Pulse1Width = (rawDataWord & 0x000003e0) >> 5;
221  rawDataWord_buffer = (rawDataWord & 0x0000001f);
222  break;
223  case 5:
224  Pulse2Position = ((rawDataWord & 0x80000000) >> 31) | (rawDataWord_buffer << 1);
225  Pulse2Width = (rawDataWord & 0x7c000000) >> 26;
226 #ifdef BCM_DEBUG
227  if (Pulse1Width != 0 || Pulse2Width != 0) {
228  ATH_MSG_ERROR( "BCM-ISSUE L1ID: " << ROD_LVL1_ID << " Ch: " << Channel << " L1A: " << LVL1A << " BCID: " << BCID << " Hit: " << Pulse1Position << " " << Pulse1Width << " " << Pulse2Position << " " << Pulse2Width );
229  }
230  ATH_MSG_DEBUG( "Decoded ROD 0x"<< std::hex<<ROD_source_ID<<std::dec <<" channel: "<< Channel <<" - BCID: "<< BCID <<" : "<< Pulse1Position <<"-"<< Pulse1Width <<" "<< Pulse2Position <<"-"<< Pulse2Width );
231 #endif
232  coll->push_back(new RDO(Channel,Pulse1Position,Pulse1Width,Pulse2Position,Pulse2Width,LVL1A,BCID,ROD_LVL1_ID,Error));
233  m_hit_number++;
234  Channel = getChannelID(ROD_source_ID, 7);
235  coll = getCollection(Channel,rdoCont);
236  Pulse1Position = (rawDataWord & 0x03f00000) >> 20;
237  Pulse1Width = (rawDataWord & 0x000f8000) >> 15;
238  Pulse2Position = (rawDataWord & 0x00007e00) >> 9;
239  Pulse2Width = (rawDataWord & 0x000001f0) >> 4;
240 #ifdef BCM_DEBUG
241  if (Pulse1Width != 0 || Pulse2Width != 0) {
242  ATH_MSG_ERROR( "BCM-ISSUE L1ID: " << ROD_LVL1_ID << " Ch: " << Channel << " L1A: " << LVL1A << " BCID: " << BCID << " Hit: " << Pulse1Position << " " << Pulse1Width << " " << Pulse2Position << " " << Pulse2Width );
243  }
244  ATH_MSG_DEBUG( "Decoded ROD 0x"<< std::hex<<ROD_source_ID<<std::dec <<" channel: "<< Channel <<" - BCID: "<< BCID <<" : "<< Pulse1Position <<"-"<< Pulse1Width <<" "<< Pulse2Position <<"-"<< Pulse2Width );
245 #endif
246  coll->push_back(new RDO(Channel,Pulse1Position,Pulse1Width,Pulse2Position,Pulse2Width,LVL1A,BCID,ROD_LVL1_ID,Error));
247  m_hit_number++;
248  break;
249  }
250  }
251 
252  return sc;
253 }

◆ finalize()

StatusCode BCM_RodDecoder::finalize ( )
overridevirtual

Definition at line 53 of file BCM_RodDecoder.cxx.

54 {
55 #ifdef BCM_DEBUG
56  ATH_MSG_VERBOSE( "in BCM_RodDecoder::finalize" );
57 #endif
58 
59  ATH_MSG_INFO( "Bytestream summary: " << m_fragment_number << " fragments found" );
60  ATH_MSG_INFO( "Bytestream summary: " << m_LVL1A_number << " LVL1As found" );
61  ATH_MSG_INFO( "Bytestream summary: " << m_hit_number << " hits found" );
62 
63  return StatusCode::SUCCESS;
64 }

◆ getChannelID()

unsigned int BCM_RodDecoder::getChannelID ( int  ROD_source_ID,
unsigned int  dataword_position 
) const

Definition at line 258 of file BCM_RodDecoder.cxx.

259 {
260  switch(ROD_source_ID) {
261  // Run-1 Fragment
262  case 0x0081000A:
263  switch(dataword_position) {
264  case 0:
265  return 0;
266  case 1:
267  return 9;
268  case 2:
269  return 2;
270  case 3:
271  return 11;
272  case 4:
273  return 4;
274  case 5:
275  return 13;
276  case 6:
277  return 6;
278  case 7:
279  return 15;
280  default:
281  return 0xffffffff;
282  }
283  // Run-2 Fragment
284  case 0x0081004A:
285  switch(dataword_position) {
286  case 0:
287  return 0;
288  case 1:
289  return 9;
290  case 2:
291  return 2;
292  case 3:
293  return 11;
294  case 4:
295  return 4;
296  case 5:
297  return 13;
298  case 6:
299  return 6;
300  case 7:
301  return 15;
302  default:
303  return 0xffffffff;
304  }
305  // Run-1 Fragment
306  case 0x0081000C:
307  switch(dataword_position) {
308  case 0:
309  return 8;
310  case 1:
311  return 1;
312  case 2:
313  return 10;
314  case 3:
315  return 3;
316  case 4:
317  return 12;
318  case 5:
319  return 5;
320  case 6:
321  return 14;
322  case 7:
323  return 7;
324  default:
325  return 0xffffffff;
326  }
327  // Run-2 fragment
328  case 0x0081004C:
329  switch(dataword_position) {
330  case 0:
331  return 8;
332  case 1:
333  return 1;
334  case 2:
335  return 10;
336  case 3:
337  return 3;
338  case 4:
339  return 12;
340  case 5:
341  return 5;
342  case 6:
343  return 14;
344  case 7:
345  return 7;
346  default:
347  return 0xffffffff;
348  }
349  default:
350  return 0xffffffff;
351  }
352 }

◆ getCollection()

BCM_RDO_Collection * BCM_RodDecoder::getCollection ( unsigned int  chan,
BCM_RDO_Container cont 
) const

Definition at line 358 of file BCM_RodDecoder.cxx.

359 {
360  BCM_RDO_Collection* coll;
362  bool collExists = false;
365  for (; it!=itE; ++it) {
366  if ((*it)->getChannel() == chan) {
367  collExists = true;
368  cont_it = it;
369  }
370  }
371  if (collExists) {
372  coll = *cont_it;
373  } else { // if collection does not exist create it
374  coll = new BCM_RDO_Collection(chan);
375  cont->push_back(coll); // add collection to container
376  }
377  return coll;
378 }

◆ initialize()

StatusCode BCM_RodDecoder::initialize ( )
overridevirtual

Definition at line 35 of file BCM_RodDecoder.cxx.

36 {
37 #ifdef BCM_DEBUG
38  ATH_MSG_VERBOSE( "in BCM_RodDecoder::initialize" );
39 #endif
40 
42 
44  m_LVL1A_number = 0;
45  m_hit_number = 0;
46 
47  return StatusCode::SUCCESS;
48 }

◆ 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 & BCM_RodDecoder::interfaceID ( )
static

Definition at line 20 of file BCM_RodDecoder.cxx.

21 {
22  return IID_IBCM_RodDecoder;
23 }

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

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

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

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

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

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ 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 DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ 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 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) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_fragment_number

std::atomic<unsigned int> BCM_RodDecoder::m_fragment_number {}
mutableprivate

Definition at line 52 of file BCM_RodDecoder.h.

◆ m_hit_number

std::atomic<unsigned int> BCM_RodDecoder::m_hit_number {}
mutableprivate

Definition at line 54 of file BCM_RodDecoder.h.

◆ m_LVL1A_number

std::atomic<unsigned int> BCM_RodDecoder::m_LVL1A_number {}
mutableprivate

Definition at line 53 of file BCM_RodDecoder.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
BCM_RodDecoder::m_LVL1A_number
std::atomic< unsigned int > m_LVL1A_number
Definition: BCM_RodDecoder.h:53
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
LArBadChanBlobUtils::Channel
Identifier32::value_type Channel
Definition: LArBadChanBlobUtils.h:24
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
initialize
void initialize()
Definition: run_EoverP.cxx:894
skel.it
it
Definition: skel.GENtoEVGEN.py:423
BCM_RodDecoder::getChannelID
unsigned int getChannelID(int ROD_source_ID, unsigned int dataword_position) const
Definition: BCM_RodDecoder.cxx:258
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
BCM_RodDecoder::RDO
BCM_RawData RDO
Definition: BCM_RodDecoder.h:32
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
TruthTest.itE
itE
Definition: TruthTest.py:25
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
PixelByteStreamErrors::BCID
@ BCID
Definition: PixelByteStreamErrors.h:13
OFFLINE_FRAGMENTS_NAMESPACE::PointerType
const DataType * PointerType
Definition: RawEvent.h:25
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
DataModel_detail::iterator
(Non-const) Iterator class for DataVector/DataList.
Definition: DVLIterator.h:184
ReadCellNoiseFromCool.chan
chan
Definition: ReadCellNoiseFromCool.py:52
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
BCM_RodDecoder::m_fragment_number
std::atomic< unsigned int > m_fragment_number
Definition: BCM_RodDecoder.h:52
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
BCM_RodDecoder::getCollection
BCM_RDO_Collection * getCollection(unsigned int chan, BCM_RDO_Container *cont) const
Definition: BCM_RodDecoder.cxx:358
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
a
TList * a
Definition: liststreamerinfos.cxx:10
h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
L1Topo::Error
Error
The different types of error that can be flagged in the L1TopoRDO.
Definition: Error.h:16
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
BCM_RodDecoder::m_hit_number
std::atomic< unsigned int > m_hit_number
Definition: BCM_RodDecoder.h:54
BCM_RDO_Collection
Definition: BCM_RDO_Collection.h:27
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
fitman.k
k
Definition: fitman.py:528