|
BrEventManagerclass description - source file - inheritance tree class BrEventManager : public TObjectprotected: Data Membersprivate: Class DescriptionBrEventManager This manager class will assits user module is retrieving general event information regardless if a module has access to the EventHeader. Sample code: The application can load the Manager and keep a global pointer accesible via a Brat common application file. It is in fact implemented via a Singleton mechanism. This enables us to use both the global mechanism as well as the instantons. Main application will have --------------------------- BrEventManager *gEventMgr = BrEventManager::Instance(); The application that reads the Event from DISK EVB etc should call the event method for the EventManager i.e. InputFile->Event(event); if(InputFile->Eof()){ cout << "End Of Data" << endl; break; } gEventMgr->Event(event); The user module should have (either in the Named Constructor or in the Init() method. ------------------------------------ BrCalibrationManager *gParamDb = BrCalibrationManager::Instance(); At the time of Event the user code could access information e.g. as such BrEventManager *gEventMgr = BrEventManager::Instance(); if(gEventMgr->IsEvent()){ .... } int evno = gEventMgr->Event(); if(gEventMgr->TriggerOn(6)){ // collisions event ... } See also the TestEventManager.cxx in the brat/test directory ____________________________________________________ Static instance of instanton. BrEventManager() BrEventManager* Instance() void Event(const BrEvent* event) // // Extract Event runnumber from current event // and store in local variable. // This allows multiple modules to ask for // current values. // Inline FunctionsBool_t IsSyncEvent() const Bool_t IsEvent() const Int_t RunNumber() const Int_t EventNumber() const Int_t EventType() const Int_t TriggerType() const Int_t TriggerWord1() const Int_t TriggerWord2() const Bool_t TriggerOn(Int_t trigno) const Int_t DebugLevel() const void SetDebugLevel(Int_t level) TClass* Class() TClass* IsA() const void ShowMembers(TMemberInspector& insp, char* parent) void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) BrEventManager BrEventManager(BrEventManager&) |
||||||
This page automatically generated by script docBrat by Christian Holm |
Copyright ; 2002 BRAHMS Collaboration
<brahmlib@rcf.rhic.bnl.gov>
|