41 typedef std::pair<UInt_t,UInt_t> RunEvent;
44 typedef std::set<RunEvent> RunEventList;
51 const std::set<std::string>& runNames ()
53 static const std::set<std::string>
result =
54 {
"RunNumber",
"runNumber" };
63 const std::set<std::string>& eventNames ()
65 static const std::set<std::string>
result =
66 {
"EventNumber",
"eventNumber" };
77 findBranch (
const TTree&
tree,
const std::set<std::string>& names)
80 TObjArray *
branches = tree_nc.GetListOfBranches();
82 for (std::set<std::string>::const_iterator name =
names.begin(),
83 end =
names.end(); name != end; ++ name)
89 return std::string ();
103 RCU_THROW_MSG (
"failed to read number of events from n-tuple");
107 const std::string runName = findBranch (
tree, runNames());
108 const std::string eventName = findBranch (
tree, eventNames());
110 tree.SetBranchStatus (
"*", 0);
112 tree.SetBranchStatus (runName.c_str(), 1);
113 tree.SetBranchAddress (runName.c_str(),
static_cast<void*
>(&run));
115 tree.SetBranchStatus (eventName.c_str(), 1);
116 tree.SetBranchAddress (eventName.c_str(),
static_cast<void*
>(&event));
118 tree.SetCacheSize (10 * 1024 * 1024);
119 for (Long64_t entry = 0;
122 if (
tree.GetEntry (entry) < 0)
124 RunEvent runEvent (run, event);
125 if (
list.find (runEvent) ==
list.end())
127 list.insert (runEvent);
131 message <<
"duplicate event run=" <<
run <<
" event=" <<
event
132 <<
" file=" <<
tree.GetCurrentFile()->GetName();
145 std::unique_ptr<TChain> chain (sample.makeTChain ());
154 end =
sh.end(); sample != end; ++ sample)
166 end =
sh.end(); sample != end; ++ sample)
168 std::unique_ptr<TChain> chain ((*sample)->makeTChain ());
#define RCU_THROW_MSG(message)
#define RCU_WARN_MSG(message)
Define macros for attributes used to control the static checker.
#define ATLAS_THREAD_SAFE
A class that manages a list of Sample objects.
std::vector< Sample * >::const_iterator iterator
the iterator to use
a base class that manages a set of files belonging to a particular data set and the associated meta-d...
This module provides a lot of global definitions, forward declarations and includes that are used by ...
void printDuplicateEventsSplit(const SampleHandler &sh)
effects: check each sample for duplicate events and then print them out guarantee: basic,...
void printDuplicateEvents(const Sample &sample)
effects: check the given sample for duplicate events and then print them out guarantee: basic,...
void printDuplicateEventsJoint(const SampleHandler &sh)
effects: check for duplicate events between all the samples and then print them out guarantee: basic,...