Version 1 (modified by 12 years ago) ( diff ) | ,
---|
Here is a wish list for a common FastSim framework:
- (optional, lowest priority) ROOT independance (for example, using some classes from CLHEP and Boost.Python for factories, config. file, etc)
- (optional) config. file independence (specifying only in-memory representation and access methods)
- Module factory that creates modules instances at runtime by name
With ROOT it's just
gROOT->GetClass(moduleClassName)->New()
The simplest solution without ROOT would be
BaseModuleClass* moduleFactory(string const &name) { if(name == "Module1") { return new Module1; } else if(name == "Module2") { return new Module2; } return NULL; }
- Memory manager that minimizes the amount of memory allocations and
that creates/destroys/clears all data collections used by other services and modules.
It also clears all data collections produce by other services and modules between
events in the event loop.
(see ROOT
TClonesArray
,ExRootFactory
)
- Central configuration manager that stores all parameters for all modules and
that provides access by name to these parameters
(
getDouble(name, defaultValue)
,getDouble("JetFinder/MinPT", 10.0)
)
- Data manager that provides access by name to all data collections created by other services and modules
(see
fwlite::Handle<T>::getByLabel(event, label)
in CMSSW orTFolder
in ROOT)
https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookFWLiteEventLoop
http://cmssdt.cern.ch/SDT/doxygen/CMSSW_5_3_2/doc/html/d1/dd2/classfwlite_1_1Handle.html
http://root.cern.ch/download/doc/ROOTUsersGuideHTML/ch10.html
- Universal object that could represent all physics objects (particles, tracks,
calorimeter towers, jets) with possibility to add user defined information
(see FastJet
PseudoJet
&UserInfoBase
classes, CMS PATUserData
,ExRootCandidate
)
With ROOT, user defined information can be implemented quite easily
class ExRootCandidate { ... private: map< const TClass*, TObject* > fInfoMap }; //------------------------------------------------------------------------------ TObject *ExRootCandidate::GetInfo(const TClass *cl) { map<const TClass *, TObject *>::const_iterator it = fInfoMap.find(cl); return (it != fInfoMap.end() ? it->second : 0); } //------------------------------------------------------------------------------ void ExRootCandidate::SetInfo(TObject *info) { fInfoMap[info->IsA()] = info; }
https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuidePATUserData
http://fastjet.fr/repo/doxygen-3.0.2/classfastjet_1_1PseudoJet.html
http://fastjet.fr/repo/doxygen-3.0.2/classfastjet_1_1PseudoJet_1_1UserInfoBase.html
- Modules that consume and produce collections of universal objects