ATLAS Offline Software
CollAppendBase.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef POOL_COLLUTILITIES_COLLAPPENDBASE_H
6 #define POOL_COLLUTILITIES_COLLAPPENDBASE_H
7 
16 
27 
28 #include "CoralBase/MessageStream.h"
29 #include "CoralBase/AttributeList.h"
30 
37 
38 
39 #include <string>
40 #include <map>
41 #include <set>
42 
43 
44 namespace pool
45 {
46  class CollectionService;
47 
49  {
50  public:
51 
52  CollAppendBase(const std::string& name="CollAppend");
53  virtual ~CollAppendBase();
54 
55  CollAppendBase (const CollAppendBase&) = delete;
56  CollAppendBase& operator= (const CollAppendBase&) = delete;
57 
58  virtual int execute( std::vector<std::string> argv_v );
59 
60  protected:
61  virtual bool init( std::vector<std::string> argv_v );
62  virtual void chkExistingDst( std::vector<bool>& existVec);
63 
64  virtual std::vector< pool::ICollection* >
66 
67  virtual pool::ICollection*
68  openDestCollection( const std::string& name, const std::string& type, const std::string& connect );
69 
70  virtual pool::ICollection*
72 
75  const pool::TokenList &tokens,
76  const coral::AttributeList &attribs,
77  const std::string& queryopt );
78 
79  virtual pool::ICollection*
80  openSrcCollection( const std::string& name, const std::string& type, const std::string& connect );
81 
82  virtual std::string
84 
85  virtual void copyData();
86 
87  virtual void closeCollections();
88  virtual void finalize();
89 
90 
91  std::vector< pool::ICollection* > m_srcCollections;
92  std::vector< pool::ICollection* > m_destCollections;
93 
94  std::string m_thisProgram;
95 
96  std::string m_provName;
97  std::string m_provCLID;
99 
100  // used to mark provenance columns removed from the source
102  std::set<std::string> m_removedTokens;
103 
105  // output modifiers
112 
113  time_t m_starttime, m_endtime;
114  // src collection info
115  std::vector<int> m_srcCountVec;
116  unsigned int m_evtCounterTotal;
117 
118  // for adding attributes
121 
122  // Classes with shared cli keys and their argument properties
128 
131  coral::MessageStream m_log;
132 
133  // Vector of args
135 
137  };
138 
139 } // end pool namespace
140 
141 #endif
pool::CollAppendBase::m_addedAttributes
coral::AttributeList m_addedAttributes
Definition: CollAppendBase.h:119
pool::CollAppendBase::m_removedTokens
std::set< std::string > m_removedTokens
Definition: CollAppendBase.h:102
collListGuids.queryopt
list queryopt
Definition: collListGuids.py:74
pool::CollAppendBase::m_catinfo
CatalogInfo m_catinfo
Definition: CollAppendBase.h:123
pool::CollAppendBase::finalize
virtual void finalize()
pool::DstInfo
Definition: DstInfo.h:31
pool::CollAppendBase::m_dstinfo
DstInfo m_dstinfo
Definition: CollAppendBase.h:125
pool::CollAppendBase::m_noAttrib
bool m_noAttrib
Definition: CollAppendBase.h:104
pool::CollAppendBase::init
virtual bool init(std::vector< std::string > argv_v)
TokenList.h
pool::CollAppendBase::m_thisProgram
std::string m_thisProgram
Definition: CollAppendBase.h:94
CollectionDescription.h
ICollectionColumn.h
pool::CollAppendBase::m_numRowsCached
int m_numRowsCached
Definition: CollAppendBase.h:109
ICollectionCursor.h
fillPileUpNoiseLumi.connect
string connect
Definition: fillPileUpNoiseLumi.py:70
pool
pool namespace
Definition: libname.h:15
pool::CollAppendBase::openDestCollections
virtual std::vector< pool::ICollection * > openDestCollections(pool::CollectionDescription &destDescription)
pool::CollAppendBase::CollAppendBase
CollAppendBase(const CollAppendBase &)=delete
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
pool::CollAppendBase::m_numEventsPerCommit
int m_numEventsPerCommit
Definition: CollAppendBase.h:107
beamspotman.tokens
tokens
Definition: beamspotman.py:1284
pool::CollAppendBase::createDestCollection
virtual pool::ICollection * createDestCollection(const pool::ICollectionDescription &destDescription)
pool::CollAppendBase::m_provCLID
std::string m_provCLID
Definition: CollAppendBase.h:97
pool::CollAppendBase::m_log
coral::MessageStream m_log
Definition: CollAppendBase.h:131
CollectionBaseNames.h
Token
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition: Token.h:21
pool::Args2Container
Definition: Args2Container.h:100
pool::CollAppendBase::m_committed
bool m_committed
Definition: CollAppendBase.h:129
pool::TokenList
Definition: TokenList.h:24
pool::CollAppendBase::closeCollections
virtual void closeCollections()
CollectionService.h
CollectionRowBuffer.h
pool::CollAppendBase::m_starttime
time_t m_starttime
Definition: CollAppendBase.h:113
Progress.h
pool::CollAppendBase::m_addedReferences
TokenList m_addedReferences
Definition: CollAppendBase.h:120
ICollectionDataEditor.h
pool::CollAppendBase::buildDstDesc
virtual pool::CollectionDescription buildDstDesc(const pool::ICollectionDescription &sourceDesc, const pool::TokenList &tokens, const coral::AttributeList &attribs, const std::string &queryopt)
pool::CollectionDescription
Definition: CollectionDescription.h:29
ICollection.h
Args2Container.h
pool::CollAppendBase::chkExistingDst
virtual void chkExistingDst(std::vector< bool > &existVec)
pool::CollAppendBase::m_progress
Progress m_progress
Definition: CollAppendBase.h:127
pool::QueryInfo
Definition: QueryInfo.h:31
pool::CollAppendBase::m_initialized
bool m_initialized
Definition: CollAppendBase.h:136
DstInfo.h
pool::CollAppendBase::m_extendProv
bool m_extendProv
Definition: CollAppendBase.h:110
pool::CollAppendBase::m_evtCounterTotal
unsigned int m_evtCounterTotal
Definition: CollAppendBase.h:116
CatalogInfo.h
pool::CollAppendBase::m_collectionService
pool::CollectionService * m_collectionService
Definition: CollAppendBase.h:130
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
pool::CollAppendBase::~CollAppendBase
virtual ~CollAppendBase()
pool::CollAppendBase::m_destCollections
std::vector< pool::ICollection * > m_destCollections
Definition: CollAppendBase.h:92
pool::CollAppendBase::m_ignoreSchemaDiff
bool m_ignoreSchemaDiff
Definition: CollAppendBase.h:111
pool::CollAppendBase::m_numEvents
int m_numEvents
Definition: CollAppendBase.h:106
pool::CollAppendBase::m_provName
std::string m_provName
Definition: CollAppendBase.h:96
pool::Progress
Definition: Progress.h:29
pool::SrcInfo
Definition: SrcInfo.h:31
pool::CollAppendBase::m_numEventsPerPrint
int m_numEventsPerPrint
Definition: CollAppendBase.h:108
pool::CollAppendBase
Definition: CollAppendBase.h:49
pool::CollAppendBase::m_queryinfo
QueryInfo m_queryinfo
Definition: CollAppendBase.h:124
pool::CollAppendBase::m_provCollExists
bool m_provCollExists
Definition: CollAppendBase.h:101
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
pool::CatalogInfo
Definition: CatalogInfo.h:35
pool::ATLAS_NOT_THREAD_SAFE
DbStatus DbObjectHandle< T >::makeLink ATLAS_NOT_THREAD_SAFE(const Token *pToken, Token::OID_t &linkH) const
Add persistent association entry.
Definition: DbObject.h:220
pool::CollAppendBase::openSrcCollection
virtual pool::ICollection * openSrcCollection(const std::string &name, const std::string &type, const std::string &connect)
pool::CollAppendBase::m_srcinfo
SrcInfo m_srcinfo
Definition: CollAppendBase.h:126
pool::CollAppendBase::CollAppendBase
CollAppendBase(const std::string &name="CollAppend")
ICollectionQuery.h
pool::CollAppendBase::readCollectionGUID
virtual std::string readCollectionGUID(pool::ICollection *collection)
pool::CollAppendBase::execute
virtual int execute(std::vector< std::string > argv_v)
pool::CollectionService
Definition: CollectionService.h:26
pool::CollAppendBase::m_srcCollections
std::vector< pool::ICollection * > m_srcCollections
Definition: CollAppendBase.h:91
pool::CollAppendBase::m_provToken
Token m_provToken
Definition: CollAppendBase.h:98
pool::CollAppendBase::m_argsVec
Args2Container m_argsVec
Definition: CollAppendBase.h:134
pool::CollAppendBase::copyData
virtual void copyData()
SrcInfo.h
Token.h
This file contains the class definition for the Token class (migrated from POOL).
QueryInfo.h
pool::ICollection
Definition: ICollection.h:24
pool::ICollectionDescription
Definition: ICollectionDescription.h:26
pool::CollAppendBase::m_srcCountVec
std::vector< int > m_srcCountVec
Definition: CollAppendBase.h:115
pool::CollAppendBase::openDestCollection
virtual pool::ICollection * openDestCollection(const std::string &name, const std::string &type, const std::string &connect)