Version 14 (modified by 12 years ago) ( diff ) | ,
---|
Here is a wishlist for a common FastSim framework:
(points 3-8 has been found to be indispensable to implement prototype of the modular Delphes library)
- (optional, lowest priority) ROOT Independence (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 run-time by name
With ROOT it's just
gROOT->GetClass(moduleClassName)->New()
Poco has DynamicFactory class
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 (see ROOT
TClonesArray
,ExRootFactory
, Boost Pool). It also clears all data collections produced by other services and modules between events in the event loop.
http://www.boost.org/doc/libs/1_49_0/libs/pool/doc/html/index.html
- 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)
). It also should provide access to hierarchical structures with variable dimensions for each entry (like for examplemap< double, set< double > >
)CaloBins ( ( ( etaEdge1 etaEdge2 ) ( phiEdge1 phiEdge2 phiEdge3 ) ) ( etaEdge3 ( phiEdge4 phiEdge5 phiEdge6 phiEdge7 phiEdge8 ) ) )
- 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 (see ROOT
TTask
&TFolder
)
http://root.cern.ch/download/doc/ROOTUsersGuideHTML/ch10.html