1 #ifndef __sbnanalysis_core_ProcessorBase__
2 #define __sbnanalysis_core_ProcessorBase__
14 #include "gallery/Event.h"
23 template<
class AParamType>
41 class ProviderManager;
83 return fTree->Branch(name.c_str(), obj);
98 return fRecoTree->Branch(name.c_str(), obj);
112 const std::vector<event::Interaction> &truth,
113 std::vector<event::RecoInteraction>&
reco) = 0;
116 std::vector<event::RecoInteraction>*
fReco;
131 virtual void Initialize(fhicl::ParameterSet* config=NULL) = 0;
141 virtual void Setup(
char* config=NULL);
148 virtual void Setup(fhicl::ParameterSet* config=NULL);
203 #define DECLARE_SBN_PROCESSOR(classname) extern "C" { \
204 core::ProcessorBase* CreateProcessorObject() { return new classname; } \
205 void DestroyProcessorObject(core::ProcessorBase* o) { delete o; } \
206 struct core::export_table exports = { CreateProcessorObject, DestroyProcessorObject };}
208 #endif // __sbnanalysis_core_ProcessorBase__
TTree * fSubRunTree
Subrun output tree.
TParameter< int > * fExperimentParameter
Saves value of experiment enum.
void SetupServices(gallery::Event &ev)
art::InputTag fTruthTag
art tag for MCTruth information
TTree * fTree
The output ROOT tree.
std::vector< event::RecoInteraction > * fReco
Reco interaction list.
virtual void Finalize()=0
TFile * fOutputFile
The output ROOT file.
std::vector< geo::BoxBoundedGeo > fActiveVolumes
List of active volumes in configured detector.
std::vector< art::InputTag > fWeightTags
art tag(s) for MCEventWeight information
The reconstructed event data definition.
event::Event * fEvent
The standard output event data structure.
event::RecoEvent * fRecoEvent
The standard output reco event data structure.
Interface to LArSoft services.
void UpdateSubRuns(gallery::Event &ev)
virtual void Initialize(char *config=NULL)
process_name standard_reco_uboone reco
std::string fProviderConfig
A custom provider config fcl file.
unsigned long fEventIndex
An incrementing index.
bool fWriteTree
Enable writing of the main tree.
SubRun * fSubRun
Standard output subrun structure.
A generic tree-writing event-by-event processor.
virtual void EventCleanup()
Experiment fExperimentID
Experiment identifier.
art::InputTag fFluxTag
art tag for MCFlux information
FileMeta * fFileMeta
standard output file metadata structure
art::InputTag fMCShowerTag
art tag for MCShower
The standard subrun data definition.
virtual void FillRecoTree()
void BuildEventTree(gallery::Event &ev)
The standard event data definition.
std::string fGeneratorProcess
process_name of process used to run genie. Used to extract subrun/POT information ...
virtual bool ProcessEvent(const gallery::Event &ev, const std::vector< event::Interaction > &truth, std::vector< event::RecoInteraction > &reco)=0
TTree * fRecoTree
The output reco ROOT tree.
ProviderManager * fProviderManager
Interface for provider access.
bool fWriteRecoTree
Enable writing of the reco tree.
art::InputTag fMCParticleTag
art tag for MCParticle
std::string fOutputFilename
The output filename.
TTree * fFileMetaTree
File metadata output tree.
TBranch * AddRecoBranch(std::string name, T *obj)
std::set< std::pair< int, int > > fSubRunCache
Cache stored subruns.
art::InputTag fMCTrackTag
art tag for MCTrack
TBranch * AddBranch(std::string name, T *obj)
void UpdateFileMeta(gallery::Event &ev)
virtual void Setup(char *config=NULL)