Revision: | 1.3 |
Committed: | Tue Dec 12 08:55:45 2006 UTC (18 years, 4 months ago) by flucke |
Content type: | text/plain |
Branch: | MAIN |
CVS Tags: | CMSSW_1_6_12, CMSSW_1_6_12_pre2, CMSSW_1_6_12_pre1, CMSSW_1_6_11, CMSSW_1_7_7, CMSSW_1_6_11_pre1, CMSSW_1_7_6, CMSSW_1_6_10, CMSSW_1_6_10_pre2, CMSSW_1_6_10_pre1, CMSSW_1_6_9, CMSSW_1_6_9_pre2, CMSSW_1_6_9_pre1, CMSSW_1_7_5, CMSSW_1_7_4, CMSSW_1_7_3, CMSSW_1_6_8, CMSSW_1_6_8_pre2, CMSSW_1_7_2, CMSSW_1_6_8_pre1, CMSSW_1_7_1, CMSSW_1_7_0, CMSSW_1_7_0_pre13, CMSSW_1_4_10, CMSSW_1_7_0_pre12, CMSSW_1_7_0_pre11, CMSSW_1_7_0_pre10, CMSSW_1_7_0_pre9, CMSSW_1_7_0_pre8, CMSSW_1_7_0_pre7, CMSSW_1_4_9, CMSSW_1_4_8, CMSSW_1_6_7, CMSSW_1_7_0_pre6, CMSSW_1_6_6, CMSSW_1_6_5, CMSSW_1_6_5_pre1, CMSSW_1_6_4, CMSSW_1_7_0_pre5, CMSSW_1_6_3, CMSSW_1_6_1, CMSSW_1_7_0_pre4, V01-04-00-08, CMSSW_1_7_0_pre3, CMSSW_1_7_0_pre2, CMSSW_1_6_0, CMSSW_1_6_0_pre14, CMSSW_1_7_0_pre1, CMSSW_1_6_0_DAQ3, CMSSW_1_6_0_pre13, CMSSW_1_6_0_pre12, CMSSW_1_6_0_pre11, CMSSW_1_6_0_pre10, CMSSW_1_4_7, CMSSW_1_6_0_pre9, CMSSW_1_6_0_pre8, CMSSW_1_5_4, CMSSW_1_6_0_pre7, CMSSW_1_5_3, CMSSW_1_6_0_pre6, CMSSW_1_4_6, CMSSW_1_3_6, CMSSW_1_6_0_DAQ1, CMSSW_1_6_0_pre5, V01-04-00-07, V01-09-00, V01-04-00-06, CMSSW_1_6_0_pre4, CMSSW_1_3_1_HLT6, CMSSW_1_5_2, CMSSW_1_3_5, CMSSW_1_6_0_pre3, CMSSW_1_6_0_pre2, CMSSW_1_6_0_pre1, CMSSW_1_5_1, CMSSW_1_4_5, CMSSW_1_5_0, V01-08-01, V01-04-00-05, CMSSW_1_4_3g483, CMSSW_1_4_4, CMSSW_1_5_0_pre6, CMSSW_1_4_3, V01-04-00-03, V01-08-00, CMSSW_1_3_1_HLT5, CMSSW_1_5_0_pre5, CMSSW_1_4_2, CMSSW_1_3_1_HLT4, CMSSW_1_4_1, CMSSW_1_5_0_pre4, V01-07-04, CMSSW_1_3_1_HLT3, CMSSW_1_5_0_pre3, V01-07-03, V01-07-02, CMSSW_1_4_0_DAQ1, CMSSW_1_3_4, V01-06-01, CMSSW_1_3_3, V01-07-01, V01-04-00-02, CMSSW_1_4_0, CMSSW_1_5_0_pre2, CMSSW_1_3_2, CMSSW_1_4_0_pre7, CMSSW_1_4_0_pre6, CMSSW_1_4_0_pre5, V01-07-00, V01-04-00-01, CMSSW_1_5_0_pre1, CMSSW_1_4_0_pre4, V01-06-00, V01-05-00, V01-04-01, CMSSW_1_3_1, CMSSW_1_4_0_pre3, CMSSW_1_4_0_pre2, V01-04-00, CMSSW_1_3_0, CMSSW_1_3_0_pre7, V01-03-01, CMSSW_1_4_0_pre1, V01-03-00, CMSSW_1_3_0_pre6, cklae_20070314, V01-02-00, V01-01-04, CMSSW_1_3_0_pre5, CMSSW_1_3_0_pre4, V01-01-03, CMSSW_1_3_0_pre3, V01-01-02, CMSSW_1_3_0_SLC4_pre2, CMSSW_1_3_0_pre2, V01-01-01, V01-01-00, CMSSW_1_3_0_SLC4_pre1, CMSSW_1_3_0_pre1, V01-00-00, V00-08-01 |
Branch point for: | V01-04-00-04 |
Changes since 1.2: | +11 -20 lines |
Log Message: | remove misleading comments about ownership (and its unused infrastructure), add documentation |
# | User | Rev | Content |
---|---|---|---|
1 | flucke | 1.3 | /** |
2 | * \file AlignmentUserVariablesIO | ||
3 | * | ||
4 | * $Revision: 1.5 $ | ||
5 | * $Date: 2006/11/30 10:34:05 $ | ||
6 | * $Author: flucke $ (at least last update...) | ||
7 | */ | ||
8 | |||
9 | fpschill | 1.1 | #include "FWCore/MessageLogger/interface/MessageLogger.h" |
10 | |||
11 | // this class's header | ||
12 | #include "Alignment/CommonAlignmentAlgorithm/interface/AlignmentUserVariablesIO.h" | ||
13 | flucke | 1.3 | #include "Alignment/CommonAlignment/interface/Alignable.h" |
14 | #include "Alignment/CommonAlignment/interface/AlignmentParameters.h" | ||
15 | fpschill | 1.1 | |
16 | //----------------------------------------------------------------------------- | ||
17 | // write many user variables | ||
18 | |||
19 | int | ||
20 | AlignmentUserVariablesIO::write(const std::vector<Alignable*>& alivec, | ||
21 | bool validCheck) | ||
22 | { | ||
23 | int icount=0; | ||
24 | for(std::vector<Alignable*>::const_iterator it=alivec.begin(); | ||
25 | it!=alivec.end(); it++) { | ||
26 | if ((*it)->alignmentParameters()->isValid() || !(validCheck)) { | ||
27 | icount++; | ||
28 | int iret=writeOne(*it); | ||
29 | if (iret!=0) return iret; | ||
30 | } | ||
31 | } | ||
32 | flucke | 1.2 | edm::LogInfo("Alignment") << "@SUB=AlignmentUserVariablesIO::write" |
33 | << "Write variables all,written: " << alivec.size() <<","<< icount; | ||
34 | fpschill | 1.1 | return 0; |
35 | } | ||
36 | |||
37 | //----------------------------------------------------------------------------- | ||
38 | // read many user variables | ||
39 | |||
40 | std::vector<AlignmentUserVariables*> | ||
41 | AlignmentUserVariablesIO::read(const std::vector<Alignable*>& alivec, int& ierr) | ||
42 | { | ||
43 | std::vector<AlignmentUserVariables*> retvec; | ||
44 | ierr=0; | ||
45 | int ierr2; | ||
46 | int icount=0; | ||
47 | int icount2=0; | ||
48 | for(std::vector<Alignable*>::const_iterator it=alivec.begin(); | ||
49 | it!=alivec.end(); it++) { | ||
50 | flucke | 1.3 | AlignmentUserVariables* ad=readOne(*it, ierr2); // should create with new! |
51 | fpschill | 1.1 | if (ierr2==0) { |
52 | retvec.push_back(ad); icount++; | ||
53 | if (ad!=0) icount2++; | ||
54 | } | ||
55 | } | ||
56 | flucke | 1.2 | edm::LogInfo("Alignment") << "@SUB=AlignmentUserVariablesIO::read" |
57 | << "Read variables all,read,valid: " << alivec.size() <<"," | ||
58 | << icount <<","<< icount2; | ||
59 | fpschill | 1.1 | return retvec; |
60 | } |