  | 
  
    ATLAS Offline Software
    
   | 
 
 
 
 
Go to the documentation of this file.
   23   return StatusCode::SUCCESS;
 
   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; 
 
   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; 
 
   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; 
 
   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;
 
  118   return StatusCode::SUCCESS;
 
  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;
 
  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);
 
  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);
 
  
virtual StatusCode initialize() override
 
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.
 
const DataObjID & fullKey() const
 
std::unordered_map< uint16_t, uint16_t > m_trigbit_tile
 
static constexpr uint8_t ADDR_SIDE_SHIFT
Bit position of the side bit in the (EIFI/TILE) ADDR.
 
bool range(EventIDRange &r)
 
This class is a collection of AttributeLists where each one is associated with a channel number....
 
virtual StatusCode finalize() override
 
TGCTriggerDbAlg(const std::string &name, ISvcLocator *pSvcLocator)
 
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
 
static constexpr uint8_t SSC_MASK
Mask for SSC for the (EIFI/TILE) ADDR.
 
::StatusCode StatusCode
StatusCode definition for legacy code.
 
std::unordered_map< uint16_t, uint8_t > m_flagpt_tile
 
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.
 
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.
 
SG::WriteCondHandleKey< TGCTriggerData > m_writeKey
 
virtual StatusCode execute() override
 
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
 
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.
 
void fillTrigBitTile(TGCTriggerData *writeCdo, const CondAttrListCollection *readKey)
 
static constexpr uint8_t PT_MASK
Mask for pT value for Run-2.
 
const std::string & key() const
 
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.