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(
"nPulsedCalibLines",m_nPulsedCalibLines,0,4);
96 if (
sc!=StatusCode::SUCCESS) {
98 return StatusCode::FAILURE;
101 sc=m_nt->addItem(
"pulsedCalibLines",4,m_pulsedCalibLines);
102 if (
sc!=StatusCode::SUCCESS) {
104 return StatusCode::FAILURE;
109 sc=m_nt->addItem(
"Jitter",m_jitter,0.,1.);
110 if (
sc!=StatusCode::SUCCESS) {
112 return StatusCode::FAILURE;
117 sc=m_nt->addItem(
"corrUndo",m_corrUndo,0,1);
118 if (
sc!=StatusCode::SUCCESS) {
120 return StatusCode::FAILURE;
137 return StatusCode::FAILURE;
140 for (
unsigned k=0 ;
k<m_keylist.size() ;
k++ ) {
141 const std::string&
key = m_keylist[
k] ;
144 ATH_MSG_INFO(
"Processing WaveContainer from StoreGate! key=" << m_keylist[
k] );
147 if (
sc.isFailure()) {
148 ATH_MSG_ERROR(
"Cannot read LArCaliWaveContainer from StoreGate! key=" <<
key );
149 return StatusCode::FAILURE;
151 ATH_MSG_INFO(
"Read LArCaliWaveContainer from StoreGate! key= " <<
key );
157 if (
sc.isFailure()) {
158 ATH_MSG_ERROR(
"Failed to apply corrections to LArCaliWaveContainer!" );
161 ATH_MSG_INFO(
"Applied corrections to LArCaliWaveContainer" );
170 for (
const HWIdentifier chid: m_onlineId->channel_range()) {
173 if (cwv.empty())
continue;
175 LArCaliWaveVec::const_iterator cwv_it=cwv.begin();
176 LArCaliWaveVec::const_iterator cwv_it_e=cwv.end();
177 for (;cwv_it!=cwv_it_e;++cwv_it) {
180 if (m_addCorrUndo) m_corrUndo=0;
181 bool skip=writeEntry(chid,
igain,wave,clCont);
184 if (
sc!=StatusCode::SUCCESS) {
197 for(;itUndo!=itUndo_e;itUndo++) {
200 LArCaliWaveVec::const_iterator cwv_it=cwv.begin();
201 LArCaliWaveVec::const_iterator cwv_it_e=cwv.end();
202 for (;cwv_it!=cwv_it_e;++cwv_it) {
204 m_gain = (long)
igain;
206 bool skip=writeEntry(chid,
igain,wave,clCont);
209 if (
sc!=StatusCode::SUCCESS) {
217 if (caliWaveContainer_nc) {
219 ATH_MSG_INFO(
"Reverted corrections of CaliWave container");
223 return StatusCode::SUCCESS;
232 int DACSatur = 100000;
248 if (
m_dac > DACSatur )
return true;
254 const std::vector<HWIdentifier>& calibLineV = clCont->
calibSlotLine(chid);
255 if ( !calibLineV.empty() ) {
257 for(
int i=0;
i<4;
i++) {
260 std::vector<HWIdentifier>::const_iterator calibLineIt = calibLineV.begin();
261 unsigned iCalibLine=0;
263 for(calibLineIt = calibLineV.begin(); calibLineIt != calibLineV.end();++calibLineIt) {