ATLAS Offline Software
Namespaces | Functions
PhysicsAnalysis/TopPhys/xAOD/TopAnalysis/TopAnalysis/Tools.h File Reference
#include <vector>
#include <string>
#include "xAODRootAccess/TEvent.h"
#include "xAODCutFlow/CutBookkeeper.h"
#include "xAODCutFlow/CutBookkeeperContainer.h"
#include "xAODMetaData/FileMetaData.h"
#include "TopConfiguration/TopConfig.h"
Include dependency graph for PhysicsAnalysis/TopPhys/xAOD/TopAnalysis/TopAnalysis/Tools.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 top
 TopConfig A simple configuration that is NOT a singleton.
 

Functions

void top::xAODInit (bool failOnUnchecked=true)
 A little wrapper for the xAOD tools. More...
 
std::string top::getDerivationStream (TFile *inputFile)
 Function to determine the derivation type using string manipulation. More...
 
void top::parseCutBookkeepers (xAOD::TEvent &event, const std::size_t size, std::vector< std::string > &names, std::vector< float > &sumW)
 Search bookkeepers for ones matching AllExecutedEvents, and which originate from AOD before skimming. More...
 
ULong64_t top::getRawEventsBookkeeper (const xAOD::CutBookkeeperContainer *cutBookKeepers)
 Get raw number of events before skimming from "AllExecutedEvents" bookkeeper. More...
 
void top::renameCutBookkeepers (std::vector< std::string > &bookkepeer_names, const std::vector< std::string > &pmg_weight_names)
 Rename CutBookkeeper names according to MC generator weight names reported by PMGTruthWeightTool. More...
 
std::vector< std::string > top::loadCuts (const std::string &filename)
 Load the file and make a vector of the cuts to pass on to the selection tool. More...
 
std::vector< std::string > top::fileList (const std::string &filename)
 Given a filename for a text file, parse it and extract a list of root files. More...
 
size_t top::checkFiles (const std::vector< std::string > &filenames)
 Open each file in the vector and get the number of events in it. More...
 
void top::loadLibraries (const std::string &libraryNames)
 So that we can load external libraries with (1) extra event selection tools in, (2) user defined object selection and (3) user defined output file formats. More...
 
top::TopObjectSelectiontop::loadObjectSelection (const std::shared_ptr< top::TopConfig > &config)
 Users may want to define (and load!) their own object selection. More...
 
top::EventSaverBasetop::loadEventSaver (const std::shared_ptr< top::TopConfig > &config)
 Users may also want to write out custom ntuples / xAODs. More...
 
bool top::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. More...
 
void top::readMetaData (const xAOD::FileMetaData *FMD, const std::shared_ptr< top::TopConfig > &config)
 Retrieve metadata from xAOD::FileMetaData object, to be stored in the TopConfig instance. More...
 

Detailed Description

Some tools to make life in the xAOD world a bit easier. Including ways to initialise, guess the best "mode" to open an xAOD with, load cuts, list files, check yields of files, and load some "tools".

Definition in file PhysicsAnalysis/TopPhys/xAOD/TopAnalysis/TopAnalysis/Tools.h.