|  | ATLAS Offline Software
    | 
 
 
 
#include <TGCTriggerDbAlg.h>
|  | 
|  | TGCTriggerDbAlg (const std::string &name, ISvcLocator *pSvcLocator) | 
|  | 
| virtual | ~TGCTriggerDbAlg ()=default | 
|  | 
| virtual StatusCode | initialize () override | 
|  | 
| virtual StatusCode | execute () override | 
|  | 
| virtual StatusCode | finalize () override | 
|  | 
| virtual StatusCode | sysInitialize () override | 
|  | Override sysInitialize.  More... 
 | 
|  | 
| virtual const DataObjIDColl & | extraOutputDeps () const override | 
|  | Return the list of extra output dependencies.  More... 
 | 
|  | 
| ServiceHandle< StoreGateSvc > & | evtStore () | 
|  | The standard StoreGateSvc(event store) Returns (kind of) a pointer to theStoreGateSvc.  More...
 | 
|  | 
| const ServiceHandle< StoreGateSvc > & | evtStore () const | 
|  | The standard StoreGateSvc(event store) Returns (kind of) a pointer to theStoreGateSvc.  More...
 | 
|  | 
| const ServiceHandle< StoreGateSvc > & | detStore () const | 
|  | The standard StoreGateSvc/DetectorStoreReturns (kind of) a pointer to theStoreGateSvc.  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, V, H > &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 | 
|  | 
|  | 
| void | fillReadMapBw (TGCTriggerData *writeCdo, const CondAttrListCollection *readKey) | 
|  | 
| void | fillTrigBitEifi (TGCTriggerData *writeCdo, const CondAttrListCollection *readKey) | 
|  | 
| void | fillTrigBitTile (TGCTriggerData *writeCdo, const CondAttrListCollection *readKey) | 
|  | 
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) | 
|  | specialization for handling Gaudi::Property<SG::VarHandleKey>  More... 
 | 
|  | 
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &) | 
|  | specialization for handling Gaudi::Property<SG::VarHandleKeyArray>  More... 
 | 
|  | 
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &) | 
|  | specialization for handling Gaudi::Property<SG::VarHandleBase>  More... 
 | 
|  | 
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &) | 
|  | specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>  More... 
 | 
|  | 
|  | 
| SG::ReadCondHandleKey< CondAttrListCollection > | m_readKey_bw {this, "ReadKeyBw", "/TGC/TRIGGER/CW_BW", "SG key for CW-BW"} | 
|  | 
| SG::ReadCondHandleKey< CondAttrListCollection > | m_readKey_eifi {this, "ReadKeyEifi", "/TGC/TRIGGER/CW_EIFI", "SG key for CW-EIFI"} | 
|  | 
| SG::ReadCondHandleKey< CondAttrListCollection > | m_readKey_tile {this, "ReadKeyTile", "/TGC/TRIGGER/CW_TILE", "SG key for CW-TILE"} | 
|  | 
| SG::WriteCondHandleKey< TGCTriggerData > | m_writeKey {this, "WriteKey", "TGCTriggerData", "SG Key of TGCTrigger LUTs"} | 
|  | 
| DataObjIDColl | m_extendedExtraObjects | 
|  | 
| 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 14 of file TGCTriggerDbAlg.h.
 
◆ StoreGateSvc_t
◆ TGCTriggerDbAlg()
      
        
          | TGCTriggerDbAlg::TGCTriggerDbAlg | ( | const std::string & | name, | 
        
          |  |  | ISvcLocator * | pSvcLocator | 
        
          |  | ) |  |  | 
      
 
 
◆ ~TGCTriggerDbAlg()
  
  | 
        
          | virtual TGCTriggerDbAlg::~TGCTriggerDbAlg | ( |  | ) |  |  | virtualdefault | 
 
 
◆ 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]
◆ execute()
  
  | 
        
          | StatusCode TGCTriggerDbAlg::execute | ( |  | ) |  |  | overridevirtual | 
 
Definition at line 26 of file TGCTriggerDbAlg.cxx.
   29   if (writeHandle.isValid()) {
 
   30     ATH_MSG_DEBUG(
"CondHandle " << writeHandle.fullKey() << 
" is already valid." 
   31           << 
". In theory this should not be called, but may happen" 
   32           << 
" if multiple concurrent events are being processed out of order.");
 
   33     return StatusCode::SUCCESS; 
 
   36   auto writeCdo = std::make_unique<TGCTriggerData>();
 
   42   if (readCdo_bw == 
nullptr) {
 
   44     return StatusCode::FAILURE; 
 
   47   ATH_MSG_INFO(
"Size of CondAttrListCollection" << readHandle_bw.fullKey() << 
" = " << readCdo_bw->size());
 
   49   EventIDRange rangeW_bw;
 
   50   if ( !readHandle_bw.range(rangeW_bw) ) {
 
   51     ATH_MSG_ERROR(
"Failed to retrieve validity range for " << readHandle_bw.key());
 
   52     return StatusCode::FAILURE;
 
   62   if (readCdo_eifi == 
nullptr) {
 
   64     return StatusCode::FAILURE; 
 
   67   ATH_MSG_INFO(
"Size of CondAttrListCollection" << readHandle_eifi.fullKey() << 
" = " << readCdo_eifi->size());
 
   69   EventIDRange rangeW_eifi;
 
   70   if ( !readHandle_eifi.range(rangeW_eifi) ) {
 
   71     ATH_MSG_ERROR(
"Failed to retrieve validity range for " << readHandle_eifi.key());
 
   72     return StatusCode::FAILURE;
 
   81   if (readCdo_tile == 
nullptr) {
 
   83     return StatusCode::FAILURE; 
 
   85   ATH_MSG_INFO(
"Size of CondAttrListCollection" << readHandle_tile.fullKey() << 
" = " << readCdo_tile->
size());
 
   87   EventIDRange rangeW_tile;
 
   88   if ( !readHandle_tile.range(rangeW_tile) ) {
 
   89     ATH_MSG_ERROR(
"Failed to retrieve validity range for " << readHandle_tile.key());
 
   90     return StatusCode::FAILURE;
 
   98   if(rangeIntersection.start()>rangeIntersection.stop()) {
 
   99     ATH_MSG_ERROR(
"Invalid intersection range: " << rangeIntersection);
 
  100     return StatusCode::FAILURE;
 
  103   if (writeHandle.record(rangeIntersection, std::move(writeCdo)).isFailure()) {
 
  104     ATH_MSG_FATAL(
"Could not record TGCTriggerData " << writeHandle.key() 
 
  105           << 
" with EventRange " << rangeIntersection
 
  106           << 
" into Conditions Store");
 
  107     return StatusCode::FAILURE;
 
  109   ATH_MSG_INFO(
"recorded new " << writeHandle.key() << 
" with range " << rangeIntersection << 
" into Conditions Store");
 
  111   return StatusCode::SUCCESS;
 
 
 
 
◆ 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 
 
 
◆ extraOutputDeps()
  
  | 
        
          | const DataObjIDColl & AthAlgorithm::extraOutputDeps | ( |  | ) | const |  | overridevirtualinherited | 
 
Return the list of extra output dependencies. 
This list is extended to include symlinks implied by inheritance relations. 
Definition at line 50 of file AthAlgorithm.cxx.
   57   return Algorithm::extraOutputDeps();
 
 
 
 
◆ fillReadMapBw()
Definition at line 122 of file TGCTriggerDbAlg.cxx.
  125   const uint8_t kNMODULETYPE = 12;
 
  126   const uint8_t modulenumber[kNMODULETYPE]    = {0, 1, 2, 2, 3, 4, 5, 5, 6, 7, 8, 8};
 
  127   const std::string 
modulename[kNMODULETYPE]         = {
"0",
"1",
"2a",
"2b",
"3",
"4",
"5a",
"5b",
"6",
"7",
"8a",
"8b"};
 
  132   for(
auto& attrmap : *readCdo) {
 
  137     std::string 
version = *(
static_cast<const std::string*
>((atr[
"version"]).addressOfData()));
 
  138     std::string 
file = *(
static_cast<const std::string*
>((atr[
"file"]).addressOfData()));
 
  156       std::string 
side = 
file.substr(strlen(
"RPhiCoincidenceMap."), 1);
 
  158         if(sidename[
id] == 
side) {
 
  167       octantId = std::stoi(
file.substr(strlen(
"RPhiCoincidenceMap.X"), 1));
 
  174     for(
size_t iModule = 0; iModule < kNMODULETYPE; iModule++) {
 
  175       std::ostringstream 
dbname;
 
  176       dbname << 
"RPhiCoincidenceMap.";
 
  177       if (fullCW) 
dbname << sidename[sideId] << octantId << 
".";
 
  185     std::string 
data = *(
static_cast<const std::string*
>((atr[
"data"]).addressOfData()));
 
  201         int16_t lDR, hDR, lDPhi, hDPhi;
 
  202         header >> ptLevel >> roi >> 
mod >> lDR >> hDR >> lDPhi >> hDPhi;
 
  207         if( 
mod != modulenumber[moduleId] ||
 
  209           ATH_MSG_WARNING(
"Invalid configuration of DB file! - Nothing to load this DB file");
 
  218         std::istringstream cont(
field);
 
  225           if (bit == 0) 
continue; 
 
  227           for(
uint8_t iphi=0; iphi<15; iphi++) {  
 
  228             if(bit>>iphi & 0
x1) {
 
  229               uint32_t theaddr = octaddr + modaddr + cwaddr + draddr + iphi;
 
 
 
 
◆ fillTrigBitEifi()
preumably, as this is in a loop, there should be some ouput for the channel as well, although that is in a DEBUG statement, so presumably this prinout was demoted to DEBUG, but the following lines were forgotten 
Definition at line 243 of file TGCTriggerDbAlg.cxx.
  250   for(
auto& attrmap : *readCdo) {
 
  255     std::string 
version = *(
static_cast<const std::string*
>((atr[
"version"]).addressOfData()));
 
  256     std::string 
file = *(
static_cast<const std::string*
>((atr[
"file"]).addressOfData()));
 
  278       std::string 
side = 
file.substr(strlen(
"InnerCoincidenceMap."), 1);
 
  280         if(sidename[
id] == 
side) {
 
  291       dbname = 
"InnerCoincidenceMap." + sidename[sideId]
 
  299     std::istringstream 
stream(*(
static_cast<const std::string*
>((atr[
"data"]).addressOfData())));
 
  312         header >> sectorId >> sscId;
 
  329         flag_pt |= (use&0x1)<<
pt;
 
  337         flag_roi |= (use&0x1)<<
pos;
 
  342       std::istringstream cont(
field);
 
 
 
 
◆ fillTrigBitTile()
Definition at line 358 of file TGCTriggerDbAlg.cxx.
  364   for(
auto& attrmap : *readCdo) {
 
  369     ATH_MSG_DEBUG(
"channel: " << attrmap.first << 
", file: " << atr[
"file"].data<std::string>());
 
  374            << 
" version: " << atr[
"version"].data<std::string>());
 
  380             << 
" version: " << atr[
"version"].data<std::string>());
 
  385     std::istringstream 
stream(*(
static_cast<const std::string*
>((atr[
"data"]).addressOfData())));
 
  400         header >> sideId >> sectorId >> sscId;
 
  417         flagpt |= (use&0x1)<<
pt;
 
  425         roi |= (use&0x1)<<
pos;
 
  430       std::istringstream cont(
field);
 
  435         trigbit |= (word & 0xf)<<(
pos*4);
 
 
 
 
◆ finalize()
  
  | 
        
          | StatusCode TGCTriggerDbAlg::finalize | ( |  | ) |  |  | overridevirtual | 
 
 
◆ initialize()
  
  | 
        
          | StatusCode TGCTriggerDbAlg::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. 
 
 
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ 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()
◆ sysInitialize()
  
  | 
        
          | StatusCode AthAlgorithm::sysInitialize | ( |  | ) |  |  | overridevirtualinherited | 
 
 
◆ 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_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
  
  | 
        
          | DataObjIDColl AthAlgorithm::m_extendedExtraObjects |  | privateinherited | 
 
 
◆ m_readKey_bw
◆ m_readKey_eifi
◆ m_readKey_tile
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_writeKey
The documentation for this class was generated from the following files:
 
static constexpr uint8_t ROI_SHIFT
Bit position of the module number bits in the GLOBALADDR.
char data[hepevt_bytes_allocation_ATLAS]
static constexpr uint8_t SECTOR_MASK
Mask for trigger sector for the (EIFI/TILE) ADDR.
SG::ReadCondHandleKey< CondAttrListCollection > m_readKey_bw
static constexpr uint8_t ADDR_SECTOR_SHIFT
Bit position of the trigger sector bit in the (EIFI/TILE) ADDR.
std::unordered_map< uint16_t, uint16_t > m_trigbit_tile
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
static constexpr uint8_t ADDR_SIDE_SHIFT
Bit position of the side bit in the (EIFI/TILE) ADDR.
This class is a collection of AttributeLists where each one is associated with a channel number....
setScaleOne setStatusOne setSaturated int16_t
void fillReadMapBw(TGCTriggerData *writeCdo, const CondAttrListCollection *readKey)
static constexpr uint8_t EIFI_TRIGBIT_SHIFT
Special bit shift for the EIFI Trigger bit.
SG::ReadCondHandleKey< CondAttrListCollection > m_readKey_eifi
virtual void setOwner(IDataHandleHolder *o)=0
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
virtual StatusCode sysInitialize() override
Override sysInitialize.
static constexpr uint8_t SSC_MASK
Mask for SSC for the (EIFI/TILE) ADDR.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
std::unordered_map< uint16_t, uint8_t > m_flagpt_tile
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
static constexpr uint8_t MODULE_SHIFT
Bit position of the module number bits in the GLOBALADDR.
static constexpr uint8_t MODULE_MASK
Mask for extracting the module number from the GLOBALADDR.
static constexpr uint8_t PHIMOD2_SHIFT
Bit position of the module number bits in the GLOBALADDR.
std::unordered_map< uint32_t, uint8_t > m_ptmap_bw
Run-2 BW-CW LUT map.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
static constexpr uint8_t PHIMOD2_MASK
Mask for extracting the phi(F or B) from the GLOBALADDR.
static constexpr uint8_t OCTANT_SHIFT
Bit position of the octant bits in the GLOBALADDR.
StatusCode initialize(bool used=true)
size_type size() const
number of Chan/AttributeList pairs
static constexpr uint8_t SIDE_MASK
Mask for extracting the side from the GLOBALADDR.
std::unordered_map< uint16_t, uint16_t > m_trigbit_eifi
std::unordered_map< uint16_t, uint8_t > m_flagroi_eifi
int ir
counter of the current depth
static constexpr uint8_t OCTANT_MASK
Mask for extracting the octant from the GLOBALADDR.
DataObjIDColl m_extendedExtraObjects
SG::WriteCondHandleKey< TGCTriggerData > m_writeKey
std::optional< double > intersect(const AmgVector(N)&posA, const AmgVector(N)&dirA, const AmgVector(N)&posB, const AmgVector(N)&dirB)
Calculates the point B' along the line B that's closest to a second line A.
#define ATH_MSG_WARNING(x)
std::unordered_map< uint16_t, uint8_t > m_flagpt_eifi
int8_t getTYPE(const int16_t lDR, const int16_t hDR, const int16_t lDPhi, const int16_t hDPhi) const
std::unordered_map< uint16_t, uint8_t > m_flagroi_tile
static constexpr uint8_t DR_SHIFT
Bit position of the deltaR bits in the GLOBALADDR.
SG::ReadCondHandleKey< CondAttrListCollection > m_readKey_tile
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
static constexpr uint8_t TYPE_SHIFT
Bit position of the octant bits in the GLOBALADDR.
void fillTrigBitEifi(TGCTriggerData *writeCdo, const CondAttrListCollection *readKey)
static constexpr uint8_t SIDE_SHIFT
Bit position of the side bit in the GLOBALADDR.
static constexpr uint8_t DR_MASK
Mask for extracting the deltaR from the GLOBALADDR.
AthAlgorithm()
Default constructor:
void fillTrigBitTile(TGCTriggerData *writeCdo, const CondAttrListCollection *readKey)
static constexpr uint8_t PT_MASK
Mask for pT value for Run-2.
static constexpr uint8_t TYPE_MASK
Mask for extracting the octant from the GLOBALADDR.
std::string m_type[CW_NUM]
static constexpr uint8_t ROI_MASK
Mask for extracting the module number from the GLOBALADDR.