Go to the source code of this file.
|
template<class T > |
bool | dumpHcalMatrixObject (std::ostream &fOutput, const T &fObject) |
|
template<class T > |
bool | dumpHcalObject (std::ostream &fOutput, const T &fObject) |
|
template<class T > |
bool | dumpHcalSingleFloatObject (std::ostream &fOutput, const T &fObject) |
|
template<class T > |
bool | dumpHcalSingleIntObject (std::ostream &fOutput, const T &fObject) |
|
template<class T > |
bool | from_string (T &t, const std::string &s, std::ios_base &(*f)(std::ios_base &)) |
|
template<class T , class S > |
bool | getHcalMatrixObject (std::istream &fInput, T *fObject, S *fCondObject) |
|
template<class T , class S > |
bool | getHcalObject (std::istream &fInput, T *fObject, S *fCondObject) |
|
template<class T , class S > |
bool | getHcalSingleFloatObject (std::istream &fInput, T *fObject, S *fCondObject) |
|
template<class T , class S > |
bool | getHcalSingleIntObject (std::istream &fInput, T *fObject, S *fCondObject) |
|
std::vector< std::string > | splitString (const std::string &fLine) |
|
std::vector< unsigned int > | splitStringToIntByComma (const std::string &fLine) |
|
template<class T >
bool dumpHcalMatrixObject |
( |
std::ostream & |
fOutput, |
|
|
const T & |
fObject |
|
) |
| |
Definition at line 280 of file HcalDbASCIIIO.cc.
References HcalDbASCIIIO::dumpId(), i, j, m, and python.multivaluedict::sort().
282 sprintf (buffer,
"# %5s %5s %5s %5s %5s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %10s\n",
283 "eta",
"phi",
"dep",
"det",
"capid",
"c0",
"c1",
"c2",
"c3",
"c4",
"c5",
"c6",
"c7",
"c8",
"c9",
"DetId");
285 std::vector<DetId> channels = fObject.getAllChannels ();
286 std::sort (channels.begin(), channels.end(), DetIdLess ());
287 for (std::vector<DetId>::iterator channel = channels.begin ();
288 channel != channels.end ();
291 for(
int m = 0;
m != 4;
m++){
292 for(
int i = 0;
i != 10;
i++){
293 for(
int j = 0;
j != 10;
j++){
295 thisline[
j] = fObject.getValues(*channel)->getValue(
m,
i,
j);
299 sprintf(buffer,
" %5i %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %10X\n",
300 m, thisline[0], thisline[1], thisline[2], thisline[3], thisline[4], thisline[5], thisline[6], thisline[7],
301 thisline[8], thisline[9], channel->rawId());
void dumpId(std::ostream &fOutput, DetId id)
template<class T >
bool dumpHcalObject |
( |
std::ostream & |
fOutput, |
|
|
const T & |
fObject |
|
) |
| |
Definition at line 145 of file HcalDbASCIIIO.cc.
References HcalDbASCIIIO::dumpId(), python.multivaluedict::sort(), and makeHLTPrescaleTable::values.
147 sprintf (buffer,
"# %15s %15s %15s %15s %8s %8s %8s %8s %10s\n",
"eta",
"phi",
"dep",
"det",
"cap0",
"cap1",
"cap2",
"cap3",
"DetId");
149 std::vector<DetId> channels = fObject.getAllChannels ();
150 std::sort (channels.begin(), channels.end(), DetIdLess ());
151 for (std::vector<DetId>::iterator channel = channels.begin ();
152 channel != channels.end ();
154 const float*
values = fObject.getValues (*channel)->getValues ();
157 sprintf (buffer,
" %8.5f %8.5f %8.5f %8.5f %10X\n",
158 values[0], values[1], values[2], values[3], channel->rawId ());
void dumpId(std::ostream &fOutput, DetId id)
template<class T >
bool dumpHcalSingleFloatObject |
( |
std::ostream & |
fOutput, |
|
|
const T & |
fObject |
|
) |
| |
Definition at line 192 of file HcalDbASCIIIO.cc.
References HcalDbASCIIIO::dumpId(), python.multivaluedict::sort(), and relativeConstraints::value.
194 sprintf (buffer,
"# %15s %15s %15s %15s %8s %10s\n",
"eta",
"phi",
"dep",
"det",
"value",
"DetId");
196 std::vector<DetId> channels = fObject.getAllChannels ();
197 std::sort (channels.begin(), channels.end(), DetIdLess ());
198 for (std::vector<DetId>::iterator channel = channels.begin ();
199 channel != channels.end ();
201 const float value = fObject.getValues (*channel)->getValue ();
203 sprintf (buffer,
" %8.5f %10X\n",
204 value, channel->rawId ());
void dumpId(std::ostream &fOutput, DetId id)
template<class T >
bool dumpHcalSingleIntObject |
( |
std::ostream & |
fOutput, |
|
|
const T & |
fObject |
|
) |
| |
Definition at line 237 of file HcalDbASCIIIO.cc.
References HcalDbASCIIIO::dumpId(), python.multivaluedict::sort(), and relativeConstraints::value.
239 sprintf (buffer,
"# %15s %15s %15s %15s %8s %10s\n",
"eta",
"phi",
"dep",
"det",
"value",
"DetId");
241 std::vector<DetId> channels = fObject.getAllChannels ();
242 std::sort (channels.begin(), channels.end(), DetIdLess ());
243 for (std::vector<DetId>::iterator channel = channels.begin ();
244 channel != channels.end ();
246 const int value = fObject.getValues (*channel)->getValue ();
248 sprintf (buffer,
" %15d %10X\n",
249 value, channel->rawId ());
void dumpId(std::ostream &fOutput, DetId id)
template<class T >
bool HcalDbOmds::from_string |
( |
T & |
t, |
|
|
const std::string & |
s, |
|
|
std::ios_base &(*)(std::ios_base &) |
f |
|
) |
| |
template<class T , class S >
bool getHcalMatrixObject |
( |
std::istream & |
fInput, |
|
|
T * |
fObject, |
|
|
S * |
fCondObject |
|
) |
| |
Definition at line 256 of file HcalDbASCIIIO.cc.
References HcalDbASCIIIO::getId(), i, j, DetId::rawId(), and splitString().
257 if (!fObject) fObject =
new T;
259 while (fInput.getline(buffer, 1024)) {
260 if (buffer [0] ==
'#')
continue;
261 std::vector <std::string> items =
splitString (std::string (buffer));
262 if (items.size()==0)
continue;
264 fCondObject =
new S(firstid.
rawId());
265 for(
int j = 0;
j != 10;
j++) fCondObject->setValue(atoi(items[4].c_str()), 0,
j, atof(items[
j+5].c_str()));
266 for(
int i = 1;
i != 40;
i++){
267 fInput.getline(buffer, 1024);
270 if(
id.rawId() != firstid.
rawId())
break;
271 for(
int j = 0;
j != 10;
j++) fCondObject->setValue(atoi(items[4].c_str()),
i%10,
j, atof(items[
j+5].c_str()));
273 fObject->addValues(*fCondObject);
std::vector< std::string > splitString(const std::string &fLine)
uint32_t rawId() const
get the raw id
DetId getId(const std::vector< std::string > &items)
template<class T , class S >
bool getHcalObject |
( |
std::istream & |
fInput, |
|
|
T * |
fObject, |
|
|
S * |
fCondObject |
|
) |
| |
Definition at line 117 of file HcalDbASCIIIO.cc.
References HcalDbASCIIIO::getId(), and splitString().
118 if (!fObject) fObject =
new T;
120 while (fInput.getline(buffer, 1024)) {
121 if (buffer [0] ==
'#')
continue;
122 std::vector <std::string> items =
splitString (std::string (buffer));
123 if (items.size()==0)
continue;
124 if (items.size () < 8) {
125 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 8 items: eta, phi, depth, subdet, 4x values" << std::endl;
134 fCondObject =
new S(
id, atof (items [4].c_str()), atof (items [5].c_str()),
135 atof (items [6].c_str()), atof (items [7].c_str()));
136 fObject->addValues(*fCondObject);
std::vector< std::string > splitString(const std::string &fLine)
DetId getId(const std::vector< std::string > &items)
template<class T , class S >
bool getHcalSingleFloatObject |
( |
std::istream & |
fInput, |
|
|
T * |
fObject, |
|
|
S * |
fCondObject |
|
) |
| |
Definition at line 166 of file HcalDbASCIIIO.cc.
References HcalDbASCIIIO::getId(), and splitString().
167 if (!fObject) fObject =
new T;
169 while (fInput.getline(buffer, 1024)) {
170 if (buffer [0] ==
'#')
continue;
171 std::vector <std::string> items =
splitString (std::string (buffer));
172 if (items.size()==0)
continue;
173 if (items.size () < 5) {
174 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 5 items: eta, phi, depth, subdet, value" << std::endl;
183 fCondObject =
new S(
id, atof (items [4].c_str()) );
184 fObject->addValues(*fCondObject);
std::vector< std::string > splitString(const std::string &fLine)
DetId getId(const std::vector< std::string > &items)
template<class T , class S >
bool getHcalSingleIntObject |
( |
std::istream & |
fInput, |
|
|
T * |
fObject, |
|
|
S * |
fCondObject |
|
) |
| |
Definition at line 211 of file HcalDbASCIIIO.cc.
References HcalDbASCIIIO::getId(), and splitString().
212 if (!fObject) fObject =
new T;
214 while (fInput.getline(buffer, 1024)) {
215 if (buffer [0] ==
'#')
continue;
216 std::vector <std::string> items =
splitString (std::string (buffer));
217 if (items.size()==0)
continue;
218 if (items.size () < 5) {
219 edm::LogWarning(
"Format Error") <<
"Bad line: " << buffer <<
"\n line must contain 5 items: eta, phi, depth, subdet, value" << std::endl;
228 fCondObject =
new S(
id, atoi (items [4].c_str()) );
229 fObject->addValues(*fCondObject);
std::vector< std::string > splitString(const std::string &fLine)
DetId getId(const std::vector< std::string > &items)
std::vector<std::string> splitString |
( |
const std::string & |
fLine | ) |
|
Definition at line 55 of file HcalDbASCIIIO.cc.
References relativeConstraints::empty, i, and query::result.
Referenced by EgHLTOfflineClient::createLooseTightTrigEff(), getHcalMatrixObject(), getHcalObject(), getHcalSingleFloatObject(), getHcalSingleIntObject(), HcalQIEManager::getHfQieTable(), HcalQIEManager::getQIETableFromFile(), egHLT::MonElemFuncs::initTightLooseDiObjTrigHistsTrigCuts(), egHLT::MonElemFuncs::initTightLooseTrigHists(), and egHLT::MonElemFuncs::initTightLooseTrigHistsTrigCuts().
56 std::vector <std::string>
result;
59 for (
unsigned i = 0;
i <= fLine.size ();
i++) {
60 if (fLine [
i] ==
' ' ||
i == fLine.size ()) {
62 std::string item (fLine, start,
i-start);
63 result.push_back (item);
69 if (empty) empty =
false;
std::vector<unsigned int> splitStringToIntByComma |
( |
const std::string & |
fLine | ) |
|
Definition at line 75 of file HcalDbASCIIIO.cc.
References relativeConstraints::empty, i, and query::result.
76 std::vector <unsigned int>
result;
79 for (
unsigned i = 0;
i <= fLine.size ();
i++) {
80 if (fLine [
i] ==
',' ||
i == fLine.size ()) {
82 std::string itemString (fLine, start,
i-start);
83 result.push_back (atoi (itemString.c_str()) );
89 if (empty) empty =
false;