|
ATLAS Offline Software
|
Go to the documentation of this file.
44 std::cout <<
"Running options:" << std::endl;
45 std::cout <<
" --help : To get the help you're reading" << std::endl;
46 std::cout <<
" --jetColl= : Specify the jet collection" << std::endl;
47 std::cout <<
" --sample= : Specify input xAOD" << std::endl;
48 std::cout <<
" Example: Example --jetColl=AntiKt4EMTopo --sample=xAOD.root" << std::endl;
61 std::string jetColl =
"";
68 std::string
opt(
argv[
i]); std::vector< std::string >
v;
70 std::istringstream iss(
opt);
75 while (std::getline(iss,
item, delim)){
79 if (
opt.find(
"--help") != std::string::npos ) {
83 if (
opt.find(
"--sample=") != std::string::npos )
sample =
v[1];
85 if (
opt.find(
"--jetColl=") != std::string::npos ) jetColl =
v[1];
90 std::cout <<
"No input xAOD file specified, exiting" << std::endl;
94 std::cout <<
"No jet collection specified, exiting" << std::endl;
99 static const char*
APP_NAME =
"JetJvtTools_Example";
105 std::unique_ptr< TFile >
ifile( TFile::Open(
sample.c_str(),
"READ" ) );
117 const std::string name_JetJvtTool =
"JetJvt_Example";
118 const std::string name_JetfJvtTool =
"JetfJvt_Example";
124 jvtTool.setProperty(
"JVTFileName",
125 "JetMomentTools/JVTlikelihood_20140805.root"));
128 if(!(jvtTool.initialize().isSuccess())){
129 std::cout <<
"Initialization of JetJvtTools failed, exiting" << std::endl;
132 if(!(fjvtTool.initialize().isSuccess())){
133 std::cout <<
"Initialization of JetJvtTools failed, exiting" << std::endl;
141 const Long64_t
nevents =
event.getEntries();
142 for(Long64_t ievent = 0; ievent <
nevents; ++ievent){
146 std::cerr <<
"Failed to load entry " << ievent << std::endl;
151 if(ievent % 100==0) std::cout <<
"Event " << ievent <<
" of " <<
nevents << std::endl;
162 jvtTool.updateJvt( *
jet );
166 delete jets_shallowCopy.first;
167 delete jets_shallowCopy.second;
#define RETURN_CHECK(CONTEXT, EXP)
Helper macro for checking return codes in a compact form in the code.
ReadStats & stats()
Access the object belonging to the current thread.
@ kClassAccess
Access auxiliary data using the aux containers.
int main(int, char **)
Main class for all the CppUnit test classes
StatusCode readFrom(TFile *file)
POOL::TEvent event(POOL::TEvent::kClassAccess)
James Frost November 2014.
static IOStats & instance()
Singleton object accessor.
void printSmartSlimmingBranchList(bool autoIncludeLinks=false) const
Print the accessed variables, formatted for smart slimming.
std::pair< std::unique_ptr< T >, std::unique_ptr< ShallowAuxContainer > > shallowCopyContainer(const T &cont, [[maybe_unused]] const EventContext &ctx)
Function making a shallow copy of a constant container.
A relatively simple transient store for objects created in analysis.
StatusCode retrieve(const T *&obj)
Tool for accessing xAOD files outside of Athena.
StatusCode Init(const char *appname)
Function initialising ROOT/PyROOT for using the ATLAS EDM.