23 const std::string& outfile);
25 const std::string& outfile);
45 void SetMetadata(
const std::string& key,
const std::string& val)
51 virtual void Go()
override;
55 long& nRecSeen,
long& nRecPassed);
59 long& nRecSeen,
long& nRecPassed);
63 long& nRecSeen,
long& nRecPassed);
68 const std::set<std::string>&
mask,
69 const std::vector<std::string>& fnames)
const;
void CopyGlobalTree(TFile *fin, TFile *fout)
void( ReductionFunc)(caf::StandardRecord *)
void HandleNestedTree(TFile *fout, TTree *recTree, TTree *&trOut, Progress *prog, long &nRecSeen, long &nRecPassed)
void SetMetadata(const std::string &key, const std::string &val)
Override any metadata key in the output file.
process_name opflashCryoW ana
void HandleFile(TFile *fin, TFile *fout, TTree *&trOut, Progress *prog, long &nRecSeen, long &nRecPassed)
void AddReductionStep(const std::function< ReductionFunc > &f)
Run the specified reduction function over each event.
constexpr mask_t< EnumType > mask(EnumType bit, OtherBits...otherBits)
Returns a mask with all specified bits set.
std::map< std::string, std::string > fMetaMap
void ClearTrueParticles(caf::StandardRecord *sr)
FileReducer(const std::string &wildcard, const std::string &outfile)
void AddSpillCut(const SpillCut &cut)
Only copy records to the output file if they pass this cut.
virtual void Go() override
Load all the registered spectra.
void AddSliceCut(const SliceCut &cut)
Base class for the various types of spectrum loader.
std::vector< std::function< ReductionFunc > > fReductionFuncs
The StandardRecord is the primary top-level object in the Common Analysis File trees.
void HandleFlatTree(TFile *fout, TTree *recTree, TTree *&trOut, Progress *prog, long &nRecSeen, long &nRecPassed)
std::set< std::tuple< int, int, int > > fEventList
void UpdateMetadata(std::map< std::string, std::string > &meta, const std::set< std::string > &mask, const std::vector< std::string > &fnames) const
A simple ascii-art progress bar.
void Huskify(caf::StandardRecord *sr) const
Strip all information out of this record and tag it as a husk.
void SetEventList(const std::string &fname)
If called, only events whose run/subrun/event occur in fname will be retained.