40 std::vector<std::string>
42 const std::string& branchName)
44 std::vector<std::string>
result;
46 TString *
var =
nullptr;
49 std::unique_ptr<TFile>
file (TFile::Open (
fileName.c_str(),
"READ"));
78 if (sampleName ==
"empty")
83 std::unique_ptr<SH::SampleLocal> myresult (
new SH::SampleLocal (
"empty"));
85 result = myresult.release();
89 if (sampleName ==
"single")
94 std::unique_ptr<SH::SampleLocal> myresult (
new SH::SampleLocal (
"single"));
96 for (
unsigned iter = 0; iter != 10000; ++ iter)
99 result = myresult.release();
103 if (sampleName ==
"multi")
108 std::unique_ptr<SH::SampleLocal> myresult (
new SH::SampleLocal (
"multi"));
109 for (
unsigned jter = 0; jter != 10; ++ jter)
112 for (
unsigned iter = 0; iter != 10000; ++ iter)
116 result = myresult.release();
141 using namespace asg::msgUserCode;
144 std::shared_ptr<Driver>
driver = GetParam().m_driver;
151 GetParam().setupJob (
job);
154 config.setType (
"EL::UnitTestAlg2");
155 config.setName (
"newAlg");
156 config.setUseXAODs (
false);
162 job.algsAdd (
alg.release());
165 std::ostringstream
submit;
177 const std::string& objectName,
185 TObject *
object =
sample->readHist (objectName);
186 if (isMandatory &&
object ==
nullptr)
196 TH1 *
hist = getHist<TH1> (sampleName,
"EventLoop_EventCount",
true);
197 return hist->GetBinContent (1);
205 return getHist<TH1> (sampleName,
"callbacks",
true);
213 std::set<std::string> filesOut;
220 auto vec = readVectorFromTree (
sample,
"EventLoop_FileExecuted",
"file");
221 filesOut.insert (
vec.begin(),
vec.end());
223 std::set<std::string> filesIn;
227 if (
split == std::string::npos)
232 ASSERT_TRUE (filesIn.find (
fileName) == filesIn.end());
235 ASSERT_EQ (filesIn, filesOut);
243 static unsigned index = 0;
247 std::unique_ptr<SH::DiskWriter>
file
248 = GetParam().make_file_writer (
fileName.str());
252 TTree *
tree =
new TTree (
"physics",
"physics");
254 tree->Branch (
"el_n", &el_n,
"el_n/I");
261 file->file()->Write ();
359 sh.load (
getJob() +
"/output-out_empty");
361 ASSERT_TRUE (
sample !=
nullptr);
365 std::unique_ptr<TFile>
file (TFile::Open (
fileName.c_str(),
"READ"));