BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EventWriterTool.h
Go to the documentation of this file.
1#pragma once
2
3#include <Gaudi/Property.h>
4#include <GaudiKernel/AlgTool.h>
5#include <GaudiKernel/DataStoreItem.h>
6#include <GaudiKernel/IDataProviderSvc.h>
7#include <TFile.h>
8#include <TTree.h>
9#include <string>
10#include <vector>
11
12#include "EventWriter/IEventWriterTool.h"
13#include "RootCnvSvc/IRootCnvSvc.h"
14#include "RootCnvSvc/commonData.h"
15#include "RootEventData/TJobInfo.h"
16
17class EventWriterTool : public extends<AlgTool, IEventWriterTool> {
18public:
19 using extends::extends;
20
21 StatusCode write() override;
22
23 /// Overriding initialize / finalize
24 StatusCode initialize() override;
25 StatusCode finalize() override;
26
27private:
28 void addItem( std::vector<DataStoreItem*>& items, const std::string& descriptor );
29 DataStoreItem* findItem( const std::string& path );
30 std::string getDecayOptions();
31
32private:
33 int m_st{ 0 };
34 commonData m_commonData;
35
36 std::vector<DataStoreItem*> m_itemLists{};
37
38 TFile* m_outputFile{ nullptr };
39 TTree* m_outputTree{ nullptr };
40 TTree* m_jobInfoTree{ nullptr };
41 TJobInfo* m_jobInfo{ nullptr };
42
43 /// Services
44 IRootCnvSvc* m_cnvSvc{ nullptr };
45 IDataProviderSvc* m_pDataProvider{ nullptr };
46
47 /// Properties
48 IntegerProperty m_mode{ this, "RunMode", 2 };
49 StringProperty m_dofileName{ this, "digiRootOutputFile", "event.rec" };
50 StringArrayProperty m_itemNames{ this,
51 "ItemList",
52 {
53 "/Event",
54 "/Event/EventHeader",
55 "/Event/Navigator",
56 "/Event/Digi",
57 "/Event/Digi/MdcDigiCol",
58 "/Event/Digi/TofDigiCol",
59 "/Event/Digi/EmcDigiCol",
60 "/Event/Digi/MucDigiCol",
61 "/Event/Hlt",
62 "/Event/Hlt/HltRawCol",
63 "/Event/Hlt/HltInf",
64 "/Event/Recon",
65 "/Event/Recon/RecMdcTrackCol",
66 "/Event/Recon/RecMdcDedxCol",
67 "/Event/Recon/RecMdcKalTrackCol",
68 "/Event/Recon/RecEsTimeCol",
69 "/Event/Recon/RecExtTrackCol",
70 "/Event/Recon/RecTofTrackCol",
71 "/Event/Recon/RecEmcHitCol",
72 "/Event/Recon/RecEmcClusterCol",
73 "/Event/Recon/RecEmcShowerCol",
74 "/Event/Recon/RecMucTrackCol",
75 "/Event/Recon/EvtRecEvent",
76 "/Event/Recon/EvtRecTrackCol",
77 } };
78};
StatusCode initialize() override
Overriding initialize / finalize.
StatusCode finalize() override
StatusCode write() override