![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
29 using namespace TopAnalysis;
37 ATH_MSG_INFO(
"Code to perform object and event selection and write-out\n"
38 <<
"a few histograms and / or a tree in xAOD format.\n"
40 <<
" " <<
argv[0] <<
" cuts.txt input.txt\n"
41 <<
" cuts.txt - file containing cuts\n"
42 <<
" input.txt - file containing list of input files\n"
43 <<
" submitdir - path for EventLoop submit directory\n"
47 <<
" $ROOTCOREBIN/data/TopAnalysis/nocuts.txt "
48 "$ROOTCOREBIN/data/TopAnalysis/input-13TeV-fondueworld.txt output\n");
59 StatusCode::enableFailure();
65 std::string settingsFilename =
68 ATH_MSG_INFO(
"LOCATED (using PathResolverFindFile ): Configuration file = " << settingsFilename
72 ATH_MSG_INFO(
"Configuration Files:\n" << settingsFilename <<
"\n" <<
argv[2] <<
"\n");
83 const std::string libraryNames = settings->
value(
"LibraryNames");
106 std::unique_ptr<TFile> checkingYieldFile(TFile::Open(
filename.c_str()));
109 const TTree *
const collectionTree =
110 dynamic_cast<TTree *
>(checkingYieldFile->Get(
"CollectionTree"));
111 if (collectionTree) {
118 std::unique_ptr<TFile>
testFile(TFile::Open(usethisfile.c_str()));
120 ATH_MSG_ERROR(
"Unable to access FileMetaData in this file : "
121 << usethisfile <<
"\nPlease report this message.");
133 const std::string tdp_filename = settings->
value(
"TDPPath");
138 ATH_MSG_ERROR(
"TopDataPreparation - could not read file\n" << tdp_filename);
147 <<
"ShowerIndex: " << ShowerIndex
164 "Failed to retrieve EventInfo");
181 auto sample = std::make_unique<SH::SampleLocal>(
"sample");
185 job.sampleHandler(
sh);
194 job.algsAdd(algConfig);
static const std::string optMaxEvents
description: the name of the option used for setting the maximum number of events to process per samp...
const std::string & value(const std::string &key) const
The user wants to know the value for the specified key.
void loadLibraries(const std::string &libraryNames)
So that we can load external libraries with (1) extra event selection tools in, (2) user defined obje...
static std::string find_file(const std::string &logical_file_name, const std::string &search_path, SearchType search_type=LocalSearch)
int main(int argc, char **argv)
void setConfigSettings(top::ConfigurationSettings *const &settings)
static void enableDataSubmission(::Bool_t value)
Function for turning data submission on/off.
void checkSettings()
Validate that configured options make sense.
void loadFromFile(const std::string &filename)
Read the settings from a text file given by.
unsigned int getDSID() const
bool readMetaData(TFile *inputFile, const std::shared_ptr< top::TopConfig > &config)
This function will be used to load the metadata object and pull information from it.
const std::string & sgKeyEventInfo() const
an object that can create a AnaAlgorithm
@ kClassAccess
Access auxiliary data using the aux containers.
const std::unordered_map< std::string, std::string > & GetMCMCTranslator() const
virtual unsigned int numberOfEventsToRun() const
std::vector< std::string > fileList(const std::string &filename)
Given a filename for a text file, parse it and extract a list of root files.
uint32_t runNumber() const
The current event's run number.
void setTranslator(const std::unordered_map< std::string, std::string > &map)
bool readFromFile(const char *fName)
std::string getShoweringString(const int dsid) const
::Long64_t getEntries() const
Get how many entries are available from the current input file(s)
::Int_t getEntry(::Long64_t entry, ::Int_t getall=0)
Function loading a given entry of the input TTree.
static ConfigurationSettings * get(bool reset=false)
Design patterns 101.
void xAODInit(bool failOnUnchecked)
A little wrapper for the xAOD tools.
void setShoweringAlgorithm(SampleXsection::showering in)
bool isTruthDxAOD() const
virtual unsigned int numberOfEventsToSkip() const
void check(bool thingToCheck, const std::string &usefulFailureMessage)
Print an error message and terminate if thingToCheck is false.
showering getShowering(const int dsid) const
std::string getYear(unsigned int runnumber, const bool isMC)
void SetYear(const std::string &year)
a Driver that runs directly inside the submission job itself
void SetTriggersToYear(const bool isMC)
Class describing the basic event information.
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
StatusCode retrieve(const T *&obj, const std::string &key)
Retrieve either an input or an output object from the event.
StatusCode setProperty(const std::string &name, const T &value)
set the given property
StatusCode readFrom(::TFile *file, Bool_t useTreeCache=kTRUE, const char *treeName=EVENT_TREE_NAME)
Connect the object to a new input file.
A class that manages a list of Sample objects.
void setMapIndex(unsigned int value)
static const std::string optSubmitDirMode
the submit-dir mode (allowed values: "no-clobber", "overwrite", "unique", "unique-link")
static const std::string optSkipEvents
description: the name of the option used for skipping a certain number of events in the beginning rat...
int getShoweringIndex(const int dsid) const
Hold the configuration information for the whole run.
Tool for accessing xAOD files outside of Athena.
SampleXsection::showering getShoweringAlgorithm() const