Fri morning o Tuple - Tuple propsal: chaining, merging, filtered creation, TupleFolders - Binding of vars - projections with weights - projection (with weights) into Clouds *** WORK *** ITupleFactory : copy() -> createFilteredTuple () *** end WORK *** The user should be able to store (the logics of) a Tuple chain in a Tree. Low Prioriy. The user should be able to see with tree.ls() whether a tuple is a plain one or a chained/merged one. *** WORK *** ITupleFactory : merge - how to deal with same names in different tuples - what to do if different lengths - is there a clear use case ? Postponed until clear use case available from user, potentially an item for the contrib area. *** end WORK *** ITuple : How to "read" (project, next) only a subset of the tuple rows (e.g., to use only the part in cache). The user wants to access a given "row" (tuple.setRow(5);). *** WORK *** ITuple getTuple(int column); // to get access to a tuple-in-a-tuple Ok to have. *** end WORK *** IProjector class to decouple categories. To be defined and discussed later. Not clear if this should be done on the user level. *** WORK *** From yesterdays discussion: ITuple { project(IBaseHistogram, IEvaluator [] x, IFilter cut=0, IEvaluator w=1.) // No, not type safe. project(IHistogram1D, IEvaluator x) project(IHistogram1D, IEvaluator x, IFilter cut) project(IHistogram1D, IEvaluator x, IEvaluator w) project(IHistogram1D, IEvaluator x, IFilter cut, IEvaluator w) // similar overloaded instead of defaults for the following: project(IHistogram2D, IEvaluator x, IEvaluator y, IFilter cut=0,IEvaluator w=1.) project(IHistogram3D, IEvaluator x, IEvaluator y, IEvaluator z, IFilter cut=0,IEvaluator w=1.) project(ICloud1D, IEvaluator x, IFilter cut=0, IEvaluator w=1.) project(ICloud2D, IEvaluator x, IEvaluator y, IFilter cut=0,IEvaluator w=1.) project(ICloud3D, IEvaluator x, IEvaluator y, IEvaluator z, IFilter cut=0,IEvaluator w=1.) project(IProfileHistogram1D, IEvaluator x, IEvaluator y, IFilter cut=0,IEvaluator w=1.) project(IProfileHistogram2D, IEvaluator x, IEvaluator y, IEvaluator z, IFilter cut=0,IEvaluator w=1.) }; *** end WORK *** "Project" is a method on the ITuple to allow for efficient access to the Tuple internals. Evaluators and Filters can be created by the ITupleFactory, not passing the ITuple as argument -- the "binding" is done on the developer level. === end from yesterday Binding of user variables: Binding of user variables to colums of an tuple, such that after every next() the contents of the user vars is updated (and the actual content of the user vars is copied to the tuple at addRow(). Danger for the user is that he may erroneously bind a temporary variable or inside a dynamic class (which is destroyed at every event). Quantity eKin; ntuple.bind(eKin, "eKin"); h1.fill(eKin) This would be ok. track::track(tuple){ Quantity px, py, pz ; tuple.bind(px); }; In this case, the track needs to be created _before_ next() (to have the Quantities valid) Postponed. o ITreeIterator (java: extends Iterator; c++ : std::forward_iterator ??? ) - presently: Iterator ITree::ls() ==> ITreeIterator ITree::ls() use case: itr = tree.ls(); // C++ while ( itr != tree.end() ) { // hasNext() --> internal checks on devTree::end() cerr << *itr << endl; // should give: name type itr++; } // Java while ( itr.hasNext() ) { cerr << itr.next() << endl; // should give: name type itr++; } Use case: after creating a tree to a file, how do I see which directories exist ? tree.ls() should return a list of strings of all objects in the current directory, including the subdirectories. How do I tell from this string whether I have a Histogram, Tuple, subDir ??? *** WORK *** // one line per object: name, type, ??? void ITree::ls(string path=".", bool recursive=false, std::ostream &os = std::cout); (( java: void ITree::ls(PrintWriter p) void ITree::ls() )) string [] ITree::listObjectNames(string path=".", bool recursive=false); // dirs have "/" at end // no ".",".."; names are appended to path (except if path is ".") // for example: /a/h1 /h0 in / // tree.listObjectNames() : ["h0", "a/"] // tree.listObjectNames("/") : ["/h0", "/a/"] The python binding may add a method returning a list of pairs (for name, type). string [] ITree::listObjectTypes(string path=".", bool recursive=false); // Type is in analogy to the file-type of the file system, not as in introspection. // should return string of leaf class of the Interface, e.g., "IHistogram1D", "ITuple" // dirs are "dir" IManagedObject find(string path); // find(directory) returns 0 *** end WORK *** string IManagedObject::type();// should return string of leaf class of the Interface ... is now obsolete o Plotter - list of constraints Fri afternoon 14:15 England - Argentina 1:0 (at end of first half, and final score) *** WORK *** o IXYData / Vector of Points - see idatavec.h o "label" vs. "title" ==> title. (name stays) Guy is still not convinced, but agrees. title() and setTitle(string) are user convenience which will forward to the annotation *** end WORK *** o should "label/title" be only inside the annotation (key ??) should annotation::clear() erase the title ? (or other "special" keys) *** WORK *** o should "label/title" be a user convenience method to get it from annotation *** end WORK *** h.annotation().add("PlotStyle", "MCStyle") h.annotation().add("MCStyle", "") // define escape character, use key/value from plotter.setParameters h.annotation().add("IPlotter", "MonteCarlo") h.annotation().add("IPlotter.addLegend", "run " + h.annotation().get("run")) Can we add another item to the legend ???? Keys should be unique (for now). This is not the best way to do it, but at least it gives a hint on what we want. h.annotation().add("IPlotter:xaxis", GeV/c2") h.annotation().add("IPlotter", "yaxis mBarn") plotter.addStyle(string key, IStyle style) mcStyle(...) // specific for MCStyle pl.addStyle("MCStyle", mcStyle) pl.plot(h, mcStyle) o Discussion of remaining user wishes/user requirements As every other project, we are limited in resources. Our priorities are set to create a fully functional set of user interfaces together with working implementations. Volunteers to join and help are welcome. We also envision to work on interoperability of the implementations, which require the definition of developer interfaces. We believe this can be done without affecting the user-interfaces (and end-user code) and therefore consider this a (slightly) lower priority. - Define developer level interfaces to allow mixing of implementations. . See above. - Don't change the Interfaces with every release. . Not possible yet. Some IFs (like histograms) are already stable, others (like fitting) will be stable within one or two releases. After that it is foreseen to have changes in a backward compatible way for the IFs which are considered stable. - Histograms (have a pointer to their Factory to allow:) - used for projections and slicing (to be added) (forwarding to the factory) - increment (adding another IHistogram to *this) - adding other IHistogram and returning new - other arithmetic operations . UR: Projections, slicing, arithmetic operations between histograms should be part of the Histograms. . A: Objects created newly are mananged in AIDA. Therefore it is considered better to have these methods only on the corresponding factory. We think that users will get used to this pattern easily. However, if this assumption turns out to be wrong, we will revisit the case. - AIDA binding to Python Yes, will come later. Volunteers to do it now are very welcome. - Discriminate between Histograms (statistics) and Vectors of Points (and convert from IHist to VoP, not vice versa) VoP created. Conversion from histo to be discussed. - To create Objects without management, Factories can be created without management (Tree) . At the user level this is not foreseen as we think it complicates the issue for the user in terms of ownership of the objects. For the developer level interfaces we expect a complete decoupling of management from creation. - "Easier" for user to create Objects without explicit referencing to Factories. - Simplicity for users, while preserve flexibility on the implementation ("hbook(10,"foo",50,0,50) for users, IHistoFactory for developers) >>> Facade . Applications using AIDA can provide a Facade which will hide the Factories (and even management) at the expense of reduced flexibility. - HistogramFactory has a pointer to a "creational" Factory (which may also deal with the management (in an expt. specific way) - used for the histo-operational methods . This is considered as part of the developer interfaces. - Tree: (global) state (cwd) is bad. . More explicit use (and non-use) cases are needed. o two "levels" of developer interfaces: - setters et al - facility like storing o "small changes" -- part 2 - histo operations - histo scaling / normalizing : at given bin, integral, region, max, - histo Comparator (Kolmogorov) --> contrib and Cumulator (returnes cumulative distribution) --> needs developer interfaces *** WORK *** - IAxis::isFixedBinning() Yes. - IProfileHistogram1D --- to be done . booked like 1D, fill(x,y,w), binSpread(i) . booked like 2D, ymin/ymax limits filling range (outside entries are ignored), fill(x,y,w), binSpread(i) - IProfileHistogram2D . booked like 2D, fill(x,y,z,w), binSpread(i,j) . booked like 3D, zmin/zmax limits filling range (outside entries are ignored), fill(x,y,z,w), binSpread(i,j) *** end WORK *** - IEfficiencyHistogram1D, -2D, -3D - more general: provide user controlled error handling o Python binding - conversion from/to PyObjects - "simplified" interface (on top of IFs) POW: Fitting: Max T, Victor, Kuba, Lorenzo Vector of Points: Max S, Ioannis Histograms : Ioannis - Profile, label->title Plotting : Max S, Emmanuel - styles Tuple : Victor, Ioannis Tree/Store : Lorenzo, Ioannis py-script for conversion: ap - void|bool - const ITuple *& cvs restructure: Tony Webify minutes : Tony