ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/CMSSW/Alignment/CommonAlignmentAlgorithm/interface/AlignmentParameterBuilder.h
Revision: 1.4
Committed: Fri Nov 3 16:28:54 2006 UTC (18 years, 6 months ago) by flucke
Content type: text/plain
Branch: MAIN
Changes since 1.3: +13 -36 lines
Log Message:
- moving selection of Alignable into new class AlignableSelector
- changing level of messages: wrong config always gives an exception,
  info instead of warning if it is just information...
- little clean up

File Contents

# User Rev Content
1 fronga 1.1 #ifndef Alignment_CommonAlignmentAlgorithm_AlignmentParameterBuilder_h
2     #define Alignment_CommonAlignmentAlgorithm_AlignmentParameterBuilder_h
3    
4     #include <string>
5     #include <vector>
6    
7 flucke 1.3 /** \class AlignmentParameterBuilder
8     *
9     * Build Alignment Parameter Structure
10     *
11 flucke 1.4 * $Date: 2006/10/20 13:24:55 $
12     * $Revision: 1.3 $
13 flucke 1.3 * (last update by $Author: flucke $)
14     */
15    
16 flucke 1.4 namespace edm {
17     class ParameterSet;
18     }
19     class Alignabletracker;
20 fronga 1.1
21     class AlignmentParameterBuilder
22     {
23     public:
24    
25     /// Constructor
26 flucke 1.4 explicit AlignmentParameterBuilder(AlignableTracker *alignableTracker);
27     /// Constructor adding selection using int addSelections(const edm::ParameterSet &pSet)
28     AlignmentParameterBuilder(AlignableTracker *alignableTracker, const edm::ParameterSet &pSet);
29 fronga 1.1
30     /// destructor
31 flucke 1.4 virtual ~AlignmentParameterBuilder() {};
32 fronga 1.1
33 flucke 1.3 /// Add several selections defined by the PSet which must contain a vstring like e.g.
34     /// vstring alignableParamSelector = { "PixelHalfBarrelLadders,111000,pixelSelection",
35     /// "BarrelDSRods,111000",
36     /// "BarrelSSRods,101000"}
37     /// The '11100' part defines which d.o.f. to be aligned (x,y,z,alpha,beta,gamma)
38     /// returns number of added selections or -1 if problems (then also an error is logged)
39     /// If a string contains a third, comma separated part (e.g. ',pixelSelection'),
40     /// a further PSet of that name is expected to select eta/z/phi/r-ranges
41 flucke 1.4 unsigned int addSelections(const edm::ParameterSet &pset);
42 fronga 1.1
43     /// Add arbitrary selection of Alignables
44 flucke 1.2 void add (const std::vector<Alignable*>& alignables, const std::vector<bool> &sel);
45 fronga 1.1
46     /// Get list of alignables for which AlignmentParameters are built
47 flucke 1.2 std::vector<Alignable*> alignables() { return theAlignables; };
48 fronga 1.1
49     /// Remove n Alignables from list
50     void fixAlignables( int n );
51    
52 flucke 1.3 /// Decoding string to select local rigid body parameters into vector<bool>,
53     /// "101001" will mean x,z,gamma, but not y,alpha,beta
54 flucke 1.4 /// cms::Exception if problems while decoding (e.g. length of sring)
55 flucke 1.3 std::vector<bool> decodeParamSel(const std::string &selString) const;
56 flucke 1.4 /// Decomposing input string 's' into parts separated by 'delimiter'
57 flucke 1.3 std::vector<std::string> decompose(const std::string &s, std::string::value_type delimiter) const;
58 fronga 1.1 private:
59    
60     // data members
61    
62     /// Vector of alignables
63     std::vector<Alignable*> theAlignables;
64    
65     /// Alignable tracker
66     AlignableTracker* theAlignableTracker;
67    
68     };
69    
70     #endif