52 if ( m_dacSaturSkip && m_dacSaturLayer0.size()<3 ) {
53 ATH_MSG_WARNING(
"DACSaturPS jobOption has wrong size. Will use default." ) ;
54 m_dacSaturLayer0.resize(3);
55 m_dacSaturLayer0[0] = 15000 ;
56 m_dacSaturLayer0[1] = 50000 ;
57 m_dacSaturLayer0[2] = 65000 ;
59 if ( m_dacSaturSkip && m_dacSaturLayer1.size()<3 ) {
60 ATH_MSG_WARNING(
"DACSaturStrips jobOption has wrong size. Will use default." ) ;
61 m_dacSaturLayer1.resize(3);
62 m_dacSaturLayer1[0] = 800 ;
63 m_dacSaturLayer1[1] = 8000 ;
64 m_dacSaturLayer1[2] = 65000 ;
66 if ( m_dacSaturSkip && m_dacSaturLayer2.size()<3 ) {
67 ATH_MSG_WARNING(
"DACSaturMiddle jobOption has wrong size. Will use default." ) ;
68 m_dacSaturLayer2.resize(3);
69 m_dacSaturLayer2[0] = 1000 ;
70 m_dacSaturLayer2[1] = 10000 ;
71 m_dacSaturLayer2[2] = 65000 ;
73 if ( m_dacSaturSkip && m_dacSaturLayer3.size()<3 ) {
74 ATH_MSG_WARNING(
"DACSaturBack jobOption has wrong size. Will use default." ) ;
75 m_dacSaturLayer3.resize(3);
76 m_dacSaturLayer3[0] = 800 ;
77 m_dacSaturLayer3[1] = 8000 ;
78 m_dacSaturLayer3[2] = 65000 ;
82 sc=m_nt->addItem(
"DAC",m_dac,0,600000);
83 if (
sc!=StatusCode::SUCCESS) {
85 return StatusCode::FAILURE;
88 sc=m_nt->addItem(
"gain",m_gain,0,3);
89 if (
sc!=StatusCode::SUCCESS) {
91 return StatusCode::FAILURE;
95 sc=m_nt->addItem(
"isPulsed",m_isPulsed);
96 if (
sc!=StatusCode::SUCCESS) {
98 return StatusCode::FAILURE;
100 sc=m_nt->addItem(
"nPulsedCalibLines",m_nPulsedCalibLines,0,4);
101 if (
sc!=StatusCode::SUCCESS) {
103 return StatusCode::FAILURE;
106 sc=m_nt->addItem(
"pulsedCalibLines",4,m_pulsedCalibLines);
107 if (
sc!=StatusCode::SUCCESS) {
109 return StatusCode::FAILURE;
114 sc=m_nt->addItem(
"Jitter",m_jitter,0.,1.);
115 if (
sc!=StatusCode::SUCCESS) {
117 return StatusCode::FAILURE;
122 sc=m_nt->addItem(
"corrUndo",m_corrUndo,0,1);
123 if (
sc!=StatusCode::SUCCESS) {
125 return StatusCode::FAILURE;
142 return StatusCode::FAILURE;
145 for (
unsigned k=0 ; k<m_keylist.size() ; k++ ) {
146 const std::string& key = m_keylist[k] ;
149 ATH_MSG_INFO(
"Processing WaveContainer from StoreGate! key=" << m_keylist[k] );
151 StatusCode
sc = m_detStore->retrieve(caliWaveContainer,key);
152 if (
sc.isFailure()) {
153 ATH_MSG_ERROR(
"Cannot read LArCaliWaveContainer from StoreGate! key=" << key );
154 return StatusCode::FAILURE;
156 ATH_MSG_INFO(
"Read LArCaliWaveContainer from StoreGate! key= " << key );
162 if (
sc.isFailure()) {
163 ATH_MSG_ERROR(
"Failed to apply corrections to LArCaliWaveContainer!" );
166 ATH_MSG_INFO(
"Applied corrections to LArCaliWaveContainer" );
175 for (
const HWIdentifier chid: m_onlineId->channel_range()) {
178 if (cwv.empty())
continue;
180 LArCaliWaveVec::const_iterator cwv_it=cwv.begin();
181 LArCaliWaveVec::const_iterator cwv_it_e=cwv.end();
182 for (;cwv_it!=cwv_it_e;++cwv_it) {
185 if (m_addCorrUndo) m_corrUndo=0;
186 bool skip=writeEntry(chid,igain,wave,clCont);
189 if (
sc!=StatusCode::SUCCESS) {
202 for(;itUndo!=itUndo_e;itUndo++) {
205 LArCaliWaveVec::const_iterator cwv_it=cwv.begin();
206 LArCaliWaveVec::const_iterator cwv_it_e=cwv.end();
207 for (;cwv_it!=cwv_it_e;++cwv_it) {
209 m_gain = (long)igain;
211 bool skip=writeEntry(chid,igain,wave,clCont);
214 if (
sc!=StatusCode::SUCCESS) {
222 if (caliWaveContainer_nc) {
224 ATH_MSG_INFO(
"Reverted corrections of CaliWave container");
228 return StatusCode::SUCCESS;