3#include "GaudiKernel/MsgStream.h"
4#include "GaudiKernel/AlgFactory.h"
5#include "GaudiKernel/SmartDataPtr.h"
6#include "GaudiKernel/ISvcLocator.h"
7#include "GaudiKernel/IDataProviderSvc.h"
8#include "GaudiKernel/PropertyMgr.h"
10#include "DQAEvent/DQAEvent.h"
11#include "DQACtrlSamples/DQACtrlSamples.h"
18 Algorithm(name, pSvcLocator) {
21 declareProperty(
"SelectBhabha", m_selBhabha =
true);
22 declareProperty(
"SelectDimu", m_selDimu =
true);
23 declareProperty(
"SelectHadron", m_selHadron =
false);
24 declareProperty(
"SelectRhopi", m_selRhopi =
false);
25 declareProperty(
"SelectPpbar", m_selPpbar =
false);
26 declareProperty(
"SelectKstark", m_selKstark =
false);
27 declareProperty(
"SelectLambdalambda", m_selLambdalambda =
false);
33 MsgStream log(
msgSvc(), name());
35 log << MSG::INFO <<
"in initialize()" << endmsg;
39 sc = createSubAlgorithm(
"DQASelBhabha",
"DQASelBhabha", m_dqaBhabha);
41 log << MSG::ERROR <<
"Error creating Sub-Algorithm DQASelBhabha" << endreq;
42 return StatusCode::FAILURE;
47 sc = createSubAlgorithm(
"DQASelDimu",
"DQASelDimu", m_dqaDimu);
49 log << MSG::ERROR <<
"Error creating Sub-Algorithm DQASelDimu" << endreq;
50 return StatusCode::FAILURE;
55 sc = createSubAlgorithm(
"DQASelHadron",
"DQASelHadron", m_dqaHadron);
57 log << MSG::ERROR <<
"Error creating Sub-Algorithm DQASelHadron" << endreq;
58 return StatusCode::FAILURE;
63 sc = createSubAlgorithm(
"DQARhopi",
"DQARhopi", m_dqaRhopi);
65 log << MSG::ERROR <<
"Error creating Sub-Algorithm DQARhopiAlg" << endreq;
66 return StatusCode::FAILURE;
71 sc = createSubAlgorithm(
"DQAJpsi2PPbarAlg",
"DQAJpsi2PPbarAlg", m_dqaPpbar);
73 log << MSG::ERROR <<
"Error creating Sub-Algorithm Jpsi2PPbarAlg" << endreq;
74 return StatusCode::FAILURE;
79 sc = createSubAlgorithm(
"DQAKsKpi",
"DQAKsKpi", m_dqaKstark);
81 log << MSG::ERROR <<
"Error creating Sub-Algorithm DQAKsKpi" << endreq;
82 return StatusCode::FAILURE;
86 if ( m_selLambdalambda ) {
87 sc = createSubAlgorithm(
"JsiLL",
"JsiLL", m_dqaLambdalambda);
89 log << MSG::ERROR <<
"Error creating Sub-Algorithm JsiLL" << endreq;
90 return StatusCode::FAILURE;
94 log << MSG::INFO <<
"successfully return from initialize()" <<endmsg;
95 return StatusCode::SUCCESS;
103 MsgStream log(
msgSvc(), name());
104 log << MSG::INFO <<
"in execute()" << endreq;
106 SmartDataPtr<DQAEvent::DQAEvent> dqaevt(eventSvc(),
"/Event/DQATag");
110 sc = eventSvc()->registerObject(
"/Event/DQATag", dqaevt);
111 if (sc.isFailure()) {
112 log << MSG::ERROR <<
"Could not register DQAEvent to TDS" << endreq;
113 return StatusCode::FAILURE;
119 m_dqaBhabha->execute();
120 if ( m_dqaBhabha->filterPassed() ) dqaevt->setBhabha(1);
124 m_dqaDimu->execute();
125 if ( m_dqaDimu->filterPassed() ) dqaevt->setDimu(1);
129 m_dqaHadron->execute();
130 if ( m_dqaHadron->filterPassed() ) dqaevt->setHadron(1);
134 m_dqaRhopi->execute();
135 if ( m_dqaRhopi->filterPassed() ) dqaevt->setRhopi(1);
139 m_dqaPpbar->execute();
140 if ( m_dqaPpbar->filterPassed() ) dqaevt->setPpbar(1);
144 m_dqaKstark->execute();
145 if ( m_dqaKstark->filterPassed() ) dqaevt->setKstark(1);
148 if ( m_selLambdalambda ) {
149 m_dqaLambdalambda->execute();
150 if ( m_dqaLambdalambda->filterPassed() ) dqaevt->setLambdalambdabar(1);
153 return StatusCode::SUCCESS;
160 MsgStream log(
msgSvc(), name());
161 log << MSG::INFO <<
"in finalize()" << endmsg;
162 return StatusCode::SUCCESS;
DECLARE_ALGORITHM_FACTORY(ReadRawData)