BOSS 7.0.7
BESIII Offline Software System
Loading...
Searching...
No Matches
MucCalibAlg.cxx
Go to the documentation of this file.
1//------------------------------------------------------------------------------|
2// [File ]: MucCalibAlg.cxx |
3// [Brief ]: Algorithom of MUC calibration |
4// [Author]: Xie Yuguang, <[email protected]> |
5// [Date ]: Mar 28, 2006 |
6// [Log ]: See ChangLog |
7//------------------------------------------------------------------------------|
8
9#include<iostream>
10
11#include "GaudiKernel/MsgStream.h"
12#include "GaudiKernel/IHistogramSvc.h"
13#include "GaudiKernel/SmartDataPtr.h"
14#include "GaudiKernel/INTupleSvc.h"
15
17
18using namespace std;
19
20// -----------------------------------Declaration----------------------------------------
21MucCalibAlg::MucCalibAlg(const std::string& name, ISvcLocator* pSvcLocator) :
22 Algorithm(name, pSvcLocator),
23 m_vJobInfo(0),
24 m_vConfigInfo(0),
25 m_sOutputFile("MucCalibConst.root")
26{
27 // Declare the properties
28 declareProperty("JobInfo", m_vJobInfo);
29 declareProperty("ConfigInfo", m_vConfigInfo);
30 declareProperty("Output" , m_sOutputFile);
31}
32
33// ----------------------------------Initialize-----------------------------------------
35{
36 MsgStream log(msgSvc(), name());
37 log << MSG::INFO << endreq << "In initialize() " << endreq;
38 std::string recMode[3]={"ExtTrk","SlfTrk","Combine"};
39 log << MSG::INFO << " InputTag = " << m_vJobInfo[4] << endreq;
40 log << MSG::INFO << " RecMode = " << recMode[m_vConfigInfo[0]] << endreq;
41 log << MSG::INFO << " UsePad = " << m_vConfigInfo[1] << endreq;
42 log << MSG::INFO << " EffWindow = " << m_vConfigInfo[2] << endreq;
43 log << MSG::INFO << " ClstMode = " << m_vConfigInfo[3] << endreq;
44 log << MSG::INFO << " ClstSave = " << m_vConfigInfo[4] << endreq;
45 log << MSG::INFO << " CheckEvent = " << (m_vConfigInfo[5]?"Yes":"No") << endreq;
46 log << MSG::INFO << " DimuSelect = " << (m_vConfigInfo[6]?"Yes":"No") << endreq;
47 log << MSG::INFO << " DimuOnly = " << (m_vConfigInfo[7]?"Yes":"No") << endreq;
48 //log << MSG::INFO << " Output = " << m_sOutputFile << endreq;
49
50 m_pMucCalibMgr = new MucCalibMgr( m_vJobInfo, m_vConfigInfo, m_sOutputFile );
51
52 return StatusCode::SUCCESS;
53}
54
55// ----------------------------------Execute--------------------------------------------
57{
58 MsgStream log(msgSvc(), name());
59 log << MSG::INFO << endreq << "In execute()" << endreq;
60 StatusCode sc = StatusCode::FAILURE;
61
62 m_pMucCalibMgr->ReadEvent();
63 if( m_vConfigInfo[5] == 1 ) m_pMucCalibMgr->CheckEvent();
64 m_pMucCalibMgr->FillEvent();
65
66 return StatusCode::SUCCESS;
67}
68
69// ----------------------------------Finalize------------------------------------------
71{
72 MsgStream log(msgSvc(), name());
73 log << MSG::INFO << endreq << "In finalize()" << endreq << endreq;
74 m_pMucCalibMgr->AnalyseEffAndNoise();
75 //m_pMucCalibMgr->AnalyseCluster();
76 m_pMucCalibMgr->AnalyseRes();
77
78 m_pMucCalibMgr->SaveConst();
79
80 m_pMucCalibMgr->EndRun();
81 //delete m_pMucCalibMgr;
82 log << MSG::INFO << endreq << "MucCalibAlg finalizes successfully!" << endreq << endreq;
83 return StatusCode::SUCCESS;
84}
85
86//--------------------------------------------END-----------------------------------------
87
IMessageSvc * msgSvc()
MucCalibAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: MucCalibAlg.cxx:21
StatusCode execute()
Definition: MucCalibAlg.cxx:56
StatusCode finalize()
Definition: MucCalibAlg.cxx:70
StatusCode initialize()
Definition: MucCalibAlg.cxx:34
StatusCode SaveConst()
StatusCode FillEvent()
StatusCode EndRun()
StatusCode ReadEvent()
StatusCode AnalyseRes()
StatusCode CheckEvent()
StatusCode AnalyseEffAndNoise()