|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef SAMPLE_HANDLER_SAMPLE_HH
6 #define SAMPLE_HANDLER_SAMPLE_HH
79 const std::string&
name ()
const;
97 void name (std::string val_name);
302 [[
deprecated(
"use meta() instead, or (preferably) access of meta-data by name")]]
308 [[
deprecated(
"use meta() instead, or (preferably) access of meta-data by name")]]
std::size_t numFiles() const
the number of files in the sample
MetaObject * m_meta
the meta-information for this sample
TagList m_tags
the tag list we are using
void updateLocation(const std::string &from, const std::string &to)
update all file references starting with from to to
virtual SamplePtr doMakeLocal() const =0
Make this a local sample, i.e.
A class that manages a list of tags for identifying samples.
Long64_t getNumEntries() const
get the number of entries
Sample(const Sample &that)
Sample & operator=(const Sample &that)
virtual TObject * doReadHist(const std::string &name) const
read an object from a histogram file
void addTag(const std::string &tag)
add a tag to the content of tags()
TObject * readHist(const std::string &name) const
read an object from a histogram file
TObject * getMeta(const std::string &name)
the meta-data object with the given name
void print() const
print the debugging output to the screen
std::string getMetaString(const std::string &name, const std::string &def_val="") const
the meta-data string with the given name
const TObject * getMeta(const std::string &name) const
the meta-data object with the given name
void tags(const TagList &tags)
set the content of tags()
TCollection * metaDataList()
get the meta-data list
void addReplaceMeta(TNamed *meta_swallow)
add a meta-data object and remove any existing meta-data with the same name
void setMetaDouble(const std::string &name, double value)
set the meta-data double with the given name
void fetchMeta(const Sample &source)
fetch the meta-data from the given sample.
void name(std::string val_name)
set the value of name
std::vector< std::string > makeFileList() const
make a list of all files, prestaging them if necessary
double getMetaDouble(const std::string &name, double def_val=0) const
the meta-data double with the given name
const TagList & tags() const
the tag list we are using
virtual bool getContains(const std::string &name) const
whether this sample contains a sample of the given name
virtual std::string getFileName(std::size_t index) const =0
the name of the file with the given index
void removeMeta(const std::string &name)
remove all meta-information with the given name
MetaObject * meta()
the meta-information for this sample
const std::string & name() const
the name of the sample we are using
void testInvariant() const
test the invariant of this object
const MetaObject * meta() const
the meta-information for this sample
void release() const
decrease the reference count by one
a base class that manages a set of files belonging to a particular data set and the associated meta-d...
std::string dbg(const Sample &obj, unsigned verbosity=0)
the debugging info of this object
virtual ~Sample()
standard destructor
bool contains(const std::string &name) const
whether this sample contains a sample of the given name
SamplePtr makeLocal() const
Make this a local sample, i.e.
A smart pointer class that holds a single Sample object.
void printContent() const
print the debugging output to the screen
std::atomic< unsigned > m_references
the reference count
std::string fileName(std::size_t index) const
the name of the file with the given index
virtual void doAddSamples(SampleHandler &result)
add all samples this sample corresponds to to the given sample handler
TChain * makeTChain() const
create a TChain object, containing all these files
std::string m_name
the name of the sample we are using
Sample(const std::string &name)
standard constructor
virtual void doUpdateLocation(const std::string &from, const std::string &to)
update all file references starting with from to to
virtual std::size_t getNumFiles() const =0
the number of files in the sample
A class that manages a list of Sample objects.
This module provides a lot of global definitions, forward declarations and includes that are used by ...
void setMetaString(const std::string &name, const std::string &value)
set the meta-data string with the given name
virtual std::vector< std::string > doMakeFileList() const =0
make a list of all files, prestaging them if necessary
const TCollection * metaDataList() const
get the meta-data list
void alloc() const
increase the reference count by one
void addSamples(SampleHandler &result)
add all samples this sample corresponds to to the given sample handler