From GlueXWiki
Jump to: navigation, search

JANA Home Page



This wiki page was used to track bugs and feature requests up until July, 2011 when it was switched to Mantis.

For the current list of bugs and feature requests, see here:


Future development

Here are some thoughts about what things should be put into JANA or how it's current design should be changed. I am starting this to hopefully be a list of things that can be done later since I don't have time to do them right now.

  1. Default Factory Choice: After using the framework a bit, it has become clear that it would be nice to be able to specify the "default" factory for a given data type once and have that used everywhere. The way it is now, if I want to use a tagged factory for a certain data type, I have to create a configuration parameter and have every place that accesses the factory use that configuration parameter. There should be a way to tell the framework to use a specific tag if the request uses an empty string (default) for the factory tag.[1]
  2. JException/jLog: Standardize exception and logging classes.[2]
  3. Replace HDCLASSDEF with virtual method in JObject.[3]
  4. JANA namespace: Place JANA inside a namespace. Let's see, what should we call it ..mmmm.....Oh yeah, "JANA"![4]
  5. Geometry info: Some code was written to help with getting geometry info, but it needs to be revisited and completed. As of right now, folks have started putting geometry info into special factories. The geometry info is really a different type of data than what the factory mechanism is designed to do. This also needs to be tied in to the hdds system. This may entail adding a generic object storage mechanism into JApplication such that an object pointer is stored along with a valid run-range and can be retrieved by any factory of any thread.(??)[5]
  6. Out-Of-Band Factory Data: One thing discussed some time ago is how to access data on macro-scale from a factory in addition to the micro-scale data obtained through the normal factory mechanism. The specific example was how to access residual energy in a calorimeter that does not appear in any of the clusters a factory produces. This can currently be achived via the factory pointer, but maybe there should be a more formal mechanism to access a single object that holds this type of data. (??)[6]
  7. const correctness: Methods should be reviewed so that if they do not change internal object data, they should be declared const methods.
  8. Vertex Object: Create an object to hold the event vertex. For now it can be set to the center of the target, but later we can use tracks to help pin it down. This vertex object should be used by all reconstruction code instead of hard coding the center of the target.[7]
  9. Warn/Crash on auto factory generation: Maybe code should, by default, crash when a user asks for objects that don't exist instead of auto-generating factories. A command line option can be used to bypass this behavior.[8]
  10. Calibration constants: The idea for now is to make an API that allows one to request a set of constants by name. The name can be a colon separated list specifying the system, subsystem, ... down to the actual item one wishes to get. This could be templated to allow one to pass in a reference to an STL vector that the values could be copied into. To start with, the "database" could be a directory structure mirroring the colon separated directories with the "item" being a simple ASCII file. This would be very quick to implement, trivial for others to use, and easy to extend to using a real network-based database later on.[9]
  11. Add an "associated objects" map to JObject and a templated extractor method. This could be used for e.g. holding the hits used on a track. The values would be stored in a map whose key was the JObject pointer and whose value was a "tag". The templated method could pull out objects of the appropriate type by finding the ones that successfully dynamically cast into the desired type and have the appropriate (optional) tag.[10]
  12. Remove jerror_t and replace with exception throwing for call backs. It is also used in event sources for result codes so that needs to be either rethought or retooled.[11]
  13. Move the functionality of toString() from the factories to the JObjects.[12]
  14. Plugin to automatically generate ROOT trees from JObjects based on info gathered from a factory's "toStrings()" method.[13]
  15. Add feature to allow one to specify a number of events to skip and then a number of events to read via the command line[14]
  16. Read in options from a configuration file.[15]
  17. Automatically dump event number when a thread is killed and launch a new thread to take it's place.[16]
  18. Fix bug where fini is called when there are no events and init is never called.[17]
  19. Exit with error if plugin is specified but not found.[18]
  20. GetFactory method of JEventLoop does not attempt a substitution of the command line specified default tag when an empty tag is supplied. This is different than the behavior of the Get method. The GetFactory method should be brought into alignment with the Get method. At the same time, another method should be provided that allows easy access to the un-tagged factory even when a default is given via the command line.[19]
  21. Provide better checking for duplicate settings of default values of configuration parameters. Warn user if different defaults are set.[20]
  22. Emit an error or warning when calibration constants are asked for using a map, implying named fields, but no named fields exist. Similarly for vectors.
  23. Provide some sort of generic counters in framework to allow maintaining statistics on things like which factories failed how often etc. (suggested by Elton)
  24. Add an optional FiniPlugin()" routine for plugins so they can de-register things cleanly before being detached.[21]
  25. Fix problem with return code being 255 when "cleanly" exiting rather than 0 (identified by Mark I.)[22]
  26. Add GetSingle method to JObject[23]
  27. Add GetUsingPath method to JEventLoop to allow one to specify a specific set of factory tags to use when satisfying the request. This will need to somehow temporarily remove objects from factories that already have them since the inputs will be different in some cases. It will also need to have another container to hold all of the objects made since the originals will need to be replaced so subsequent calls to Get() are properly handled.
  28. Add more monitoring capability including statistics for each thread. [24]
  29. Add more control capability including dynamically changing the number of threads.
  30. Create janactl plugin for monitoring/controlling running processes via cMsg.[25]
  31. Automatic runtime determination of the number of threads to use based on available cores/memory. Make this configurable via configuration parameter.[26]
  32. Add AddLog(string&) and AddLog(vector<string>&) methods to JObject so debugging info can be stored on an object-by-object basis. A Corresponding vector<string>& GetLog() method will also be needed.[27]
  33. Add ability to specify objects to write out to janaroot plugin.[28]
  34. Add methods to JGeometry to get list of all values that satisfy a given xpath.[29]
  35. Fix problem in JParameterManager where string values containing white space get parsed by stringstream so that only the first token is copied using SetDefaultParmeter if the parameter is already defined.[30]
  36. From Maurizio: would it be possible to give an option to JANA to log infos on screen only if asked to? And, to have those logs pre-fixed with something like " JANA >> " (notice the space at the beginning) to better identify them?[31]
  37. Add option to janadot to display differential of ticks either in addition to or in place of the integral so one can more easily see ticks used by single factory.[32]
  38. Add virtual methods to JEventProcessor that will get called at brun and erun (possibly init and fini?) for every thread. This would allow for some kind of resource allocation by thread that is a little more natural than doing it with if statements in evnt.
  39. Makefile.config is left for the last platform configuration was run on making it difficult to make new plugins on different platforms. BMS should be installed into prefix to allow 3rd parties to build using it.[33]
  40. There is an apparent bug in the number of events processed with -PEVENTS_TO_KEEP (it is one less than it should be).[34]
  41. JEventProcessor objects should be deleted in JApplication destructor.[35]
  42. Add option so GetParameter will throw an exception if a requested parameter does not exist.[36]
  43. Add optional 2nd parameter to AddAssociatedObject that allows one to specify that ownership of the object is passing to the object to which it is being associated. When the higher-level JObject is deleted, any associated objects it owns will then be deleted as well.[37]
  44. Add pointer back to factory that created it in JObject[38]
  45. If an infinite recursion is detected, an exception of type jerror_t is thrown with a value -987 (= INFINITE_RECURSION). This should be changed to throw a JException with an appropriate error message. Similarly for other cases where jerror_t is thrown.[39]
  46. Add declaration of extern jana::JApplication *japp to JApplication.h[40]
  47. JApplication::Quit() called prior to launching threads does not prevent threads from being created or running through events. [41]
  48. jcalibread does not honor the -t type argument shown in the usage statement[42]
  49. Passing flags like CXXFLAGS=xyz to configure script doesn't work. Only setting them as environment variables does (from Maurizio)[43]
  50. The -j8 option to make does not work (from Maurizio)[44]
  51. Fix compiler warnings when building janaroot (from Maurizio)[45]
  52. When a thread is cancelled and then restarted due to not having completed an event before timeout, the event should be discarded rather than left for the new thread to get stuck on as well! Also, it seems the "Thread 0 hasn't responded in X seconds" messages have "X" increasing by 1/2 second every time. (This from a log file sent by Jake Bennett on Dec. 9, 2010).[46]
  53. JFactorys and JEventLoops are deleted before JEventProcessor fini methods are called preventing them from having access to the factories and any accumulated data they may contain.[47]
  54. Messages from JANA should all have a command-line changeable option to turn them off. In particular, the "didn't sleep full 0.5 seconds" message. This is constantly being printed while running valgrind or a debugger since they are constantly signaling the program causing all threads to wake up.[48]
  55. Add a configuration parameter to allow auto activated factories to be specified through that mechanism[49]
  56. Program should quit with error if a configuration file is specified, but does not exist.[50]
  57. Make jana run with TestSpeed plugin "valgrind clean"[51]
  58. Add a THREAD_TIMEOUT_FIRST_EVENT config. param. to allow the first event's timeout to be set differently from other events since it often takes longer due to setting up (B-field reading). Note that this should really affect the first NTHREADS events since all will be waiting for the field maps etc. to be read in.
  59. Add a set of templated classes to extend things like map<string,double> used by JCalibration so when the user tries to access a key for which there is no entry using operator[], an exception is thrown instead of simply creating a new key with a value of 0.
  60. Fix what appears to be a deadlock that occurs when --factoryreport is specified. This happens at the end of event processing.
  61. Objects read from source don't have their factory pointer set so calls to JObject::GetTag seg fault. The factory pointer needs to be set, but it also needs to be initialized to NULL in the JObject constructor and checked that it is not NULL in GetTag (and anywhere else it is used internally).

  1. This change was committed to the JANA repository on July 12, 2007 (r271)
  2. A merge of 2 JException classes (JException and JException2) was made with revision 426 on Mar. 3, 2009 and appeared in version 0.5.2. JLog was removed and JStreamLog and JStreamLogBuffer were re-written to be thread compatible in revision 489 committed on Dec. 16, 2009. That change will appear in JANA version 0.6.0.
  3. This change was made in April 21(rev. 318), 2008. This was actually modified to use a macro called JOBJECT_PUBLIC instead which is defined in JObject.h (as opposed to JFactory.h for the HDCLASSDEF macro). It was decided after all that the simplest and most user friendly way to get the desired functionality was indeed via a macro.
  4. This change was made April 21, 2008 (rev. 318). The namespace chosen was actually "jana" (lower case) to be more consistent with what appears to be the norm.
  5. This change was made on April 4, 2008 (rev. 315). The JGeometry class was made into a base class that specified the API and the a class JGeometryXML was introduced as a subclass implementing it. The JGeometryXML allows one to request geometry info using xpath style queries.
  6. April 24, 2008. ... nay. I think this would unnecessarily overcomplicate the framework. This type of data really should be obtained through the factory pointer.
  7. This is being removed from the list 12-16-2009. It is really more implementation specific and so should not be part of the framework.
  8. This change was committed to the JANA repository on July 12, 2007 (r271)
  9. This change was committed to the JANA repository on July 10-12, 2007
  10. This was committed April 21, 2008 (rev. 318). It has not actually been tested yet, but all of the hooks are there.
  11. This is very unlikely to happen at this point since jerror_t is ingrained everywhere. To do this would require a major modification to JANA that would not be backwards compatible. (Dec. 17, 2009)
  12. This was committed April 21, 2008 (rev. 318).
  13. The initial version of this was committed on July 15, 2008(rev. 349) It was included in version 0.4.7
  14. Committed on July 18, 2008(rev. 352). Included in version 0.4.7
  15. Committed on July 17, 2008(rev. 351). Included in version 0.4.7
  16. Committed on August 28, 2008(rev. 359). Included in version 0.4.8
  17. Committed on March 3, 2009 (rev. 432)
  18. Committed on August 28, 2008(rev. 360). Included in version 0.4.8
  19. Committed on March 3, 2009 (rev. 428)
  20. Committed on March 4, 2009 (rev. 433)
  21. Committed on March 3, 2009 (rev. 429)
  22. Committed on March 3, 2009 (rev. 431)
  23. Committed Dec. 17, 2009 (rev. 492)
  24. Committed Dec. 18, 2009 (rev. 502). This includes ability to probe JApplication for the per-thread values of Nevents, Instantaneous rate, and Integrated rate. In addition, JEventLoops can be probed for the processing time of the last event.
  25. Rudimentary version included in jana 0.6.0
  26. Committed Dec. 17, 2009 (rev. 490)
  27. Committed Dec. 17, 2009 (rev. 491)
  28. Committed Dec. 18, 2009 (rev. 499)
  29. Committed Dec. 16, 2009 (rev. 488)
  30. Committed Dec. 17, 2009 (rev. 496)
  31. Committed Dec. 16, 2009 (rev. 489)
  32. This changed appeared in jana 0.6.1
  33. This changed appeared in jana 0.6.1
  34. This changed appeared in jana 0.6.1
  35. This is now an option when registering the processor. Stack allocated processors make this undesirable as a default behavior. This changed appeared in jana 0.6.1
  36. This changed appeared in jana 0.6.1
  37. This was dane using the AddAssociateObjectAutoDelete method instead of using an optional argument to make it more transparent. This changed appeared in jana 0.6.1
  38. This changed appeared in jana 0.6.1
  39. Committed on April 10, 2010 (rev. 598) for the specific case mentioned.
  40. Committed on Feb. 7, 2011 (rev. 715)
  41. Committed on Feb. 7, 2011 (rev. 716)
  42. Committed on Feb. 8, 2011 (rev. 724)
  43. Committed on Feb. 7, 2011 (rev. 717)
  44. Committed on Feb. 7, 2011 (rev. 714) Added .NOTPARALLEL: pseudo-target to Makefile.common to prevent makefiles at a certain level from being run in parallel. It still seems to run make in the individual program directories in parallel and then again in the plugin directories, but only after having built the JANA library. This appears to allow clean builds on the same machine that failed with -j so hopefully this is fixed.
  45. Committed on Feb. 8, 2011 (rev. 728)
  46. It looks like this problem may be related to the problem of hanging on certain events also reported by Kei Moriya. Best judgment at this time is that the symptom is caused by GlueX code rather than JANA. Especially considering that it is not possible for JANA to try re-analyzing an event in the way described.
  47. Committed on Feb. 8, 2011 (rev. 722)
  48. Committed on Feb. 7, 2011 (rev. 721)
  49. Committed on Feb. 7, 2011 (rev. 720)
  50. Committed on Feb. 7, 2011 (rev. 719)
  51. This was reduced to as close as seemed possible for release 0.6.3. There are a few messages coming from the guts of libdl, but they are beyond our control.