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-2026 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 : public extends<AthAlgorithm, IIoComponent>
34{
35public:
36
38 AANTupleStream(const std::string& name, ISvcLocator* pSvcLocator);
39
41 virtual ~AANTupleStream();
42
44 virtual StatusCode initialize() override;
45
47 virtual StatusCode finalize() override;
48
50 virtual StatusCode execute() override;
51
52private:
53
55 StatusCode initCollection();
56
58 StatusCode getRef(CLID id, const std::string& key,
59 std::string& ref);
60
62 StatusCode splitAddress( const std::string& address,
63 const std::string& match,
64 std::string& address_header,
65 std::string& address_data ) const;
66
69
71 void setupTree();
72
74 bool writeTokenAttrList( const std::string& token, const coral::AttributeList& attributeList );
75
77 StatusCode getFilters();
78
80 bool isEventAccepted() const;
81
82 StatusCode initSchema();
83
87 virtual StatusCode io_reinit () override;
88
91
93 coral::AttributeListSpecification* m_attribSpec;
94
96 std::string m_fileName;
97
99 StringArrayProperty m_extraRefNames;
100
102 BooleanProperty m_writeInputDH;
103
105 BooleanProperty m_existDH;
106
108 std::string m_streamName;
109
111 BooleanProperty m_lateSchema;
112
114 std::string m_macro;
115
118
120 std::string m_treeName;
121
123 std::vector<std::string> m_acceptNames;
124
126 std::vector<IAlgorithm*> m_acceptAlgs;
127
129 TTree * m_tree;
130
132 TBranch * m_tokenBranch;
133
136
138 static const unsigned int s_maxLengthOfStrings = 5000;
140};
141
142#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
virtual StatusCode execute() override
Working entry point.
void setupTree()
setup Tree
std::string m_treeName
Name of the output tree.
BooleanProperty m_lateSchema
write schema in execute()
std::string m_macro
macro
AANTupleStream(const std::string &name, ISvcLocator *pSvcLocator)
Standard AANTupleStream Constructor.
StatusCode initCollection()
Initialize the output collection.
virtual StatusCode io_reinit() override
callback method to reinitialize the internal state of the component for I/O purposes (e....
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.
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.
std::string m_fileName
Name of the output collection.
virtual StatusCode finalize() override
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
The Athena Transient Store API.
bool match(std::string s1, std::string s2)
match the individual directories of two strings
Definition hcg.cxx:359
void initialize()