BOSS 7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
RootEvtSelector.h
Go to the documentation of this file.
1#ifndef ROOTEVTSELECTOR_H
2#define ROOTEVTSELECTOR_H 1
3
4#include "GaudiKernel/IEvtSelector.h"
5#include "GaudiKernel/ISvcLocator.h"
6#include "GaudiKernel/Service.h"
7
8
9class IAddressCreator;
10class IDataProviderSvc;
11class RootInterface;
13class TagFilterSvc;
14
15static const InterfaceID IID_IRootEvtSelector("IRootEvtSelector", 1, 0);
16
17/** @class RootEvtSelector
18* @brief RootEvtSelector performs the function of controlling the
19* ApplicationMgr loop.
20*
21* Adapted to RootCnvSvc from GlastSvc/EventSelector.
22* The input property can now be set either to NONE or to ROOT.
23* If it is NONE, the loop
24* will run until it hits EvtMax. A new class variable was added :m_evtMax
25* which is a local copy of the AppMgrs property.
26*
27* $Header: /bes/bes/BossCvs/Event/RootCnvSvc/RootCnvSvc/RootEvtSelector.h,v 1.17 2022/01/24 04:07:17 maqm Exp $
28*/
29class GAUDI_API RootEvtSelector : public extends<Service, IEvtSelector>
30 ,virtual public IProperty {
31public:
32 // constructor and destructor
33 RootEvtSelector( const std::string& name, ISvcLocator* svcloc );
35
36 // IEvtSelector implementation
37 virtual StatusCode initialize();
38
39 // Implementation of the IEvtSelector interface methods.
40 virtual StatusCode createContext(Context*& it) const;
41 StatusCode next() const;
42 virtual StatusCode next(Context& it) const;
43 virtual StatusCode next(Context& it, int jump) const;
44 virtual StatusCode previous(Context& it) const;
45 virtual StatusCode previous(Context& it, int jump) const;
46
47 virtual StatusCode last(Context& it) const;
48 virtual StatusCode rewind(Context& it) const;
49
50 virtual StatusCode createAddress(const Context& it,IOpaqueAddress*& iop) const;
51 virtual StatusCode releaseContext(Context*& it) const;
52 virtual StatusCode resetCriteria(const std::string& criteria, Context& context) const;
53
54 virtual StatusCode setCriteria( const std::string& criteria );
55
56 // IInterface implementation
57 virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface);
58
59 // int IEvtSelector::getrecId();
60 int getRecId() const { return (*m_recId); }
61
62 void getEntryFromTag() const ;
63
64
65private:
66 enum CriteriaType {
67 ROOT, //When the input is a ROOT file
68 NONE //When there is no input
69 };
70
71 // Used internally to get the MaxEvent from the ApplicationMgr
72 StatusCode getMaxEvent();
73
74 RootEventContext* p_beginContext;
75 RootEventContext* p_endContext;
76
77 std::string m_criteria;
78 StringProperty m_jobInput;
79 CriteriaType m_criteriaType;
80
81 // pointer to RootInterface
82 RootInterface* m_rootInterface;
83
84 // pointer to AddressCreator
85 IAddressCreator* m_addrCreator;
86
87 // CLID of root basic object
88 CLID m_rootCLID;
89
90 /// max nr of events to be treated
91 int m_evtMax;
92
93 /// counts number of event
94 int* m_recId;
95
96 TagFilterSvc* m_tagFilterSvc;
97};
98
99#endif // RootEvtSelector_H
This class provides the Context for RootEventSelector.
RootEvtSelector performs the function of controlling the ApplicationMgr loop.
virtual StatusCode previous(Context &it, int jump) const
virtual StatusCode next(Context &it, int jump) const
virtual StatusCode previous(Context &it) const
int getRecId() const
virtual StatusCode next(Context &it) const