14 #include "Gaudi/Property.h"
19 ISvcLocator* pSvcLocator ) :
62 std::unique_ptr<LArShapeComplete> shape_cont;
76 const int nPhases=
ofc.OFC_aSize();
77 const float timeOffset=
ofc.timeOffset();
78 const float timeBinWidth=
ofc.timeBinWidth();
85 std::vector<std::vector<float> > OFC_a;
86 std::vector<std::vector<float> > OFC_b;
91 if ( vOFC_a.size() == 0 || vOFC_b.size() == 0 ) {
93 }
else if ( vOFC_a.size() != vOFC_b.size() ) {
94 ATH_MSG_WARNING(
"OFC a (" << vOFC_a.size() <<
") and b (" << vOFC_b.size() <<
") are not the same size for channel " << onlID->
channel_name(
id) );
98 std::vector<float> newOFCa=vOFC_a.
asVector();
99 std::vector<float> newOFCb=vOFC_b.
asVector();
102 newOFCa.insert(newOFCa.begin(),0.);
103 newOFCb.insert(newOFCb.begin(),0.);
106 newOFCa.resize(newOFCa.size()+
m_numAdd, 0.);
107 newOFCb.resize(newOFCb.size()+
m_numAdd, 0.);
110 OFC_a.push_back(newOFCa);
111 OFC_b.push_back(newOFCb);
120 if(
m_numAdd > 0) ofc_cont->
set(
id,(
int)
gain,OFC_a,OFC_b,timeOffset,timeBinWidth);
127 for(; its!=its_e;++its){
130 const int nPhases=shape.shapeSize();
131 const float timeOffset=shape.timeOffset();
132 const float timeBinWidth=shape.timeBinWidth();
138 std::vector<std::vector<float> > Shape;
139 std::vector<std::vector<float> > ShapeDer;
144 if ( vShape.size() == 0 || vShapeDer.size() == 0 ) {
146 }
else if ( vShape.size() != vShapeDer.size() ) {
147 ATH_MSG_WARNING(
"Shape (" << vShape.size() <<
") and ShapeDer (" << vShapeDer.size() <<
") are not the same size for channel " << onlID->
channel_name(
id) );
151 std::vector<float> newShape=vShape.
asVector();
152 std::vector<float> newShapeDer=vShapeDer.
asVector();
155 newShape.insert(newShape.begin(),0.);
156 newShapeDer.insert(newShapeDer.begin(),0.);
159 newShape.resize(newShape.size()+
m_numAdd, 0.);
160 newShapeDer.resize(newShapeDer.size()+
m_numAdd, 0.);
163 Shape.push_back(newShape);
164 ShapeDer.push_back(newShapeDer);
168 ShapeDer.push_back(vShapeDer.
asVector());
173 shape_cont->
set(
id,(
int)
gain,Shape,ShapeDer,timeOffset,timeBinWidth);
192 return StatusCode::SUCCESS;