CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
DQACtrlSamples Class Reference

#include <DQACtrlSamples.h>

+ Inheritance diagram for DQACtrlSamples:

Public Member Functions

 DQACtrlSamples (const std::string &name, ISvcLocator *pSvcLocator)
 
StatusCode initialize ()
 
StatusCode execute ()
 
StatusCode finalize ()
 

Detailed Description

Definition at line 22 of file DQACtrlSamples.h.

Constructor & Destructor Documentation

◆ DQACtrlSamples()

DQACtrlSamples::DQACtrlSamples ( const std::string & name,
ISvcLocator * pSvcLocator )

Definition at line 17 of file DQACtrlSamples.cxx.

17 :
18 Algorithm(name, pSvcLocator) {
19
20 //Declare the properties
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);
28
29}

Member Function Documentation

◆ execute()

StatusCode DQACtrlSamples::execute ( )

Definition at line 101 of file DQACtrlSamples.cxx.

101 {
102
103 MsgStream log(msgSvc(), name());
104 log << MSG::INFO << "in execute()" << endreq;
105
106 SmartDataPtr<DQAEvent::DQAEvent> dqaevt(eventSvc(), "/Event/DQATag");
107 if( !dqaevt ) {
108 dqaevt = new DQAEvent::DQAEvent;
109 StatusCode sc;
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;
114 return sc;
115 }
116 }
117
118 if ( m_selBhabha ) {
119 m_dqaBhabha->execute();
120 if ( m_dqaBhabha->filterPassed() ) dqaevt->setBhabha(1);
121 }
122
123 if ( m_selDimu ) {
124 m_dqaDimu->execute();
125 if ( m_dqaDimu->filterPassed() ) dqaevt->setDimu(1);
126 }
127
128 if ( m_selHadron ) {
129 m_dqaHadron->execute();
130 if ( m_dqaHadron->filterPassed() ) dqaevt->setHadron(1);
131 }
132
133 if ( m_selRhopi ) {
134 m_dqaRhopi->execute();
135 if ( m_dqaRhopi->filterPassed() ) dqaevt->setRhopi(1);
136 }
137
138 if ( m_selPpbar ) {
139 m_dqaPpbar->execute();
140 if ( m_dqaPpbar->filterPassed() ) dqaevt->setPpbar(1);
141 }
142
143 if ( m_selKstark ) {
144 m_dqaKstark->execute();
145 if ( m_dqaKstark->filterPassed() ) dqaevt->setKstark(1);
146 }
147
148 if ( m_selLambdalambda ) {
149 m_dqaLambdalambda->execute();
150 if ( m_dqaLambdalambda->filterPassed() ) dqaevt->setLambdalambdabar(1);
151 }
152
153 return StatusCode::SUCCESS;
154
155}
IMessageSvc * msgSvc()

◆ finalize()

StatusCode DQACtrlSamples::finalize ( )

Definition at line 158 of file DQACtrlSamples.cxx.

158 {
159
160 MsgStream log(msgSvc(), name());
161 log << MSG::INFO << "in finalize()" << endmsg;
162 return StatusCode::SUCCESS;
163}

◆ initialize()

StatusCode DQACtrlSamples::initialize ( )

Definition at line 32 of file DQACtrlSamples.cxx.

32 {
33 MsgStream log(msgSvc(), name());
34
35 log << MSG::INFO << "in initialize()" << endmsg;
36 StatusCode sc;
37
38 if ( m_selBhabha ) {
39 sc = createSubAlgorithm( "DQASelBhabha", "DQASelBhabha", m_dqaBhabha);
40 if (sc.isFailure()) {
41 log << MSG::ERROR << "Error creating Sub-Algorithm DQASelBhabha" << endreq;
42 return StatusCode::FAILURE;
43 }
44 }
45
46 if ( m_selDimu ) {
47 sc = createSubAlgorithm( "DQASelDimu", "DQASelDimu", m_dqaDimu);
48 if (sc.isFailure()) {
49 log << MSG::ERROR << "Error creating Sub-Algorithm DQASelDimu" << endreq;
50 return StatusCode::FAILURE;
51 }
52 }
53
54 if ( m_selHadron ) {
55 sc = createSubAlgorithm( "DQASelHadron", "DQASelHadron", m_dqaHadron);
56 if (sc.isFailure()) {
57 log << MSG::ERROR << "Error creating Sub-Algorithm DQASelHadron" << endreq;
58 return StatusCode::FAILURE;
59 }
60 }
61
62 if ( m_selRhopi ) {
63 sc = createSubAlgorithm( "DQARhopi", "DQARhopi", m_dqaRhopi);
64 if (sc.isFailure()) {
65 log << MSG::ERROR << "Error creating Sub-Algorithm DQARhopiAlg" << endreq;
66 return StatusCode::FAILURE;
67 }
68 }
69
70 if ( m_selPpbar ) {
71 sc = createSubAlgorithm( "DQAJpsi2PPbarAlg", "DQAJpsi2PPbarAlg", m_dqaPpbar);
72 if (sc.isFailure()) {
73 log << MSG::ERROR << "Error creating Sub-Algorithm Jpsi2PPbarAlg" << endreq;
74 return StatusCode::FAILURE;
75 }
76 }
77
78 if ( m_selKstark ) {
79 sc = createSubAlgorithm( "DQAKsKpi", "DQAKsKpi", m_dqaKstark);
80 if (sc.isFailure()) {
81 log << MSG::ERROR << "Error creating Sub-Algorithm DQAKsKpi" << endreq;
82 return StatusCode::FAILURE;
83 }
84 }
85
86 if ( m_selLambdalambda ) {
87 sc = createSubAlgorithm( "JsiLL", "JsiLL", m_dqaLambdalambda);
88 if (sc.isFailure()) {
89 log << MSG::ERROR << "Error creating Sub-Algorithm JsiLL" << endreq;
90 return StatusCode::FAILURE;
91 }
92 }
93
94 log << MSG::INFO << "successfully return from initialize()" <<endmsg;
95 return StatusCode::SUCCESS;
96
97
98}

The documentation for this class was generated from the following files: