|  | ATLAS Offline Software
    | 
 
 
 
Go to the documentation of this file.
    8 #include "GaudiKernel/MsgStream.h" 
   24           for(
int wireLayer = 0; wireLayer <4; wireLayer++){
 
   25             for(
int measuresPhi = 0; measuresPhi <2; measuresPhi++){
 
   35               unsigned int onlineId;
 
   38                 log << MSG::WARNING << 
"Failed at geting online id!" << 
endmsg;
 
  250     if(
val==-1) 
return StatusCode::FAILURE;
 
  251     return StatusCode::SUCCESS;
 
  257     if(
val==-1) 
return StatusCode::FAILURE;
 
  258     return StatusCode::SUCCESS;
 
  264     if(
val==-1) 
return StatusCode::FAILURE;
 
  265     return StatusCode::SUCCESS;
 
  271     if(
val==-1) 
return StatusCode::FAILURE;
 
  272     return StatusCode::SUCCESS;
 
  278     if(
val==-1) 
return StatusCode::FAILURE;
 
  279     return StatusCode::SUCCESS;
 
  285     if(
val==-1) 
return StatusCode::FAILURE;
 
  286     return StatusCode::SUCCESS;
 
  292     if(
val==-1) 
return StatusCode::FAILURE;
 
  293     return StatusCode::SUCCESS;
 
  300     return StatusCode::SUCCESS;
 
  353         return StatusCode::SUCCESS;
 
  355     if(cat == 
"ENDCAP") {
 
  362             log << 
MSG::INFO << 
"Requested index " << 
index << 
" can't be converted to a string Id for the category " << cat << 
endmsg;
 
  363             return StatusCode::RECOVERABLE;
 
  368     unsigned int onlineId = 0;
 
  369     std::stringstream 
ss;
 
  370     if(cat == 
"CHAMBER"){
 
  375             log << 
MSG::INFO << 
"Failed converting chamber identifier to online id during stringId gen." << 
endmsg;
 
  376             return StatusCode::RECOVERABLE;
 
  379     else if(cat == 
"LAYER"){
 
  380         unsigned int onlineId;
 
  383             log << 
MSG::INFO << 
"Failed at getting online id from layer hash during stringId gen." << 
endmsg;
 
  386     else if(cat == 
"CHANNEL"){
 
  391             log << 
MSG::INFO << 
"Failed converting chamber identifier to online id during stringId gen." << 
endmsg;
 
  392             return StatusCode::RECOVERABLE;
 
  396     ss << std::hex << std::setfill(
'0') << std::setw(5) << onlineId << std::dec;
 
  398     return StatusCode::SUCCESS;
 
  410         return StatusCode::SUCCESS;
 
  413     return StatusCode::SUCCESS;
 
  435     onlineId        += (
phi << 13) ;    
 
  436     onlineId    += (
eta <<12);            
 
  437     onlineId    += (chamLay <<11);      
 
  438     onlineId    += (wireLay << 9);      
 
  439     onlineId    += (measuresPhi << 8);  
 
  441     return StatusCode::SUCCESS;
 
  458     int wireLay =       (idHelper->
wireLayer(
id)-1) &0x3;             
 
  459     int measuresPhi =   (idHelper->
measuresPhi(
id) &0x1);           
 
  472     onlineId        += (
phi << 13) ;    
 
  473     onlineId    += (
eta <<12);            
 
  474     onlineId    += (chamLay <<11);      
 
  475     onlineId    += (wireLay << 9);      
 
  476     onlineId    += (measuresPhi << 8);  
 
  478     return StatusCode::SUCCESS;
 
  487     int phi =               ((onlineId >> 13)&0x7)+1;
 
  488     int eta =               ((((onlineId >> 12)&0
x1) == 1) ? 1:-1);
 
  489     int chamLay =           ((onlineId>>11)&0
x1) +1;
 
  490     int wireLay =           ((onlineId>>9)&0x3) +1;
 
  491     int measuresPhi =       ((onlineId >> 8)&0
x1);
 
  496       strip = 48 - ((onlineId)&0xff) ; 
 
  499       strip = ((onlineId)&0xff) +1;
 
  509     static std::atomic<bool> conversionFailPrinted = 
false;
 
  511       if (!conversionFailPrinted) {
 
  513         log << MSG::WARNING << 
"Failed to retrieve offline Identifier from online Identifier " << onlineId
 
  515                               << 
"This is likely due to the fact that the CSCCool database contains " 
  516                               << 
"more entries than the detector layout." << 
endmsg;
 
  517         conversionFailPrinted = 
true;
 
  519       return StatusCode::FAILURE;
 
  522     return StatusCode::SUCCESS;
 
  
StatusCode readChannelRMS(IdentifierHash, float &) const
const float & getChannelPSlope(IdentifierHash) const
constexpr uint8_t stationPhi
station Phi 1 to 8
const float & getChannelF001(IdentifierHash) const
std::map< unsigned int, float > m_cachedChannelsNoise
Scalar phi() const
phi method
StatusCode readChannelPed(IdentifierHash, float &) const
virtual int get_id(const IdentifierHash &hash_id, Identifier &id, const IdContext *context=0) const override
Create compact id from hash id (return == 0 for OK)
singleton-like access to IMessageSvc via open function and helper
std::string find(const std::string &s)
return a remapped string
void setDeadChannelHash(IdentifierHash)
StatusCode readChannelT0Phase(IdentifierHash, bool &) const
const std::vector< Identifier > & getDeadLayersId() const
const std::vector< unsigned int > & getDeadChannelsHash() const
IdContext channel_context() const
id for channel
Scalar eta() const
pseudorapidity method
void setChannelNoise(IdentifierHash, float)
bool m_onlineOfflinePhiFlip
std::vector< std::string > m_cachedDeadLayers
const int & getChannelStatus(IdentifierHash) const
void setChannelPSlope(IdentifierHash, float)
std::map< unsigned int, float > m_cachedChannelsPed
std::vector< Identifier > m_cachedDeadStationsId
int stationName(const Identifier &id) const
IdContext m_moduleContext
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
StatusCode offlineToOnlineId(const CscIdHelper *, const Identifier &, unsigned int &) const
std::map< unsigned int, float > m_cachedChannelsPSlope
IMessageSvc * getMessageSvc(bool quiet=false)
StatusCode indexToStringId(const CscIdHelper *, const unsigned int &, const std::string &, std::string &) const
std::vector< Identifier > m_cachedDeadLayersId
const std::vector< std::string > & getDeadStations() const
StatusCode readChannelT0Base(IdentifierHash, float &) const
std::vector< std::string > m_emptyNames
int wireLayer(const Identifier &id) const
StatusCode offlineElementToOnlineId(const CscIdHelper *, const Identifier &, unsigned int &) const
std::vector< Identifier > m_emptyIds
void setChannelRMS(IdentifierHash, float)
const float & getChannelRMS(IdentifierHash) const
std::vector< unsigned int > m_onlineChannelIdsFromLayerHash
StatusCode readChannelPSlope(IdentifierHash, float &) const
StatusCode readChannelStatus(IdentifierHash, int &) const
void setChannelPed(IdentifierHash, float)
::StatusCode StatusCode
StatusCode definition for legacy code.
void setChannelT0Phase(IdentifierHash, bool)
void setChannelStatus(IdentifierHash, int)
std::vector< unsigned int > m_cachedDeadChannelsHash
StatusCode readChannelNoise(IdentifierHash, float &) const
StatusCode readChannelF001(IdentifierHash, float &) const
void setDeadStation(std::string_view, Identifier)
void setDeadLayer(std::string_view, Identifier)
const std::vector< Identifier > & getDeadStationsId() const
int stationPhi(const Identifier &id) const
const float & getChannelNoise(IdentifierHash) const
std::map< unsigned int, float > m_cachedChannelsF001
Identifier channelID(int stationName, int stationEta, int stationPhi, int chamberLayer, int wireLayer, int measuresPhi, int strip) const
std::vector< std::string > m_cachedDeadStations
const std::vector< std::string > & getDeadLayers() const
int stationEta(const Identifier &id) const
void setChannelF001(IdentifierHash, float)
std::map< unsigned int, float > m_cachedChannelsT0Base
std::vector< unsigned int > m_emptyHashs
bool isGood(const Identifier &) const
Identifier elementID(int stationName, int stationEta, int stationPhi) const
IdContext m_channelContext
StatusCode onlineToOfflineIds(const CscIdHelper *, const unsigned int &, Identifier &, Identifier &) const
const float & getChannelPed(IdentifierHash) const
bool hasChannelT0Phase(IdentifierHash) const
int strip(const Identifier &id) const
std::map< unsigned int, int > m_cachedChannelsStatus
IdContext module_context() const
id for module
bool isGoodStation(const Identifier &) const
std::map< unsigned int, bool > m_cachedChannelsT0Phase
bool measuresPhi(const Identifier &id) const override
bool isGoodLayer(const Identifier &) const
constexpr uint8_t stationEta
1 to 3
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
void setChannelT0Base(IdentifierHash, float)
std::map< unsigned int, float > m_cachedChannelsRMS
int chamberLayer(const Identifier &id) const
StatusCode layerHashToOnlineId(const unsigned int &, unsigned int &) const
IdentifierHash layerHash(const UncalibratedMeasurement *meas)
Returns the layer hash from an uncalibrated meaurement.
bool isGoodChannelHash(const IdentifierHash &) const
const float & getChannelT0Base(IdentifierHash) const
const bool & getChannelT0Phase(IdentifierHash) const
void loadParameters(const CscIdHelper *)