ATLAS Offline Software
RNTCollectionSchemaEditor.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 RNTCOLLECTION_COLLECTIONSCHEMAEDITOR_H
6 #define RNTCOLLECTION_COLLECTIONSCHEMAEDITOR_H
7 
8 #include <string>
9 #include <vector>
10 #include <typeinfo>
11 
14 
15 #include "CoralBase/MessageStream.h"
16 
17 
18 namespace ROOT::Experimental {
19  class RNTupleReader;
20 }
22 
23 
24 namespace pool {
25  class ICollectionColumn;
26 
27  namespace RootCollection {
28 
29  class RNTCollection;
30 
37  {
38 
39  friend class RNTCollection;
40 
41  public:
42 
46 
47 
53  virtual void setEventReferenceColumnName( const std::string& columnName );
54 
65  const std::string& columnName,
66  const std::string& columnType,
67  const std::string& annotation = "",
68  int maxSize = 0,
69  bool sizeIsFixed = true );
70 
80  const std::string& columnName,
81  const std::type_info& columnType,
82  const std::string& annotation = "",
83  int maxSize = 0,
84  bool sizeIsFixed = true );
85 
92  const std::string& columnName,
93  const std::string& annotation = "" );
94 
95 
98  const std::string& columnName,
99  const std::string& annotation );
100 
106  virtual void dropColumn( const std::string& columnName );
107 
114  virtual void renameColumn( const std::string& oldName, const std::string& newName );
115 
117  void readSchema();
118 
121 
122  protected:
123  void addRNTupleField( const std::string& name, const std::string& type_name );
125 
127 
129 
131 
132  coral::MessageStream m_poolOut;
133  };
134  }
135 }
136 #endif
137 
pool::ICollectionSchemaEditor
Definition: ICollectionSchemaEditor.h:22
CollectionDescription.h
pool::RootCollection::RNTCollectionSchemaEditor::m_description
CollectionDescription & m_description
Definition: RNTCollectionSchemaEditor.h:128
pool
pool namespace
Definition: libname.h:15
pool::RootCollection::RNTupleReader
ROOT::Experimental::RNTupleReader RNTupleReader
Definition: RNTCollection.h:37
pool::RootCollection::RNTCollectionSchemaEditor::dropColumn
virtual void dropColumn(const std::string &columnName)
Removes a column from the collection.
pool::RootCollection::RNTCollectionSchemaEditor::renameColumn
virtual void renameColumn(const std::string &oldName, const std::string &newName)
Renames a column of the collection.
pool::RootCollection::RNTCollectionSchemaEditor::m_reader
RNTupleReader & m_reader
Definition: RNTCollectionSchemaEditor.h:130
pool::RootCollection::RNTCollection
Collection (and CollectionProxy) implementation based on RNTuple.
Definition: RNTCollection.h:46
pool::RootCollection::RNTCollectionSchemaEditor::insertColumn
virtual const ICollectionColumn & insertColumn(const std::string &columnName, const std::string &columnType, const std::string &annotation="", int maxSize=0, bool sizeIsFixed=true)
Adds a new column to the collection.
ICollectionSchemaEditor.h
pool::RootCollection::RNTCollectionSchemaEditor::insertColumn
virtual const ICollectionColumn & insertColumn(const std::string &columnName, const std::type_info &columnType, const std::string &annotation="", int maxSize=0, bool sizeIsFixed=true)
Adds a new column to the collection.
RNTupleReader
ROOT::Experimental::RNTupleReader RNTupleReader
Definition: RNTCollectionSchemaEditor.h:21
pool::CollectionDescription
Definition: CollectionDescription.h:29
pool::ICollectionColumn
Definition: ICollectionColumn.h:19
pool::RootCollection::RNTCollectionSchemaEditor::m_poolOut
coral::MessageStream m_poolOut
Definition: RNTCollectionSchemaEditor.h:132
pool::RootCollection::RNTCollectionSchemaEditor::readSchema
void readSchema()
get Collection Description from the RNTupleReader
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
pool::RootCollection::RNTCollectionSchemaEditor::m_collection
RNTCollection & m_collection
Definition: RNTCollectionSchemaEditor.h:126
pool::RootCollection::RNTCollectionSchemaEditor::RNTCollectionSchemaEditor
RNTCollectionSchemaEditor(RNTCollection &collection, CollectionDescription &description, RNTupleReader &reader)
MakeNewFileFromOldAndSubstitution.newName
dictionary newName
Definition: ICHEP2016/MakeNewFileFromOldAndSubstitution.py:95
pool::RootCollection::RNTCollectionSchemaEditor::insertTokenColumn
virtual const ICollectionColumn & insertTokenColumn(const std::string &columnName, const std::string &annotation="")
Adds a new column of type pool::Token to the collection.
pool::RootCollection::RNTCollectionSchemaEditor::~RNTCollectionSchemaEditor
virtual ~RNTCollectionSchemaEditor()
destructor.
pool::RootCollection::RNTCollectionSchemaEditor::createRNTuple
void createRNTuple()
pool::RootCollection::RNTCollectionSchemaEditor::setEventReferenceColumnName
virtual void setEventReferenceColumnName(const std::string &columnName)
Sets the name of the event reference Token column.
ROOT::Experimental
Definition: RNTCollection.h:27
collisions.reader
reader
read the goodrunslist xml file(s)
Definition: collisions.py:22
description
std::string description
glabal timer - how long have I taken so far?
Definition: hcg.cxx:88
pool::RootCollection::RNTCollectionSchemaEditor::annotateColumn
virtual const ICollectionColumn & annotateColumn(const std::string &columnName, const std::string &annotation)
add annotation to column
pool::RootCollection::RNTCollectionSchemaEditor::addRNTupleField
void addRNTupleField(const std::string &name, const std::string &type_name)
pool::RootCollection::RNTCollectionSchemaEditor
Definition: RNTCollectionSchemaEditor.h:37