58 {
59
60 MsgStream log(
msgSvc(), name() );
61 log << MSG::DEBUG << "in execute()" << endmsg;
62
63 SmartDataPtr<RecEsTimeCol> estimeCol( eventSvc(), "/Event/Recon/RecEsTimeCol" );
64
65 if ( !estimeCol || ( estimeCol->size() == 0 ) )
66 {
67 log << MSG::WARNING << "Could not find RecEsTimeCol!" << endmsg;
68 return StatusCode::SUCCESS;
69 }
70
71 RecEsTimeCol::iterator iter_ESTime = estimeCol->begin();
72 double t0 = ( *iter_ESTime )->getTest();
73
74 SmartDataPtr<RecEmcShowerCol> emcRecShowerCol( eventSvc(),
76 if ( !emcRecShowerCol )
77 {
78 log << MSG::WARNING << "Could not find RecEmcShowerCol!" << endmsg;
79 return StatusCode::SUCCESS;
80 }
81
82 RecEmcShowerCol::iterator iShowerCol;
83 for ( iShowerCol = emcRecShowerCol->begin(); iShowerCol != emcRecShowerCol->end();
84 iShowerCol++ )
85 {
86
87 if ( ( *iShowerCol )->status() >= 100 ) continue;
88
89 double tEmc = ( *iShowerCol )->time();
90 ( *iShowerCol )->setTime( tEmc - (int)( t0 / 50 ) );
91 ( *iShowerCol )->setStatus( ( *iShowerCol )->status() % 100 + 100 );
92
93 if ( m_output )
94 {
95 m_nt_emcTime = tEmc;
96 m_nt_estTime = (double)(int)( t0 / 50 );
97 m_nt_corTime = ( *iShowerCol )->time();
98 RecEmcID id( ( *iShowerCol )->getShowerId() );
102 m_nt_e5x5 = ( *iShowerCol )->e5x5();
103 m_nt_status = ( *iShowerCol )->status();
104 m_tuple->write();
105 }
106 }
107
108 return StatusCode::SUCCESS;
109}
static unsigned int barrel_ec(const Identifier &id)
Values of different levels (failure returns 0).
static unsigned int theta_module(const Identifier &id)
static unsigned int phi_module(const Identifier &id)
_EXTERN_ std::string RecEmcShowerCol