|
ATLAS Offline Software
|
#include <MuCalStreamerTool.h>
|
| MuCalStreamerTool (const std::string &type, const std::string &name, const IInterface *parent) |
|
virtual StatusCode | initialize () override |
|
const std::string & | instanceName () const |
|
void | setInstanceName (const std::string &name) |
|
void | setBufferName (const std::string &buffName) |
|
std::vector< int > * | getLocalBuffer () |
|
int | getLocalBufferSize () const |
|
StatusCode | openStream (int calBufferSize) |
|
StatusCode | closeStream () |
|
bool | isStreamOpen () |
|
StatusCode | createRoiFragment (const xAOD::MuonRoI *roi, TrigL2MuonSA::TrackPattern &trackPattern, TrigL2MuonSA::MdtHits &mdtHits, TrigL2MuonSA::RpcHits &rpcHits, TrigL2MuonSA::TgcHits &tgcHits, bool doDataScouting, bool &updateTriggerElement, 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 | 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 |
|
|
Gaudi::Property< bool > | m_writeToFile { this, "WriteToFile", false, "" } |
|
SG::ReadHandleKey< TgcRdoContainer > | m_tgcRdoKey {this, "TgcRdoContainer", "TGCRDO", "Tgc RDO Input"} |
|
SG::ReadHandleKey< xAOD::EventInfo > | m_eventInfoKey { this, "EventInfoKey", "EventInfo", "" } |
|
SG::ReadHandleKey< RpcPadContainer > | m_rpcPadKey {this, "RpcPadContainerKey", "RPCPAD", "RpcPad container fro MuCalStreamerTool"} |
|
std::string | m_calBufferName |
|
std::string | m_algInstanceName |
|
std::ofstream | m_outputFile |
|
ToolHandle< IRegSelTool > | m_regSel_MDT {this, "RegSel_MDT", "RegSelTool/RegSelTool_MDT", "MDT Region Selector Tool"} |
|
ToolHandle< IRegSelTool > | m_regSel_TGC {this, "RegSel_TGC", "RegSelTool/RegSelTool_TGC", "TGC Region Selector Tool"} |
|
SG::ReadCondHandleKey< RpcCablingCondData > | m_readKey {this, "ReadKey", "RpcCablingCondData", "Key of RpcCablingCondData"} |
|
int | m_localBufferSize = 0 |
|
std::vector< int > | m_localBuffer |
|
TrigL2MuonSA::MuCalCircClient * | m_circ = nullptr |
|
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 |
|
Definition at line 54 of file MuCalStreamerTool.h.
◆ StoreGateSvc_t
◆ MuCalStreamerTool()
TrigL2MuonSA::MuCalStreamerTool::MuCalStreamerTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ closeStream()
StatusCode TrigL2MuonSA::MuCalStreamerTool::closeStream |
( |
| ) |
|
◆ createMdtFragment()
StatusCode TrigL2MuonSA::MuCalStreamerTool::createMdtFragment |
( |
TrigL2MuonSA::MdtHits & |
mdtHits, |
|
|
LVL2_MUON_CALIBRATION::MdtCalibFragment & |
mdtFragment, |
|
|
float |
phi |
|
) |
| const |
|
private |
Definition at line 241 of file MuCalStreamerTool.cxx.
246 TrigL2MuonSA::MdtHits::const_iterator
it = mdtHits.begin();
247 for ( ;
it != mdtHits.end() ; ++
it ) {
252 int multilayer = (*it).Multilayer;
253 int layer = (*it).TubeLayer;
254 int tube = (*it).Tube;
257 stationEta,stationPhi,multilayer,
layer,
tube);
259 uint16_t leadingCoarseTime = (*it).LeadingCoarseTime;
260 uint16_t leadingFineTime = (*it).LeadingFineTime;
261 uint16_t trailingCoarseTime = (*it).TrailingCoarseTime;
262 uint16_t trailingFineTime = (*it).TrailingFineTime;
265 LVL2_MUON_CALIBRATION::MdtCalibData mdt(
ID,leadingCoarseTime,leadingFineTime,
266 trailingCoarseTime,trailingFineTime,
adc
275 return StatusCode::SUCCESS;
◆ createRoiFragment()
Definition at line 111 of file MuCalStreamerTool.cxx.
127 unsigned int totalHits = mdtHits.size()+rpcHits.size()+tgcHits.size();
128 if ( totalHits > 500 ) {
130 updateTriggerElement=
false;
131 return StatusCode::SUCCESS;
137 return StatusCode::FAILURE;
147 uint32_t lvl1Id = eventInfo->extendedLevel1ID();
152 float phi = (
float)
track.phiVtx;
157 std::vector<uint32_t> robIdList_MDT;
160 double phi_roi = roi->
phi();
161 double phiMin = roi->
phi()-0.05;
162 double phiMax = roi->
phi()+0.05;
163 if( phi_roi < 0 ) phi_roi += 2*
M_PI;
164 if( phiMin < 0 ) phiMin += 2*
M_PI;
165 if( phiMax < 0 ) phiMax += 2*
M_PI;
170 m_regSel_MDT->lookup( ctx )->ROBIDList(*iroi,robIdList_MDT);
173 ATH_MSG_DEBUG(
"Size of the MDT rob list: " << robIdList_MDT.size());
174 int isize = robIdList_MDT.size()<5 ? robIdList_MDT.size() : 4;
175 for (
int ii = 0 ; ii<isize ; ++ii ) {
176 ATH_MSG_DEBUG(
"robId: 0x" << std::hex << robIdList_MDT.at(ii) << std::dec);
177 mrods[ii] = robIdList_MDT.at(ii);
181 std::vector<uint32_t> robIdList_TGC;
182 m_regSel_TGC->lookup(ctx)->ROBIDList(*iroi,robIdList_TGC);
183 ATH_MSG_DEBUG(
"Size of the TGC rob list: " << robIdList_TGC.size());
186 LVL2_MUON_CALIBRATION::CalibEvent
event(1,
runId,lvl1Id,1,1,mrods,
name().c_str(),eta,phi,
pt);
187 LVL2_MUON_CALIBRATION::MdtCalibFragment mdtFragment;
190 if ( mdtHits.size()>0 ) {
194 event << mdtFragment;
198 return StatusCode::SUCCESS;
202 if ( rpcHits.size() > 0 ) {
203 LVL2_MUON_CALIBRATION::RpcCalibFragment rpcFragment;
206 ATH_MSG_WARNING(
"Could not create the Rpc fragment of the calibration stream");
209 ATH_MSG_DEBUG(
"Adding the RPC fragment to the calibration stream");
210 event << rpcFragment;
214 if ( tgcHits.size() > 0 ) {
215 LVL2_MUON_CALIBRATION::TgcCalibFragment tgcFragment;
218 ATH_MSG_ERROR(
"Could not create the Tgc fragment of the calibration stream");
221 ATH_MSG_DEBUG(
"Adding the TGC fragment to the calibration stream");
222 event << tgcFragment;
235 return StatusCode::SUCCESS;
◆ createRpcFragment()
StatusCode TrigL2MuonSA::MuCalStreamerTool::createRpcFragment |
( |
const xAOD::MuonRoI * |
roi, |
|
|
LVL2_MUON_CALIBRATION::RpcCalibFragment & |
rpcFragment, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
private |
Definition at line 283 of file MuCalStreamerTool.cxx.
289 if ( roi->
getSource() != 0 )
return StatusCode::SUCCESS;
304 unsigned int padIdHash;
305 if (readCdo->give_PAD_address(
side, sector,
roiNumber, padIdHash)) {
308 if( itPad==
nullptr ) {
310 return StatusCode::FAILURE;
312 const RpcPad* rpcPad = itPad;
315 uint16_t sysId = (sector<32)? 0x66 : 0x65;
321 LVL2_MUON_CALIBRATION::RpcCalibFragment frag(sysId,secId,padId,
status,
error);
324 for (; it3!=rpcPad->
end() ; ++it3) {
332 LVL2_MUON_CALIBRATION::RpcCalibData
matrix(cmaId,fel1Id,febcId,crc);
336 for (; it5 != (*it3)->end() ; ++it5) {
356 ATH_MSG_WARNING(
"Can't get the pad address from the RpcCablingCondData");
357 return StatusCode::FAILURE;
360 return StatusCode::SUCCESS;
◆ createTgcFragment()
StatusCode TrigL2MuonSA::MuCalStreamerTool::createTgcFragment |
( |
std::vector< uint32_t > & |
tgcRobIdList, |
|
|
LVL2_MUON_CALIBRATION::TgcCalibFragment & |
tgcFragment |
|
) |
| const |
|
private |
Definition at line 368 of file MuCalStreamerTool.cxx.
373 if ( robIdList_TGC.size()<1 ) {
375 return StatusCode::SUCCESS;
381 uint16_t subSystemId = ( (robIdList_TGC.at(0) & 0xff0000) >> 16 );
382 uint16_t rdoId = ( robIdList_TGC.at(0) & 0xff );
386 tgcFragment = LVL2_MUON_CALIBRATION::TgcCalibFragment(
systemId,subSystemId,rdoId,
roiNumber);
390 if (!rdoRH.isValid()) {
392 return StatusCode::FAILURE;
400 LVL2_MUON_CALIBRATION::TgcCalibData tgc_payload;
403 for ( ;
it != tgcRdoContainer->
end() ; ++
it ) {
411 for ( ; itRaw != (*it)->end() ; ++itRaw ) {
414 LVL2_MUON_CALIBRATION::TGC_BYTESTREAM_READOUTHIT roh;
415 LVL2_MUON_CALIBRATION::TGC_BYTESTREAM_READOUTTRIPLETSTRIP tps;
416 LVL2_MUON_CALIBRATION::TGC_BYTESTREAM_READOUTTRACKLET rot;
417 LVL2_MUON_CALIBRATION::TGC_BYTESTREAM_HIPT hpt;
418 LVL2_MUON_CALIBRATION::TGC_BYTESTREAM_SL sl;
421 switch (raw->
type()) {
424 roh.channel = raw->
channel()-40;
425 roh.sbId = raw->
slbId();
428 roh.ldbId = raw->
sswId();
440 tps.sbId = raw->
slbId();
441 tps.ldbId = raw->
sswId();
451 rot.delta = raw->
delta();
452 rot.sbId = raw->
slbId();
453 rot.ldbId = raw->
sswId();
463 hpt.delta = raw->
delta();
464 hpt.hitId = raw->
hitId();
466 hpt.cand = raw->
index();
467 hpt.chip = raw->
chip();
468 hpt.sector = raw->
sector();
480 sl.cand = raw->
index();
481 sl.sector = raw->
sector();
490 return StatusCode::FAILURE;
494 tgc_payload.getHit(roh,tps,rot,hpt,sl);
499 tgcFragment << tgc_payload;
501 return StatusCode::SUCCESS;
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
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
◆ getLocalBuffer()
std::vector<int>* TrigL2MuonSA::MuCalStreamerTool::getLocalBuffer |
( |
| ) |
|
|
inline |
◆ getLocalBufferSize()
int TrigL2MuonSA::MuCalStreamerTool::getLocalBufferSize |
( |
| ) |
const |
|
inline |
◆ initialize()
StatusCode TrigL2MuonSA::MuCalStreamerTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ inputHandles()
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.
◆ instanceName()
const std::string& TrigL2MuonSA::MuCalStreamerTool::instanceName |
( |
| ) |
const |
|
inline |
◆ isStreamOpen()
bool TrigL2MuonSA::MuCalStreamerTool::isStreamOpen |
( |
| ) |
|
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ openStream()
StatusCode TrigL2MuonSA::MuCalStreamerTool::openStream |
( |
int |
calBufferSize | ) |
|
Definition at line 54 of file MuCalStreamerTool.cxx.
69 <<
name <<
" buffer size=" << calBufferSize);
72 ATH_MSG_INFO(
"Opening muon calibration stream. Buffer name: "
73 <<
name <<
" buffer size: " << calBufferSize);
76 return StatusCode::SUCCESS;
◆ outputHandles()
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()
◆ renounceArray()
◆ setBufferName()
void TrigL2MuonSA::MuCalStreamerTool::setBufferName |
( |
const std::string & |
buffName | ) |
|
|
inline |
◆ setInstanceName()
void TrigL2MuonSA::MuCalStreamerTool::setInstanceName |
( |
const std::string & |
name | ) |
|
|
inline |
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_algInstanceName
std::string TrigL2MuonSA::MuCalStreamerTool::m_algInstanceName |
|
private |
◆ m_calBufferName
std::string TrigL2MuonSA::MuCalStreamerTool::m_calBufferName |
|
private |
◆ m_circ
◆ m_detStore
◆ m_eventInfoKey
◆ m_evtStore
◆ m_localBuffer
std::vector<int> TrigL2MuonSA::MuCalStreamerTool::m_localBuffer |
|
private |
◆ m_localBufferSize
int TrigL2MuonSA::MuCalStreamerTool::m_localBufferSize = 0 |
|
private |
◆ m_outputFile
std::ofstream TrigL2MuonSA::MuCalStreamerTool::m_outputFile |
|
private |
◆ m_readKey
◆ m_regSel_MDT
◆ m_regSel_TGC
◆ m_rpcPadKey
◆ m_tgcRdoKey
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_writeToFile
Gaudi::Property< bool > TrigL2MuonSA::MuCalStreamerTool::m_writeToFile { this, "WriteToFile", false, "" } |
|
private |
The documentation for this class was generated from the following files:
constexpr uint8_t stationPhi
station Phi 1 to 8
Const iterator class for DataVector/DataList.
std::vector< Identifier > ID
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
float eta() const
The pseudorapidity ( ) of the muon candidate.
std::vector< SG::VarHandleKeyArray * > m_vhka
nope - should be used for standalone also, perhaps need to protect the class def bits #ifndef XAOD_AN...
Hemisphere getHemisphere() const
Returns the hemisphere that detected the muon candidate.
virtual void setOwner(IDataHandleHolder *o)=0
uint16_t subMatrix() const
bool dumpToCirc(LVL2_MUON_CALIBRATION::CalibEvent &event) const
POOL::TEvent event(POOL::TEvent::kClassAccess)
Describes the API of the Region of Ineterest geometry.
uint16_t tracklet() const
Class describing a LVL1 muon region of interest.
RoISource getSource() const
Returns the system that detected the muon candidate.
const_iterator end() const
return const_iterator for end of container
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
const_iterator begin() const
return const_iterator for first entry
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
int getRoI() const
Get the "RoI number" (position inside the sector)
unsigned bcBitmap(uint16_t bcTag)
uint16_t position() const
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
uint16_t threshold() const
setTeId setLumiBlock setRoiId setRoiSubsystem roiNumber
StatusCode initialize(bool used=true)
setEventNumber setTimeStamp bcid
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
virtual const T * indexFindPtr(IdentifierHash hashId) const override final
return pointer on the found entry or null if out of range using hashed index - fast version,...
def time(flags, cells_name, *args, **kw)
#define ATH_MSG_WARNING(x)
An unit object of TGC ROD output.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
bool trackPhi(const xAOD::TauJet &, const xAOD::TauTrack &track, double &out)
int getSectorID() const
Get the sector ID number.
constexpr uint8_t stationEta
1 to 3
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
Use IdentifiableContainer with RpcPad.
float phi() const
The azimuthal angle ( ) of the muon candidate.