2 #include "spdlog/sinks/stdout_color_sinks.h"
3 #include "spdlog/spdlog.h"
10 int main(
int argc,
char const *argv[]) {
12 chain.
Add(
"test.root");
17 spdlog::info(
"{} entries in the chain", chain.
GetEntries());
19 auto handle1 = chain.
CreateSkimTree(
"skimmed.root",
"RichBase;RichPlus");
21 unsigned long long nEntries = chain.
GetEntries();
24 unsigned long long skimmedEntries = 0;
33 for (
auto &event : chain) {
38 spdlog::info(
"Entry {} - Mask {}", event.header->EventNo, to_string_binary<32>(event.header->Mask()));
60 event.mcTruthBase->Dump();
61 event.mcTruthPlus->Dump();
106 spdlog::info(
"We skimmed {} entries", skimmedEntries);
SkimTreeHandle< SingleTreeChain > CreateSkimTree(const std::string &filename, const std::string &exclBranches)
Create a new SkimTree handle object and setup all internal branches.
int main(int argc, char **argv)
int Add(const std::string &filePath)
Add a file to the chain.
This event is classified as charge >2 according to tracker (Q > 2.5)
unsigned long int GetEntries()
Get the total number of events.
void SetupBranches(bool isMC=false)
Set all branch addresses for reading operations, or create all branches for writing operation...