001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024 #ifndef STORABLEBANKS_CLSL_STORABLEBANK_HH
025 #include "StorableBanks/CLSL_StorableBank.hh"
026 #endif
027
028 #include "Trybos/TRY_Bank_Name.hh"
029 #include "Trybos/TRY_Bank_Number.hh"
030 #include "Trybos/TRY_Bank_Type.hh"
031
032 #include <iostream>
033 #include <iomanip>
034
035 #if defined (__GNUG__) && (__GNUC_MAJOR__ == 2) && (__GNUC_MINOR__ <= 95)
036 # define istringstream istrstream
037 # define ostringstream ostrstream
038 # include <strstream>
039 #else
040 # include <sstream>
041 #endif
042
043
044
045
046
047
048
049 CLSL_StorableBank::
050 CLSL_StorableBank(void):
051 StorableBank(form_bank_name(), 0, form_bank_type())
052 { }
053
054 CLSL_StorableBank::
055 CLSL_StorableBank(const CLSL_StorableBank& bank):
056 StorableBank(bank)
057 { }
058
059 CLSL_StorableBank&
060 CLSL_StorableBank::
061 operator = (const CLSL_StorableBank& bank)
062 { if (this != &bank)
063 { StorableBank::assign(bank) ;
064 }
065 return(*this) ;
066 }
067
068 CLSL_StorableBank::
069 CLSL_StorableBank(const TRY_Bank_Number& bank_number,
070 const size_t n_clusters):
071 StorableBank(form_bank_name(), bank_number, form_bank_type(n_clusters))
072 { }
073
074 CLSL_StorableBank::
075 CLSL_StorableBank(const TRY_Generic_Bank& my_bank):
076 StorableBank(my_bank)
077 {
078 }
079
080
081
082
083 CLSL_StorableBank::
084 ~CLSL_StorableBank(void)
085 { }
086
087
088
089
090 std::string
091 CLSL_StorableBank::
092 class_name(void) const
093 { return(CLSL_StorableBank::Class_Name()) ;
094 }
095
096 Version_t
097 CLSL_StorableBank::
098 class_version(void) const
099 { return(CLSL_StorableBank::Class_Version()) ;
100 }
101
102 TRY_Bank_Name
103 CLSL_StorableBank::
104 form_bank_name(void)
105 { return( TRY_Bank_Name("CLSL") ) ;
106 }
107
108 TRY_Bank_Type
109 CLSL_StorableBank::
110 form_bank_type(const size_t n_clusters)
111 { std::ostringstream typestream ;
112 typestream << "(2I4,16AS,1I4,4AS,2I4," << n_clusters << "I4)" ;
113 return( TRY_Bank_Type( typestream.str() ) ) ;
114 }
115
116
117
118
119 void
120 CLSL_StorableBank::
121 print(std::ostream& output) const
122 {
123 output << "Version = " << version_number() << "\n" ;
124 output << "Algorithm name = " << algorithm_name() << "\n" ;
125 output << "Algorithm version = " << algorithm_number() << "\n" ;
126 output << "Parameter bank name = " << parameter_bank_name() << "\n" ;
127 output << "parameter bank number = " << parameter_bank_number() << "\n" ;
128 output << "number of clusters = " << number_clusters() << "\n" ;
129 output << "JETS bank numbers = ";
130 for (int iJet=0; iJet<number_clusters(); iJet++) {
131 output << JETS_bank_number(iJet) << " ";
132 }
133 output << std::endl;
134 }
135
136
137
138
139
140
Send problems or questions to cdfcode@fnal.gov