In large part being inspired by a discussion with Peter yesterday I implemeted a simple utility manager (yes yet another one) that can assist in pulling out event information. see also the message from Peter. I enclose the class description from the source code. IThere is also a test macro that demonstrates the use of the feature. I see this as a tool to avoid duplication of extrating event information in user modules, which in fact may not even have access to the eventheader. new code base/.. /BrEventManager.h .cxx test/TestEventManager,cxx modified Linkdef files. ////////////////////////////////////////////////////////////////// // // BrEventManager // // 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 / 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. // ------------------------------------ // BrParameterElementManager *gParamDb = // BrParameterElementManager::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
This archive was generated by hypermail 2b29 : Wed Jul 19 2000 - 18:47:12 EDT