ATLAS Offline Software
Loading...
Searching...
No Matches
AANTupleStream.h
Go to the documentation of this file.
1// dear emacs, this is -*- C++ -*-
2
3/*
4 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5*/
6
7#ifndef ANALYSISTOOLS_AANTUPLESTREAM_H
8#define ANALYSISTOOLS_AANTUPLESTREAM_H 1
9
10#include "GaudiKernel/IAddressCreator.h"
11#include "GaudiKernel/ServiceHandle.h"
12#include "GaudiKernel/IIoComponent.h"
15
16#include <map>
17#include <vector>
18
19namespace coral
20{
21 class AttributeList;
22 class AttributeListSpecification;
23}
24
25class StoreGateSvc;
26
27class ITHistSvc;
28
29class TFile;
30class TTree;
31class TBranch;
32
33class ATLAS_NOT_THREAD_SAFE AANTupleStream : virtual public IIoComponent,
35{
36public:
37
39 AANTupleStream(const std::string& name, ISvcLocator* pSvcLocator);
40
42 virtual ~AANTupleStream();
43
45 virtual StatusCode initialize();
46
48 virtual StatusCode finalize();
49
51 virtual StatusCode execute();
52
53private:
54
56 StatusCode initCollection();
57
59 StatusCode getRef(CLID id, const std::string& key,
60 std::string& ref);
61
63 StatusCode splitAddress( const std::string& address,
64 const std::string& match,
65 std::string& address_header,
66 std::string& address_data ) const;
67
69 StatusCode initialize_subAlgos ();
70
72 StatusCode execute_subAlgos ();
73
76
78 void setupTree();
79
81 bool writeTokenAttrList( const std::string& token, const coral::AttributeList& attributeList );
82
84 StatusCode getFilters();
85
87 bool isEventAccepted() const;
88
89 StatusCode initSchema();
90
94 StatusCode io_reinit ();
95
98
100 coral::AttributeListSpecification* m_attribSpec;
101
103 std::string m_fileName;
104
106 StringArrayProperty m_extraRefNames;
107
109 BooleanProperty m_writeInputDH;
110
112 BooleanProperty m_existDH;
113
115 std::string m_streamName;
116
118 BooleanProperty m_lateSchema;
119
121 std::string m_macro;
122
125
127 std::string m_treeName;
128
130 std::vector<std::string> m_acceptNames;
131
133 std::vector<IAlgorithm*> m_acceptAlgs;
134
136 TTree * m_tree;
137
139 TBranch * m_tokenBranch;
140
143
144 // Sub-algorithms as given in jobOptions type/name
145 std::vector<std::string> m_membersNames;
146
148 static const unsigned int s_maxLengthOfStrings = 5000;
150};
151
152#endif
const boost::regex ref(r_ef)
uint32_t CLID
The Class ID type.
Define macros for attributes used to control the static checker.
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
void setupTree()
setup Tree
std::string m_treeName
Name of the output tree.
BooleanProperty m_lateSchema
write schema in execute()
std::vector< std::string > m_membersNames
std::string m_macro
macro
AANTupleStream(const std::string &name, ISvcLocator *pSvcLocator)
Standard AANTupleStream Constructor.
StatusCode io_reinit()
callback method to reinitialize the internal state of the component for I/O purposes (e....
StatusCode initCollection()
Initialize the output collection.
bool writeTokenAttrList(const std::string &token, const coral::AttributeList &attributeList)
write Token and AttributeList
bool m_schemaDone
first event
StatusCode getFilters()
get filter alogs
ServiceHandle< IAddressCreator > m_persSvc
Persistency service.
StatusCode splitAddress(const std::string &address, const std::string &match, std::string &address_header, std::string &address_data) const
Split the address to get pool token.
std::vector< IAlgorithm * > m_acceptAlgs
Vector of Algorithms that this stream accepts.
BooleanProperty m_writeInputDH
Flag to signal whether or not to write input data header.
StatusCode initialize_subAlgos()
initialize sub-algos
TBranch * m_tokenBranch
TBranch which contains Token info.
char m_tokenCString[s_maxLengthOfStrings]
StringArrayProperty m_extraRefNames
Vector of extra parent ref names to register in collection.
static const unsigned int s_maxLengthOfStrings
for string branches
std::vector< std::string > m_acceptNames
Vector of names of Algorithms that this stream accepts.
coral::AttributeListSpecification * m_attribSpec
Collection attribute specification.
BooleanProperty m_existDH
Flag to signal whether data header exists.
StatusCode execute_subAlgos()
execute sub-algos
std::string m_fileName
Name of the output collection.
virtual StatusCode finalize()
Terminate AANTupleStream.
StatusCode getRef(CLID id, const std::string &key, std::string &ref)
Get ref from a proxy.
ServiceHandle< ITHistSvc > m_tHistSvc
THistSvc.
std::string m_streamName
Name of Stream.
StatusCode initSchema()
TTree * m_tree
TTree.
bool isEventAccepted() const
check filters passed
void writeAttributeListSpecification()
write schema of AttributeList
Alias for backward compatibility.
StatusCode execute() override=0
The Athena Transient Store API.
bool match(std::string s1, std::string s2)
match the individual directories of two strings
Definition hcg.cxx:357
void initialize()