BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EventWriter.h
Go to the documentation of this file.
1#ifndef BESVISALG_H_
2#define BESVISALG_H_
3
4// something needed by Gaudi
5#include "GaudiKernel/Algorithm.h"
6#include "GaudiKernel/DataStoreItem.h"
7#include "GaudiKernel/IConversionSvc.h"
8#include "GaudiKernel/IDataManagerSvc.h"
9#include "GaudiKernel/IDataProviderSvc.h"
10#include "GaudiKernel/IDataStoreAgent.h"
11
12// something needed by root
13#include "RootCnvSvc/RootInterface.h"
14#include "RootCnvSvc/commonData.h"
15#include "RootEventData/TDigiEvent.h"
16#include "RootEventData/TJobInfo.h"
17#include "RootEventData/TRecTrackEvent.h"
18
19#include "RootCnvSvc/IRootCnvSvc.h"
20#include "TFile.h"
21#include "TTree.h"
22
23using namespace std;
24
25///////////////////////////////////////////////////////////////////////////////
26
27class EventWriter : public Algorithm {
28public:
29 EventWriter( const std::string& name, ISvcLocator* pSvcLocator );
31 StatusCode initialize();
32 StatusCode execute();
33 StatusCode finalize();
34
35private:
36 // some variables needed by semaphore
37
38 // Gaudi service interface
39 IDataManagerSvc* m_pDataManager;
40 IDataProviderSvc* m_pDataProvider;
41 IConversionSvc* m_pConversionSvc;
42 IDataStoreAgent* m_pAgent;
43 DataStoreItem* m_currentItem;
44 RootInterface* m_pRootInterface;
45 IRootCnvSvc* m_cnvSvc;
46 TRecTrackEvent* m_trkEvt;
47 TDigiEvent* m_digiEvt;
48 TMcEvent* m_mcEvt;
49 THltEvent* m_hltEvt;
50 TEvtHeader* m_evtHd;
51 virtual std::string getJobOptions();
52 virtual std::string getDecayOptions();
53
54 typedef std::vector<DataStoreItem*> Items;
55 typedef std::vector<std::string> ItemNames;
56
57 commonData m_common;
58 TFile* m_single_outputFiles;
59 TTree* m_single_outputTrees;
60 TTree* m_jobInfoTree;
61 int st;
62 string m_dofileName;
63 string m_dofileName_1;
64 Items m_itemList;
65 ItemNames m_itemNames;
66 StatusCode getSvc();
67 void addItem( Items& itms, const std::string& descriptor );
68 void clearItems( Items& items );
69 DataStoreItem* findItem( const std::string& path );
70 StatusCode collectObjects();
71 std::vector<std::string> m_jobOptions;
72 std::string m_bossVer;
73 std::string m_decayOptions;
74 TJobInfo* jobInfo;
75
76 int m_mode; // 2-OfflineMode
77};
78
79#endif
EventWriter(const std::string &name, ISvcLocator *pSvcLocator)
StatusCode finalize()
StatusCode execute()
StatusCode initialize()