THaAnalyzer THaAnalyzer is the base class for a "Hall A analyzer" class. An analyzer defines the basic actions to perform during analysis. THaAnalyzer is the default analyzer that is used if no user class is defined. It performs a standard analysis consisting of 1. Decoding/Calibrating 2. Track Reconstruction 3. Physics variable processing At the end of each step, testing and histogramming are done for the appropriate block defined in the global test/histogram lists.
THaAnalyzer() | |
virtual | ~THaAnalyzer() |
void | TObject::AbstractMethod(const char* method) const |
virtual Int_t | AddPostProcess(THaPostProcess* module) |
virtual void | TObject::AppendPad(Option_t* option = "") |
virtual void | TObject::Browse(TBrowser* b) |
static TClass* | Class() |
virtual const char* | TObject::ClassName() const |
virtual void | TObject::Clear(Option_t* = "") |
virtual TObject* | TObject::Clone(const char* newname = "") const |
virtual void | Close() |
virtual Int_t | TObject::Compare(const TObject* obj) const |
virtual void | TObject::Copy(TObject& object) const |
virtual void | TObject::Delete(Option_t* option = "")MENU |
virtual Int_t | TObject::DistancetoPrimitive(Int_t px, Int_t py) |
virtual void | TObject::Draw(Option_t* option = "") |
virtual void | TObject::DrawClass() constMENU |
virtual TObject* | TObject::DrawClone(Option_t* option = "") constMENU |
virtual void | TObject::Dump() constMENU |
void | EnableBenchmarks(Bool_t b = kTRUE) |
void | EnableHelicity(Bool_t b = kTRUE) |
void | EnableOtherEvents(Bool_t b = kTRUE) |
void | EnableOverwrite(Bool_t b = kTRUE) |
void | EnablePhysicsEvents(Bool_t b = kTRUE) |
void | EnableRunUpdate(Bool_t b = kTRUE) |
void | EnableScalers(Bool_t b = kTRUE) |
void | EnableSlowControl(Bool_t b = kTRUE) |
virtual void | TObject::Error(const char* method, const char* msgfmt) const |
virtual void | TObject::Execute(const char* method, const char* params, Int_t* error = 0) |
virtual void | TObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0) |
virtual void | TObject::ExecuteEvent(Int_t event, Int_t px, Int_t py) |
virtual void | TObject::Fatal(const char* method, const char* msgfmt) const |
virtual TObject* | TObject::FindObject(const char* name) const |
virtual TObject* | TObject::FindObject(const TObject* obj) const |
TList* | GetApps() const |
Int_t | GetCompressionLevel() const |
const char* | GetCutFileName() const |
THaEvData* | GetDecoder() const |
virtual Option_t* | TObject::GetDrawOption() const |
static Long_t | TObject::GetDtorOnly() |
THaEvent* | GetEvent() const |
virtual const char* | TObject::GetIconName() const |
static THaAnalyzer* | GetInstance() |
virtual const char* | TObject::GetName() const |
virtual char* | TObject::GetObjectInfo(Int_t px, Int_t py) const |
static Bool_t | TObject::GetObjectStat() |
const char* | GetOdefFileName() const |
virtual Option_t* | TObject::GetOption() const |
TFile* | GetOutFile() const |
const char* | GetOutFileName() const |
TList* | GetPhysics() const |
TList* | GetPostProcess() const |
TList* | GetScalers() const |
const char* | GetSummaryFileName() const |
virtual const char* | TObject::GetTitle() const |
virtual UInt_t | TObject::GetUniqueID() const |
virtual Bool_t | TObject::HandleTimer(TTimer* timer) |
virtual ULong_t | TObject::Hash() const |
Bool_t | HasStarted() const |
Bool_t | HelicityEnabled() const |
virtual void | TObject::Info(const char* method, const char* msgfmt) const |
virtual Bool_t | TObject::InheritsFrom(const char* classname) const |
virtual Bool_t | TObject::InheritsFrom(const TClass* cl) const |
virtual Int_t | Init(THaRunBase* run) |
Int_t | Init(THaRunBase& run) |
virtual void | TObject::Inspect() constMENU |
void | TObject::InvertBit(UInt_t f) |
virtual TClass* | IsA() const |
virtual Bool_t | TObject::IsEqual(const TObject* obj) const |
virtual Bool_t | TObject::IsFolder() const |
Bool_t | TObject::IsOnHeap() const |
virtual Bool_t | TObject::IsSortable() const |
Bool_t | TObject::IsZombie() const |
virtual void | TObject::ls(Option_t* option = "") const |
void | TObject::MayNotUse(const char* method) const |
virtual Bool_t | TObject::Notify() |
static void | TObject::operator delete(void* ptr) |
static void | TObject::operator delete(void* ptr, void* vp) |
static void | TObject::operator delete[](void* ptr) |
static void | TObject::operator delete[](void* ptr, void* vp) |
void* | TObject::operator new(size_t sz) |
void* | TObject::operator new(size_t sz, void* vp) |
void* | TObject::operator new[](size_t sz) |
void* | TObject::operator new[](size_t sz, void* vp) |
Bool_t | OtherEventsEnabled() const |
virtual void | TObject::Paint(Option_t* option = "") |
Bool_t | PhysicsEnabled() const |
virtual void | TObject::Pop() |
virtual void | Print(Option_t* opt = "") const |
virtual Int_t | Process(THaRunBase* run = 0) |
Int_t | Process(THaRunBase& run) |
virtual Int_t | TObject::Read(const char* name) |
virtual void | TObject::RecursiveRemove(TObject* obj) |
void | TObject::ResetBit(UInt_t f) |
virtual void | TObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU |
virtual void | TObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "") |
Bool_t | ScalersEnabled() const |
void | TObject::SetBit(UInt_t f) |
void | TObject::SetBit(UInt_t f, Bool_t set) |
void | SetCompressionLevel(Int_t level) |
virtual Int_t | SetCountMode(Int_t mode) |
void | SetCrateMapFileName(const char* name) |
void | SetCutFile(const char* name) |
virtual void | TObject::SetDrawOption(Option_t* option = "")MENU |
static void | TObject::SetDtorOnly(void* obj) |
void | SetEvent(THaEvent* event) |
void | SetMarkInterval(UInt_t interval) |
static void | TObject::SetObjectStat(Bool_t stat) |
void | SetOdefFile(const char* name) |
void | SetOutFile(const char* name) |
void | SetSummaryFile(const char* name) |
virtual void | TObject::SetUniqueID(UInt_t uid) |
void | SetVerbosity(Int_t level) |
virtual void | ShowMembers(TMemberInspector& insp, char* parent) |
Bool_t | SlowControlEnabled() const |
virtual void | Streamer(TBuffer& b) |
void | StreamerNVirtual(TBuffer& b) |
virtual void | TObject::SysError(const char* method, const char* msgfmt) const |
Bool_t | TObject::TestBit(UInt_t f) const |
Int_t | TObject::TestBits(UInt_t f) const |
virtual void | TObject::UseCurrentStyle() |
virtual void | TObject::Warning(const char* method, const char* msgfmt) const |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const |
virtual Int_t | BeginAnalysis() |
void | ClearCounters() |
THaAnalyzer::Counter_t* | DefineCounter(const THaAnalyzer::Counter_t* counter) |
THaAnalyzer::Stage_t* | DefineStage(const THaAnalyzer::Stage_t* stage) |
virtual void | TObject::DoError(int level, const char* location, const char* fmt, va_list va) const |
virtual Int_t | DoInit(THaRunBase* run) |
virtual Int_t | EndAnalysis() |
virtual bool | EvalStage(int n) |
UInt_t | GetCount(Int_t i) const |
UInt_t | Incr(Int_t i) |
virtual void | InitCounters() |
virtual void | InitCuts() |
virtual Int_t | InitModules(const TList* module_list, TDatime& time, Int_t erroff, const char* baseclass = 0) |
virtual Int_t | InitOutput(const TList* module_list, Int_t erroff, const char* baseclass = 0) |
virtual void | InitStages() |
virtual Int_t | MainAnalysis() |
void | TObject::MakeZombie() |
virtual Int_t | OtherAnalysis(Int_t code) |
virtual Int_t | PhysicsAnalysis(Int_t code) |
virtual Int_t | PostProcess(Int_t code) |
virtual void | PrintCounters() const |
virtual void | PrintCutSummary() const |
virtual void | PrintScalers() const |
virtual Int_t | ReadOneEvent() |
virtual Int_t | ScalerAnalysis(Int_t code) |
virtual Int_t | SlowControlAnalysis(Int_t code) |
THaAnalyzer(const THaAnalyzer&) | |
THaAnalyzer& | operator=(const THaAnalyzer&) |
enum ERetVal { | kOK | |
kSkip | ||
kTerminate | ||
kFatal | ||
}; | ||
enum { | kRawDecode | |
kDecode | ||
kCoarseTrack | ||
kCoarseRecon | ||
kTracking | ||
kReconstruct | ||
kPhysics | ||
kNevRead | ||
kNevGood | ||
kNevPhysics | ||
kNevScaler | ||
kNevEpics | ||
kNevOther | ||
kNevPostProcess | ||
kNevAnalyzed | ||
kNevAccepted | ||
kEvFileTrunc | ||
kCodaErr | ||
kRawDecodeTest | ||
kDecodeTest | ||
kCoarseTrackTest | ||
kCoarseReconTest | ||
kTrackTest | ||
kReconstructTest | ||
kPhysicsTest | ||
}; | ||
enum ECountMode { | kCountPhysics | |
kCountAll | ||
kCountRaw | ||
}; | ||
enum TObject::EStatusBits { | kCanDelete | |
kMustCleanup | ||
kObjInCanvas | ||
kIsReferenced | ||
kHasUUID | ||
kCannotPick | ||
kNoContextMenu | ||
kInvalidObject | ||
}; | ||
enum TObject::[unnamed] { | kIsOnHeap | |
kNotDeleted | ||
kZombie | ||
kBitMask | ||
kSingleKey | ||
kOverwrite | ||
kWriteDelete | ||
}; |
Bool_t | fAnalysisStarted | Process() run and output file open |
TList* | fApps | List of apparatuses |
THaBenchmark* | fBench | Counters for timing statistics |
Int_t | fCompress | Compression level for ROOT output file |
Int_t | fCountMode | Event counting mode (see ECountMode) |
THaAnalyzer::Counter_t* | fCounters | [fNCounters] Statistics counters |
TString | fCutFileName | Name of cut definition file to load |
Bool_t | fDoBench | Collect detailed timing statistics |
Bool_t | fDoHelicity | Enable helicity decoding |
Bool_t | fDoOtherEvents | Enable other event processing |
Bool_t | fDoPhysics | Enable physics event processing |
Bool_t | fDoScalers | Enable scaler processing |
Bool_t | fDoSlowControl | Enable slow control processing |
THaEvData* | fEvData | Instance of decoder used by us |
THaEvent* | fEvent | The event structure to be written to file. |
TFile* | fFile | The ROOT output file. |
Bool_t | fFirstPhysics | Status flag for physics analysis |
Bool_t | fIsInit | Init() called successfully |
TString | fLoadedCutFileName | Name of last loaded cut definition file |
Bool_t | fLocalEvent | fEvent allocated by this object |
UInt_t | fMarkInterval | Interval for printing event numbers |
Int_t | fNCounters | Number of counters |
Int_t | fNStages | Number of analysis stages |
UInt_t | fNev | Number of events read during most recent replay |
TString | fOdefFileName | Name of output definition file |
TString | fOutFileName | Name of output ROOT file. |
THaOutput* | fOutput | Flexible ROOT output (tree, histograms) |
Bool_t | fOverwrite | Overwrite existing output files |
TList* | fPhysics | List of physics modules |
TList* | fPostProcess | List of post-processing modules |
THaEvent* | fPrevEvent | Event structure from last Init() |
THaRunBase* | fRun | Pointer to current run |
TList* | fScalers | List of scaler groups |
THaAnalyzer::Stage_t* | fStages | [fNStages] Parameters for analysis stages |
TString | fSummaryFileName | Name of test/cut statistics output file |
Bool_t | fUpdateRun | Update run parameters during replay |
Int_t | fVerbose | Verbosity level |
static THaAnalyzer* | fgAnalyzer | Pointer to instance of this class |
static const char *const | kDefaultOdefFile | |
static const char *const | kMasterCutName |
Inheritance Chart: | ||||||||
|
Add 'module' to the list of post-processing modules. This can only be done if no analysis is in progress. If the Analyzer has been initialized, the module will be initialized immediately for the current run time.
Fill histogram block for analysis stage 'n', then evaluate cut block. Return 'false' if master cut is not true, 'true' otherwise. The result can be used to skip further processing of the current event. If event is skipped, increment associated statistics counter. Call InitCuts() before using! This is an internal function.
Define analysis stages. Called from Init(). Does nothing if called again. Derived classes can override this method to define their own stages or additional stages. This should be done with caution.
Allocate statistics counters. See notes for InitStages() for additional information.
Internal function that sets up structures to handle cuts more efficiently: - Find pointers to the THaNamedList lists that hold the cut blocks. - find pointer to each block's master cut
Initialize a list of THaAnalysisObjects for time 'run_time'. If 'baseclass' given, ensure that each object in the list inherits from 'baseclass'.
Internal function called by Init(). This is where the actual work is done.
Initialize a list of THaAnalysisObject's for output If 'baseclass' given, ensure that each object in the list inherits from 'baseclass'.
Set event counting mode. The default mode is kCountPhysics. If mode >= 0 and mode is one of kCountAll, kCountPhysics, or kCountRaw, then set the mode. If mode >= 0 but unknown, return -mode. If mode < 0, don't change the mode but return the current count mode. Changing the counting mode should only be necessary in special cases.
Set name of file from which to read the crate map. Unless already specified, the name will be automatically prefixed with "db_" and terminated with ".dat", so SetCrateMapFileName("mymap") will get the crate map from db_mymap.dat
Internal function called right before the start of the event loop for each run. Initializes subroutine-specific variables. Executes Begin() for all Apparatus and Physics modules.
Execute End() for all Apparatus and Physics modules. Internal function called right after event loop is finished for each run.
Analyze slow control (EPICS) data and write then to output. Ignores RawDecode results and requested event range, so EPICS data are always analyzed continuously from the beginning of the run.
--- Loop over all defined scalers and execute THaScaler::LoadData() Also, output scaler data to output file. NB: we ignore 'code' and fNev and always return kOK. In this way, scalers are always analyzed even if RawDecode tests fail and/or the event is before the first requested event number. This is necessary because LoadData() works incrementally and must see the entire stream of scaler data starting from the beginning of the run.
Analysis of other events (i.e. events that are not physics, scaler, or slow control events). This default version does nothing. Returns 'code'.
Post-processing via generic PostProcess modules May be used for event filtering etc. 'code' (status of the preceding analysis) is passed to the THaPostProcess::Process() function for optional evaluation, e.g. skipping events that fail analysis stage cuts.
Process the given run. Loop over all events in the event range and analyze all apparatuses defined in the global apparatus list. Fill Event structure if it is defined. If Event and Filename are defined, then fill the output tree with Event and write the file.