19 base_class( name, pSvcLocator ),
25 declareProperty(
"DetectorStore",
m_detStore );
37 StatusCode
sc(StatusCode::SUCCESS);
58 if ( barrel_ec == 1 ) partition = 0x31;
59 else if ( barrel_ec == -1 ) partition = 0x32;
60 else if ( barrel_ec == 2 ) partition = 0x33;
61 else if ( barrel_ec == -2 ) partition = 0x34;
67 int phi = phi_module + 1;
70 if ( abs(barrel_ec) == 2 ) {
71 if ( layer_or_wheel >= 0 && layer_or_wheel < 4 ) rodHalf = 2;
72 if ( layer_or_wheel == 4 && straw_layer >= 0 && straw_layer < 8 ) rodHalf = 1;
73 if ( layer_or_wheel == 4 && straw_layer >= 8 && straw_layer < 16 ) rodHalf = 2;
74 if ( layer_or_wheel == 5 && straw_layer >= 0 && straw_layer < 8 ) rodHalf = 2;
75 if ( layer_or_wheel == 5 && straw_layer >= 8 && straw_layer < 16 ) rodHalf = 1;
76 if ( layer_or_wheel >= 6 && layer_or_wheel < 14 ) rodHalf = 1;
79 int thisRODid = partition*0x10000 +
phi*0x100 + rodHalf;
91 if ( !EnabledRods )
return InDet::TRT_COND_NOINFO;
93 unsigned int thisRODid =
RODid( ident );
106 if ( !EnabledRods )
return InDet::TRT_COND_NOINFO;
111 return InDet::TRT_COND_NOINFO;
114 std::string chanName =
"";
115 for ( chanNameMapItr = EnabledRods->
name_begin();
116 chanNameMapItr != EnabledRods->
name_end(); ++chanNameMapItr ) {
117 chanNum = (*chanNameMapItr).first;
118 chanName = (*chanNameMapItr).second;
121 std::string ROD_Part = std::string( chanName, chanName.length()-6, 2 );
122 std::string ROD_Phi = std::string( chanName, chanName.length()-4, 2 );
123 std::string ROD_Half = std::string( chanName, chanName.length()-2, 2 );
125 unsigned int rod = 0;
131 std::istringstream iss(ROD_Part);
133 switch ( ROD_Part_int ) {
135 rod += 0x10000 * 0x31;
138 rod += 0x10000 * 0x32;
141 rod += 0x10000 * 0x33;
144 rod += 0x10000 * 0x34;
151 char* extra =
nullptr;
152 int ROD_Phi_int = strtol( ROD_Phi.c_str(), &extra, 16 );
153 rod += ROD_Phi_int * 0x100;
155 rod += atoi(ROD_Half.c_str());
158 if ( rod == thisRODid )
break;
160 if ( chanNameMapItr == EnabledRods->
name_end() ) {
162 return InDet::TRT_COND_BAD;
170 if ( chanAttrListPair == EnabledRods->
end() ) {
171 ATH_MSG_VERBOSE(
"Channel " << chanNum <<
" (" << chanName <<
") not found." );
172 return InDet::TRT_COND_BAD;
176 ATH_MSG_VERBOSE(
"Channel " << chanNum <<
" (" << chanName <<
") enabled in this event." );
177 return InDet::TRT_COND_GOOD;
184 return StatusCode::SUCCESS;
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
This class is a collection of AttributeLists where each one is associated with a channel number.
const_iterator end() const
name_const_iterator name_begin() const
Access to Chan/Name pairs via iterators.
name_size_type name_size() const
number of Chan/Name pairs
name_const_iterator name_end() const
ChanAttrListMap::const_iterator const_iterator
ChanNameMap::const_iterator name_const_iterator
const_iterator chanAttrListPair(ChanNum chanNum) const
Access to Chan/AttributeList pairs via channel number: returns map iterator.
InDet::TRT_CondFlag condSummaryStatus(unsigned int)
ConditionsSummaryStatus for a ROD ID.
virtual ~TRT_DAQ_ConditionsSvc()
Destructor //.
const TRT_ID * m_TRT_ID_Helper
virtual StatusCode finalize()
Finalize //.
SG::ReadCondHandleKey< CondAttrListCollection > m_RobinsReadKey
virtual StatusCode initialize()
Initialize //.
ServiceHandle< StoreGateSvc > m_detStore
unsigned int RODid(const Identifier &)
Return ROD identifier //.
TRT_DAQ_ConditionsSvc(const std::string &, ISvcLocator *)
Constructor //.