ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
LVL1::RoIROD Class Reference

The RoIROD Athena Algorithm takes the output from the LVL1 Calo Trigger simulations and produces the words, as would be produced by the hardware ReadOut Drivers (RODs); i.e. More...

#include <RoIROD.h>

Inheritance diagram for LVL1::RoIROD:
Collaboration diagram for LVL1::RoIROD:

Public Member Functions

 RoIROD (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual ~RoIROD ()
 
virtual StatusCode initialize () override
 
virtual StatusCode execute (const EventContext &ctx) const override
 
virtual StatusCode finalize () override
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual bool isClonable () const override
 Specify if the algorithm is clonable. More...
 
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
 
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
virtual bool filterPassed (const EventContext &ctx) const
 
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. 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 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
 

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 DataVector< LVL1::CPMTobRoIt_cpmTobRoIContainer
 
typedef DataVector< LVL1::JEMTobRoIt_jemTobRoIContainer
 
typedef CMXRoI t_EnergyRoIContainer
 
typedef DataVector< LVL1CTP::SlinkWordt_SlinkContainer
 
typedef std::unique_ptr< t_SlinkContainert_SlinkPtr
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

void addHeader (t_SlinkContainer &slink, unsigned int subDetID, unsigned int moduleId, const EventContext &ctx) const
 adds slink header More...
 
void addTail (t_SlinkContainer &slink, unsigned int numberOfDataWords) const
 add Slink tail More...
 
StatusCode saveSlinkObjects (t_SlinkPtr CPRoIROD[TrigT1CaloDefs::numOfCPRoIRODs], t_SlinkPtr jepRoIROD[TrigT1CaloDefs::numOfJEPRoIRODs], const EventContext &ctx) const
 save Slink Objects to SG More...
 
void formSlinkObjects (t_SlinkPtr CPRoIROD[TrigT1CaloDefs::numOfCPRoIRODs], t_SlinkPtr jepRoIROD[TrigT1CaloDefs::numOfJEPRoIRODs], const EventContext &ctx) const
 get ROIwords and form Slink words from them, adding header and tail. More...
 
void assignVectors (t_SlinkPtr CPRoIROD[TrigT1CaloDefs::numOfCPRoIRODs], t_SlinkPtr jepRoIROD[TrigT1CaloDefs::numOfJEPRoIRODs]) const
 Create the object vectors to be stored in SG and clear mult vectors. More...
 
std::unique_ptr< LVL1CTP::SlinkWordgetWord (unsigned int tword) const
 creates a new SlinkWord object with the passed word, and returns a pointer. More...
 
void dumpSlinks (t_SlinkPtr CPRoIROD[TrigT1CaloDefs::numOfCPRoIRODs]) const
 prints out the Slink info. More...
 
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

SG::ReadHandleKey< t_cpmTobRoIContainerm_emTauRoILocation { this, "EmTauRoILocation", TrigT1CaloDefs::CPMTobRoILocation, "" }
 
SG::ReadHandleKey< t_jemTobRoIContainerm_JetRoILocation { this, "JetRoILocation", TrigT1CaloDefs::JEMTobRoILocation, "" }
 
SG::ReadHandleKey< t_EnergyRoIContainerm_energyRoILocation { this, "EnergyRoILocation", TrigT1CaloDefs::CMXRoILocation, "" }
 
std::string m_emTauSlinkLocation
 
SG::WriteHandleKeyArray< t_SlinkContainerm_emTauSlinkKeys { this, "EmTauSlinkKeys", {}, "" }
 
std::string m_jepSlinkLocation
 
SG::WriteHandleKeyArray< t_SlinkContainerm_jepSlinkKeys { this, "JEPSlinkKeys", {}, "" }
 
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
 
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

The RoIROD Athena Algorithm takes the output from the LVL1 Calo Trigger simulations and produces the words, as would be produced by the hardware ReadOut Drivers (RODs); i.e.

-Cluster (Em & Tau) ROD to RoIB
-Jet/Energy ROD to RoIB

Definition at line 53 of file RoIROD.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

◆ t_cpmTobRoIContainer

Definition at line 60 of file RoIROD.h.

◆ t_EnergyRoIContainer

Definition at line 62 of file RoIROD.h.

◆ t_jemTobRoIContainer

Definition at line 61 of file RoIROD.h.

◆ t_SlinkContainer

Definition at line 63 of file RoIROD.h.

◆ t_SlinkPtr

typedef std::unique_ptr<t_SlinkContainer> LVL1::RoIROD::t_SlinkPtr
private

Definition at line 64 of file RoIROD.h.

Constructor & Destructor Documentation

◆ RoIROD()

LVL1::RoIROD::RoIROD ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 24 of file RoIROD.cxx.

◆ ~RoIROD()

LVL1::RoIROD::~RoIROD ( )
virtual

Definition at line 36 of file RoIROD.cxx.

36  {
37 }

Member Function Documentation

◆ addHeader()

void LVL1::RoIROD::addHeader ( t_SlinkContainer slink,
unsigned int  subDetID,
unsigned int  moduleId,
const EventContext &  ctx 
) const
private

adds slink header

adds slink header as defined in DAQ-98-129

Definition at line 163 of file RoIROD.cxx.

167 {
168  slink.push_back(getWord(0xb0f00000)); // beginning of fragment word (control word)
169  slink.push_back(getWord(0xee1234ee)); // start of header marker
170  slink.push_back(getWord(8)); // header length
171  slink.push_back(getWord(1)); // format version number
172  unsigned int moduleType=0x00; // ROD
173  slink.push_back(getWord( (moduleType<<16)+(subDetID<<8)+moduleId )); // 1st 8b but source id: CP system
174  slink.push_back(getWord(ctx.eventID().event_number())); // 8b ECR_count (set to 0) | 24b L1 id = evt number
175  slink.push_back( getWord(1 )); // 8b BCID
176  slink.push_back( getWord(1 )); // 8b L1 trig type
177  slink.push_back( getWord(0 )); // detector evt type}
178 }

◆ addTail()

void LVL1::RoIROD::addTail ( t_SlinkContainer slink,
unsigned int  numberOfDataWords 
) const
private

add Slink tail

Definition at line 181 of file RoIROD.cxx.

183 {
184  slink.push_back(getWord(0 )); // write status word 1
185  slink.push_back(getWord(0 )); // write status word 2
186 //^^^ not simulating any errors.
187  slink.push_back(getWord(2 )); // status block length
188  slink.push_back(getWord(numberOfDataWords)); // calculated data block length
189  slink.push_back(getWord(1 )); // status block position
190 // ^^^ indicates that data precedes status block
191  slink.push_back(getWord(0xe0f00000 )); // end of fragment word
192 }

◆ assignVectors()

void LVL1::RoIROD::assignVectors ( t_SlinkPtr  CPRoIROD[TrigT1CaloDefs::numOfCPRoIRODs],
t_SlinkPtr  jepRoIROD[TrigT1CaloDefs::numOfJEPRoIRODs] 
) const
private

Create the object vectors to be stored in SG and clear mult vectors.

Definition at line 214 of file RoIROD.cxx.

216 {
217  ATH_MSG_DEBUG("assignVectors" );
218 
219  for (unsigned int i = 0; i<TrigT1CaloDefs::numOfCPRoIRODs;i++){
220  CPRoIROD[i] = std::make_unique<t_SlinkContainer>();
221  }
222  for (unsigned int i = 0; i<TrigT1CaloDefs::numOfJEPRoIRODs;i++){
223  jepRoIROD[i] = std::make_unique<t_SlinkContainer>();
224  }
225 
226 }

◆ cardinality()

unsigned int AthReentrantAlgorithm::cardinality ( ) const
overridevirtualinherited

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

Override this to return 0 for reentrant algorithms.

Override this to return 0 for reentrant algorithms.

Definition at line 55 of file AthReentrantAlgorithm.cxx.

56 {
57  return 0;
58 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< 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.

95 { return m_detStore; }

◆ dumpSlinks()

void LVL1::RoIROD::dumpSlinks ( t_SlinkPtr  CPRoIROD[TrigT1CaloDefs::numOfCPRoIRODs]) const
private

prints out the Slink info.

Definition at line 236 of file RoIROD.cxx.

237 {
238  for (unsigned int slink=0; slink<(TrigT1CaloDefs::numOfCPRoIRODs);slink++){
239  ATH_MSG_INFO("Slink cable "<<slink
240  <<" has "<<(CPRoIROD[slink]->size())<<" words");
241  for (DataVector<LVL1CTP::SlinkWord>::iterator i=CPRoIROD[slink]->begin();
242  i!=CPRoIROD[slink]->end();++i){
243  ATH_MSG_INFO("Word :"<<MSG::hex<<(*i)->word()<<MSG::dec);
244  }
245  }
246 }

◆ evtStore() [1/2]

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.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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; }

◆ execute()

StatusCode LVL1::RoIROD::execute ( const EventContext &  ctx) const
overridevirtual

there are 4 CP RoI RODs which have a Slink cable connected to the RoIB. This array holds pointers to 4 DataVectors containing the Slink words

there are 2 Jet RoI RODs which have a Slink cable connected to the RoIB. This array holds pointers to 2 DataVectors containing the Slink words

Definition at line 82 of file RoIROD.cxx.

83 {
84  ATH_MSG_DEBUG("Executing" );
85 
89 
93  assignVectors (CPRoIROD, jepRoIROD); // create new storage vectors
94  formSlinkObjects (CPRoIROD, jepRoIROD, ctx); // Fill storage vectors
95  ATH_CHECK( saveSlinkObjects (CPRoIROD, jepRoIROD, ctx) ); // save storage vectors
96 
97  return StatusCode::SUCCESS ;
98 }

◆ 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 & AthReentrantAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 79 of file AthReentrantAlgorithm.cxx.

80 {
81  // If we didn't find any symlinks to add, just return the collection
82  // from the base class. Otherwise, return the extended collection.
83  if (!m_extendedExtraObjects.empty()) {
85  }
86  return Algorithm::extraOutputDeps();
87 }

◆ filterPassed()

virtual bool AthReentrantAlgorithm::filterPassed ( const EventContext &  ctx) const
inlinevirtualinherited

Definition at line 135 of file AthReentrantAlgorithm.h.

135  {
136  return execState( ctx ).filterPassed();
137  }

◆ finalize()

StatusCode LVL1::RoIROD::finalize ( )
overridevirtual

Definition at line 70 of file RoIROD.cxx.

71 {
72  ATH_MSG_INFO("Finalizing" );
73  return StatusCode::SUCCESS ;
74 }

◆ formSlinkObjects()

void LVL1::RoIROD::formSlinkObjects ( t_SlinkPtr  CPRoIROD[TrigT1CaloDefs::numOfCPRoIRODs],
t_SlinkPtr  jepRoIROD[TrigT1CaloDefs::numOfJEPRoIRODs],
const EventContext &  ctx 
) const
private

get ROIwords and form Slink words from them, adding header and tail.

Set SLink headers

Retrieve CPMTobRoIs and copy data to SLink vectors

Push TOBs to ROD vectors This version makes no attempt to order them.

Retrieve JEMTobRoIs and copy data to SLink vectors

Push TOBs to ROD vectors This version makes no attempt to order them.

Retrieve EnergySum RoI(s) and add to SLink record

Add 6 ET RoIWords to crate 1 ROD data.

Set SLink tails

Definition at line 101 of file RoIROD.cxx.

104 {
105  ATH_MSG_DEBUG("formSlinkObjects" );
106 
108  for (unsigned int i = 0; i<TrigT1CaloDefs::numOfCPRoIRODs;i++){
109  addHeader(*CPRoIROD[i],0x72,i, ctx);//set modID to crate #
110  }
111  for (unsigned int i = 0; i<TrigT1CaloDefs::numOfJEPRoIRODs;i++){
112  addHeader(*jepRoIROD[i],0x73,i, ctx);//set modID to crate #
113  }
114 
115 
117  ATH_MSG_DEBUG("Load and process CPM TOBs");
121  for (const CPMTobRoI* tau : *EMTaus) {
122  int crate = tau->crate();
123  CPRoIROD[crate]->push_back( getWord(tau->roiWord()) );
124  }
125 
126 
128  ATH_MSG_DEBUG("Load and process Jet TOBs");
132  for (const JEMTobRoI* jet : *Jets) {
133  int crate = jet->crate();
134  jepRoIROD[crate]->push_back( getWord(jet->roiWord()) );
135  }
136 
137 
141  jepRoIROD[1]->push_back(getWord(energy->exWord(LVL1::CMXRoI::NORMAL)));
142  jepRoIROD[1]->push_back(getWord(energy->eyWord(LVL1::CMXRoI::NORMAL)));
143  jepRoIROD[1]->push_back(getWord(energy->etWord(LVL1::CMXRoI::NORMAL)));
144  jepRoIROD[1]->push_back(getWord(energy->exWord(LVL1::CMXRoI::MASKED)));
145  jepRoIROD[1]->push_back(getWord(energy->eyWord(LVL1::CMXRoI::MASKED)));
146  jepRoIROD[1]->push_back(getWord(energy->etWord(LVL1::CMXRoI::MASKED)));
147 
148 
150  const unsigned int headerWords=8+1;//8 in Slink head + control word
151 
152  for (unsigned int i = 0; i<TrigT1CaloDefs::numOfCPRoIRODs;i++){
153  addTail(*CPRoIROD[i], (CPRoIROD[i]->size()-headerWords) );
154  }
155  for (unsigned int i = 0; i<TrigT1CaloDefs::numOfJEPRoIRODs;i++){
156  addTail(*jepRoIROD[i], (jepRoIROD[i]->size()-headerWords) );
157  }
158 
159  return;
160 }

◆ getWord()

std::unique_ptr< LVL1CTP::SlinkWord > LVL1::RoIROD::getWord ( unsigned int  tword) const
private

creates a new SlinkWord object with the passed word, and returns a pointer.

Definition at line 229 of file RoIROD.cxx.

230 {
231  return std::make_unique<LVL1CTP::SlinkWord>(tword);
232 }

◆ initialize()

StatusCode LVL1::RoIROD::initialize ( )
overridevirtual

Definition at line 44 of file RoIROD.cxx.

45 {
46  ATH_CHECK( m_emTauRoILocation.initialize() );
47  ATH_CHECK( m_JetRoILocation.initialize() );
48  ATH_CHECK( m_energyRoILocation.initialize() );
49 
50  m_jepSlinkKeys.clear();
51  m_jepSlinkKeys.push_back (m_jepSlinkLocation + "0");
52  m_jepSlinkKeys.push_back (m_jepSlinkLocation + "1");
53  ATH_CHECK( m_jepSlinkKeys.initialize() );
54 
55  m_emTauSlinkKeys.clear();
56  m_emTauSlinkKeys.push_back (m_emTauSlinkLocation + "0");
57  m_emTauSlinkKeys.push_back (m_emTauSlinkLocation + "1");
58  m_emTauSlinkKeys.push_back (m_emTauSlinkLocation + "2");
59  m_emTauSlinkKeys.push_back (m_emTauSlinkLocation + "3");
60  ATH_CHECK( m_emTauSlinkKeys.initialize() );
61 
62  return StatusCode::SUCCESS ;
63 }

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

bool AthReentrantAlgorithm::isClonable ( ) const
overridevirtualinherited

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::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< 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 380 of file AthCommonDataStore.h.

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

◆ renounceArray()

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

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ saveSlinkObjects()

StatusCode LVL1::RoIROD::saveSlinkObjects ( t_SlinkPtr  CPRoIROD[TrigT1CaloDefs::numOfCPRoIRODs],
t_SlinkPtr  jepRoIROD[TrigT1CaloDefs::numOfJEPRoIRODs],
const EventContext &  ctx 
) const
private

save Slink Objects to SG

Definition at line 195 of file RoIROD.cxx.

198 {
199  ATH_MSG_DEBUG("saveSlinkObjects");
200 
201  for (unsigned int i = 0; i<TrigT1CaloDefs::numOfCPRoIRODs;++i){
202  ATH_CHECK( SG::makeHandle (m_emTauSlinkKeys[i], ctx).record (std::move(CPRoIROD[i])) );
203  }
204 
205  for (unsigned int i = 0; i<TrigT1CaloDefs::numOfJEPRoIRODs;++i){
206  ATH_CHECK( SG::makeHandle (m_jepSlinkKeys[i], ctx).record (std::move(jepRoIROD[i])) );
207  }
208 
209  return StatusCode::SUCCESS;
210 }

◆ setFilterPassed()

virtual void AthReentrantAlgorithm::setFilterPassed ( bool  state,
const EventContext &  ctx 
) const
inlinevirtualinherited

Definition at line 139 of file AthReentrantAlgorithm.h.

139  {
140  execState( ctx ).setFilterPassed( state );
141  }

◆ sysExecute()

StatusCode AthReentrantAlgorithm::sysExecute ( const EventContext &  ctx)
overridevirtualinherited

Execute an algorithm.

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

Definition at line 67 of file AthReentrantAlgorithm.cxx.

68 {
69  return Gaudi::Algorithm::sysExecute (ctx);
70 }

◆ sysInitialize()

StatusCode AthReentrantAlgorithm::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 InputMakerBase, and HypoBase.

Definition at line 96 of file AthReentrantAlgorithm.cxx.

96  {
98 
99  if (sc.isFailure()) {
100  return sc;
101  }
102 
103  ServiceHandle<ICondSvc> cs("CondSvc",name());
104  for (auto h : outputHandles()) {
105  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
106  // do this inside the loop so we don't create the CondSvc until needed
107  if ( cs.retrieve().isFailure() ) {
108  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
109  return StatusCode::SUCCESS;
110  }
111  if (cs->regHandle(this,*h).isFailure()) {
112  sc = StatusCode::FAILURE;
113  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
114  << " with CondSvc");
115  }
116  }
117  }
118  return sc;
119 }

◆ sysStart()

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

Handle START transition.

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

◆ updateVHKA()

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

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
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< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_emTauRoILocation

SG::ReadHandleKey<t_cpmTobRoIContainer> LVL1::RoIROD::m_emTauRoILocation { this, "EmTauRoILocation", TrigT1CaloDefs::CPMTobRoILocation, "" }
private

Definition at line 108 of file RoIROD.h.

◆ m_emTauSlinkKeys

SG::WriteHandleKeyArray<t_SlinkContainer> LVL1::RoIROD::m_emTauSlinkKeys { this, "EmTauSlinkKeys", {}, "" }
private

Definition at line 116 of file RoIROD.h.

◆ m_emTauSlinkLocation

std::string LVL1::RoIROD::m_emTauSlinkLocation
private

Definition at line 115 of file RoIROD.h.

◆ m_energyRoILocation

SG::ReadHandleKey<t_EnergyRoIContainer> LVL1::RoIROD::m_energyRoILocation { this, "EnergyRoILocation", TrigT1CaloDefs::CMXRoILocation, "" }
private

Definition at line 112 of file RoIROD.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthReentrantAlgorithm::m_extendedExtraObjects
privateinherited

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

Empty if no symlinks were found.

Definition at line 153 of file AthReentrantAlgorithm.h.

◆ m_jepSlinkKeys

SG::WriteHandleKeyArray<t_SlinkContainer> LVL1::RoIROD::m_jepSlinkKeys { this, "JEPSlinkKeys", {}, "" }
private

Definition at line 120 of file RoIROD.h.

◆ m_jepSlinkLocation

std::string LVL1::RoIROD::m_jepSlinkLocation
private

Definition at line 119 of file RoIROD.h.

◆ m_JetRoILocation

SG::ReadHandleKey<t_jemTobRoIContainer> LVL1::RoIROD::m_JetRoILocation { this, "JetRoILocation", TrigT1CaloDefs::JEMTobRoILocation, "" }
private

Definition at line 110 of file RoIROD.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
LVL1::RoIROD::m_energyRoILocation
SG::ReadHandleKey< t_EnergyRoIContainer > m_energyRoILocation
Definition: RoIROD.h:113
LVL1::RoIROD::m_jepSlinkLocation
std::string m_jepSlinkLocation
Definition: RoIROD.h:119
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
LVL1::RoIROD::m_jepSlinkKeys
SG::WriteHandleKeyArray< t_SlinkContainer > m_jepSlinkKeys
Definition: RoIROD.h:121
xAOD::JEMTobRoI
JEMTobRoI_v1 JEMTobRoI
Define the latest version of the JEMTobRoI class.
Definition: Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/JEMTobRoI.h:17
LVL1::RoIROD::addTail
void addTail(t_SlinkContainer &slink, unsigned int numberOfDataWords) const
add Slink tail
Definition: RoIROD.cxx:181
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
AthCommonDataStore::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 > renounce(T &h)
Definition: AthCommonDataStore.h:380
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
LVL1::CMXRoI::NORMAL
@ NORMAL
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:26
LVL1::TrigT1CaloDefs::numOfJEPRoIRODs
static const unsigned int numOfJEPRoIRODs
Definition: TrigT1CaloDefs.h:225
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
LVL1::RoIROD::addHeader
void addHeader(t_SlinkContainer &slink, unsigned int subDetID, unsigned int moduleId, const EventContext &ctx) const
adds slink header
Definition: RoIROD.cxx:163
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:270
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthReentrantAlgorithm::AthReentrantAlgorithm
AthReentrantAlgorithm()
Default constructor:
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
DataModel_detail::iterator
(Non-const) Iterator class for DataVector/DataList.
Definition: DVLIterator.h:184
LVL1::TrigT1CaloDefs::EmTauSlinkLocation
static const std::string EmTauSlinkLocation
Definition: TrigT1CaloDefs.h:81
lumiFormat.i
int i
Definition: lumiFormat.py:92
LVL1::TrigT1CaloDefs::jepSlinkLocation
static const std::string jepSlinkLocation
Definition: TrigT1CaloDefs.h:82
LVL1::RoIROD::saveSlinkObjects
StatusCode saveSlinkObjects(t_SlinkPtr CPRoIROD[TrigT1CaloDefs::numOfCPRoIRODs], t_SlinkPtr jepRoIROD[TrigT1CaloDefs::numOfJEPRoIRODs], const EventContext &ctx) const
save Slink Objects to SG
Definition: RoIROD.cxx:195
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
LVL1::RoIROD::m_emTauRoILocation
SG::ReadHandleKey< t_cpmTobRoIContainer > m_emTauRoILocation
Definition: RoIROD.h:109
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
LVL1::RoIROD::t_SlinkPtr
std::unique_ptr< t_SlinkContainer > t_SlinkPtr
Definition: RoIROD.h:64
AthReentrantAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthReentrantAlgorithm.h:153
LVL1::RoIROD::getWord
std::unique_ptr< LVL1CTP::SlinkWord > getWord(unsigned int tword) const
creates a new SlinkWord object with the passed word, and returns a pointer.
Definition: RoIROD.cxx:229
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
LVL1::RoIROD::m_emTauSlinkLocation
std::string m_emTauSlinkLocation
Definition: RoIROD.h:115
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
AthReentrantAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthReentrantAlgorithm.cxx:96
LVL1::RoIROD::m_JetRoILocation
SG::ReadHandleKey< t_jemTobRoIContainer > m_JetRoILocation
Definition: RoIROD.h:111
LVL1::RoIROD::formSlinkObjects
void formSlinkObjects(t_SlinkPtr CPRoIROD[TrigT1CaloDefs::numOfCPRoIRODs], t_SlinkPtr jepRoIROD[TrigT1CaloDefs::numOfJEPRoIRODs], const EventContext &ctx) const
get ROIwords and form Slink words from them, adding header and tail.
Definition: RoIROD.cxx:101
LVL1::CMXRoI::MASKED
@ MASKED
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXRoI.h:26
a
TList * a
Definition: liststreamerinfos.cxx:10
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
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
LVL1::TrigT1CaloDefs::numOfCPRoIRODs
static const unsigned int numOfCPRoIRODs
Definition: TrigT1CaloDefs.h:224
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
LVL1::RoIROD::m_emTauSlinkKeys
SG::WriteHandleKeyArray< t_SlinkContainer > m_emTauSlinkKeys
Definition: RoIROD.h:117
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
xAOD::CPMTobRoI
CPMTobRoI_v1 CPMTobRoI
Define the latest version of the CPMTobRoI class.
Definition: Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/CPMTobRoI.h:17
fitman.k
k
Definition: fitman.py:528
ServiceHandle< ICondSvc >
LVL1::RoIROD::assignVectors
void assignVectors(t_SlinkPtr CPRoIROD[TrigT1CaloDefs::numOfCPRoIRODs], t_SlinkPtr jepRoIROD[TrigT1CaloDefs::numOfJEPRoIRODs]) const
Create the object vectors to be stored in SG and clear mult vectors.
Definition: RoIROD.cxx:214