48 {
49 MsgStream log(
msgSvc(), name());
50
51 log << MSG::INFO << "in initialize()" << endmsg;
52 StatusCode sc;
53
54 if ( m_selBhabha ) {
55 sc = createSubAlgorithm( "DQASelBhabha", "DQASelBhabha", m_dqaBhabha);
56 if (sc.isFailure()) {
57 log << MSG::ERROR << "Error creating Sub-Algorithm DQASelBhabha" << endreq;
58 return StatusCode::FAILURE;
59 }
60 if ( m_OutBhabha ) {
61 sc = createSubAlgorithm( "EventWriter", "DQAOutBhabha", m_dqaoutBhabha);
62 if (sc.isFailure()) {
63 log << MSG::ERROR << "Error creating Sub-Algorithm DQAOutBhabha" << endreq;
64 return StatusCode::FAILURE;
65 }
66 }
67 }
68
69 if ( m_selDimu ) {
70 sc = createSubAlgorithm( "DQASelDimu", "DQASelDimu", m_dqaDimu);
71 if (sc.isFailure()) {
72 log << MSG::ERROR << "Error creating Sub-Algorithm DQASelDimu" << endreq;
73 return StatusCode::FAILURE;
74 }
75 if ( m_OutDimu ) {
76 sc = createSubAlgorithm( "EventWriter", "DQAOutDimu", m_dqaoutDimu);
77 if (sc.isFailure()) {
78 log << MSG::ERROR << "Error creating Sub-Algorithm DQAOutDimu" << endreq;
79 return StatusCode::FAILURE;
80 }
81 }
82 }
83
84 if ( m_selHadron ) {
85 sc = createSubAlgorithm( "DQASelHadron", "DQASelHadron", m_dqaHadron);
86 if (sc.isFailure()) {
87 log << MSG::ERROR << "Error creating Sub-Algorithm DQASelHadron" << endreq;
88 return StatusCode::FAILURE;
89 }
90 if ( m_OutHadron ) {
91 sc = createSubAlgorithm( "EventWriter", "DQAOutHadron", m_dqaoutHadron);
92 if (sc.isFailure()) {
93 log << MSG::ERROR << "Error creating Sub-Algorithm DQAOutHadron" << endreq;
94 return StatusCode::FAILURE;
95 }
96 }
97 }
98
99 if ( m_selRhopi ) {
100 sc = createSubAlgorithm( "DQARhopi", "DQARhopi", m_dqaRhopi);
101 if (sc.isFailure()) {
102 log << MSG::ERROR << "Error creating Sub-Algorithm DQARhopiAlg" << endreq;
103 return StatusCode::FAILURE;
104 }
105 if ( m_OutRhopi ) {
106 sc = createSubAlgorithm( "EventWriter", "DQAOutRhopi", m_dqaoutRhopi);
107 if (sc.isFailure()) {
108 log << MSG::ERROR << "Error creating Sub-Algorithm DQAOutRhopi" << endreq;
109 return StatusCode::FAILURE;
110 }
111 }
112 }
113
114 if ( m_selPpbar ) {
115 sc = createSubAlgorithm( "DQAJpsi2PPbarAlg", "DQAJpsi2PPbarAlg", m_dqaPpbar);
116 if (sc.isFailure()) {
117 log << MSG::ERROR << "Error creating Sub-Algorithm Jpsi2PPbarAlg" << endreq;
118 return StatusCode::FAILURE;
119 }
120 if ( m_OutPpbar ) {
121 sc = createSubAlgorithm( "EventWriter", "DQAOutPpbar", m_dqaoutPpbar);
122 if (sc.isFailure()) {
123 log << MSG::ERROR << "Error creating Sub-Algorithm DQAOutPpbar" << endreq;
124 return StatusCode::FAILURE;
125 }
126 }
127 }
128
129 if ( m_selKstark ) {
130 sc = createSubAlgorithm( "DQAKsKpi", "DQAKsKpi", m_dqaKstark);
131 if (sc.isFailure()) {
132 log << MSG::ERROR << "Error creating Sub-Algorithm DQAKsKpi" << endreq;
133 return StatusCode::FAILURE;
134 }
135 if ( m_OutKstark ) {
136 sc = createSubAlgorithm( "EventWriter", "DQAOutKstark", m_dqaoutKstark);
137 if (sc.isFailure()) {
138 log << MSG::ERROR << "Error creating Sub-Algorithm DQAOutKstark" << endreq;
139 return StatusCode::FAILURE;
140 }
141 }
142 }
143
144 if ( m_selLambdalambda ) {
145 sc = createSubAlgorithm( "JsiLL", "JsiLL", m_dqaLambdalambda);
146 if (sc.isFailure()) {
147 log << MSG::ERROR << "Error creating Sub-Algorithm JsiLL" << endreq;
148 return StatusCode::FAILURE;
149 }
150 if ( m_OutLambdalambda ) {
151 sc = createSubAlgorithm( "EventWriter", "DQAOutLambdalambda", m_dqaoutLambdalambda);
152 if (sc.isFailure()) {
153 log << MSG::ERROR << "Error creating Sub-Algorithm DQAOutLambdalambda" << endreq;
154 return StatusCode::FAILURE;
155 }
156 }
157 }
158
159 if ( m_selPPpipi ) {
160 sc = createSubAlgorithm( "DQAPi2p2", "DQAPi2p2", m_dqaPPpipi);
161 if (sc.isFailure()) {
162 log << MSG::ERROR << "Error creating Sub-Algorithm DQAPi2p2" << endreq;
163 return StatusCode::FAILURE;
164 }
165 if ( m_OutPPpipi ) {
166 sc = createSubAlgorithm( "EventWriter", "DQAOutPPpipi", m_dqaoutPPpipi);
167 if (sc.isFailure()) {
168 log << MSG::ERROR << "Error creating Sub-Algorithm DQAPi2p2" << endreq;
169 return StatusCode::FAILURE;
170 }
171 }
172 }
173
174 if ( m_selKsKpiDedx ) {
175 sc = createSubAlgorithm( "DQAKsKpiDEDX", "DQAKsKpiDEDX", m_dqaKsKpiDedx);
176 if (sc.isFailure()) {
177 log << MSG::ERROR << "Error creating Sub-Algorithm DQAKsKpiDedx" << endreq;
178 return StatusCode::FAILURE;
179 }
180 if ( m_OutKsKpiDedx ) {
181 sc = createSubAlgorithm( "EventWriter", "DQAOutKsKpiDedx", m_dqaoutKsKpiDedx);
182 if (sc.isFailure()) {
183 log << MSG::ERROR << "Error creating Sub-Algorithm DQAOutKsKpiDedx" << endreq;
184 return StatusCode::FAILURE;
185 }
186 }
187 }
188
189 if ( m_selpipiJpsi ) {
190 sc = createSubAlgorithm( "PipiJpsi", "PipiJpsi", m_dqapipiJpsi);
191 if (sc.isFailure()) {
192 log << MSG::ERROR << "Error creating Sub-Algorithm DQApipiJpsi" << endreq;
193 return StatusCode::FAILURE;
194 }
195 if ( m_OutpipiJpsi ) {
196 sc = createSubAlgorithm( "EventWriter", "DQAOutpipiJpsi", m_dqaoutpipiJpsi);
197 if (sc.isFailure()) {
198 log << MSG::ERROR << "Error creating Sub-Algorithm DQAOutpipiJpsi" << endreq;
199 return StatusCode::FAILURE;
200 }
201 }
202 }
203
204 log << MSG::INFO << "successfully return from initialize()" <<endmsg;
205 return StatusCode::SUCCESS;
206
207
208}